mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
anv: properly flag image/imageviews for ISL protection
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
(cherry picked from commit 8d9cc6aa23)
This commit is contained in:
parent
8d4ee91743
commit
c28b4470c5
2 changed files with 7 additions and 1 deletions
|
|
@ -814,7 +814,7 @@
|
|||
"description": "anv: properly flag image/imageviews for ISL protection",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -251,6 +251,9 @@ anv_image_choose_isl_surf_usage(struct anv_physical_device *device,
|
|||
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT))
|
||||
isl_usage |= ISL_SURF_USAGE_2D_3D_COMPATIBLE_BIT;
|
||||
|
||||
if (vk_create_flags & VK_IMAGE_CREATE_PROTECTED_BIT)
|
||||
isl_usage |= ISL_SURF_USAGE_PROTECTED_BIT;
|
||||
|
||||
/* Even if we're only using it for transfer operations, clears to depth and
|
||||
* stencil images happen as depth and stencil so they need the right ISL
|
||||
* usage bits or else things will fall apart.
|
||||
|
|
@ -3237,6 +3240,9 @@ anv_image_fill_surface_state(struct anv_device *device,
|
|||
struct isl_view view = *view_in;
|
||||
view.usage |= view_usage;
|
||||
|
||||
/* Propagate the protection flag of the image to the view. */
|
||||
view_usage |= surface->isl.usage & ISL_SURF_USAGE_PROTECTED_BIT;
|
||||
|
||||
if (view_usage == ISL_SURF_USAGE_RENDER_TARGET_BIT)
|
||||
view.swizzle = anv_swizzle_for_render(view.swizzle);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue