[Mesa-dev] [PATCH 2/3] nv50: add more RGB10A2 formats
Ilia Mirkin
imirkin at alum.mit.edu
Wed Jan 15 03:37:21 PST 2014
On Wed, Dec 25, 2013 at 11:53 AM, Christoph Bumiller
<e0425955 at student.tuwien.ac.at> wrote:
> ---
> src/gallium/drivers/nouveau/nv50/nv50_formats.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_formats.c b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
> index 0a7e812..b301890 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_formats.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
> @@ -202,6 +202,8 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
> TBV, 1),
> C4A(R10G10B10A2_SNORM, NONE, C0, C1, C2, C3, SNORM, 10_10_10_2, TV, 0),
> C4A(B10G10R10A2_SNORM, NONE, C2, C1, C0, C3, SNORM, 10_10_10_2, TV, 1),
> + C4A(R10G10B10A2_UINT, RGB10_A2_UINT, C0, C1, C2, C3, UINT, 10_10_10_2, TRV, 0),
> + C4A(B10G10R10A2_UINT, RGB10_A2_UINT, C2, C1, C0, C3, UINT, 10_10_10_2, TV, 0),
>
> F3B(R11G11B10_FLOAT, R11G11B10_FLOAT, C0, C1, C2, xx, FLOAT, 11_11_10, IB),
>
> @@ -394,6 +396,11 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
> F1A(R16_SSCALED, NONE, C0, xx, xx, xx, SSCALED, 16, V),
> F1A(R16_USCALED, NONE, C0, xx, xx, xx, USCALED, 16, V),
>
> + C4A(R10G10B10A2_USCALED, NONE, C0, C1, C2, C3, USCALED, 10_10_10_2, V, 0),
> + C4A(R10G10B10A2_SSCALED, NONE, C0, C1, C2, C3, SSCALED, 10_10_10_2, V, 0),
> + C4A(B10G10R10A2_USCALED, NONE, C0, C1, C2, C3, USCALED, 10_10_10_2, V, 1),
> + C4A(B10G10R10A2_SSCALED, NONE, C0, C1, C2, C3, SSCALED, 10_10_10_2, V, 1),
> +
> C4A(R8G8B8A8_SSCALED, NONE, C0, C1, C2, C3, SSCALED, 8_8_8_8, V, 0),
> C4A(R8G8B8A8_USCALED, NONE, C0, C1, C2, C3, USCALED, 8_8_8_8, V, 0),
> F3A(R8G8B8_UNORM, NONE, C0, C1, C2, xx, UNORM, 8_8_8, V),
FWIW I ran piglit on this (with your other patches that cause the
RGB10A2 extensions to actually be turned on), and I saw this failure:
$ bin/draw-vertices-2101010 -auto
Int vertices - 2/10/10/10
Unsigned Int vertices - 2/10/10/10
Int Color - 2/10/10/10
Probe color at (45,5)
Expected: 1.000000 0.000000 0.000000 0.333000
Observed: 1.000000 0.000000 0.000000 0.000000
Unsigned Int Color - 2/10/10/10
Int BGRA Color - 2/10/10/10
Probe color at (85,5)
Expected: 0.000000 0.000000 1.000000 0.333000
Observed: 0.000000 0.000000 1.000000 0.000000
Unsigned Int BGRA Color - 2/10/10/10
Int 2/10/10/10 - test ABI
Unsigned 2/10/10/10 - test ABI
There were also ARB_texture_rgb10_a2ui failures with texwrap
bordercolor's, but there are lots of other such failures with integer
formats, so I assume that's all part of the same thing. For reference:
$ bin/texwrap GL_ARB_texture_rgb10_a2ui bordercolor -fbo -auto
Testing GL_ARB_texture_rgb10_a2ui.
Testing the border color only.
Testing GL_RGB10_A2UI, border color only
Fail with NEAREST and CLAMP_TO_BORDER at (95,36) @ 0,0
Expected: 25 229 127 170
Observed: 0 0 0 0
Fail with NEAREST and MIRROR_CLAMP_TO_BORDER_EXT at (273,36) @ 0,0
Expected: 25 229 127 170
Observed: 0 0 0 0
$ bin/texwrap GL_ARB_texture_rgb10_a2ui bordercolor swizzled -fbo -auto
Testing GL_ARB_texture_rgb10_a2ui.
Testing the border color only.
Using texture swizzling.
Testing GL_RGB10_A2UI, swizzled, border color only
Fail with NEAREST and CLAMP_TO_BORDER at (95,36) @ 0,0
Expected: 127 25 229 170
Observed: 0 0 0 0
Fail with NEAREST and MIRROR_CLAMP_TO_BORDER_EXT at (273,36) @ 0,0
Expected: 127 25 229 170
Observed: 0 0 0 0
More information about the mesa-dev
mailing list