From 423f3fd485012c903ed32f1af1fa6b942f58c8ca Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 19 Mar 2025 12:25:30 +0100 Subject: [PATCH] panfrost: enable 8x and 16x msaa modes when supported 8x and 16x MSAA should work now, so we no longer need to deal with those separately. We have more accurate checks for when it's supported or not in place already. 2x MSAA isn't supported at all until v12, which we haven't finished wiring up yet. So let's leave that one for now... We'll need some more fixes for that anyway. Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Eric R. Smith Part-of: --- docs/relnotes/new_features.txt | 1 + src/gallium/drivers/panfrost/pan_screen.c | 23 +---------------------- src/panfrost/ci/panfrost-g52-fails.txt | 8 ++++++++ src/panfrost/ci/panfrost-g52-skips.txt | 3 +++ src/panfrost/ci/panfrost-g57-fails.txt | 17 +++++++++++++++++ src/panfrost/ci/panfrost-g72-fails.txt | 2 ++ src/panfrost/lib/pan_util.h | 2 +- 7 files changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index d4ad80b0a5e..958327de755 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -39,3 +39,4 @@ VK_EXT_inline_uniform_block on panvk cl_khr_fp16 on asahi, freedreno, llvmpipe, panfrost, radeonsi and zink GL_ARB_shader_clock on panfrost/v6+ VK_EXT_texture_compression_astc_hdr on panvk +MSAA with 8 and 16 sample counts on panfrost diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index ebee5e9ccce..0454f4aa627 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -70,7 +70,6 @@ static const struct debug_named_value panfrost_debug_options[] = { {"gl3", PAN_DBG_GL3, "Enable experimental GL 3.x implementation, up to 3.3"}, {"noafbc", PAN_DBG_NO_AFBC, "Disable AFBC support"}, {"nocrc", PAN_DBG_NO_CRC, "Disable transaction elimination"}, - {"msaa16", PAN_DBG_MSAA16, "Enable MSAA 8x and 16x support"}, {"linear", PAN_DBG_LINEAR, "Force linear textures"}, {"strict_import", PAN_DBG_STRICT_IMPORT, "Use the explicit WSI stride and fail if it's not properly aligned"}, {"nocache", PAN_DBG_NO_CACHE, "Disable BO cache"}, @@ -177,28 +176,8 @@ panfrost_is_format_supported(struct pipe_screen *screen, MAX2(sample_count, 1) > max_msaa) return false; - /* MSAA 2x gets rounded up to 4x. MSAA 8x/16x only supported on v5+. - * TODO: debug MSAA 8x/16x */ - - switch (sample_count) { - case 0: - case 1: - case 4: - break; - case 2: - if (dev->arch >= 12) - break; - else - return false; - case 8: - case 16: - if (dev->debug & PAN_DBG_MSAA16) - break; - else - return false; - default: + if (sample_count == 2 && dev->arch < 12) return false; - } if (MAX2(sample_count, 1) != MAX2(storage_sample_count, 1)) return false; diff --git a/src/panfrost/ci/panfrost-g52-fails.txt b/src/panfrost/ci/panfrost-g52-fails.txt index cf321666bc7..cefb9e3bf5f 100644 --- a/src/panfrost/ci/panfrost-g52-fails.txt +++ b/src/panfrost/ci/panfrost-g52-fails.txt @@ -33,6 +33,9 @@ spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB,Fail spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB NPOT,Fail spec@arb_texture_float@multisample-formats 2 gl_arb_texture_float,Fail spec@arb_texture_float@multisample-formats 4 gl_arb_texture_float,Fail +spec@arb_texture_float@multisample-formats 6 gl_arb_texture_float,Fail +spec@arb_texture_float@multisample-formats 8 gl_arb_texture_float,Fail +spec@arb_texture_float@multisample-formats 16 gl_arb_texture_float,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16I,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16_SNORM,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R32I,Fail @@ -326,6 +329,8 @@ afbcp-spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB,Fail afbcp-spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB NPOT,Fail afbcp-spec@arb_texture_float@multisample-formats 2 gl_arb_texture_float,Fail afbcp-spec@arb_texture_float@multisample-formats 4 gl_arb_texture_float,Fail +afbcp-spec@arb_texture_float@multisample-formats 6 gl_arb_texture_float,Fail +afbcp-spec@arb_texture_float@multisample-formats 8 gl_arb_texture_float,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16I,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16_SNORM,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R32I,Fail @@ -389,6 +394,9 @@ afbcp-spec@khr_texture_compression_astc@sliced-3d-miptree-gl srgb-fp@sRGB decode spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash afbcp-spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread,Crash +# CTS bug: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5695 +KHR-GLES31.core.texture_storage_multisample.APIDependencies.renderbuffer_storage_multisample_invalid_samples_argument_for_integer_internalformats,Fail + # physical device and device needs more robustness in allocation handling dEQP-VK.api.object_management.max_concurrent.device,Fail dEQP-VK.api.object_management.max_concurrent.device_group,Fail diff --git a/src/panfrost/ci/panfrost-g52-skips.txt b/src/panfrost/ci/panfrost-g52-skips.txt index bf71218aaf6..febf578ba18 100644 --- a/src/panfrost/ci/panfrost-g52-skips.txt +++ b/src/panfrost/ci/panfrost-g52-skips.txt @@ -10,6 +10,9 @@ dEQP-GLES31.functional.draw_indirect.compute_interop.large.* # https://gitlab.freedesktop.org/mesa/mesa/-/jobs/19776551 dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36 +# Huge render, which eventually times out +dEQP-GLES31.functional.fbo.no_attachments.maximums.all + # Seems to timeout occasionally dEQP-VK.api.object_management.max_concurrent.query_pool diff --git a/src/panfrost/ci/panfrost-g57-fails.txt b/src/panfrost/ci/panfrost-g57-fails.txt index 318083a321a..e37898fe6b3 100644 --- a/src/panfrost/ci/panfrost-g57-fails.txt +++ b/src/panfrost/ci/panfrost-g57-fails.txt @@ -27,6 +27,8 @@ spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB,Fail spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB NPOT,Fail spec@arb_texture_float@multisample-formats 2 gl_arb_texture_float,Fail spec@arb_texture_float@multisample-formats 4 gl_arb_texture_float,Fail +spec@arb_texture_float@multisample-formats 6 gl_arb_texture_float,Fail +spec@arb_texture_float@multisample-formats 8 gl_arb_texture_float,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16I,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16_SNORM,Fail spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R32I,Fail @@ -354,6 +356,8 @@ afbcp-spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB,Fail afbcp-spec@arb_texture_float@fbo-generatemipmap-formats@GL_INTENSITY16F_ARB NPOT,Fail afbcp-spec@arb_texture_float@multisample-formats 2 gl_arb_texture_float,Fail afbcp-spec@arb_texture_float@multisample-formats 4 gl_arb_texture_float,Fail +afbcp-spec@arb_texture_float@multisample-formats 6 gl_arb_texture_float,Fail +afbcp-spec@arb_texture_float@multisample-formats 8 gl_arb_texture_float,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16I,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R16_SNORM,Fail afbcp-spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch@Texture type: GL_R32I,Fail @@ -651,3 +655,16 @@ afbcp-spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2d,F afbcp-spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2d_projvec4,Fail afbcp-spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2dshadow,Fail afbcp-spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 3d,Fail + +# Piglit tests require too much precision in alpha-to-coverage higher sample-counts +spec@ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 6,Fail +spec@ext_framebuffer_multisample@alpha-to-coverage-dual-src-blend 8,Fail +spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 6,Fail +spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 8,Fail +spec@ext_framebuffer_multisample@draw-buffers-alpha-to-coverage 6,Fail +spec@ext_framebuffer_multisample@draw-buffers-alpha-to-coverage 8,Fail +spec@ext_framebuffer_multisample@sample-alpha-to-coverage 6 color,Fail +spec@ext_framebuffer_multisample@sample-alpha-to-coverage 8 color,Fail + +# CTS bug: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5695 +KHR-GLES31.core.texture_storage_multisample.APIDependencies.renderbuffer_storage_multisample_invalid_samples_argument_for_integer_internalformats,Fail diff --git a/src/panfrost/ci/panfrost-g72-fails.txt b/src/panfrost/ci/panfrost-g72-fails.txt index e69de29bb2d..0be6f863f6f 100644 --- a/src/panfrost/ci/panfrost-g72-fails.txt +++ b/src/panfrost/ci/panfrost-g72-fails.txt @@ -0,0 +1,2 @@ +# CTS bug: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5695 +KHR-GLES31.core.texture_storage_multisample.APIDependencies.renderbuffer_storage_multisample_invalid_samples_argument_for_integer_internalformats,Fail diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h index 4f87d6e7eb6..e6155abfc5d 100644 --- a/src/panfrost/lib/pan_util.h +++ b/src/panfrost/lib/pan_util.h @@ -42,7 +42,7 @@ #define PAN_DBG_NO_CRC 0x0080 #define PAN_DBG_GL3 0x0100 #define PAN_DBG_NO_AFBC 0x0200 -#define PAN_DBG_MSAA16 0x0400 +/* 0x400 unused */ #define PAN_DBG_STRICT_IMPORT 0x0800 #define PAN_DBG_LINEAR 0x1000 #define PAN_DBG_NO_CACHE 0x2000