]> git.tdb.fi Git - libs/gl.git/commitdiff
Mask out the descriptor set part of bind point when creating layouts
authorMikko Rasa <tdb@tdb.fi>
Wed, 16 Mar 2022 11:20:59 +0000 (13:20 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 16 Mar 2022 11:20:59 +0000 (13:20 +0200)
source/backends/vulkan/program_backend.cpp

index 0c30b99e72ffad596614eec86a1eee69702cb336..2e9518108eca16e32ba9de5d9325343c1b469a05 100644 (file)
@@ -125,7 +125,7 @@ void VulkanProgram::finalize_uniforms()
                        {
                                bindings.emplace_back();
                                VkDescriptorSetLayoutBinding &binding = bindings.back();
-                               binding.binding = b.bind_point;
+                               binding.binding = b.bind_point&0xFFFFF;
                                binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
                                binding.descriptorCount = 1;
                                binding.stageFlags = VK_SHADER_STAGE_ALL;
@@ -137,7 +137,7 @@ void VulkanProgram::finalize_uniforms()
                        {
                                bindings.emplace_back();
                                VkDescriptorSetLayoutBinding &binding = bindings.back();
-                               binding.binding = u.binding;
+                               binding.binding = u.binding&0xFFFFF;
                                binding.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
                                binding.descriptorCount = 1;
                                binding.stageFlags = VK_SHADER_STAGE_ALL;