mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 17:18:30 +02:00
anv: Set TRANSFER_DST_BIT for HiZ operations
VK_IMAGE_USAGE_TRANSFER_DST_BIT is needed to recognize a surface as a
destination in get_blorp_surf_for_anv_image(). Set this image usage for
HiZ operations to correct the MOCS programming on gfx12.0.
Fixes: 08e82b28e8 ("anv: use the correct MOCS for depth destinations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42122>
This commit is contained in:
parent
56d7d5522c
commit
28aba5fba4
1 changed files with 8 additions and 5 deletions
|
|
@ -1953,7 +1953,7 @@ anv_fast_clear_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
|
|||
anv_image_aux_layers(image, VK_IMAGE_ASPECT_DEPTH_BIT, level));
|
||||
get_blorp_surf_for_anv_image(cmd_buffer,
|
||||
image, VK_IMAGE_ASPECT_DEPTH_BIT,
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
depth_layout, ISL_AUX_USAGE_NONE,
|
||||
ISL_FORMAT_UNSUPPORTED, false, &depth);
|
||||
}
|
||||
|
|
@ -1962,7 +1962,7 @@ anv_fast_clear_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
|
|||
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
get_blorp_surf_for_anv_image(cmd_buffer,
|
||||
image, VK_IMAGE_ASPECT_STENCIL_BIT,
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
stencil_layout, ISL_AUX_USAGE_NONE,
|
||||
ISL_FORMAT_UNSUPPORTED, false, &stencil);
|
||||
}
|
||||
|
|
@ -2672,7 +2672,8 @@ anv_image_clear_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
|
|||
if (aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
||||
get_blorp_surf_for_anv_image(cmd_buffer,
|
||||
image, VK_IMAGE_ASPECT_DEPTH_BIT,
|
||||
0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
depth_aux_usage, ISL_FORMAT_UNSUPPORTED,
|
||||
false, &depth);
|
||||
}
|
||||
|
|
@ -2683,7 +2684,8 @@ anv_image_clear_depth_stencil(struct anv_cmd_buffer *cmd_buffer,
|
|||
anv_image_aspect_to_plane(image, VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||
get_blorp_surf_for_anv_image(cmd_buffer,
|
||||
image, VK_IMAGE_ASPECT_STENCIL_BIT,
|
||||
0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
image->planes[plane].aux_usage,
|
||||
ISL_FORMAT_UNSUPPORTED, false, &stencil);
|
||||
}
|
||||
|
|
@ -2742,7 +2744,8 @@ anv_image_hiz_op(struct anv_cmd_buffer *cmd_buffer,
|
|||
struct blorp_surf surf;
|
||||
get_blorp_surf_for_anv_image(cmd_buffer,
|
||||
image, VK_IMAGE_ASPECT_DEPTH_BIT,
|
||||
0, ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT,
|
||||
ANV_IMAGE_LAYOUT_EXPLICIT_AUX,
|
||||
image->planes[plane].aux_usage,
|
||||
ISL_FORMAT_UNSUPPORTED, false, &surf);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue