summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre-Loup A. Griffais <[email protected]>2017-01-06 12:57:17 -0800
committerBas Nieuwenhuizen <[email protected]>2017-01-07 01:26:08 +0100
commitf6d3af2af6fd27c5d4e4ecfe369ca805b74fcc9c (patch)
tree5258ebdecec43550fe53214002bb8b7030eadd92 /src
parente6ae19944d977dc91bc45adff679337182c20683 (diff)
radv: fix depth transitions with layerCount = VK_REMAINING_ARRAY_LAYERS
Interpreting layerCount literally would try to create billions of image views in radv_process_depth_image_inplace(). Signed-off-by: Pierre-Loup A. Griffais <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_meta_decompress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c
index 490747511c3..53443e9eb88 100644
--- a/src/amd/vulkan/radv_meta_decompress.c
+++ b/src/amd/vulkan/radv_meta_decompress.c
@@ -382,7 +382,7 @@ static void radv_process_depth_image_inplace(struct radv_cmd_buffer *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 < radv_get_layerCount(image, subresourceRange); layer++) {
struct radv_image_view iview;
radv_image_view_init(&iview, cmd_buffer->device,