diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-02-19 14:00:25 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-02-19 20:58:06 +0100 |
commit | 81b23796648afd1816e6367348ef682660eb630e (patch) | |
tree | c40c9dacc6bfa2d60dbc9d26cc836817a57a5a43 | |
parent | c8ef5123980f9f538c79e626b0092660a2256ae6 (diff) |
radv: Handle VK_REMAINING_ARRAY_LAYERS in fast clear eliminate.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_fast_clear.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c index 0902c455037..ffaa9a3d5e8 100644 --- a/src/amd/vulkan/radv_meta_fast_clear.c +++ b/src/amd/vulkan/radv_meta_fast_clear.c @@ -419,13 +419,13 @@ radv_fast_clear_flush_image_inplace(struct radv_cmd_buffer *cmd_buffer, struct radv_meta_saved_pass_state saved_pass_state; VkDevice device_h = radv_device_to_handle(cmd_buffer->device); VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer); + uint32_t layer_count = radv_get_layerCount(image, subresourceRange); assert(cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL); radv_meta_save_pass(&saved_pass_state, cmd_buffer); radv_meta_save_graphics_reset_vport_scissor(&saved_state, cmd_buffer); - for (uint32_t layer = 0; layer < subresourceRange->layerCount; - ++layer) { + for (uint32_t layer = 0; layer < layer_count; ++layer) { struct radv_image_view iview; radv_image_view_init(&iview, cmd_buffer->device, |