anv: set image_read_without_format NIR option on Vulkan 1.3

VK_KHR_format_feature_flags2 is core and implicitly enabled in 1.3.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17442>
This commit is contained in:
Constantine Shablya 2022-07-09 16:09:28 +03:00 committed by Marge Bot
parent 2861d1ff8a
commit 85c3cea96f
1 changed files with 5 additions and 4 deletions

View File

@ -54,6 +54,7 @@ anv_shader_stage_to_nir(struct anv_device *device,
void *mem_ctx)
{
const struct anv_physical_device *pdevice = device->physical;
const struct anv_instance *instance = pdevice->instance;
const struct brw_compiler *compiler = pdevice->compiler;
gl_shader_stage stage = vk_to_mesa_shader_stage(stage_info->stage);
const nir_shader_compiler_options *nir_options =
@ -76,11 +77,11 @@ anv_shader_stage_to_nir(struct anv_device *device,
.fragment_shader_sample_interlock = pdevice->info.ver >= 9,
.fragment_shader_pixel_interlock = pdevice->info.ver >= 9,
.geometry_streams = true,
/* When KHR_format_feature_flags2 is enabled, the read/write without
* format is per format, so just report true. It's up to the
* application to check.
/* When using Vulkan 1.3 or KHR_format_feature_flags2 is enabled, the
* read/write without format is per format, so just report true. It's
* up to the application to check.
*/
.image_read_without_format = device->vk.enabled_extensions.KHR_format_feature_flags2,
.image_read_without_format = instance->vk.app_info.api_version >= VK_API_VERSION_1_3 || device->vk.enabled_extensions.KHR_format_feature_flags2,
.image_write_without_format = true,
.int8 = pdevice->info.ver >= 8,
.int16 = pdevice->info.ver >= 8,