Interpreting layerCount literally would try to create billions of image
views in radv_process_depth_image_inplace().
Signed-off-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
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,