Mesa (master): nv50,nvc0: fix normalized RG16 and RGBA32 texture format entries

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sat Apr 16 15:18:28 PDT 2011


Module: Mesa
Branch: master
Commit: b4c7cd3fd6a8ae4b3c704e7c284e10fdb9746153
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b4c7cd3fd6a8ae4b3c704e7c284e10fdb9746153

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sat Apr 16 13:13:56 2011 +0200

nv50,nvc0: fix normalized RG16 and RGBA32 texture format entries

---

 src/gallium/drivers/nv50/nv50_formats.c |    8 ++++----
 src/gallium/drivers/nvc0/nvc0_formats.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_formats.c b/src/gallium/drivers/nv50/nv50_formats.c
index 7946117..c10ba03 100644
--- a/src/gallium/drivers/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nv50/nv50_formats.c
@@ -237,7 +237,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
    /* SNORM 32 */
 
    [PIPE_FORMAT_R32G32B32A32_SNORM] = { 0,
-    A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
+    A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 32_32_32_32, 0),
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R32G32B32_SNORM] = { 0,
@@ -255,7 +255,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
    /* UNORM 32 */
 
    [PIPE_FORMAT_R32G32B32A32_UNORM] = { 0,
-    A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
+    A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 32_32_32_32, 0),
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R32G32B32_UNORM] = { 0,
@@ -281,7 +281,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
-    A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
+    A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
     VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
 
    [PIPE_FORMAT_R16_SNORM] = { NV50_SURFACE_FORMAT_R16_SNORM,
@@ -299,7 +299,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
-    A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
+    A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
     VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
 
    [PIPE_FORMAT_R16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,
diff --git a/src/gallium/drivers/nvc0/nvc0_formats.c b/src/gallium/drivers/nvc0/nvc0_formats.c
index 454c744..6eaa7c2 100644
--- a/src/gallium/drivers/nvc0/nvc0_formats.c
+++ b/src/gallium/drivers/nvc0/nvc0_formats.c
@@ -322,7 +322,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
-    A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
+    A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
     VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
 
    [PIPE_FORMAT_R16_SNORM] = { NV50_SURFACE_FORMAT_R16_SNORM,
@@ -340,7 +340,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
     VERTEX_BUFFER | SAMPLER_VIEW },
 
    [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
-    A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
+    A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
     VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
 
    [PIPE_FORMAT_R16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,



More information about the mesa-commit mailing list