diff options
author | Samuel Pitoiset <[email protected]> | 2017-10-03 11:08:03 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-10-06 09:49:05 +0200 |
commit | b269ed3d9493f6ab035a413207bc8d90f8a28605 (patch) | |
tree | 14b2834439defb1cf0d95bdedc1aa22b13ef92ce | |
parent | 507df359394a914040ebebe72901001f99c104df (diff) |
radv: select the pipeline outside of the loop when decompressing htile
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_decompress.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c index f4ed63f68be..83885f73f87 100644 --- a/src/amd/vulkan/radv_meta_decompress.c +++ b/src/amd/vulkan/radv_meta_decompress.c @@ -311,6 +311,7 @@ static void radv_process_depth_image_inplace(struct radv_cmd_buffer *cmd_buffer, uint32_t samples = image->info.samples; uint32_t samples_log2 = ffs(samples) - 1; struct radv_meta_state *meta_state = &cmd_buffer->device->meta_state; + VkPipeline pipeline_h; if (!image->surface.htile_size) return; @@ -318,6 +319,17 @@ static void radv_process_depth_image_inplace(struct radv_cmd_buffer *cmd_buffer, radv_meta_save_graphics_reset_vport_scissor_novertex(&saved_state, cmd_buffer); + switch (op) { + case DEPTH_DECOMPRESS: + pipeline_h = meta_state->depth_decomp[samples_log2].decompress_pipeline; + break; + case DEPTH_RESUMMARIZE: + pipeline_h = meta_state->depth_decomp[samples_log2].resummarize_pipeline; + break; + default: + unreachable("unknown operation"); + } + for (uint32_t layer = 0; layer < radv_get_layerCount(image, subresourceRange); layer++) { struct radv_image_view iview; @@ -372,18 +384,6 @@ static void radv_process_depth_image_inplace(struct radv_cmd_buffer *cmd_buffer, }, VK_SUBPASS_CONTENTS_INLINE); - VkPipeline pipeline_h; - switch (op) { - case DEPTH_DECOMPRESS: - pipeline_h = meta_state->depth_decomp[samples_log2].decompress_pipeline; - break; - case DEPTH_RESUMMARIZE: - pipeline_h = meta_state->depth_decomp[samples_log2].resummarize_pipeline; - break; - default: - unreachable("unknown operation"); - } - emit_depth_decomp(cmd_buffer, &(VkExtent2D){width, height}, pipeline_h); radv_CmdEndRenderPass(cmd_buffer_h); |