summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix validation error when using pipeline cache controlMatias N. Goldberg2023-09-163-1/+27
| | | | | | | | PR #80296 introduced a regression because it checks if the VK_EXT_pipeline_creation_cache_control extension has been enabled before using it, but turns out the process is a bit more convoluted than that (a Vulkan driver may support the extension but then say the feature is not supported)
* [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-67/+67
|
* Enhance Vulkan PSO cachingPedro J. Estébanez2023-08-303-77/+95
|
* Fix missing EARLY_FRAGMENT_TESTS_BIT barrier flagsMatias N. Goldberg2023-08-271-4/+9
|
* Fix Vulkan texture updatebitsawer2023-08-191-1/+1
|
* Abort on startup with a visible alert if required Vulkan features are missingHugo Locurcio2023-08-171-3/+20
|
* Merge pull request #80288 from pkpro/memcpy_into_nullptrRémi Verschelde2023-08-171-4/+7
|\ | | | | | | Vulkan: Fix sanitizers error with empty shader name
| * Vulkan: Fix sanitizers error with empty shader namePavel Kraynyukhov2023-08-091-4/+7
| | | | | | | | Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* | Merge pull request #80571 from darksylinc/matias-resize-window-fixRémi Verschelde2023-08-161-14/+22
|\ \ | | | | | | | | | Fix validation error when resizing window
| * | Fix validation error when resizing windowMatias N. Goldberg2023-08-151-14/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes when resizing the window we may get the following validation error: ERROR: VALIDATION - Message Id Number: -370888023 | Message Id Name: VUID-vkAcquireNextImageKHR-semaphore-01286 Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01286 ] Object 0: handle = 0xdcc8fd0000000012, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0xe9e4b2a9 | vkAcquireNextImageKHR: Semaphore must not be currently signaled or in a wait state. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must be unsignaled (https://vulkan.lunarg.com/doc/view/1.2.198.1/linux/1.2-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286) In VulkanContext::prepare_buffers the problem was that vkAcquireNextImageKHR returned VK_SUBOPTIMAL_KHR but it already signaled the semaphore (because it is possible to continue normally with a VK_SUBOPTIMAL_KHR result). Then we recreate the swapchain and reuse the w->image_acquired_semaphores[frame_index] which is in an inconsistent state. Fixed by recreating the semamphores along the swapchain. Fix #80570
* | Merge pull request #80424 from DarioSamo/rd-buffer-copy-vulkanRémi Verschelde2023-08-162-0/+59
|\ \ | | | | | | | | | Add `buffer_copy` method to RenderingDevice
| * | Add buffer_copy method to RenderingDevice interface and an implementation ↵Dario2023-08-122-0/+59
| |/ | | | | | | | | | | for the Vulkan driver. Direct buffer copies are required to perform certain operations more efficiently, as the only current alternative is to download the buffer to the CPU and upload it again. As the first use case, the new function is used when enabling motion vectors on multimeshes.
* / Add support for GLSL source-level debugging with RenderDoc ↵sakrel2023-08-121-0/+4
|/ | | | (`--generate-spirv-debug-info`)
* Initialize shader placeholders up frontclayjohn2023-08-031-29/+33
| | | | | Then use the placeholder to create the shader instead of swapping RIDs This fixes a false positive that reported leaked shaders
* Merge pull request #80071 from darksylinc/matias-fixes2Yuri Sizov2023-08-011-6/+19
|\ | | | | | | Fix validation layer warnings
| * Fix validation layer warningsMatias N. Goldberg2023-07-301-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Validation layers on Windows were complaining w/ VUID-VkSwapchainCreateInfoKHR-surface-01270 that we were not calling vkGetPhysicalDeviceSurfaceSupportKHR before vkCreateSwapchainKHR. 2. Godot was only calling vkGetPhysicalDeviceSurfaceSupportKHR at startup, but it should be doing this for every window w/ a new surface it wants to create, not just the first one. - In practice this will likely not make a difference. If vkGetPhysicalDeviceSurfaceSupportKHR returns false after initialization, there's nothing we can do about it and it is likely because something else went terribly wrong, which is why the error message is worded like that. - This is mostly to shut up validation layers. Though technically, the layers are right. 3. Do not call vkGetPhysicalDeviceSurfaceSupportKHR on queues we don't even plan on ever using. We don't know how drivers will react to that (e.g. they may preemptetively allocate resources to support presentation on exotic queues, instead of just saying no). Just behave like every other Vulkan app out there.
* | Merge pull request #79606 from clayjohn/ShaderRD-compilation-groupsYuri Sizov2023-08-012-4/+14
|\ \ | |/ |/| | | Shader rd compilation groups
| * Add Shader compile groups to RD Shader systemclayjohn2023-07-212-4/+14
| | | | | | | | | | | | | | | | This allows us to specify a subset of variants to compile at load time and conditionally other variants later. This works seamlessly with shader caching. Needed to ensure that users only pay the cost for variants they use
* | Fix uninitialized variable ending up sent to VulkanMatias N. Goldberg2023-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time a shader is compiled Godot performs the following: ```cpp for (uint32_t i = 0; i < SHADER_STAGE_MAX; i++) { if (spirv_data.push_constant_stages_mask.has_flag((ShaderStage)(1 << i))) { binary_data.push_constant_vk_stages_mask |= shader_stage_masks[i]; } } ``` However binary_data.push_constant_vk_stages_mask is never initialized to 0 and thus contains garbage data or'ed with the good data. This value is used by push constants (and many other things) thus it can be a big deal. Fortunately because the relevant flags are always guaranteed to be set (but not guaranteed to be unset), the damage is restricted to: 1. Performance (unnecessary flushing & over-excessive barriers) 2. Overwriting push descriptors already set (this would be serious, doesn't seem to be an issue) 3. Driver implementations going crazy when they see bits set they don't expect (unknown if this is an issue) This uninitialized value is later saved into the binary cache. Valgrind is able to detect this bug on the first run, but not on the subsequent ones because they data comes from a file. cache_file_version has been bumped to force rebuild of all cached shaders. Because the ones generated so far are compromised.
* | Add custom texture create functionBastiaan Olij2023-07-262-0/+24
| |
* | Fix dangling pointers in _clean_up_swap_chainFlorian Kothmeier2023-07-251-0/+2
| |
* | Fix Vulkan multithreaded compute list and GPU particle processingbitsawer2023-07-241-0/+2
| |
* | Add missing thread-safe method macros to RD Vulkan submit and syncMarc Gilleron2023-07-181-0/+12
|/
* Split raster barrier into vertex and fragment barrierBastiaan Olij2023-07-151-23/+66
|
* Merge pull request #79143 from clayjohn/wayland-menuRémi Verschelde2023-07-091-3/+5
|\ | | | | | | Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain
| * Avoid freeze when interacting with menus on Wayland by re-aquiring next ↵clayjohn2023-07-071-3/+5
| | | | | | | | swapchain image after updating swapchain
* | fix threading bug in vulkan rendering deviceJoe Marshall2023-06-281-0/+2
|/
* Fix for Win+M crashing the editorjpcerrone2023-06-141-0/+1
| | | | | | Fixes #77790 Adds missing 'break' statement to 'VulkanContext::prepare_buffers' function. It was mistakenly removed in #72859
* Expose RD::texture_native_handleBastiaan Olij2023-06-142-2/+2
|
* Merge pull request #76348 from warriormaster12/pipeline-cacheRémi Verschelde2023-06-012-2/+162
|\ | | | | | | Implement Vulkan pipeline caching
| * Implement Vulkan pipeline cachingwarriormaster122023-05-312-2/+162
| |
* | Merge pull request #77022 from sakrel/fix_buffer_get_dataRémi Verschelde2023-05-241-3/+3
|\ \ | | | | | | | | | RenderingDeviceVulkan::buffer_get_data: Use draw command buffer instead of setup command buffer
| * | RenderingDeviceVulkan::buffer_get_data: Use draw command buffer instead of ↵sakrel2023-05-121-3/+3
| | | | | | | | | | | | setup command buffer
* | | Merge pull request #75945 from Calinou/renderingdevice-finalaction-fix-typoRémi Verschelde2023-05-241-1/+1
|\ \ \ | |/ / |/| | | | | Fix typo in FinalAction `switch` statement in RenderingDevice
| * | Fix typo in FinalAction `switch` statement in RenderingDeviceHugo Locurcio2023-04-111-1/+1
| |/
* | fixed a query pool validation errorwarriormaster122023-05-111-0/+5
| |
* | Merge pull request #74711 from BastiaanOlij/add_texture_native_handleRémi Verschelde2023-05-092-0/+10
|\ \ | | | | | | | | | Provide access to internal graphics handles for textures
| * | For GDExternal use, provides access to internal graphics handles for texturesBastiaan Olij2023-05-092-0/+10
| | |
* | | Save cluster render shader from being optimized out entirelyPedro J. Estébanez2023-05-081-0/+3
|/ /
* | Merge pull request #75937 from RandomShaper/threaded_render_loadRémi Verschelde2023-05-081-20/+0
|\ \ | | | | | | | | | Allow creation of rendering buffers at any time
| * | Allow creation of rendering buffers at any timePedro J. Estébanez2023-04-111-20/+0
| |/
* | Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentationHugo Locurcio2023-05-061-14/+14
| | | | | | | | This brings the overall class reference completion percentage from 87% to 92%.
* | Fix unsupported sampler filter used for voxel GIPedro J. Estébanez2023-04-262-0/+13
| |
* | Fix issues with Vulkan layout transitionsPedro J. Estébanez2023-04-242-50/+54
|/
* Merge pull request #72859 from clayjohn/VK-suboptimalRémi Verschelde2023-04-031-2/+2
|\ | | | | | | Recreate swap chain when suboptimal to avoid error spam
| * Recreate swap chain when suboptimal to avoid error spamclayjohn2023-02-071-2/+2
| |
* | Remove (or make verbose only) various debug prints.bruvzg2023-03-201-1/+0
| |
* | Avoid overflow when calculating ptr address for 3D textures in ↵clayjohn2023-03-061-1/+1
| | | | | | | | RenderingDevice texture update
* | Fix use-after-free for VkAttachmentReference ChibiDenDen2023-02-201-0/+5
| | | | | | | | | | | | | | In the flow where VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME does not exist VkAttachmentReference are created inside a loop and their backing buffer is referenced in the subpass object. the VkAttachmentReference vectors are freed once the loop exists, causing the subpass to point to freed data. Add all the VkAttachmentReference to a vector in the scope of the entire function, to ensure they are not freed until vkCreateRenderPass is called
* | Make present mode info message print only on changeWiktor Kocielski2023-02-121-3/+4
| | | | | | | | Styling fix