From 1e869e3fb4255351de5e908c5a53851bb58c3f2b Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 3 Nov 2021 15:11:39 -0700 Subject: [PATCH] freedreno/a5xx+: Fix missing LA formats. GL_ARB_texture_buffer_object uses these formats, and we expose it. Since we didn't have the formats in the table, we we were using bad HW texture/color formats for them. Part-of: --- src/freedreno/ci/freedreno-a530-fails.txt | 26 ------------- src/freedreno/ci/freedreno-a630-fails.txt | 38 ++++--------------- src/freedreno/ci/traces-freedreno.yml | 2 +- src/freedreno/fdl/fd6_format_table.c | 11 ++++++ .../drivers/freedreno/a5xx/fd5_format.c | 10 +++++ 5 files changed, 30 insertions(+), 57 deletions(-) diff --git a/src/freedreno/ci/freedreno-a530-fails.txt b/src/freedreno/ci/freedreno-a530-fails.txt index f493e646de4..0b58e8877ae 100644 --- a/src/freedreno/ci/freedreno-a530-fails.txt +++ b/src/freedreno/ci/freedreno-a530-fails.txt @@ -326,30 +326,9 @@ spec@arb_point_sprite@arb_point_sprite-interactions 1.0,Fail spec@arb_separate_shader_objects@400 combinations by location,Fail spec@arb_separate_shader_objects@400 combinations by name,Fail spec@arb_texture_buffer_object@formats (fs- arb),Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_ALPHA32F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE32F_ARB,Fail spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE8_ALPHA8,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE_ALPHA32F_ARB,Fail spec@arb_texture_buffer_object@formats (vs- arb),Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_ALPHA32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE32F_ARB,Fail spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE8_ALPHA8,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE_ALPHA32F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE32F_ARB,Fail spec@arb_texture_rectangle@1-1-linear-texture,Fail spec@arb_timer_query@query gl_timestamp,Fail spec@arb_timer_query@timestamp-get,Fail @@ -407,11 +386,6 @@ spec@ext_render_snorm@render@format 0x8f94 read fail,Fail spec@ext_render_snorm@render@format 0x8f95 read fail,Fail spec@ext_render_snorm@render@format 0x8f97 read fail,Fail spec@ext_texture_integer@fbo-integer,Fail -spec@ext_texture_snorm@fbo-blending-formats,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE_SNORM,Fail spec@ext_transform_feedback2@draw-auto,Fail spec@ext_transform_feedback@generatemipmap prims_generated,Fail spec@ext_transform_feedback@immediate-reuse,Fail diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt index 4eeb5fe7382..07fe4baf250 100644 --- a/src/freedreno/ci/freedreno-a630-fails.txt +++ b/src/freedreno/ci/freedreno-a630-fails.txt @@ -181,26 +181,6 @@ spec@arb_tessellation_shader@execution@vs-tes-max-in-out-components,Fail spec@arb_tessellation_shader@execution@vs-tes-tessinner-tessouter-inputs-quads,Fail spec@arb_tessellation_shader@execution@vs-tes-tessinner-tessouter-inputs-tris,Fail spec@arb_tessellation_shader@execution@vs-tes-vertex,Fail -spec@arb_texture_buffer_object@formats (fs- arb),Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_ALPHA32F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE32F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE8_ALPHA8,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (fs- arb)@GL_LUMINANCE_ALPHA32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb),Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_ALPHA32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE32F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE8_ALPHA8,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE_ALPHA16F_ARB,Fail -spec@arb_texture_buffer_object@formats (vs- arb)@GL_LUMINANCE_ALPHA32F_ARB,Fail spec@arb_texture_compression_bptc@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_compression_bptc@texwrap formats bordercolor-swizzled@GL_COMPRESSED_RGBA_BPTC_UNORM- swizzled- border color only,Fail spec@arb_texture_compression_bptc@texwrap formats bordercolor-swizzled@GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT- swizzled- border color only,Fail @@ -209,11 +189,6 @@ spec@arb_texture_compression_bptc@texwrap formats bordercolor-swizzled@GL_COMPRE spec@arb_texture_compression@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_compression@texwrap formats bordercolor-swizzled@GL_COMPRESSED_RGBA- swizzled- border color only,Fail spec@arb_texture_compression@texwrap formats bordercolor-swizzled@GL_COMPRESSED_RGB- swizzled- border color only,Fail -spec@arb_texture_float@fbo-blending-formats,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE32F_ARB,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB16F- swizzled- border color only,Fail spec@arb_texture_float@texwrap formats bordercolor-swizzled@GL_RGB32F- swizzled- border color only,Fail @@ -338,20 +313,23 @@ spec@ext_texture_integer@texwrap formats bordercolor-swizzled@GL_RGBA8I- swizzle spec@ext_texture_integer@texwrap formats bordercolor-swizzled@GL_RGBA8UI- swizzled- border color only,Fail spec@ext_texture_shared_exponent@texwrap formats bordercolor-swizzled,Fail spec@ext_texture_shared_exponent@texwrap formats bordercolor-swizzled@GL_RGB9_E5- swizzled- border color only,Fail -spec@ext_texture_snorm@fbo-blending-formats,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE_SNORM,Fail + +# These failures go away with FD_MESA_DEBUG=noblit, but don't seem to be related +# to the actual mipmap generation blits (which we do fall back on) spec@ext_texture_snorm@fbo-generatemipmap-formats,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_ALPHA16_SNORM,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_ALPHA16_SNORM NPOT,Fail +spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY_SNORM,Fail +spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY_SNORM NPOT,Fail +spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY8_SNORM,Fail +spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY8_SNORM NPOT,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY16_SNORM,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_INTENSITY16_SNORM NPOT,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_ALPHA16_SNORM,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_ALPHA16_SNORM NPOT,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_SNORM,Fail spec@ext_texture_snorm@fbo-generatemipmap-formats@GL_LUMINANCE16_SNORM NPOT,Fail + spec@ext_texture_snorm@multisample-formats 2 gl_ext_texture_snorm,Fail spec@ext_texture_snorm@multisample-formats 4 gl_ext_texture_snorm,Fail spec@ext_texture_snorm@texwrap formats bordercolor-swizzled,Fail diff --git a/src/freedreno/ci/traces-freedreno.yml b/src/freedreno/ci/traces-freedreno.yml index eb1a71273ef..a47670ae385 100644 --- a/src/freedreno/ci/traces-freedreno.yml +++ b/src/freedreno/ci/traces-freedreno.yml @@ -111,7 +111,7 @@ traces: # - device: freedreno-a530 # checksum: 2a53e6086588f4675ae3dcda9f26603b - device: freedreno-a630 - checksum: 7038fe16ec1483ca1f475c563afcee84 + checksum: 730692659fbb9eefa44d6b1a2df2fa8e - path: behdad-glyphy/glyphy.trace expectations: - device: freedreno-a306 diff --git a/src/freedreno/fdl/fd6_format_table.c b/src/freedreno/fdl/fd6_format_table.c index d99d0299c6b..aa1c45c2b8e 100644 --- a/src/freedreno/fdl/fd6_format_table.c +++ b/src/freedreno/fdl/fd6_format_table.c @@ -71,7 +71,9 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { FMT(A8_UNORM, NONE, 8_UNORM, A8_UNORM, WZYX), _TC(L8_UNORM, 8_UNORM, WZYX), + _TC(L8_SNORM, 8_SNORM, WZYX), _T_(I8_UNORM, 8_UNORM, WZYX), + _T_(I8_SNORM, 8_SNORM, WZYX), _T_(A8_UINT, 8_UINT, WZYX), _T_(A8_SINT, 8_SINT, WZYX), @@ -96,14 +98,17 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { _T_(A16_SNORM, 16_SNORM, WZYX), _T_(A16_UINT, 16_UINT, WZYX), _T_(A16_SINT, 16_SINT, WZYX), + _T_(A16_FLOAT, 16_FLOAT, WZYX), _T_(L16_UNORM, 16_UNORM, WZYX), _T_(L16_SNORM, 16_SNORM, WZYX), _T_(L16_UINT, 16_UINT, WZYX), _T_(L16_SINT, 16_SINT, WZYX), + _T_(L16_FLOAT, 16_FLOAT, WZYX), _T_(I16_UNORM, 16_UNORM, WZYX), _T_(I16_SNORM, 16_SNORM, WZYX), _T_(I16_UINT, 16_UINT, WZYX), _T_(I16_SINT, 16_SINT, WZYX), + _T_(I16_FLOAT, 16_FLOAT, WZYX), VTC(R8G8_UNORM, 8_8_UNORM, WZYX), VTC(R8G8_SNORM, 8_8_SNORM, WZYX), @@ -113,6 +118,7 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { V__(R8G8_SSCALED, 8_8_SINT, WZYX), _TC(R8G8_SRGB, 8_8_UNORM, WZYX), + _T_(L8A8_UNORM, 8_8_UNORM, WZYX), _T_(L8A8_UINT, 8_8_UINT, WZYX), _T_(L8A8_SINT, 8_8_SINT, WZYX), @@ -149,10 +155,13 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { _T_(A32_UINT, 32_UINT, WZYX), _T_(A32_SINT, 32_SINT, WZYX), + _T_(A32_FLOAT, 32_FLOAT, WZYX), _T_(L32_UINT, 32_UINT, WZYX), _T_(L32_SINT, 32_SINT, WZYX), + _T_(L32_FLOAT, 32_FLOAT, WZYX), _T_(I32_UINT, 32_UINT, WZYX), _T_(I32_SINT, 32_SINT, WZYX), + _T_(I32_FLOAT, 32_FLOAT, WZYX), VTC(R16G16_UNORM, 16_16_UNORM, WZYX), VTC(R16G16_SNORM, 16_16_SNORM, WZYX), @@ -166,6 +175,7 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { _T_(L16A16_SNORM, 16_16_SNORM, WZYX), _T_(L16A16_UINT, 16_16_UINT, WZYX), _T_(L16A16_SINT, 16_16_SINT, WZYX), + _T_(L16A16_FLOAT, 16_16_FLOAT, WZYX), VTC(R8G8B8A8_UNORM, 8_8_8_8_UNORM, WZYX), _TC(R8G8B8X8_UNORM, 8_8_8_8_UNORM, WZYX), @@ -258,6 +268,7 @@ static const struct fd6_format formats[PIPE_FORMAT_COUNT] = { _T_(L32A32_UINT, 32_32_UINT, WZYX), _T_(L32A32_SINT, 32_32_SINT, WZYX), + _T_(L32A32_FLOAT, 32_32_FLOAT, WZYX), /* 96-bit */ V__(R32G32B32_UNORM, 32_32_32_UNORM, WZYX), diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_format.c b/src/gallium/drivers/freedreno/a5xx/fd5_format.c index 61e775f989a..ecfdb617d98 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_format.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_format.c @@ -80,7 +80,9 @@ static struct fd5_format formats[PIPE_FORMAT_COUNT] = { _T(A8_UNORM, 8_UNORM, A8_UNORM, WZYX), _T(L8_UNORM, 8_UNORM, R8_UNORM, WZYX), + _T(L8_SNORM, 8_SNORM, R8_SNORM, WZYX), _T(I8_UNORM, 8_UNORM, NONE, WZYX), + _T(I8_SNORM, 8_SNORM, NONE, WZYX), _T(A8_UINT, 8_UINT, NONE, WZYX), _T(A8_SINT, 8_SINT, NONE, WZYX), @@ -105,14 +107,17 @@ static struct fd5_format formats[PIPE_FORMAT_COUNT] = { _T(A16_SNORM, 16_SNORM, NONE, WZYX), _T(A16_UINT, 16_UINT, NONE, WZYX), _T(A16_SINT, 16_SINT, NONE, WZYX), + _T(A16_FLOAT, 16_FLOAT, NONE, WZYX), _T(L16_UNORM, 16_UNORM, NONE, WZYX), _T(L16_SNORM, 16_SNORM, NONE, WZYX), _T(L16_UINT, 16_UINT, NONE, WZYX), _T(L16_SINT, 16_SINT, NONE, WZYX), + _T(L16_FLOAT, 16_FLOAT, NONE, WZYX), _T(I16_UNORM, 16_UNORM, NONE, WZYX), _T(I16_SNORM, 16_SNORM, NONE, WZYX), _T(I16_UINT, 16_UINT, NONE, WZYX), _T(I16_SINT, 16_SINT, NONE, WZYX), + _T(I16_FLOAT, 16_FLOAT, NONE, WZYX), VT(R8G8_UNORM, 8_8_UNORM, R8G8_UNORM, WZYX), VT(R8G8_SNORM, 8_8_SNORM, R8G8_SNORM, WZYX), @@ -147,10 +152,13 @@ static struct fd5_format formats[PIPE_FORMAT_COUNT] = { _T(A32_UINT, 32_UINT, NONE, WZYX), _T(A32_SINT, 32_SINT, NONE, WZYX), + _T(A32_FLOAT, 32_FLOAT, NONE, WZYX), _T(L32_UINT, 32_UINT, NONE, WZYX), _T(L32_SINT, 32_SINT, NONE, WZYX), + _T(L32_FLOAT, 32_FLOAT, NONE, WZYX), _T(I32_UINT, 32_UINT, NONE, WZYX), _T(I32_SINT, 32_SINT, NONE, WZYX), + _T(I32_FLOAT, 32_FLOAT, NONE, WZYX), VT(R16G16_UNORM, 16_16_UNORM, R16G16_UNORM, WZYX), VT(R16G16_SNORM, 16_16_SNORM, R16G16_SNORM, WZYX), @@ -164,6 +172,7 @@ static struct fd5_format formats[PIPE_FORMAT_COUNT] = { _T(L16A16_SNORM, 16_16_SNORM, NONE, WZYX), _T(L16A16_UINT, 16_16_UINT, NONE, WZYX), _T(L16A16_SINT, 16_16_SINT, NONE, WZYX), + _T(L16A16_FLOAT, 16_16_FLOAT, NONE, WZYX), VT(R8G8B8A8_UNORM, 8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX), _T(R8G8B8X8_UNORM, 8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX), @@ -244,6 +253,7 @@ static struct fd5_format formats[PIPE_FORMAT_COUNT] = { _T(L32A32_UINT, 32_32_UINT, NONE, WZYX), _T(L32A32_SINT, 32_32_SINT, NONE, WZYX), + _T(L32A32_FLOAT, 32_32_FLOAT, NONE, WZYX), /* 96-bit */ VT(R32G32B32_UINT, 32_32_32_UINT, NONE, WZYX),