From 62c52fb59d9b24f1cf73254e61151d2bc69f3051 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 8 Apr 2024 18:22:07 +0300 Subject: [PATCH] anv: expose VK_MESA_image_alignment_control Our implementation is a no-op for the following reasons : - ISL always tries to go for the smallest tiling mode (see isl_surf_choose_tiling()) - In the few cases where we need to use Tile64 for compression workarounds, VK_MESA_image_alignment_control doesn't require use to disable compression - vkd3d-proton has the ability to disable compression using VK_EXT_image_compression_control, disabling Tile64 requirements and ensuring ISL can select a 4k tiling mode So vkd3d-proton should always be able to get a 4k tiling mode if it wants to. Signed-off-by: Lionel Landwerlin Reviewed-by: Rohan Garg Part-of: --- src/intel/vulkan/anv_device.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 28c918f8ba2..8ddc299f416 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -437,6 +437,7 @@ get_device_extensions(const struct anv_physical_device *device, .INTEL_shader_integer_functions2 = true, .EXT_multi_draw = true, .NV_compute_shader_derivatives = true, + .MESA_image_alignment_control = true, .VALVE_mutable_descriptor_type = true, }; } @@ -948,6 +949,9 @@ get_features(const struct anv_physical_device *pdevice, /* VK_EXT_legacy_dithering */ .legacyDithering = true, + + /* VK_MESA_image_alignment_control */ + .imageAlignmentControl = true, }; /* The new DOOM and Wolfenstein games require depthBounds without @@ -1890,6 +1894,12 @@ get_properties(const struct anv_physical_device *pdevice, } #endif /* DETECT_OS_ANDROID */ + + /* VK_MESA_image_alignment_control */ + { + /* We support 4k/64k tiling alignments on most platforms */ + props->supportedImageAlignmentMask = (1 << 12) | (1 << 16); + } } static VkResult MUST_CHECK