anv: 3D stencil surfaces have fewer layers for higher miplevels
Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28646>
This commit is contained in:
@@ -598,6 +598,10 @@ transition_stencil_buffer(struct anv_cmd_buffer *cmd_buffer,
|
||||
|
||||
uint32_t aux_layers =
|
||||
anv_image_aux_layers(image, VK_IMAGE_ASPECT_STENCIL_BIT, level);
|
||||
|
||||
if (base_layer >= aux_layers)
|
||||
break; /* We will only get fewer layers as level increases */
|
||||
|
||||
uint32_t level_layer_count =
|
||||
MIN2(layer_count, aux_layers - base_layer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user