anv: Only consider R32 image formats as supporting atomics

Only consider R32 image formats as supporting atomics because we only
expose VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT for those formats.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
This commit is contained in:
Nanley Chery 2024-11-04 15:14:29 -05:00 committed by Marge Bot
parent 122c01a496
commit 428a970511
5 changed files with 61 additions and 120 deletions

View file

@ -590,63 +590,34 @@ glx@glx-multithread-shader-compile,Fail
glx@glx-pixmap-life,Fail
glx@glx-query-drawable-glxpbuffer-glx_height,Fail
glx@glx_ext_import_context@free context,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgb10_a2,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r16f,Fail
@ -657,80 +628,42 @@ KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba32i,Fail
KHR-GL46.shader_viewport_layer_array.ShaderViewportIndexTestCase,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgb10_a2,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_r16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r32ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rg8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba8,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgba16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg32f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_r16ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_r32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r8ui,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rg16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rg16_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_array_rgba16i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg32i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rg16f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_rgba8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_array_r8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment_texture_2d_multisample_rgb10_a2,Fail
#glcts update
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_src_y,Fail
@ -742,9 +675,6 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_revers
dEQP-GLES3.functional.fbo.multiview.samples_1,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_min_reverse_src_dst_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_min_reverse_src_y,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba8_snorm,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba8i,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_rgba8ui,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_min_reverse_dst_y,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_src_x,Fail
dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_mag_reverse_src_dst_y,Fail

View file

@ -138,3 +138,5 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers
spec@arb_timer_query@query gl_timestamp
spec@egl_chromium_sync_control@conformance
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_multisample_*

View file

@ -53,3 +53,16 @@ dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.stencil.bgra,Fail
# new failures with ANGLE 2024-10-17
KHR-GLES31.core.shader_image_load_store.basic-allTargets-loadStoreVS,Fail
# Validation layer failure:
# https://docs.vulkan.org/spec/latest/chapters/resources.html#VUID-VkImageViewCreateInfo-pNext-01585
# https://issues.angleproject.org/issues/382051956
KHR-GLES31.core.shader_image_load_store.advanced-cast-cs,Crash
KHR-GLES31.core.shader_image_load_store.advanced-cast-fs,Crash
dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_r32f,Crash
dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_r32i,Crash
dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_rgba8ui,Crash
dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8i,Crash
dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8ui,Crash
dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8_snorm,Crash
dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8ui,Crash

View file

@ -53,3 +53,16 @@ dEQP-GLES3.functional.fbo.completeness.renderable.renderbuffer.stencil.bgra,Fail
# new with ANGLE 2024-10-17
KHR-GLES31.core.shader_image_load_store.basic-allTargets-loadStoreVS,Fail
# Validation layer failure:
# https://docs.vulkan.org/spec/latest/chapters/resources.html#VUID-VkImageViewCreateInfo-pNext-01585
# https://issues.angleproject.org/issues/382051956
KHR-GLES31.core.shader_image_load_store.advanced-cast-cs,Crash
KHR-GLES31.core.shader_image_load_store.advanced-cast-fs,Crash
dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba8_r32f,Crash
dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_r32i,Crash
dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.rgba8_rgba8ui,Crash
dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8i,Crash
dEQP-GLES31.functional.image_load_store.3d.format_reinterpret.rgba8_rgba8ui,Crash
dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8_snorm,Crash
dEQP-GLES31.functional.image_load_store.cube.format_reinterpret.rgba8_rgba8ui,Crash

View file

@ -432,23 +432,14 @@ can_fast_clear_with_non_zero_color(const struct intel_device_info *devinfo,
return true;
}
/**
* Return true if the storage image could be used with atomics.
*
* If the image was created with an explicit format, we check it for typed
* atomic support. If MUTABLE_FORMAT_BIT is set, then we check the optional
* format list, seeing if /any/ of the formats support typed atomics. If no
* list is supplied, we fall back to using the bpb, as the application could
* make an image view with a format that does use atomics.
*/
static bool
storage_image_format_supports_atomic(const struct intel_device_info *devinfo,
VkImageCreateFlags create_flags,
enum isl_format format,
VkImageTiling vk_tiling,
const VkImageFormatListCreateInfo *fmt_list)
image_may_use_r32_view(VkImageCreateFlags create_flags,
VkFormat vk_format,
const VkImageFormatListCreateInfo *fmt_list)
{
if (isl_format_supports_typed_atomics(devinfo, format))
if (vk_format == VK_FORMAT_R32_SINT ||
vk_format == VK_FORMAT_R32_UINT ||
vk_format == VK_FORMAT_R32_SFLOAT)
return true;
if (!(create_flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT))
@ -456,23 +447,16 @@ storage_image_format_supports_atomic(const struct intel_device_info *devinfo,
if (fmt_list) {
for (uint32_t i = 0; i < fmt_list->viewFormatCount; i++) {
if (fmt_list->pViewFormats[i] == VK_FORMAT_UNDEFINED)
continue;
enum isl_format view_format =
anv_get_isl_format(devinfo, fmt_list->pViewFormats[i],
VK_IMAGE_ASPECT_COLOR_BIT, vk_tiling);
if (isl_format_supports_typed_atomics(devinfo, view_format))
if (fmt_list->pViewFormats[i] == VK_FORMAT_R32_SINT ||
fmt_list->pViewFormats[i] == VK_FORMAT_R32_UINT ||
fmt_list->pViewFormats[i] == VK_FORMAT_R32_SFLOAT)
return true;
}
return false;
}
/* No explicit format list. Any 16/32/64bpp format could be used with atomics. */
unsigned bpb = isl_format_get_layout(format)->bpb;
return bpb == 16 || bpb == 32 || bpb == 64;
return vk_format_get_blocksizebits(vk_format) == 32;
}
static bool
@ -538,32 +522,31 @@ anv_formats_ccs_e_compatible(const struct intel_device_info *devinfo,
if (!formats_ccs_e_compatible(devinfo, create_flags, aspect,
format, vk_tiling, fmt_list))
return false;
}
if ((vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) &&
vk_tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
if (devinfo->ver == 12) {
/* From the TGL Bspec 44930 (r47128):
*
* "Memory atomic operation on compressed data is not supported
* in Gen12 E2E compression. Result of such operation is
* undefined.
*
* Software should ensure at the time of the Atomic operation
* the surface is resolved (uncompressed) state."
*
* On gfx12.0, compression is not supported with atomic
* operations. On gfx12.5, the support is there, but it's slow
* (see HSD 1406337848).
*/
if (storage_image_format_supports_atomic(devinfo, create_flags,
format, vk_tiling,
fmt_list))
return false;
} else if (devinfo->ver <= 11) {
/* Storage accesses are not supported on compressed surfaces. */
if ((vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) &&
vk_tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
assert(vk_format_aspects(vk_format) == VK_IMAGE_ASPECT_COLOR_BIT);
if (devinfo->ver == 12) {
/* From the TGL Bspec 44930 (r47128):
*
* "Memory atomic operation on compressed data is not supported
* in Gen12 E2E compression. Result of such operation is
* undefined.
*
* Software should ensure at the time of the Atomic operation
* the surface is resolved (uncompressed) state."
*
* On gfx12.0, compression is not supported with atomic
* operations. On gfx12.5, the support is there, but it's slow
* (see HSD 1406337848).
*/
if (image_may_use_r32_view(create_flags, vk_format, fmt_list))
return false;
}
} else if (devinfo->ver <= 11) {
/* Storage accesses are not supported on compressed surfaces. */
return false;
}
}