From ed9dd3bcd9990b321f523823287643cbf893949f Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 17 Jul 2016 17:14:24 -0400 Subject: nv50,nvc0: srgb rendering is only available for rgba/bgra Mark both L8_SRGB and L8A8_SRGB as non-renderable (the latter already didn't have the bind flags). This makes the state tracker pick a different format when rendering is required, or mark the fb as incomplete. This fixes: bin/getteximage-formats init-by-clear-and-render -auto -fbo bin/getteximage-formats init-by-rendering -auto -fbo which previously ran into srgb-encoding differences. Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset Cc: mesa-stable@lists.freedesktop.org --- src/gallium/drivers/nouveau/nv50/nv50_formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_formats.c b/src/gallium/drivers/nouveau/nv50/nv50_formats.c index 07c441986f5..a95641f2ad3 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_formats.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_formats.c @@ -162,7 +162,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] = F3(A, R11G11B10_FLOAT, R11G11B10_FLOAT, R, G, B, xx, FLOAT, BF10GF11RF11, IB), F3(A, L8_UNORM, R8_UNORM, R, R, R, xx, UNORM, R8, TB), - F3(A, L8_SRGB, R8_UNORM, R, R, R, xx, UNORM, R8, TB), + F3(A, L8_SRGB, NONE, R, R, R, xx, UNORM, R8, T), F3(A, L8_SNORM, R8_SNORM, R, R, R, xx, SNORM, R8, TC), I3(A, L8_SINT, R8_SINT, R, R, R, xx, SINT, R8, TR), I3(A, L8_UINT, R8_UINT, R, R, R, xx, UINT, R8, TR), @@ -204,7 +204,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] = C4(A, L4A4_UNORM, NONE, R, R, R, G, UNORM, G4R4, T), C4(A, L8A8_UNORM, RG8_UNORM, R, R, R, G, UNORM, G8R8, T), C4(A, L8A8_SNORM, RG8_SNORM, R, R, R, G, SNORM, G8R8, T), - C4(A, L8A8_SRGB, RG8_UNORM, R, R, R, G, UNORM, G8R8, T), + C4(A, L8A8_SRGB, NONE, R, R, R, G, UNORM, G8R8, T), C4(A, L8A8_SINT, RG8_SINT, R, R, R, G, SINT, G8R8, T), C4(A, L8A8_UINT, RG8_UINT, R, R, R, G, UINT, G8R8, T), C4(A, L16A16_UNORM, RG16_UNORM, R, R, R, G, UNORM, R16_G16, T), -- cgit v1.2.3