diff --git a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h index e254bff73..53dfcf12d 100644 --- a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h +++ b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h @@ -812,8 +812,8 @@ void kinc_g5_command_list_set_compute_constant_buffer(kinc_g5_command_list_t *li lastComputeConstantBufferOffset = offset; VkDescriptorSet descriptor_set = get_compute_descriptor_set(); - uint32_t offsets[1] = {lastComputeConstantBufferOffset}; - vkCmdBindDescriptorSets(list->impl._buffer, VK_PIPELINE_BIND_POINT_COMPUTE, current_compute_shader->impl.pipeline_layout, 0, 1, &descriptor_set, 1, + uint32_t offsets[2] = {lastComputeConstantBufferOffset, lastComputeConstantBufferOffset}; + vkCmdBindDescriptorSets(list->impl._buffer, VK_PIPELINE_BIND_POINT_COMPUTE, current_compute_shader->impl.pipeline_layout, 0, 1, &descriptor_set, 2, offsets); } diff --git a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/compute.c.h b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/compute.c.h index ad79bc9cb..a86555de2 100644 --- a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/compute.c.h +++ b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/compute.c.h @@ -9,7 +9,6 @@ static void parse_shader(uint32_t *shader_source, int shader_length, kinc_intern static VkShaderModule create_shader_module(const void *code, size_t size); -static VkDescriptorSetLayout compute_descriptor_layout; static VkDescriptorPool compute_descriptor_pool; static void create_compute_descriptor_layout(void) { diff --git a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h index 9239e17cf..af402d62b 100644 --- a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h +++ b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h @@ -994,7 +994,7 @@ static VkDescriptorSet get_compute_descriptor_set() { alloc_info.pNext = NULL; alloc_info.descriptorPool = descriptor_pool; alloc_info.descriptorSetCount = 1; - alloc_info.pSetLayouts = &desc_layout; + alloc_info.pSetLayouts = &compute_descriptor_layout; VkDescriptorSet descriptor_set; VkResult err = vkAllocateDescriptorSets(vk_ctx.device, &alloc_info, &descriptor_set); assert(!err); diff --git a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vulkanunit.c b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vulkanunit.c index 9a0e06fdc..cead29272 100644 --- a/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vulkanunit.c +++ b/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vulkanunit.c @@ -72,6 +72,7 @@ static VkSemaphore framebuffer_available; static VkSemaphore relay_semaphore; static bool wait_for_relay = false; static void command_list_should_wait_for_framebuffer(void); +static VkDescriptorSetLayout compute_descriptor_layout; #include "ShaderHash.c.h" #include "Vulkan.c.h"