radv,aco: add a workaround for binding 2D views of a 3D image on GFX9

The hardware can't bind a slice of a 3D image as a 2D image, GFX10+
introduced ARRAY_PITCH to allow this without a shader workaround.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16294>
This commit is contained in:
Samuel Pitoiset
2022-05-03 10:39:59 +02:00
committed by Marge Bot
parent 05329d7f9a
commit 6d53922863
5 changed files with 32 additions and 0 deletions

View File

@@ -3061,6 +3061,9 @@ radv_generate_pipeline_key(const struct radv_pipeline *pipeline, VkPipelineCreat
key.disable_aniso_single_level = device->instance->disable_aniso_single_level &&
device->physical_device->rad_info.chip_class < GFX8;
key.image_2d_view_of_3d = device->image_2d_view_of_3d &&
device->physical_device->rad_info.chip_class == GFX9;
return key;
}