radeonsi: allow sparse depth textures

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2025-05-22 18:01:25 +02:00 committed by Marge Bot
parent 508bf2a490
commit 1cc52dff05
3 changed files with 4 additions and 18 deletions

View file

@ -2551,7 +2551,8 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib, const struct radeon_
AddrSurfInfoIn.flags.opt4space = 1;
/* For GFX10+ MSAA PRT surface won't use the prt flag because it's not supported. */
AddrSurfInfoIn.flags.prt = (surf->flags & RADEON_SURF_PRT) != 0 &&
(config->info.samples <= 1 || info->gfx_level < GFX10);
(config->info.samples <= 1 || info->gfx_level < GFX10) &&
is_color_surface;
AddrSurfInfoIn.numMipLevels = config->info.levels;
AddrSurfInfoIn.numSamples = MAX2(1, config->info.samples);

View file

@ -29,11 +29,6 @@ spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
KHR-GL46.shaders.uniform_block.random.nested_structs_instance_arrays.0,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_array_depth_component16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_depth_component16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_cube_map_array_depth_component16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_cube_map_depth_component16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_rectangle_depth_component16,Fail
# See Khronos issue 5587: the test expects one-dimensional (array) texture to work while
# it's explicitely marked as non-supported by EXT_sparse_texture2.
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r11f_g11f_b10f,Fail
@ -428,14 +423,6 @@ KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_1d_rgb
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_1d_rgba8_snorm,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_1d_rgba8i,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_1d_rgba8ui,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_2d_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_2d_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_cube_map_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_cube_map_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_2d_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_2d_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_cube_map_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_cube_map_depth_component16,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail

1 # LLVM 20-dev (da439d3af47b)
29 KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_array_depth_component16,Fail # See Khronos issue 5587: the test expects one-dimensional (array) texture to work while
30 KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_depth_component16,Fail # it's explicitely marked as non-supported by EXT_sparse_texture2.
31 KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_cube_map_array_depth_component16,Fail KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r11f_g11f_b10f,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_cube_map_depth_component16,Fail
KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_rectangle_depth_component16,Fail
# See Khronos issue 5587: the test expects one-dimensional (array) texture to work while
# it's explicitely marked as non-supported by EXT_sparse_texture2.
KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r11f_g11f_b10f,Fail
32 KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16,Fail
33 KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16_snorm,Fail
34 KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase_texture_1d_array_r16f,Fail
423 KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_2d_depth_component16,Fail KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail
424 KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_cube_map_array_depth_component16,Fail KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail
425 KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor_texture_cube_map_depth_component16,Fail KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_2d_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_2d_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_cube_map_array_depth_component16,Fail
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_cube_map_depth_component16,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail
426 KHR-GL46.texture_query_lod.sampler1D_test,Fail
427 KHR-GL46.texture_query_lod.sampler2D_test,Fail
428 KHR-GL46.texture_query_lod.sampler3D_test,Fail

View file

@ -1493,7 +1493,7 @@ bool si_texture_commit(struct si_context *ctx, struct si_resource *res, unsigned
assert(ctx->gfx_level >= GFX9);
if (ctx->gfx_level >= GFX10 && samples > 1) {
if ((ctx->gfx_level >= GFX10 && samples > 1) || (surface->flags & RADEON_SURF_Z_OR_SBUFFER)) {
uint64_t prev_offset = res->bo_size;
for (int i = 0; i < box->depth; i++) {
@ -2482,9 +2482,7 @@ static int si_get_sparse_texture_virtual_page_size(struct pipe_screen *screen,
return 0;
/* Unsupported formats. */
/* TODO: support these formats. */
if (util_format_is_depth_or_stencil(format) ||
util_format_get_num_planes(format) > 1 ||
if (util_format_get_num_planes(format) > 1 ||
util_format_is_compressed(format))
return 0;