Skip to content

radeonsi: enable ARB_sparse_texture2

Qiang Yu requested to merge yuq825/mesa:topic/arb-sparse-texture2 into main

Tested with following tests:

gfx10+ does not support multi sample texture, but ARB_sparse_texture2 need MS texture support:

if the texture target is TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY,
or TEXTURE_3D, the virtual page size for index zero is fully implementation-
dependent.
...
(17) Should we support sparse multisample textures?  If so, should we
     support standard virtual page sizes?

      RESOLVED:  Yes, we add will support for sparse multisample textures, but
      will not specify standard page sizes.

This MR relax the requirement by just report no page size available for MS texture when GFX10+ to keep the shader query capability for GFX10+. This should fail all sparse MS texture related tests in Khronos CTS.

Khronos CTS need fix https://gerrit.khronos.org/c/vk-gl-cts/+/8587, but even so, there are still three failed tests for GFX9:

  • KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup: need ARB_sparse_texture_clamp to compile the shader
  • KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess:
    • AMD GPU return (0,0,0,0) instead of (0,0,0,1) for r8 image load from uncommitted region, same problem for RADV and AMDVLK. Test case: https://github.com/yuq/gfx/tree/master/vulkan/sparse
    • glGenerateMipmap() fail for GL_RGB10_A2UI format, because it returns fail for integer format
  • KHR-GL46.sparse_texture2_tests.StandardPageSizes: due to spec incomplete, it allows 1D/1D_ARRAY/RENDER_BUFFER to be queried for page size and return a standard one. But it's not allowed to set these targets to be sparse texture. So this CTS require to return a standard page size for these target even it's useless. I could just add a commit to do that but it's really only for CTS and not useful.

There seems no more things could be done in this MR further. So ready for review now.

Edited by Qiang Yu

Merge request reports