diff options
author | Samuel Pitoiset <[email protected]> | 2019-05-30 12:29:39 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-05-31 08:50:13 +0200 |
commit | 0e7b029d005852ca817f8c95d557ae2dfc3bd479 (patch) | |
tree | 5209d331d72287efb8328fbe1848c02e791dbd81 /src/amd | |
parent | f1cb3348f18a9b679925ee537091e52749e9f6da (diff) |
radv: use CmdPushConstants when restoring constants after meta operations
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_meta.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index ec4fc4a6d4b..721c7039830 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -143,13 +143,15 @@ radv_meta_restore(const struct radv_meta_saved_state *state, } if (state->flags & RADV_META_SAVE_CONSTANTS) { - memcpy(cmd_buffer->push_constants, state->push_constants, - MAX_PUSH_CONSTANTS_SIZE); - cmd_buffer->push_constant_stages |= VK_SHADER_STAGE_COMPUTE_BIT; + VkShaderStageFlags stages = VK_SHADER_STAGE_COMPUTE_BIT; - if (state->flags & RADV_META_SAVE_GRAPHICS_PIPELINE) { - cmd_buffer->push_constant_stages |= VK_SHADER_STAGE_ALL_GRAPHICS; - } + if (state->flags & RADV_META_SAVE_GRAPHICS_PIPELINE) + stages |= VK_SHADER_STAGE_ALL_GRAPHICS; + + radv_CmdPushConstants(radv_cmd_buffer_to_handle(cmd_buffer), + VK_NULL_HANDLE, stages, 0, + MAX_PUSH_CONSTANTS_SIZE, + state->push_constants); } if (state->flags & RADV_META_SAVE_PASS) { |