summaryrefslogtreecommitdiff
path: root/drivers/vulkan/rendering_device_vulkan.cpp
AgeCommit message (Collapse)Author
2021-07-26Merge pull request #50847 from reduz/implement-binary-shader-compilationRémi Verschelde
Implement Binary Shader Compilation
2021-07-26Implement Binary Shader Compilationreduz
* Added an extra stage before compiling shader, which is generating a binary blob. * On Vulkan, this allows caching the SPIRV reflection information, which is expensive to parse. * On other (future) RenderingDevices, it allows caching converted binary data, such as DXIL or MSL. This PR makes the shader cache include the reflection information, hence editor startup times are significantly improved. I tested this well and it appears to work, and I added a lot of consistency checks, but because it includes writing and reading binary information, rare bugs may pop up, so be aware. There was not much of a choice for storing the reflection information, given shaders can be a lot, take a lot of space and take time to parse.
2021-07-25Fix various typosluz paz
Follow-up typos found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-15Fixes to forward mobilereduz
* use valid format for framebuffer: VK_FORMAT_A2B10G10R10_UNORM_PACK32 * Unfortunately cant be used for compute. * Mobile will need to do refprobe, sky, mipmapblurring using raster.
2021-07-12Use specialization constants in clustered rendererreduz
* Keep track of when projector, softshadow or directional sofshadow were enabled. * Enable them via specializaton constant where it makes sense. * Re-implements soft shadows. * Re-implements light projectors.
2021-07-11Implement Specialization Constantsreduz
* Added support to our local copy of SpirV Reflect (which does not support it). * Pass them on render or compute pipeline creation. * Not implemented in our shaders yet.
2021-07-07Fix material invalidation on reimport.reduz
* IF a texture was reimported (calling replace as an example), it would invalidate all materials using it, causing plenty of errors. * Added the possibility to get a notification when a uniform set is erased. * With this notification, materials can be queued for update properly.
2021-07-07Fix threaded update for texturesreduz
* Previews and other stuff now works again. * Not the best solution, will have to be improved in the future usinc async queues where supported.
2021-07-03Fix Render Inforeduz
* Fixed and redone the process to obtain render information from a viewport * Some stats, such as material changes are too difficult to guess on Vulkan, were removed. * Separated visible and shadow stats, which causes confusion. * Texture, buffer and general video memory can be queried now. * Fixed the performance metrics too.
2021-06-28Fix Context Validation Layer Errorsreduz
* Multisampling was wrongly selected, possibly fixes #49937 * Image semaphore acquisition is now per window, possibly fixes #41614 Please make sure to test the above two issues again, since I can't reproduce either anyway.
2021-06-24Implement Framebuffer Subpass supportreduz
* Required for better optimizing mobile platforms * Will be used by the Vulkan mobile renderer.
2021-06-13Add stereoscopic rendering through multiviewBastiaan Olij
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-07Style: Cleanup uses of double spaces between wordsRémi Verschelde
Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
2021-05-06Cleanup vulkan capabilities check and add multiview checkBastiaan Olij
2021-05-03Tweak warning messages related to leaked RIDsHugo Locurcio
- Use hardcoded pluralization for messages. - Since these messages are English-only, it's fine to hardcode it. - Use double quotes for consistency with other messages.
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
2021-03-31Merge pull request #47283 from Panquesito7/fix_lgtm_alertsRémi Verschelde
fix: 3 LGTM alerts/warnings
2021-03-31fix: 3 LGTM alerts/warningsDavid Leal
2021-03-26Obtain supported Vulkan APIBastiaan Olij
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-02-05Fixes to get Godot running again on Intel IGPreduz
-Fixed strange bug with shadowed instance_param (this should not have worked anywhere, odd..) -Cleaned up barrier usage further.
2021-02-04Rewrote how barriers work for faster renderingreduz
-Added more finegrained control in RenderingDevice API -Optimized barriers (use less ones for thee same) -General optimizations -Shadows render all together unbarriered -GI can render together with shadows. -SDFGI can render together with depth-preoass. -General fixes -Added GPU detection
2021-01-26Reorganize RenderingDevice barriersreduz
-Removed sync to draw, now everything syncs to draw by default. -Fixed many validation layer errors. -Added support for VkImageViewUsageCreateInfo to fix validation layer warnings. -Texture, buffer, raster and compute functions now all allow spcifying which barriers will be used.
2021-01-25Add named resources and debug labels in RenderDocclayjohn
2021-01-24Shadow map rendering optimizationreduz
-All shadow rendering is done with raster now (no compute) -All shadow rendering is done by rendering directly to the shadow atlas -Improved how buffer clearing is done to optimize the above. -Ability to set shadows as 16 bits.
2021-01-19Added GPU based cluster builderreduz
Clustering is now GPU based, uses an implementation based on the Activision algorithm.
2021-01-08spirv-reflect: Update to upstream commit c0ce03a (Jan 6, 2021)Rémi Verschelde
2021-01-05Threaded optimizations to cull and renderreduz
-Reorganize thread work pool for rendering -Fixes to make secondary command buffers to work (disabled because they need more testing)
2021-01-04Merge pull request #44842 from clayjohn/VULKAN-SSAO-2Rémi Verschelde
SSAO renames and move push constant binding
2021-01-03SSAO cleanup and fixesclayjohn
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-21Port ASSAO to Godot to replace SAOclayjohn
2020-12-19Merge pull request #44521 from madmiraal/rename-rect2-clipRémi Verschelde
Rename Rect2 and Rect2i clip() to intersection()
2020-12-19Fix error spam on wrong attachmentreduz
-For now, disable reading from depth this was always broken, needs to be fixed later -Give better error showing binding and set when this happens.
2020-12-19Rename Rect2 and Rect2i clip() to intersection()Marcel Admiraal
2020-12-16Reimplement skeletons and blend shapesreduz
Uses compute shaders, which only once, on demand, and all in parallel.
2020-12-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
2020-12-04Rename RD texture "type" to "texture_type"Aaron Franke
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-04Rename RD uniform "type" to "uniform_type"Aaron Franke
"type" isn't very descriptive for exposed code, and this variable is exposed via RD_SETGET.
2020-12-02Refactored Mesh internals and formats.reduz
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES. -Removed compression, it now always uses the most efficient format. -Added support for custom arrays (up to 8 custom formats) -Added support for 8 weights in skeleton data. -Added a simple optional versioning system for imported assets, to reimport if binary is newer -Fixes #43979 (I needed to test) WARNING: -NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change. -NOT backwards compatible with 3.x scenes, this will be eventually re-added. -Skeletons not working any longer, will fix in next PR.
2020-11-23Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-29Synchronization - Clean subpass dependency initJohn Zulauf
Fix incorrect subpass dependency initialization
2020-10-28Implement CanvasGroup and CanvasItem clippingreduz
-Allows merging several 2D objects into a single draw operation -Use current node to clip children nodes -Further fixes to Vulkan barriers -Changed font texture generation to white, fixes dark eges when blurred -Other small misc fixes to backbuffer code.
2020-10-25Fix crash in RenderingDeviceVulkan::shader_creatersjtdrjgfuzkfg
This commit moves the declaration of a local variable to ensure its scope survives long enough; at least in some versions of GCC and LLVM the associated memory was freed too early and thus caused issues ranging from black screens to crashes.