diff --git a/src/intel/vulkan/anv_image_view.c b/src/intel/vulkan/anv_image_view.c index a974d1c3dab..ee51bcb0d7e 100644 --- a/src/intel/vulkan/anv_image_view.c +++ b/src/intel/vulkan/anv_image_view.c @@ -58,12 +58,12 @@ 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); + /* Propagate the protection flag of the image to the view. */ + view_usage |= surface->isl.usage & ISL_SURF_USAGE_PROTECTED_BIT; + /* If this is a HiZ buffer we can sample from with a programmable clear * value (SKL+), define the clear value to the optimal constant. */ @@ -112,9 +112,6 @@ anv_image_fill_surface_state(struct anv_device *device, view_usage & ISL_SURF_USAGE_TEXTURE_BIT); state_inout->clear_address = clear_address; - if (image->vk.create_flags & VK_IMAGE_CREATE_PROTECTED_BIT) - view_usage |= ISL_SURF_USAGE_PROTECTED_BIT; - isl_surf_fill_state(&device->isl_dev, surface_state_map, .surf = isl_surf, .view = &view,