summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-07-11 11:33:11 +0200
committerChristoph Bumiller <[email protected]>2011-07-14 12:51:06 +0200
commit7e2827fad95071e04e382be0117c654445764c52 (patch)
treeafd9c5b25598a2985f99694c68c99a5d24242088 /src/gallium/drivers
parentb2dcf880e8bcd61be59602f5a2d18c77a5fc60c1 (diff)
nv50,nvc0: extensive surface format renaming to get consistency
Now the component ordering is consistent and matches gallium again.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_3d.xml.h4
-rw-r--r--src/gallium/drivers/nv50/nv50_defs.xml.h122
-rw-r--r--src/gallium/drivers/nv50/nv50_formats.c95
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_texture.xml.h81
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h6
-rw-r--r--src/gallium/drivers/nvc0/nvc0_formats.c95
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c6
8 files changed, 220 insertions, 191 deletions
diff --git a/src/gallium/drivers/nv50/nv50_3d.xml.h b/src/gallium/drivers/nv50/nv50_3d.xml.h
index 41a380ec2ec..1bde07fa3af 100644
--- a/src/gallium/drivers/nv50/nv50_3d.xml.h
+++ b/src/gallium/drivers/nv50/nv50_3d.xml.h
@@ -777,7 +777,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8 0x03000000
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16 0x03600000
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8 0x03a00000
-#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_2_10_10_10 0x06000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_10_10_10_2 0x06000000
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__MASK 0x38000000
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__SHIFT 27
#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SNORM 0x08000000
@@ -1935,7 +1935,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8 0x00c00000
#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16 0x00d80000
#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8 0x00e80000
-#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_2_10_10_10 0x01800000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_10_10_10_2 0x01800000
#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__MASK 0x7e000000
#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__SHIFT 25
#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT 0x7e000000
diff --git a/src/gallium/drivers/nv50/nv50_defs.xml.h b/src/gallium/drivers/nv50/nv50_defs.xml.h
index 1bf2f802b56..27046e9e564 100644
--- a/src/gallium/drivers/nv50/nv50_defs.xml.h
+++ b/src/gallium/drivers/nv50/nv50_defs.xml.h
@@ -1,5 +1,5 @@
-#ifndef NV50_DEFS_XML
-#define NV50_DEFS_XML
+#ifndef RNNDB_NV50_DEFS_XML
+#define RNNDB_NV50_DEFS_XML
/* Autogenerated file, DO NOT EDIT manually!
@@ -8,10 +8,11 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
git clone git://0x04.net/rules-ng-ng
The rules-ng-ng source files this header was generated from are:
-- nv50_defs.xml ( 4482 bytes, from 2010-10-03 13:18:37)
-- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- rnndb/nv50_defs.xml ( 5468 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/copyright.xml ( 6452 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/nvchipsets.xml ( 3617 bytes, from 2011-07-09 13:43:58)
-Copyright (C) 2006-2010 by the following authors:
+Copyright (C) 2006-2011 by the following authors:
- Artur Huillet <[email protected]> (ahuillet)
- Ben Skeggs (darktama, darktama_)
- B. R. <[email protected]> (koala_br)
@@ -22,7 +23,7 @@ Copyright (C) 2006-2010 by the following authors:
- Dmitry Eremin-Solenikov <[email protected]> (lumag)
- EdB <[email protected]> (edb_)
- Erik Waling <[email protected]> (erikwaling)
-- Francisco Jerez <[email protected]> (curro, curro_, currojerez)
+- Francisco Jerez <[email protected]> (curro)
- imirkin <[email protected]> (imirkin)
- jb17bsome <[email protected]> (jb17bsome)
- Jeremy Kolb <[email protected]> (kjeremy)
@@ -70,44 +71,50 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#define NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50_SURFACE_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50_SURFACE_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50_SURFACE_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50_SURFACE_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50_SURFACE_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50_SURFACE_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50_SURFACE_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50_SURFACE_FORMAT_R32G32_SINT 0x000000cc
-#define NV50_SURFACE_FORMAT_R32G32_UINT 0x000000cd
-#define NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50_SURFACE_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50_SURFACE_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50_SURFACE_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50_SURFACE_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50_SURFACE_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50_SURFACE_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50_SURFACE_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50_SURFACE_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50_SURFACE_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50_SURFACE_FORMAT_R16G16_UNORM 0x000000da
-#define NV50_SURFACE_FORMAT_R16G16_SNORM 0x000000db
-#define NV50_SURFACE_FORMAT_R16G16_SINT 0x000000dc
-#define NV50_SURFACE_FORMAT_R16G16_UINT 0x000000dd
-#define NV50_SURFACE_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50_SURFACE_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50_SURFACE_FORMAT_B10G11R11_FLOAT 0x000000e0
+#define NV50_SURFACE_FORMAT_BITMAP 0x0000001c
+#define NV50_SURFACE_FORMAT_UNK1D 0x0000001d
+#define NV50_SURFACE_FORMAT_RGBA32_FLOAT 0x000000c0
+#define NV50_SURFACE_FORMAT_RGBA32_SINT 0x000000c1
+#define NV50_SURFACE_FORMAT_RGBA32_UINT 0x000000c2
+#define NV50_SURFACE_FORMAT_RGBX32_FLOAT 0x000000c3
+#define NV50_SURFACE_FORMAT_RGBX32_SINT 0x000000c4
+#define NV50_SURFACE_FORMAT_RGBX32_UINT 0x000000c5
+#define NV50_SURFACE_FORMAT_RGBA16_UNORM 0x000000c6
+#define NV50_SURFACE_FORMAT_RGBA16_SNORM 0x000000c7
+#define NV50_SURFACE_FORMAT_RGBA16_SINT 0x000000c8
+#define NV50_SURFACE_FORMAT_RGBA16_UINT 0x000000c9
+#define NV50_SURFACE_FORMAT_RGBA16_FLOAT 0x000000ca
+#define NV50_SURFACE_FORMAT_RG32_FLOAT 0x000000cb
+#define NV50_SURFACE_FORMAT_RG32_SINT 0x000000cc
+#define NV50_SURFACE_FORMAT_RG32_UINT 0x000000cd
+#define NV50_SURFACE_FORMAT_RGBX16_FLOAT 0x000000ce
+#define NV50_SURFACE_FORMAT_BGRA8_UNORM 0x000000cf
+#define NV50_SURFACE_FORMAT_BGRA8_SRGB 0x000000d0
+#define NV50_SURFACE_FORMAT_RGB10_A2_UNORM 0x000000d1
+#define NV50_SURFACE_FORMAT_RGB10_A2_UINT 0x000000d2
+#define NV50_SURFACE_FORMAT_RGBA8_UNORM 0x000000d5
+#define NV50_SURFACE_FORMAT_RGBA8_SRGB 0x000000d6
+#define NV50_SURFACE_FORMAT_RGBA8_SNORM 0x000000d7
+#define NV50_SURFACE_FORMAT_RGBA8_SINT 0x000000d8
+#define NV50_SURFACE_FORMAT_RGBA8_UINT 0x000000d9
+#define NV50_SURFACE_FORMAT_RG16_UNORM 0x000000da
+#define NV50_SURFACE_FORMAT_RG16_SNORM 0x000000db
+#define NV50_SURFACE_FORMAT_RG16_SINT 0x000000dc
+#define NV50_SURFACE_FORMAT_RG16_UINT 0x000000dd
+#define NV50_SURFACE_FORMAT_RG16_FLOAT 0x000000de
+#define NV50_SURFACE_FORMAT_BGR10_A2_UNORM 0x000000df
+#define NV50_SURFACE_FORMAT_R11G11B10_FLOAT 0x000000e0
+#define NV50_SURFACE_FORMAT_R32_SINT 0x000000e3
+#define NV50_SURFACE_FORMAT_R32_UINT 0x000000e4
#define NV50_SURFACE_FORMAT_R32_FLOAT 0x000000e5
-#define NV50_SURFACE_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50_SURFACE_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50_SURFACE_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50_SURFACE_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50_SURFACE_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50_SURFACE_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50_SURFACE_FORMAT_R8G8_SINT 0x000000ec
-#define NV50_SURFACE_FORMAT_R8G8_UINT 0x000000ed
+#define NV50_SURFACE_FORMAT_BGRX8_UNORM 0x000000e6
+#define NV50_SURFACE_FORMAT_BGRX8_SRGB 0x000000e7
+#define NV50_SURFACE_FORMAT_B5G6R5_UNORM 0x000000e8
+#define NV50_SURFACE_FORMAT_BGR5_A1_UNORM 0x000000e9
+#define NV50_SURFACE_FORMAT_RG8_UNORM 0x000000ea
+#define NV50_SURFACE_FORMAT_RG8_SNORM 0x000000eb
+#define NV50_SURFACE_FORMAT_RG8_SINT 0x000000ec
+#define NV50_SURFACE_FORMAT_RG8_UINT 0x000000ed
#define NV50_SURFACE_FORMAT_R16_UNORM 0x000000ee
#define NV50_SURFACE_FORMAT_R16_SNORM 0x000000ef
#define NV50_SURFACE_FORMAT_R16_SINT 0x000000f0
@@ -118,19 +125,24 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_SURFACE_FORMAT_R8_SINT 0x000000f5
#define NV50_SURFACE_FORMAT_R8_UINT 0x000000f6
#define NV50_SURFACE_FORMAT_A8_UNORM 0x000000f7
-#define NV50_SURFACE_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50_SURFACE_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50_SURFACE_FORMAT_X8B8G8R8_SRGB 0x000000fa
+#define NV50_SURFACE_FORMAT_BGR5_X1_UNORM 0x000000f8
+#define NV50_SURFACE_FORMAT_RGBX8_UNORM 0x000000f9
+#define NV50_SURFACE_FORMAT_RGBX8_SRGB 0x000000fa
+#define NV50_SURFACE_FORMAT_BGR5_X1_UNORM_UNKFB 0x000000fb
+#define NV50_SURFACE_FORMAT_BGR5_X1_UNORM_UNKFC 0x000000fc
+#define NV50_SURFACE_FORMAT_BGRX8_UNORM_UNKFD 0x000000fd
+#define NV50_SURFACE_FORMAT_BGRX8_UNORM_UNKFE 0x000000fe
+#define NV50_SURFACE_FORMAT_Y32_UINT_UNKFF 0x000000ff
#define NV50_ZETA_FORMAT_Z32_FLOAT 0x0000000a
#define NV50_ZETA_FORMAT_Z16_UNORM 0x00000013
-#define NV50_ZETA_FORMAT_Z24S8_UNORM 0x00000014
-#define NV50_ZETA_FORMAT_X8Z24_UNORM 0x00000015
-#define NV50_ZETA_FORMAT_S8Z24_UNORM 0x00000016
-#define NV50_ZETA_FORMAT_UNK18 0x00000018
-#define NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM 0x00000019
-#define NV50_ZETA_FORMAT_UNK1D 0x0000001d
-#define NV50_ZETA_FORMAT_UNK1E 0x0000001e
-#define NV50_ZETA_FORMAT_UNK1F 0x0000001f
+#define NV50_ZETA_FORMAT_S8_Z24_UNORM 0x00000014
+#define NV50_ZETA_FORMAT_Z24_X8_UNORM 0x00000015
+#define NV50_ZETA_FORMAT_Z24_S8_UNORM 0x00000016
+#define NV50_ZETA_FORMAT_Z24_C8_UNORM 0x00000018
+#define NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT 0x00000019
+#define NV50_ZETA_FORMAT_Z24_X8_S8_C8_X16_UNORM 0x0000001d
+#define NV50_ZETA_FORMAT_Z32_X8_C8_X16_FLOAT 0x0000001e
+#define NV50_ZETA_FORMAT_Z32_S8_C8_X16_FLOAT 0x0000001f
#define NV50_QUERY__SIZE 0x00000010
#define NV50_QUERY_COUNTER 0x00000000
@@ -139,4 +151,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_QUERY_TIME 0x00000008
-#endif /* NV50_DEFS_XML */
+#endif /* RNNDB_NV50_DEFS_XML */
diff --git a/src/gallium/drivers/nv50/nv50_formats.c b/src/gallium/drivers/nv50/nv50_formats.c
index 1d8f6d0b86d..be43147468a 100644
--- a/src/gallium/drivers/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nv50/nv50_formats.c
@@ -65,28 +65,32 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
{
/* COMMON FORMATS */
- [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_A8R8G8B8_UNORM,
+ [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_BGRA8_UNORM,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_X8R8G8B8_UNORM,
+ [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_BGRX8_UNORM,
A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_A8R8G8B8_SRGB,
+ [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_BGRA8_SRGB,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_X8R8G8B8_SRGB,
+ [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_BGRX8_SRGB,
A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_R5G6B5_UNORM,
+ [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_B5G6R5_UNORM,
B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_6_5, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_A1R5G5B5_UNORM,
- B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
+ [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_BGR5_A1_UNORM,
+ B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 5_5_5_1, 1),
+ SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
+
+ [PIPE_FORMAT_B5G5R5X1_UNORM] = { NV50_SURFACE_FORMAT_BGR5_X1_UNORM,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_5_5_1, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
[PIPE_FORMAT_B4G4R4A4_UNORM] = { 0,
@@ -97,12 +101,12 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
SAMPLER_VIEW },
- [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_A2B10G10R10_UNORM,
- A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 0),
+ [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_RGB10_A2_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 10_10_10_2, 0),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER | SCANOUT },
- [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_A2R10G10B10_UNORM,
- A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 1),
+ [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_BGR10_A2_UNORM,
+ A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 10_10_10_2, 1),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
/* DEPTH/STENCIL FORMATS */
@@ -111,25 +115,24 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_S8Z24_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, S8Z24, 0),
+ [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_S8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_X8Z24_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, X8Z24, 0),
+ [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_Z24_X8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_X8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_Z24S8_UNORM,
- B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, Z24S8, 0),
+ [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
+ B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, S8_Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
[PIPE_FORMAT_Z32_FLOAT] = { NV50_ZETA_FORMAT_Z32_FLOAT,
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = {
- NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, X24S8Z32, 0),
+ [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32_S8_X24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
/* LUMINANCE, ALPHA, INTENSITY */
@@ -278,15 +281,15 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* FLOAT 16 */
- [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT,
+ [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_RGBA16_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT,
+ [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_RGBX16_FLOAT,
A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16_FLOAT,
+ [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_RG16_FLOAT,
A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -296,15 +299,15 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* FLOAT 32 */
- [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT,
+ [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_RGBA32_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT,
+ [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_RGBX32_FLOAT,
A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32_FLOAT,
+ [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_RG32_FLOAT,
A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -314,12 +317,12 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* ODD FORMATS */
- [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_B10G11R11_FLOAT,
- B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 10_11_11, 0),
+ [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_R11G11B10_FLOAT,
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 11_11_10, 0),
SAMPLER_VIEW | RENDER_TARGET },
[PIPE_FORMAT_R9G9B9E5_FLOAT] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, E5_9_9_9, 0),
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 9_9_9_E5, 0),
SAMPLER_VIEW },
/* SNORM 32 */
@@ -360,7 +363,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* SNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_SNORM,
+ [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_RGBA16_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -368,7 +371,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
+ [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_RG16_SNORM,
A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -378,7 +381,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* UNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_UNORM,
+ [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_RGBA16_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -386,7 +389,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
+ [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_RG16_UNORM,
A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -396,7 +399,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* SNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_SNORM,
+ [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_RGBA8_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -404,7 +407,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8_8, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_R8G8_SNORM,
+ [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_RG8_SNORM,
A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -414,23 +417,23 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* UNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_RGBA8_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_A8B8G8R8_SRGB,
- A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
+ [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_RGBA8_SRGB,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8X8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8X8_UNORM] = { NV50_SURFACE_FORMAT_RGBX8_UNORM,
B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8_UNORM] = { 0,
A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_R8G8_UNORM,
+ [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_RG8_UNORM,
A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -549,11 +552,11 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* OTHER FORMATS */
[PIPE_FORMAT_R8G8_B8G8_UNORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C1_C2_C1_C0, 0),
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, U8_YA8_V8_YB8, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_G8R8_G8B8_UNORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C2_C1_C0_C1, 0),
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, YA8_U8_YB8_V8, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_R8SG8SB8UX8U_NORM] = { 0,
@@ -561,11 +564,11 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
SAMPLER_VIEW },
[PIPE_FORMAT_R5SG5SB6U_NORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 6_5_5, 0),
+ B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 5_5_6, 0),
SAMPLER_VIEW },
- [PIPE_FORMAT_R1_UNORM] = { 0,
- B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP_8X8, 0),
+ [PIPE_FORMAT_R1_UNORM] = { NV50_SURFACE_FORMAT_BITMAP,
+ B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_A8B8G8R8_UNORM] = { 0,
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index ebacbb4a449..eefbaad6483 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -63,7 +63,7 @@ nv50_2d_format(enum pipe_format format)
case 2:
return NV50_SURFACE_FORMAT_R16_UNORM;
case 4:
- return NV50_SURFACE_FORMAT_A8R8G8B8_UNORM;
+ return NV50_SURFACE_FORMAT_BGRA8_UNORM;
default:
return 0;
}
diff --git a/src/gallium/drivers/nv50/nv50_texture.xml.h b/src/gallium/drivers/nv50/nv50_texture.xml.h
index e0cbbdf0d7b..08f6efdd7bf 100644
--- a/src/gallium/drivers/nv50/nv50_texture.xml.h
+++ b/src/gallium/drivers/nv50/nv50_texture.xml.h
@@ -1,5 +1,5 @@
-#ifndef NV50_TEXTURE_XML
-#define NV50_TEXTURE_XML
+#ifndef RNNDB_NV50_TEXTURE_XML
+#define RNNDB_NV50_TEXTURE_XML
/* Autogenerated file, DO NOT EDIT manually!
@@ -8,8 +8,10 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
git clone git://0x04.net/rules-ng-ng
The rules-ng-ng source files this header was generated from are:
-- nv50_texture.xml ( 8377 bytes, from 2011-02-12 12:05:21)
-- copyright.xml ( 6452 bytes, from 2010-11-25 23:28:20)
+- rnndb/nv50_texture.xml ( 7947 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/copyright.xml ( 6452 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/nvchipsets.xml ( 3617 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/nv50_defs.xml ( 5468 bytes, from 2011-07-09 13:43:58)
Copyright (C) 2006-2011 by the following authors:
- Artur Huillet <[email protected]> (ahuillet)
@@ -115,52 +117,52 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_TIC_0_FMT_32_32_32_32 0x00000001
#define NV50_TIC_0_FMT_16_16_16_16 0x00000003
#define NV50_TIC_0_FMT_32_32 0x00000004
-#define NV50_TIC_0_FMT_32_8 0x00000005
+#define NV50_TIC_0_FMT_32_8_X24 0x00000005
#define NV50_TIC_0_FMT_8_8_8_8 0x00000008
-#define NV50_TIC_0_FMT_2_10_10_10 0x00000009
+#define NV50_TIC_0_FMT_10_10_10_2 0x00000009
#define NV50_TIC_0_FMT_16_16 0x0000000c
-#define NV50_TIC_0_FMT_8_24 0x0000000d
-#define NV50_TIC_0_FMT_24_8 0x0000000e
+#define NV50_TIC_0_FMT_24_8 0x0000000d
+#define NV50_TIC_0_FMT_8_24 0x0000000e
#define NV50_TIC_0_FMT_32 0x0000000f
#define NV50_TIC_0_FMT_BPTC_FLOAT 0x00000010
#define NV50_TIC_0_FMT_BPTC_UFLOAT 0x00000011
#define NV50_TIC_0_FMT_4_4_4_4 0x00000012
-#define NV50_TIC_0_FMT_5_5_5_1 0x00000013
-#define NV50_TIC_0_FMT_1_5_5_5 0x00000014
+#define NV50_TIC_0_FMT_1_5_5_5 0x00000013
+#define NV50_TIC_0_FMT_5_5_5_1 0x00000014
#define NV50_TIC_0_FMT_5_6_5 0x00000015
-#define NV50_TIC_0_FMT_6_5_5 0x00000016
+#define NV50_TIC_0_FMT_5_5_6 0x00000016
#define NV50_TIC_0_FMT_BPTC 0x00000017
#define NV50_TIC_0_FMT_8_8 0x00000018
#define NV50_TIC_0_FMT_16 0x0000001b
#define NV50_TIC_0_FMT_8 0x0000001d
#define NV50_TIC_0_FMT_4_4 0x0000001e
-#define NV50_TIC_0_FMT_BITMAP_8X8 0x0000001f
-#define NV50_TIC_0_FMT_E5_9_9_9 0x00000020
-#define NV50_TIC_0_FMT_10_11_11 0x00000021
-#define NV50_TIC_0_FMT_C1_C2_C1_C0 0x00000022
-#define NV50_TIC_0_FMT_C2_C1_C0_C1 0x00000023
+#define NV50_TIC_0_FMT_BITMAP 0x0000001f
+#define NV50_TIC_0_FMT_9_9_9_E5 0x00000020
+#define NV50_TIC_0_FMT_11_11_10 0x00000021
+#define NV50_TIC_0_FMT_U8_YA8_V8_YB8 0x00000022
+#define NV50_TIC_0_FMT_YA8_U8_YB8_V8 0x00000023
#define NV50_TIC_0_FMT_DXT1 0x00000024
#define NV50_TIC_0_FMT_DXT3 0x00000025
#define NV50_TIC_0_FMT_DXT5 0x00000026
#define NV50_TIC_0_FMT_RGTC1 0x00000027
#define NV50_TIC_0_FMT_RGTC2 0x00000028
-#define NV50_TIC_0_FMT_Z24S8 0x00000029
-#define NV50_TIC_0_FMT_S8Z24 0x0000002a
-#define NV50_TIC_0_FMT_X8Z24 0x0000002b
-#define NV50_TIC_0_FMT_C8Z24_MS4_CS4 0x0000002c
-#define NV50_TIC_0_FMT_C8Z24_MS8_CS8 0x0000002d
-#define NV50_TIC_0_FMT_C8Z24_MS4_CS12 0x0000002e
+#define NV50_TIC_0_FMT_S8_Z24 0x00000029
+#define NV50_TIC_0_FMT_Z24_S8 0x0000002a
+#define NV50_TIC_0_FMT_Z24_X8 0x0000002b
+#define NV50_TIC_0_FMT_Z24_C8_MS4_CS4 0x0000002c
+#define NV50_TIC_0_FMT_Z24_C8_MS8_CS8 0x0000002d
+#define NV50_TIC_0_FMT_Z24_C8_MS4_CS12 0x0000002e
#define NV50_TIC_0_FMT_Z32 0x0000002f
-#define NV50_TIC_0_FMT_X24S8Z32 0x00000030
-#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS4_CS4 0x00000031
-#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS8_CS8 0x00000032
-#define NV50_TIC_0_FMT_X16C8X8Z32_MS4_CS4 0x00000033
-#define NV50_TIC_0_FMT_X16C8X8Z32_MS8_CS8 0x00000034
-#define NV50_TIC_0_FMT_X16C8S8Z32_MS4_CS4 0x00000035
-#define NV50_TIC_0_FMT_X16C8S8Z32_MS8_CS8 0x00000036
-#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS4_CS12 0x00000037
-#define NV50_TIC_0_FMT_X16C8X8Z32_MS4_CS12 0x00000038
-#define NV50_TIC_0_FMT_X16C8S8Z32_MS4_CS12 0x00000039
+#define NV50_TIC_0_FMT_Z32_S8_X24 0x00000030
+#define NV50_TIC_0_FMT_Z24_X8_S8_C8_X16_MS4_CS4 0x00000031
+#define NV50_TIC_0_FMT_Z24_X8_S8_C8_X16_MS8_CS8 0x00000032
+#define NV50_TIC_0_FMT_Z32_X8_C8_X16_MS4_CS4 0x00000033
+#define NV50_TIC_0_FMT_Z32_X8_C8_X16_MS8_CS8 0x00000034
+#define NV50_TIC_0_FMT_Z32_S8_C8_X16_MS4_CS4 0x00000035
+#define NV50_TIC_0_FMT_Z32_S8_C8_X16_MS8_CS8 0x00000036
+#define NV50_TIC_0_FMT_Z24_X8_S8_C8_X16_MS4_CS12 0x00000037
+#define NV50_TIC_0_FMT_Z32_X8_C8_X16_MS4_CS12 0x00000038
+#define NV50_TIC_0_FMT_Z32_S8_C8_X16_MS4_CS12 0x00000039
#define NV50_TIC_0_FMT_Z16 0x0000003a
#define NV50_TIC_1 0x00000004
@@ -215,6 +217,19 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_TIC_7_BASE_LEVEL__SHIFT 0
#define NV50_TIC_7_MAX_LEVEL__MASK 0x000000f0
#define NV50_TIC_7_MAX_LEVEL__SHIFT 4
+#define NV50_TIC_7_MS_MODE__MASK 0x0000f000
+#define NV50_TIC_7_MS_MODE__SHIFT 12
+#define NV50_TIC_7_MS_MODE_MS1 0x00000000
+#define NV50_TIC_7_MS_MODE_MS2 0x00001000
+#define NV50_TIC_7_MS_MODE_MS4 0x00002000
+#define NV50_TIC_7_MS_MODE_MS8 0x00003000
+#define NVA3_TIC_7_MS_MODE_MS8_ALT 0x00004000
+#define NVA3_TIC_7_MS_MODE_MS2_ALT 0x00005000
+#define NVC0_TIC_7_MS_MODE_UNK6 0x00006000
+#define NV50_TIC_7_MS_MODE_MS4_CS4 0x00008000
+#define NV50_TIC_7_MS_MODE_MS4_CS12 0x00009000
+#define NV50_TIC_7_MS_MODE_MS8_CS8 0x0000a000
+#define NVC0_TIC_7_MS_MODE_MS8_CS24 0x0000b000
#define NV50_TSC__SIZE 0x00000020
#define NV50_TSC_0 0x00000000
@@ -276,4 +291,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_TSC_7_BORDER_COLOR_ALPHA__SHIFT 0
-#endif /* NV50_TEXTURE_XML */
+#endif /* RNNDB_NV50_TEXTURE_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index ba7d28bd47e..63016372827 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -424,7 +424,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVC0_3D_VERTEX_ATTRIB_FORMAT(i0) (0x00001160 + 0x4*(i0))
#define NVC0_3D_VERTEX_ATTRIB_FORMAT__ESIZE 0x00000004
#define NVC0_3D_VERTEX_ATTRIB_FORMAT__LEN 0x00000020
-#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__MASK 0x0000003f
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__MASK 0x0000001f
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__SHIFT 0
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST 0x00000040
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_OFFSET__MASK 0x001fff80
@@ -443,8 +443,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8 0x03000000
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16 0x03600000
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8 0x03a00000
-#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_2_10_10_10 0x06000000
-#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__MASK 0x78000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_10_10_10_2 0x06000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__MASK 0x38000000
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__SHIFT 27
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SNORM 0x08000000
#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_UNORM 0x10000000
diff --git a/src/gallium/drivers/nvc0/nvc0_formats.c b/src/gallium/drivers/nvc0/nvc0_formats.c
index 1cc60f84476..8dd4419436d 100644
--- a/src/gallium/drivers/nvc0/nvc0_formats.c
+++ b/src/gallium/drivers/nvc0/nvc0_formats.c
@@ -66,33 +66,33 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
{
/* COMMON FORMATS */
- [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_A8R8G8B8_UNORM,
+ [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_BGRA8_UNORM,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_X8R8G8B8_UNORM,
+ [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_BGRX8_UNORM,
A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_A8R8G8B8_SRGB,
+ [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_BGRA8_SRGB,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_X8R8G8B8_SRGB,
+ [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_BGRX8_SRGB,
A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_R5G6B5_UNORM,
+ [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_B5G6R5_UNORM,
B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_6_5, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_A1R5G5B5_UNORM,
- B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
+ [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_BGR5_A1_UNORM,
+ B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 5_5_5_1, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B5G5R5X1_UNORM] = { 0,
- B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
- SAMPLER_VIEW | SCANOUT },
+ [PIPE_FORMAT_B5G5R5X1_UNORM] = { NV50_SURFACE_FORMAT_BGR5_X1_UNORM,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_5_5_1, 1),
+ SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
[PIPE_FORMAT_B4G4R4A4_UNORM] = { 0,
B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
@@ -102,12 +102,12 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
SAMPLER_VIEW },
- [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_A2B10G10R10_UNORM,
- A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 0),
+ [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_RGB10_A2_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 10_10_10_2, 0),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER | SCANOUT },
- [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_A2R10G10B10_UNORM,
- A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 1),
+ [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_BGR10_A2_UNORM,
+ A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 10_10_10_2, 1),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
/* DEPTH/STENCIL FORMATS */
@@ -116,25 +116,24 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_S8Z24_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, S8Z24, 0),
+ [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_S8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_X8Z24_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, X8Z24, 0),
+ [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_Z24_X8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_X8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_Z24S8_UNORM,
- B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, Z24S8, 0),
+ [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
+ B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, S8_Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
[PIPE_FORMAT_Z32_FLOAT] = { NV50_ZETA_FORMAT_Z32_FLOAT,
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = {
- NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM,
- B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, X24S8Z32, 0),
+ [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32_S8_X24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
/* LUMINANCE, ALPHA, INTENSITY */
@@ -283,15 +282,15 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* FLOAT 16 */
- [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT,
+ [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_RGBA16_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT,
+ [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_RGBX16_FLOAT,
A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16_FLOAT,
+ [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_RG16_FLOAT,
A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -301,15 +300,15 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* FLOAT 32 */
- [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT,
+ [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_RGBA32_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT,
+ [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_RGBX32_FLOAT,
A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32_FLOAT,
+ [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_RG32_FLOAT,
A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -319,12 +318,12 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* ODD FORMATS */
- [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_B10G11R11_FLOAT,
- B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 10_11_11, 0),
+ [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_R11G11B10_FLOAT,
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 11_11_10, 0),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
[PIPE_FORMAT_R9G9B9E5_FLOAT] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, E5_9_9_9, 0),
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 9_9_9_E5, 0),
SAMPLER_VIEW },
/* SNORM 32 */
@@ -365,7 +364,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* SNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_SNORM,
+ [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_RGBA16_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -373,7 +372,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
+ [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_RG16_SNORM,
A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -383,7 +382,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* UNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_UNORM,
+ [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_RGBA16_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -391,7 +390,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16_16, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
+ [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_RG16_UNORM,
A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -401,7 +400,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* SNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_SNORM,
+ [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_RGBA8_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -409,7 +408,7 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8_8, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_R8G8_SNORM,
+ [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_RG8_SNORM,
A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -419,23 +418,23 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* UNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_RGBA8_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_A8B8G8R8_SRGB,
- A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
+ [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_RGBA8_SRGB,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8X8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8X8_UNORM] = { NV50_SURFACE_FORMAT_RGBX8_UNORM,
B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8_UNORM] = { 0,
A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
VERTEX_BUFFER },
- [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_R8G8_UNORM,
+ [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_RG8_UNORM,
A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
@@ -554,11 +553,11 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
/* OTHER FORMATS */
[PIPE_FORMAT_R8G8_B8G8_UNORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C1_C2_C1_C0, 0),
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, U8_YA8_V8_YB8, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_G8R8_G8B8_UNORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C2_C1_C0_C1, 0),
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, YA8_U8_YB8_V8, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_R8SG8SB8UX8U_NORM] = { 0,
@@ -566,11 +565,11 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
SAMPLER_VIEW },
[PIPE_FORMAT_R5SG5SB6U_NORM] = { 0,
- B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 6_5_5, 0),
+ B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 5_5_6, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_R1_UNORM] = { 0,
- B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP_8X8, 0),
+ B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_A8B8G8R8_UNORM] = { 0,
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
index 4484a9f8b76..67bba3c6cc3 100644
--- a/src/gallium/drivers/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -62,11 +62,11 @@ nvc0_2d_format(enum pipe_format format)
case 2:
return NV50_SURFACE_FORMAT_R16_UNORM;
case 4:
- return NV50_SURFACE_FORMAT_A8R8G8B8_UNORM;
+ return NV50_SURFACE_FORMAT_BGRA8_UNORM;
case 8:
- return NV50_SURFACE_FORMAT_R16G16B16A16_UNORM;
+ return NV50_SURFACE_FORMAT_RGBA16_UNORM;
case 16:
- return NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT;
+ return NV50_SURFACE_FORMAT_RGBA32_FLOAT;
default:
return 0;
}