[Mesa-dev] [PATCH] r300g: Fix the ATI1N swizzle.

Ilia Mirkin imirkin at alum.mit.edu
Mon Mar 9 08:20:07 PDT 2015


On Mon, Mar 9, 2015 at 11:15 AM, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> This fixes the GL_COMPRESSED_RED_RGTC1 part of piglit's rgtc-teximage-01
> test as well as the precision part of Wine's 3dc format test (fd.o bug
> 89156).

This is often identified in the commit message with

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89156

>
> The Z component seems to contain a lower precision version of the
> result, probably a temporary value from the decompression computation.
> The Y and W component contain different data that depends on the input
> values as well, but I could not make sense of them (Not that I tried
> very hard).
>
> GL_COMPRESSED_SIGNED_RED_RGTC1 still seems to have precision problems in
> piglit, and both formats are affected by a compiler bug if they're

I don't suppose you've tried adding RGTC1_SNORM/LATC1_SNORM into that condition?

> sampled by the shader with a swizzle other than .xyzw. Wine uses .xxxx,
> which returns random garbage.
> ---
>  src/gallium/drivers/r300/r300_texture.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
> index ffe8c00..340b8fc 100644
> --- a/src/gallium/drivers/r300/r300_texture.c
> +++ b/src/gallium/drivers/r300/r300_texture.c
> @@ -176,7 +176,9 @@ uint32_t r300_translate_texformat(enum pipe_format format,
>              format != PIPE_FORMAT_RGTC2_UNORM &&
>              format != PIPE_FORMAT_RGTC2_SNORM &&
>              format != PIPE_FORMAT_LATC2_UNORM &&
> -            format != PIPE_FORMAT_LATC2_SNORM) {
> +            format != PIPE_FORMAT_LATC2_SNORM &&
> +            format != PIPE_FORMAT_RGTC1_UNORM &&
> +            format != PIPE_FORMAT_LATC1_UNORM) {
>              result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
>                                                  TRUE);
>          } else {
> --
> 2.0.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list