X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fprogram_backend.cpp;h=60e96698bd313242374911112359a01c117ba446;hp=61b5efaefd93f4b96fdef3892cf09fc9ff29468b;hb=27c06dbcd3af468933170e9f8c738b53b53e0277;hpb=a16145549dc87c3b12671f797bd77b14bcc7786b diff --git a/source/backends/vulkan/program_backend.cpp b/source/backends/vulkan/program_backend.cpp index 61b5efae..60e96698 100644 --- a/source/backends/vulkan/program_backend.cpp +++ b/source/backends/vulkan/program_backend.cpp @@ -19,6 +19,7 @@ VulkanProgram::VulkanProgram(): VulkanProgram::VulkanProgram(VulkanProgram &&other): device(other.device), n_stages(other.n_stages), + stage_flags(other.stage_flags), creation_info(move(other.creation_info)), desc_set_layout_handles(move(other.desc_set_layout_handles)), layout_handle(other.layout_handle) @@ -86,8 +87,11 @@ void VulkanProgram::add_spirv_stages(const SpirVModule &mod, const map(get_vulkan_stage(e.stage)); + stage_infos[i].stage = static_cast(stage_bit); stage_infos[i].module = handle_cast<::VkShaderModule>(mod.handle); strcpy(name_ptr, e.name.c_str()); stage_infos[i].pName = name_ptr; @@ -142,7 +146,7 @@ void VulkanProgram::finalize_uniforms() } VkPushConstantRange push_const_range = { }; - push_const_range.stageFlags = VK_SHADER_STAGE_ALL; + push_const_range.stageFlags = stage_flags; push_const_range.offset = 0; push_const_range.size = (push_const_block ? push_const_block->data_size : 0);