Skip to contentSkip to conversation

nv50: regenerate rnndb headers

PATCH New Ilia Mirkin 3 participants 3 messages Dec 31, 2014 – Jan 4, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nv50: regenerate rnndb headers

The headers hadn't been regenerated in a long time, and there were a few minor divergences. Among other things, rnndb has changed naming to G80/etc, for now I've not tackled switching that over and manually replaced the nvidia codenames back to the chip ids. However no other modifications of the headergen'd headers was done.

---
 src/gallium/drivers/nouveau/nv50/nv50_2d.xml.h     | 133 +++---
 src/gallium/drivers/nouveau/nv50/nv50_3d.xml.h     | 449 +++++++++++----------
 src/gallium/drivers/nouveau/nv50/nv50_3ddefs.xml.h |  55 ++-
 src/gallium/drivers/nouveau/nv50/nv50_defs.xml.h   |  94 ++++-
 src/gallium/drivers/nouveau/nv50/nv50_formats.c    |  12 +-
 src/gallium/drivers/nouveau/nv50/nv50_program.c    |   2 +-
 src/gallium/drivers/nouveau/nv50/nv50_state.c      |   4 +-
 .../drivers/nouveau/nv50/nv50_state_validate.c     |   2 +-
 src/gallium/drivers/nouveau/nv50/nv50_surface.c    |   4 +-
 .../drivers/nouveau/nv50/nv50_texture.xml.h        |  52 +--
 .../drivers/nouveau/nvc0/nvc0_state_validate.c     |   2 +-
 11 files changed, 451 insertions(+), 358 deletions(-)
src/gallium/drivers/nouveau/nv50/nv50_2d.xml.h +74 -59
index dfbef2c..899d73d 100644
@@ -1,21 +1,21 @@
-#ifndef RNNDB_NV50_2D_XML
-#define RNNDB_NV50_2D_XML
+#ifndef NV50_2D_XML
+#define NV50_2D_XML
 
 /* Autogenerated file, DO NOT EDIT manually!
 
 This file was generated by the rules-ng-ng headergen tool in this git repository:
-http://0x04.net/cgit/index.cgi/rules-ng-ng
-git clone git://0x04.net/rules-ng-ng
+http://github.com/envytools/envytools/
+git clone https://github.com/envytools/envytools.git
 
 The rules-ng-ng source files this header was generated from are:
-- rnndb/nv50_2d.xml      (  11113 bytes, from 2011-07-09 13:43:58)
-- ./rnndb/copyright.xml  (   6452 bytes, from 2011-07-09 13:43:58)
-- ./rnndb/nv_object.xml  (  12912 bytes, from 2012-07-12 09:41:09)
-- ./rnndb/nvchipsets.xml (   3736 bytes, from 2012-07-12 09:41:09)
-- ./rnndb/nv_defs.xml    (   4437 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:
+- rnndb/graph/g80_2d.xml   (  11440 bytes, from 2014-09-25 06:32:11)
+- rnndb/copyright.xml      (   6452 bytes, from 2013-05-14 03:57:49)
+- rnndb/fifo/nv_object.xml (  15326 bytes, from 2014-09-25 06:32:11)
+- rnndb/nvchipsets.xml     (   2759 bytes, from 2014-10-05 01:51:02)
+- rnndb/g80_defs.xml       (  18175 bytes, from 2014-09-25 06:32:11)
+- rnndb/nv_defs.xml        (   4399 bytes, from 2013-09-07 03:32:45)
+
+Copyright (C) 2006-2014 by the following authors:
 - Artur Huillet <[email protected]> (ahuillet)
 - Ben Skeggs (darktama, darktama_)
 - B. R. <[email protected]> (koala_br)
@@ -82,7 +82,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_DMA_SRC						0x00000188
 
-#define NV50_2D_DMA_COND					0x0000018c
+#define NV50_2D_DMA_COND						0x0000018c
 
 #define NV50_2D_DST_FORMAT					0x00000200
 
@@ -100,7 +100,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_DST_HEIGHT					0x0000021c
 
-#define NV50_2D_DST_ADDRESS_HIGH				0x00000220
+#define NV50_2D_DST_ADDRESS_HIGH					0x00000220
 
 #define NV50_2D_DST_ADDRESS_LOW					0x00000224
 
@@ -108,6 +108,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_2D_UNK228						0x00000228
 
+#define NVC0_2D_UNK22C						0x0000022c
+
 #define NV50_2D_SRC_FORMAT					0x00000230
 
 #define NV50_2D_SRC_LINEAR					0x00000234
@@ -118,7 +120,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_SRC_LAYER					0x00000240
 
-#define NVC0_2D_UNK0240						0x00000240
+#define NVC0_2D_UNK0240					0x00000240
 
 #define NV50_2D_SRC_PITCH					0x00000244
 #define NV50_2D_SRC_PITCH__MAX					0x00040000
@@ -129,25 +131,33 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_2D_SRC_HEIGHT					0x0000024c
 #define NV50_2D_SRC_HEIGHT__MAX					0x00010000
 
-#define NV50_2D_SRC_ADDRESS_HIGH				0x00000250
+#define NV50_2D_SRC_ADDRESS_HIGH					0x00000250
 
 #define NV50_2D_SRC_ADDRESS_LOW					0x00000254
 
 #define NV50_2D_UNK258						0x00000258
 
+#define NVC0_2D_UNK25C						0x0000025c
+
 #define NV50_2D_UNK260						0x00000260
 
+#define NVC0_2D_SINGLE_GPC					0x00000260
+
 #define NV50_2D_COND_ADDRESS_HIGH				0x00000264
 
-#define NV50_2D_COND_ADDRESS_LOW				0x00000268
+#define NV50_2D_COND_ADDRESS_LOW					0x00000268
 
 #define NV50_2D_COND_MODE					0x0000026c
 #define NV50_2D_COND_MODE_NEVER					0x00000000
-#define NV50_2D_COND_MODE_ALWAYS				0x00000001
+#define NV50_2D_COND_MODE_ALWAYS					0x00000001
 #define NV50_2D_COND_MODE_RES_NON_ZERO				0x00000002
 #define NV50_2D_COND_MODE_EQUAL					0x00000003
 #define NV50_2D_COND_MODE_NOT_EQUAL				0x00000004
 
+#define NVC0_2D_UNK0270(i0)				       (0x00000270 + 0x4*(i0))
+#define NVC0_2D_UNK0270__ESIZE					0x00000004
+#define NVC0_2D_UNK0270__LEN					0x00000004
+
 #define NV50_2D_CLIP_X						0x00000280
 
 #define NV50_2D_CLIP_Y						0x00000284
@@ -158,7 +168,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_CLIP_ENABLE					0x00000290
 
-#define NV50_2D_COLOR_KEY_FORMAT				0x00000294
+#define NV50_2D_COLOR_KEY_FORMAT					0x00000294
 #define NV50_2D_COLOR_KEY_FORMAT_16BPP				0x00000000
 #define NV50_2D_COLOR_KEY_FORMAT_15BPP				0x00000001
 #define NV50_2D_COLOR_KEY_FORMAT_24BPP				0x00000002
@@ -169,7 +179,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_COLOR_KEY					0x00000298
 
-#define NV50_2D_COLOR_KEY_ENABLE				0x0000029c
+#define NV50_2D_COLOR_KEY_ENABLE					0x0000029c
 
 #define NV50_2D_ROP						0x000002a0
 
@@ -203,31 +213,36 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_2D_PATTERN_OFFSET_Y__SHIFT				8
 
 #define NV50_2D_PATTERN_SELECT					0x000002b4
-#define NV50_2D_PATTERN_SELECT_MONO_8X8				0x00000000
-#define NV50_2D_PATTERN_SELECT_MONO_64X1			0x00000001
-#define NV50_2D_PATTERN_SELECT_MONO_1X64			0x00000002
+#define NV50_2D_PATTERN_SELECT_BITMAP_8X8			0x00000000
+#define NV50_2D_PATTERN_SELECT_BITMAP_64X1			0x00000001
+#define NV50_2D_PATTERN_SELECT_BITMAP_1X64			0x00000002
 #define NV50_2D_PATTERN_SELECT_COLOR				0x00000003
 
+#define NVC0_2D_UNK02B8(i0)				       (0x000002b8 + 0x4*(i0))
+#define NVC0_2D_UNK02B8__ESIZE					0x00000004
+#define NVC0_2D_UNK02B8__LEN					0x00000009
+
 #define NVC0_2D_UNK2DC						0x000002dc
 
 #define NVC0_2D_UNK2E0						0x000002e0
 
+#define NVC0_2D_UNK02E4					0x000002e4
+
 #define NV50_2D_PATTERN_COLOR_FORMAT				0x000002e8
-#define NV50_2D_PATTERN_COLOR_FORMAT_16BPP			0x00000000
-#define NV50_2D_PATTERN_COLOR_FORMAT_15BPP			0x00000001
-#define NV50_2D_PATTERN_COLOR_FORMAT_32BPP			0x00000002
-#define NV50_2D_PATTERN_COLOR_FORMAT_8BPP			0x00000003
+#define NV50_2D_PATTERN_COLOR_FORMAT_A16R5G6B5			0x00000000
+#define NV50_2D_PATTERN_COLOR_FORMAT_X16A1R5G5B5			0x00000001
+#define NV50_2D_PATTERN_COLOR_FORMAT_A8R8G8B8			0x00000002
+#define NV50_2D_PATTERN_COLOR_FORMAT_X16A8Y8			0x00000003
 #define NV50_2D_PATTERN_COLOR_FORMAT_UNK4			0x00000004
 #define NV50_2D_PATTERN_COLOR_FORMAT_UNK5			0x00000005
-#define NV50_2D_PATTERN_COLOR_FORMAT_UNK6			0x00000006
 
-#define NV50_2D_PATTERN_MONO_FORMAT				0x000002ec
-#define NV50_2D_PATTERN_MONO_FORMAT_CGA6			0x00000000
-#define NV50_2D_PATTERN_MONO_FORMAT_LE				0x00000001
+#define NV50_2D_PATTERN_BITMAP_FORMAT				0x000002ec
+#define NV50_2D_PATTERN_BITMAP_FORMAT_CGA6			0x00000000
+#define NV50_2D_PATTERN_BITMAP_FORMAT_LE				0x00000001
 
-#define NV50_2D_PATTERN_COLOR(i0)			       (0x000002f0 + 0x4*(i0))
-#define NV50_2D_PATTERN_COLOR__ESIZE				0x00000004
-#define NV50_2D_PATTERN_COLOR__LEN				0x00000002
+#define NV50_2D_PATTERN_BITMAP_COLOR(i0)			       (0x000002f0 + 0x4*(i0))
+#define NV50_2D_PATTERN_BITMAP_COLOR__ESIZE			0x00000004
+#define NV50_2D_PATTERN_BITMAP_COLOR__LEN			0x00000002
 
 #define NV50_2D_PATTERN_BITMAP(i0)			       (0x000002f8 + 0x4*(i0))
 #define NV50_2D_PATTERN_BITMAP__ESIZE				0x00000004
@@ -236,28 +251,28 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_2D_PATTERN_X8R8G8B8(i0)			       (0x00000300 + 0x4*(i0))
 #define NV50_2D_PATTERN_X8R8G8B8__ESIZE				0x00000004
 #define NV50_2D_PATTERN_X8R8G8B8__LEN				0x00000040
-#define NV50_2D_PATTERN_X8R8G8B8_B__MASK			0x000000ff
+#define NV50_2D_PATTERN_X8R8G8B8_B__MASK				0x000000ff
 #define NV50_2D_PATTERN_X8R8G8B8_B__SHIFT			0
-#define NV50_2D_PATTERN_X8R8G8B8_G__MASK			0x0000ff00
+#define NV50_2D_PATTERN_X8R8G8B8_G__MASK				0x0000ff00
 #define NV50_2D_PATTERN_X8R8G8B8_G__SHIFT			8
-#define NV50_2D_PATTERN_X8R8G8B8_R__MASK			0x00ff0000
+#define NV50_2D_PATTERN_X8R8G8B8_R__MASK				0x00ff0000
 #define NV50_2D_PATTERN_X8R8G8B8_R__SHIFT			16
 
 #define NV50_2D_PATTERN_R5G6B5(i0)			       (0x00000400 + 0x4*(i0))
 #define NV50_2D_PATTERN_R5G6B5__ESIZE				0x00000004
 #define NV50_2D_PATTERN_R5G6B5__LEN				0x00000020
 #define NV50_2D_PATTERN_R5G6B5_B0__MASK				0x0000001f
-#define NV50_2D_PATTERN_R5G6B5_B0__SHIFT			0
+#define NV50_2D_PATTERN_R5G6B5_B0__SHIFT				0
 #define NV50_2D_PATTERN_R5G6B5_G0__MASK				0x000007e0
-#define NV50_2D_PATTERN_R5G6B5_G0__SHIFT			5
+#define NV50_2D_PATTERN_R5G6B5_G0__SHIFT				5
 #define NV50_2D_PATTERN_R5G6B5_R0__MASK				0x0000f800
-#define NV50_2D_PATTERN_R5G6B5_R0__SHIFT			11
+#define NV50_2D_PATTERN_R5G6B5_R0__SHIFT				11
 #define NV50_2D_PATTERN_R5G6B5_B1__MASK				0x001f0000
-#define NV50_2D_PATTERN_R5G6B5_B1__SHIFT			16
+#define NV50_2D_PATTERN_R5G6B5_B1__SHIFT				16
 #define NV50_2D_PATTERN_R5G6B5_G1__MASK				0x07e00000
-#define NV50_2D_PATTERN_R5G6B5_G1__SHIFT			21
+#define NV50_2D_PATTERN_R5G6B5_G1__SHIFT				21
 #define NV50_2D_PATTERN_R5G6B5_R1__MASK				0xf8000000
-#define NV50_2D_PATTERN_R5G6B5_R1__SHIFT			27
+#define NV50_2D_PATTERN_R5G6B5_R1__SHIFT				27
 
 #define NV50_2D_PATTERN_X1R5G5B5(i0)			       (0x00000480 + 0x4*(i0))
 #define NV50_2D_PATTERN_X1R5G5B5__ESIZE				0x00000004
@@ -293,7 +308,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_DRAW_SHAPE					0x00000580
 #define NV50_2D_DRAW_SHAPE_POINTS				0x00000000
-#define NV50_2D_DRAW_SHAPE_LINES				0x00000001
+#define NV50_2D_DRAW_SHAPE_LINES					0x00000001
 #define NV50_2D_DRAW_SHAPE_LINE_STRIP				0x00000002
 #define NV50_2D_DRAW_SHAPE_TRIANGLES				0x00000003
 #define NV50_2D_DRAW_SHAPE_RECTANGLES				0x00000004
@@ -303,10 +318,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_2D_DRAW_COLOR					0x00000588
 
 #define NV50_2D_UNK58C						0x0000058c
-#define NV50_2D_UNK58C_0					0x00000001
-#define NV50_2D_UNK58C_1					0x00000010
-#define NV50_2D_UNK58C_2					0x00000100
-#define NV50_2D_UNK58C_3					0x00001000
+#define NV50_2D_UNK58C_0						0x00000001
+#define NV50_2D_UNK58C_1						0x00000010
+#define NV50_2D_UNK58C_2						0x00000100
+#define NV50_2D_UNK58C_3						0x00001000
 
 #define NV50_2D_DRAW_POINT16					0x000005e0
 #define NV50_2D_DRAW_POINT16_X__MASK				0x0000ffff
@@ -348,19 +363,19 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_SIFC_HEIGHT					0x0000083c
 
-#define NV50_2D_SIFC_DX_DU_FRACT				0x00000840
+#define NV50_2D_SIFC_DX_DU_FRACT					0x00000840
 
 #define NV50_2D_SIFC_DX_DU_INT					0x00000844
 
-#define NV50_2D_SIFC_DY_DV_FRACT				0x00000848
+#define NV50_2D_SIFC_DY_DV_FRACT					0x00000848
 
 #define NV50_2D_SIFC_DY_DV_INT					0x0000084c
 
-#define NV50_2D_SIFC_DST_X_FRACT				0x00000850
+#define NV50_2D_SIFC_DST_X_FRACT					0x00000850
 
 #define NV50_2D_SIFC_DST_X_INT					0x00000854
 
-#define NV50_2D_SIFC_DST_Y_FRACT				0x00000858
+#define NV50_2D_SIFC_DST_Y_FRACT					0x00000858
 
 #define NV50_2D_SIFC_DST_Y_INT					0x0000085c
 
@@ -381,7 +396,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_2D_BLIT_CONTROL_ORIGIN_CORNER			0x00000001
 #define NV50_2D_BLIT_CONTROL_FILTER__MASK			0x00000010
 #define NV50_2D_BLIT_CONTROL_FILTER__SHIFT			4
-#define NV50_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE		0x00000000
+#define NV50_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE			0x00000000
 #define NV50_2D_BLIT_CONTROL_FILTER_BILINEAR			0x00000010
 
 #define NV50_2D_BLIT_DST_X					0x000008b0
@@ -392,25 +407,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NV50_2D_BLIT_DST_H					0x000008bc
 
-#define NV50_2D_BLIT_DU_DX_FRACT				0x000008c0
+#define NV50_2D_BLIT_DU_DX_FRACT					0x000008c0
 
 #define NV50_2D_BLIT_DU_DX_INT					0x000008c4
 
-#define NV50_2D_BLIT_DV_DY_FRACT				0x000008c8
+#define NV50_2D_BLIT_DV_DY_FRACT					0x000008c8
 
 #define NV50_2D_BLIT_DV_DY_INT					0x000008cc
 
-#define NV50_2D_BLIT_SRC_X_FRACT				0x000008d0
+#define NV50_2D_BLIT_SRC_X_FRACT					0x000008d0
 
 #define NV50_2D_BLIT_SRC_X_INT					0x000008d4
 
-#define NV50_2D_BLIT_SRC_Y_FRACT				0x000008d8
+#define NV50_2D_BLIT_SRC_Y_FRACT					0x000008d8
 
 #define NV50_2D_BLIT_SRC_Y_INT					0x000008dc
 
 #define NVC0_2D_FIRMWARE(i0)				       (0x000008e0 + 0x4*(i0))
-#define NVC0_2D_FIRMWARE__ESIZE					0x00000004
+#define NVC0_2D_FIRMWARE__ESIZE				0x00000004
 #define NVC0_2D_FIRMWARE__LEN					0x00000020
 
 
-#endif /* RNNDB_NV50_2D_XML */
+#endif /* NV50_2D_XML */
src/gallium/drivers/nouveau/nv50/nv50_3d.xml.h +233 -216

1,164 lines not on this page · raw message

src/gallium/drivers/nouveau/nv50/nv50_3ddefs.xml.h +25 -30

75 lines not on this page · raw message

src/gallium/drivers/nouveau/nv50/nv50_defs.xml.h +78 -16

138 lines not on this page · raw message

src/gallium/drivers/nouveau/nv50/nv50_formats.c +8 -4
index d394015..0f86ba1 100644
@@ -73,12 +73,16 @@
 # define U_tV  U_V
 #endif
 
-#define NV50_ZETA_FORMAT_NONE 0
+#define NV50_ZETA_FORMAT_NONE    0
+#define NV50_SURFACE_FORMAT_NONE 0
 
 /* for vertex buffers: */
-#define NV50_TIC_0_FMT_8_8_8    NV50_TIC_0_FMT_8_8_8_8
-#define NV50_TIC_0_FMT_16_16_16 NV50_TIC_0_FMT_16_16_16_16
-#define NV50_TIC_0_FMT_32_32_32 NVC0_TIC_0_FMT_32_32_32
+#define NV50_TIC_0_FMT_8_8_8        NV50_TIC_0_FMT_8_8_8_8
+#define NV50_TIC_0_FMT_16_16_16     NV50_TIC_0_FMT_16_16_16_16
+#define NV50_TIC_0_FMT_32_32_32     NVC0_TIC_0_FMT_32_32_32
+#define NV50_TIC_0_FMT_BPTC         NVC0_TIC_0_FMT_BPTC
+#define NV50_TIC_0_FMT_BPTC_FLOAT   NVC0_TIC_0_FMT_BPTC_FLOAT
+#define NV50_TIC_0_FMT_BPTC_UFLOAT  NVC0_TIC_0_FMT_BPTC_UFLOAT
 
 #if NOUVEAU_DRIVER == 0xc0
 # define NVXX_3D_VAF_SIZE(s) NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_##s
src/gallium/drivers/nouveau/nv50/nv50_program.c +1 -1
index 4744a3c..aaca4c5 100644
@@ -65,7 +65,7 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info)
          continue;
       case TGSI_SEMANTIC_VERTEXID:
          prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID;
-         prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_UNK12;
+         prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID_DRAW_ARRAYS_ADD_START;
          continue;
       default:
          break;
src/gallium/drivers/nouveau/nv50/nv50_state.c +2 -2
index f233efe..2907504 100644
@@ -80,7 +80,7 @@ nv50_colormask(unsigned mask)
 }
 
 #define NV50_BLEND_FACTOR_CASE(a, b) \
-   case PIPE_BLENDFACTOR_##a: return NV50_3D_BLEND_FACTOR_##b
+   case PIPE_BLENDFACTOR_##a: return NV50_BLEND_FACTOR_##b
 
 static INLINE uint32_t
 nv50_blend_fac(unsigned factor)
@@ -106,7 +106,7 @@ nv50_blend_fac(unsigned factor)
    NV50_BLEND_FACTOR_CASE(INV_SRC1_COLOR, ONE_MINUS_SRC1_COLOR);
    NV50_BLEND_FACTOR_CASE(INV_SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA);
    default:
-      return NV50_3D_BLEND_FACTOR_ZERO;
+      return NV50_BLEND_FACTOR_ZERO;
    }
 }
 
src/gallium/drivers/nouveau/nv50/nv50_state_validate.c +1 -1
index 6916bea..85e19b4 100644
@@ -8,7 +8,7 @@ nv50_fb_set_null_rt(struct nouveau_pushbuf *push, unsigned i)
    BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(i)), 4);
    PUSH_DATA (push, 0);
    PUSH_DATA (push, 0);
-   PUSH_DATA (push, NV50_SURFACE_FORMAT_NONE);
+   PUSH_DATA (push, 0);
    PUSH_DATA (push, 0);
    BEGIN_NV04(push, NV50_3D(RT_HORIZ(i)), 2);
    PUSH_DATA (push, 64);
src/gallium/drivers/nouveau/nv50/nv50_surface.c +2 -2
index e1d2b26..dc9852d 100644
@@ -1304,8 +1304,8 @@ nv50_blit_eng2d(struct nv50_context *nv50, const struct pipe_blit_info *info)
       BEGIN_NV04(push, NV50_2D(ROP), 1);
       PUSH_DATA (push, 0xca); /* DPSDxax */
       BEGIN_NV04(push, NV50_2D(PATTERN_COLOR_FORMAT), 1);
-      PUSH_DATA (push, NV50_2D_PATTERN_COLOR_FORMAT_32BPP);
-      BEGIN_NV04(push, NV50_2D(PATTERN_COLOR(0)), 4);
+      PUSH_DATA (push, NV50_2D_PATTERN_COLOR_FORMAT_A8R8G8B8);
+      BEGIN_NV04(push, NV50_2D(PATTERN_BITMAP_COLOR(0)), 4);
       PUSH_DATA (push, 0x00000000);
       PUSH_DATA (push, mask);
       PUSH_DATA (push, 0xffffffff);
src/gallium/drivers/nouveau/nv50/nv50_texture.xml.h +26 -26

145 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c +1 -1
index 25a3232..6051f12 100644
@@ -63,7 +63,7 @@ nvc0_fb_set_null_rt(struct nouveau_pushbuf *push, unsigned i)
    PUSH_DATA (push, 0);
    PUSH_DATA (push, 64);
    PUSH_DATA (push, 0);
-   PUSH_DATA (push, NV50_SURFACE_FORMAT_NONE);
+   PUSH_DATA (push, 0);
    PUSH_DATA (push, 0);
 }
 
Signature · 6 lines
2.0.5

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

A message that is not in the archive (sent off-list or not yet received): 1419997367-7707-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]

#2 lore raw

PATCH 2/2 nvc0: regenerate rnndb headers

The headers hadn't been regenerated in a long time and had seen a number of manual modifications. A few changes:
- remove nvc0_2d entirely, use the nv50 header which has the nvc0 values too
- remove 3ddefs, it's identical to the nv50 file
- move macros out into a separate file

Also the upstream rnndb changed the overall chip naming convention; this was fixed up manually in the generated files until a better solution is determined.

---
 src/gallium/drivers/nouveau/nvc0/nvc0_2d.xml.h     |  380 -------
 src/gallium/drivers/nouveau/nvc0/nvc0_3d.xml.h     | 1115 ++++++++++++++++----
 src/gallium/drivers/nouveau/nvc0/nvc0_3ddefs.xml.h |   98 --
 .../drivers/nouveau/nvc0/nvc0_compute.xml.h        |   67 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_context.h    |    5 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_m2mf.xml.h   |   67 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_macros.h     |   32 +
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |    6 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c      |    6 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_surface.c    |   22 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_tex.c        |   12 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c   |    8 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_winsys.h     |    4 +-
 .../drivers/nouveau/nvc0/nve4_compute.xml.h        |   61 +-
 src/gallium/drivers/nouveau/nvc0/nve4_p2mf.xml.h   |  102 +-
 15 files changed, 1153 insertions(+), 832 deletions(-)
 delete mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_2d.xml.h
 delete mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_3ddefs.xml.h
 create mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_macros.h
src/gallium/drivers/nouveau/nvc0/nvc0_2d.xml.h deleted +0 -380
deleted file mode 100644
index 9a488c1..0000000
@@ -1,380 +0,0 @@
-#ifndef NVC0_2D_XML
-#define NVC0_2D_XML
-
-/* Autogenerated file, DO NOT EDIT manually!
-
-This file was generated by the rules-ng-ng headergen tool in this git repository:
-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:
-- nvc0_2d.xml    (   9454 bytes, from 2010-10-16 16:03:11)
-- copyright.xml  (   6498 bytes, from 2010-10-03 13:18:37)
-- nv_object.xml  (  11379 bytes, from 2010-10-16 11:43:24)
-- nvchipsets.xml (   2907 bytes, from 2010-10-15 16:28:21)
-- nv_defs.xml    (   4437 bytes, from 2010-07-06 07:43:58)
-- nv50_defs.xml  (   4482 bytes, from 2010-10-03 13:18:37)
-
-Copyright (C) 2006-2010 by the following authors:
-- Artur Huillet <[email protected]> (ahuillet)
-- Ben Skeggs (darktama, darktama_)
-- B. R. <[email protected]> (koala_br)
-- Carlos Martin <[email protected]> (carlosmn)
-- Christoph Bumiller <[email protected]> (calim, chrisbmr)
-- Dawid Gajownik <[email protected]> (gajownik)
-- Dmitry Baryshkov
-- Dmitry Eremin-Solenikov <[email protected]> (lumag)
-- EdB <[email protected]> (edb_)
-- Erik Waling <[email protected]> (erikwaling)
-- Francisco Jerez <[email protected]> (curro, curro_, currojerez)
-- imirkin <[email protected]> (imirkin)
-- jb17bsome <[email protected]> (jb17bsome)
-- Jeremy Kolb <[email protected]> (kjeremy)
-- Laurent Carlier <[email protected]> (lordheavy)
-- Luca Barbieri <[email protected]> (lb, lb1)
-- Maarten Maathuis <[email protected]> (stillunknown)
-- Marcin Kościelnicki <[email protected]> (mwk, koriakin)
-- Mark Carey <[email protected]> (careym)
-- Matthieu Castet <[email protected]> (mat-c)
-- nvidiaman <[email protected]> (nvidiaman)
-- Patrice Mandin <[email protected]> (pmandin, pmdata)
-- Pekka Paalanen <[email protected]> (pq, ppaalanen)
-- Peter Popov <[email protected]> (ironpeter)
-- Richard Hughes <[email protected]> (hughsient)
-- Rudi Cilibrasi <[email protected]> (cilibrar)
-- Serge Martin
-- Simon Raffeiner
-- Stephane Loeuillet <[email protected]> (leroutier)
-- Stephane Marchesin <[email protected]> (marcheu)
-- sturmflut <[email protected]> (sturmflut)
-- Sylvain Munaut <[email protected]>
-- Victor Stinner <[email protected]> (haypo)
-- Wladmir van der Laan <[email protected]> (miathan6)
-- Younes Manton <[email protected]> (ymanton)
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-
-
-#define NVC0_2D_DST_FORMAT					0x00000200
-
-#define NVC0_2D_DST_LINEAR					0x00000204
-
-#define NVC0_2D_DST_TILE_MODE					0x00000208
-
-#define NVC0_2D_DST_DEPTH					0x0000020c
-
-#define NVC0_2D_DST_LAYER					0x00000210
-
-#define NVC0_2D_DST_PITCH					0x00000214
-
-#define NVC0_2D_DST_WIDTH					0x00000218
-
-#define NVC0_2D_DST_HEIGHT					0x0000021c
-
-#define NVC0_2D_DST_ADDRESS_HIGH				0x00000220
-
-#define NVC0_2D_DST_ADDRESS_LOW					0x00000224
-
-#define NVC0_2D_UNK228						0x00000228
-
-#define NVC0_2D_SRC_FORMAT					0x00000230
-
-#define NVC0_2D_SRC_LINEAR					0x00000234
-
-#define NVC0_2D_SRC_TILE_MODE					0x00000238
-
-#define NVC0_2D_SRC_DEPTH					0x0000023c
-
-#define NVC0_2D_SRC_LAYER					0x00000240
-
-#define NVC0_2D_SRC_PITCH					0x00000244
-#define NVC0_2D_SRC_PITCH__MAX					0x00040000
-
-#define NVC0_2D_SRC_WIDTH					0x00000248
-#define NVC0_2D_SRC_WIDTH__MAX					0x00010000
-
-#define NVC0_2D_SRC_HEIGHT					0x0000024c
-#define NVC0_2D_SRC_HEIGHT__MAX					0x00010000
-
-#define NVC0_2D_SRC_ADDRESS_HIGH				0x00000250
-
-#define NVC0_2D_SRC_ADDRESS_LOW					0x00000254
-
-#define NVC0_2D_UNK258						0x00000258
-
-#define NVC0_2D_SINGLE_GPC					0x00000260
-
-#define NVC0_2D_COND_ADDRESS_HIGH				0x00000264
-
-#define NVC0_2D_COND_ADDRESS_LOW				0x00000268
-
-#define NVC0_2D_COND_MODE					0x0000026c
-#define NVC0_2D_COND_MODE_NEVER					0x00000000
-#define NVC0_2D_COND_MODE_ALWAYS				0x00000001
-#define NVC0_2D_COND_MODE_RES_NON_ZERO				0x00000002
-#define NVC0_2D_COND_MODE_EQUAL					0x00000003
-#define NVC0_2D_COND_MODE_NOT_EQUAL				0x00000004
-
-#define NVC0_2D_CLIP_X						0x00000280
-
-#define NVC0_2D_CLIP_Y						0x00000284
-
-#define NVC0_2D_CLIP_W						0x00000288
-
-#define NVC0_2D_CLIP_H						0x0000028c
-
-#define NVC0_2D_CLIP_ENABLE					0x00000290
-
-#define NVC0_2D_COLOR_KEY_FORMAT				0x00000294
-#define NVC0_2D_COLOR_KEY_FORMAT_16BPP				0x00000000
-#define NVC0_2D_COLOR_KEY_FORMAT_15BPP				0x00000001
-#define NVC0_2D_COLOR_KEY_FORMAT_24BPP				0x00000002
-#define NVC0_2D_COLOR_KEY_FORMAT_30BPP				0x00000003
-#define NVC0_2D_COLOR_KEY_FORMAT_8BPP				0x00000004
-#define NVC0_2D_COLOR_KEY_FORMAT_16BPP2				0x00000005
-#define NVC0_2D_COLOR_KEY_FORMAT_32BPP				0x00000006
-
-#define NVC0_2D_COLOR_KEY					0x00000298
-
-#define NVC0_2D_COLOR_KEY_ENABLE				0x0000029c
-
-#define NVC0_2D_ROP						0x000002a0
-
-#define NVC0_2D_BETA1						0x000002a4
-
-#define NVC0_2D_BETA4						0x000002a8
-
-#define NVC0_2D_OPERATION					0x000002ac
-#define NVC0_2D_OPERATION_SRCCOPY_AND				0x00000000
-#define NVC0_2D_OPERATION_ROP_AND				0x00000001
-#define NVC0_2D_OPERATION_BLEND					0x00000002
-#define NVC0_2D_OPERATION_SRCCOPY				0x00000003
-#define NVC0_2D_OPERATION_ROP					0x00000004
-#define NVC0_2D_OPERATION_SRCCOPY_PREMULT			0x00000005
-#define NVC0_2D_OPERATION_BLEND_PREMULT				0x00000006
-
-#define NVC0_2D_UNK2B0						0x000002b0
-#define NVC0_2D_UNK2B0_UNK0__MASK				0x0000003f
-#define NVC0_2D_UNK2B0_UNK0__SHIFT				0
-#define NVC0_2D_UNK2B0_UNK1__MASK				0x00003f00
-#define NVC0_2D_UNK2B0_UNK1__SHIFT				8
-
-#define NVC0_2D_PATTERN_SELECT					0x000002b4
-#define NVC0_2D_PATTERN_SELECT_MONO_8X8				0x00000000
-#define NVC0_2D_PATTERN_SELECT_MONO_64X1			0x00000001
-#define NVC0_2D_PATTERN_SELECT_MONO_1X64			0x00000002
-#define NVC0_2D_PATTERN_SELECT_COLOR				0x00000003
-
-#define NVC0_2D_PATTERN_COLOR_FORMAT				0x000002e8
-#define NVC0_2D_PATTERN_COLOR_FORMAT_16BPP			0x00000000
-#define NVC0_2D_PATTERN_COLOR_FORMAT_15BPP			0x00000001
-#define NVC0_2D_PATTERN_COLOR_FORMAT_32BPP			0x00000002
-#define NVC0_2D_PATTERN_COLOR_FORMAT_8BPP			0x00000003
-#define NVC0_2D_PATTERN_COLOR_FORMAT_UNK4			0x00000004
-#define NVC0_2D_PATTERN_COLOR_FORMAT_UNK5			0x00000005
-
-#define NVC0_2D_PATTERN_MONO_FORMAT				0x000002ec
-#define NVC0_2D_PATTERN_MONO_FORMAT_CGA6			0x00000000
-#define NVC0_2D_PATTERN_MONO_FORMAT_LE				0x00000001
-
-#define NVC0_2D_PATTERN_COLOR(i0)			       (0x000002f0 + 0x4*(i0))
-#define NVC0_2D_PATTERN_COLOR__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_COLOR__LEN				0x00000002
-
-#define NVC0_2D_PATTERN_BITMAP(i0)			       (0x000002f8 + 0x4*(i0))
-#define NVC0_2D_PATTERN_BITMAP__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_BITMAP__LEN				0x00000002
-
-#define NVC0_2D_PATTERN_X8R8G8B8(i0)			       (0x00000300 + 0x4*(i0))
-#define NVC0_2D_PATTERN_X8R8G8B8__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_X8R8G8B8__LEN				0x00000040
-#define NVC0_2D_PATTERN_X8R8G8B8_B__MASK			0x000000ff
-#define NVC0_2D_PATTERN_X8R8G8B8_B__SHIFT			0
-#define NVC0_2D_PATTERN_X8R8G8B8_G__MASK			0x0000ff00
-#define NVC0_2D_PATTERN_X8R8G8B8_G__SHIFT			8
-#define NVC0_2D_PATTERN_X8R8G8B8_R__MASK			0x00ff0000
-#define NVC0_2D_PATTERN_X8R8G8B8_R__SHIFT			16
-
-#define NVC0_2D_PATTERN_R5G6B5(i0)			       (0x00000400 + 0x4*(i0))
-#define NVC0_2D_PATTERN_R5G6B5__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_R5G6B5__LEN				0x00000020
-#define NVC0_2D_PATTERN_R5G6B5_B0__MASK				0x0000001f
-#define NVC0_2D_PATTERN_R5G6B5_B0__SHIFT			0
-#define NVC0_2D_PATTERN_R5G6B5_G0__MASK				0x000007e0
-#define NVC0_2D_PATTERN_R5G6B5_G0__SHIFT			5
-#define NVC0_2D_PATTERN_R5G6B5_R0__MASK				0x0000f800
-#define NVC0_2D_PATTERN_R5G6B5_R0__SHIFT			11
-#define NVC0_2D_PATTERN_R5G6B5_B1__MASK				0x001f0000
-#define NVC0_2D_PATTERN_R5G6B5_B1__SHIFT			16
-#define NVC0_2D_PATTERN_R5G6B5_G1__MASK				0x07e00000
-#define NVC0_2D_PATTERN_R5G6B5_G1__SHIFT			21
-#define NVC0_2D_PATTERN_R5G6B5_R1__MASK				0xf8000000
-#define NVC0_2D_PATTERN_R5G6B5_R1__SHIFT			27
-
-#define NVC0_2D_PATTERN_X1R5G5B5(i0)			       (0x00000480 + 0x4*(i0))
-#define NVC0_2D_PATTERN_X1R5G5B5__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_X1R5G5B5__LEN				0x00000020
-#define NVC0_2D_PATTERN_X1R5G5B5_B0__MASK			0x0000001f
-#define NVC0_2D_PATTERN_X1R5G5B5_B0__SHIFT			0
-#define NVC0_2D_PATTERN_X1R5G5B5_G0__MASK			0x000003e0
-#define NVC0_2D_PATTERN_X1R5G5B5_G0__SHIFT			5
-#define NVC0_2D_PATTERN_X1R5G5B5_R0__MASK			0x00007c00
-#define NVC0_2D_PATTERN_X1R5G5B5_R0__SHIFT			10
-#define NVC0_2D_PATTERN_X1R5G5B5_B1__MASK			0x001f0000
-#define NVC0_2D_PATTERN_X1R5G5B5_B1__SHIFT			16
-#define NVC0_2D_PATTERN_X1R5G5B5_G1__MASK			0x03e00000
-#define NVC0_2D_PATTERN_X1R5G5B5_G1__SHIFT			21
-#define NVC0_2D_PATTERN_X1R5G5B5_R1__MASK			0x7c000000
-#define NVC0_2D_PATTERN_X1R5G5B5_R1__SHIFT			26
-
-#define NVC0_2D_PATTERN_Y8(i0)				       (0x00000500 + 0x4*(i0))
-#define NVC0_2D_PATTERN_Y8__ESIZE				0x00000004
-#define NVC0_2D_PATTERN_Y8__LEN					0x00000010
-#define NVC0_2D_PATTERN_Y8_Y0__MASK				0x000000ff
-#define NVC0_2D_PATTERN_Y8_Y0__SHIFT				0
-#define NVC0_2D_PATTERN_Y8_Y1__MASK				0x0000ff00
-#define NVC0_2D_PATTERN_Y8_Y1__SHIFT				8
-#define NVC0_2D_PATTERN_Y8_Y2__MASK				0x00ff0000
-#define NVC0_2D_PATTERN_Y8_Y2__SHIFT				16
-#define NVC0_2D_PATTERN_Y8_Y3__MASK				0xff000000
-#define NVC0_2D_PATTERN_Y8_Y3__SHIFT				24
-
-#define NVC0_2D_DRAW_SHAPE					0x00000580
-#define NVC0_2D_DRAW_SHAPE_POINTS				0x00000000
-#define NVC0_2D_DRAW_SHAPE_LINES				0x00000001
-#define NVC0_2D_DRAW_SHAPE_LINE_STRIP				0x00000002
-#define NVC0_2D_DRAW_SHAPE_TRIANGLES				0x00000003
-#define NVC0_2D_DRAW_SHAPE_RECTANGLES				0x00000004
-
-#define NVC0_2D_DRAW_COLOR_FORMAT				0x00000584
-
-#define NVC0_2D_DRAW_COLOR					0x00000588
-
-#define NVC0_2D_UNK58C						0x0000058c
-#define NVC0_2D_UNK58C_0					0x00000001
-#define NVC0_2D_UNK58C_1					0x00000010
-#define NVC0_2D_UNK58C_2					0x00000100
-#define NVC0_2D_UNK58C_3					0x00001000
-
-#define NVC0_2D_DRAW_POINT16					0x000005e0
-#define NVC0_2D_DRAW_POINT16_X__MASK				0x0000ffff
-#define NVC0_2D_DRAW_POINT16_X__SHIFT				0
-#define NVC0_2D_DRAW_POINT16_Y__MASK				0xffff0000
-#define NVC0_2D_DRAW_POINT16_Y__SHIFT				16
-
-#define NVC0_2D_DRAW_POINT32_X(i0)			       (0x00000600 + 0x8*(i0))
-#define NVC0_2D_DRAW_POINT32_X__ESIZE				0x00000008
-#define NVC0_2D_DRAW_POINT32_X__LEN				0x00000040
-
-#define NVC0_2D_DRAW_POINT32_Y(i0)			       (0x00000604 + 0x8*(i0))
-#define NVC0_2D_DRAW_POINT32_Y__ESIZE				0x00000008
-#define NVC0_2D_DRAW_POINT32_Y__LEN				0x00000040
-
-#define NVC0_2D_SIFC_BITMAP_ENABLE				0x00000800
-
-#define NVC0_2D_SIFC_FORMAT					0x00000804
-
-#define NVC0_2D_SIFC_BITMAP_FORMAT				0x00000808
-#define NVC0_2D_SIFC_BITMAP_FORMAT_I1				0x00000000
-#define NVC0_2D_SIFC_BITMAP_FORMAT_I4				0x00000001
-#define NVC0_2D_SIFC_BITMAP_FORMAT_I8				0x00000002
-
-#define NVC0_2D_SIFC_BITMAP_LSB_FIRST				0x0000080c
-
-#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE			0x00000810
-#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_PACKED		0x00000000
-#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_BYTE		0x00000001
-#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_WORD		0x00000002
-
-#define NVC0_2D_SIFC_BITMAP_COLOR_BIT0				0x00000814
-
-#define NVC0_2D_SIFC_BITMAP_COLOR_BIT1				0x00000818
-
-#define NVC0_2D_SIFC_BITMAP_WRITE_BIT0_ENABLE			0x0000081c
-
-#define NVC0_2D_SIFC_WIDTH					0x00000838
-
-#define NVC0_2D_SIFC_HEIGHT					0x0000083c
-
-#define NVC0_2D_SIFC_DX_DU_FRACT				0x00000840
-
-#define NVC0_2D_SIFC_DX_DU_INT					0x00000844
-
-#define NVC0_2D_SIFC_DY_DV_FRACT				0x00000848
-
-#define NVC0_2D_SIFC_DY_DV_INT					0x0000084c
-
-#define NVC0_2D_SIFC_DST_X_FRACT				0x00000850
-
-#define NVC0_2D_SIFC_DST_X_INT					0x00000854
-
-#define NVC0_2D_SIFC_DST_Y_FRACT				0x00000858
-
-#define NVC0_2D_SIFC_DST_Y_INT					0x0000085c
-
-#define NVC0_2D_SIFC_DATA					0x00000860
-
-#define NVC0_2D_UNK0870						0x00000870
-
-#define NVC0_2D_UNK0880						0x00000880
-
-#define NVC0_2D_UNK0884						0x00000884
-
-#define NVC0_2D_UNK0888						0x00000888
-
-#define NVC0_2D_BLIT_CONTROL					0x0000088c
-#define NVC0_2D_BLIT_CONTROL_ORIGIN__MASK			0x00000001
-#define NVC0_2D_BLIT_CONTROL_ORIGIN__SHIFT			0
-#define NVC0_2D_BLIT_CONTROL_ORIGIN_CENTER			0x00000000
-#define NVC0_2D_BLIT_CONTROL_ORIGIN_CORNER			0x00000001
-#define NVC0_2D_BLIT_CONTROL_FILTER__MASK			0x00000010
-#define NVC0_2D_BLIT_CONTROL_FILTER__SHIFT			4
-#define NVC0_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE		0x00000000
-#define NVC0_2D_BLIT_CONTROL_FILTER_BILINEAR			0x00000010
-
-#define NVC0_2D_BLIT_DST_X					0x000008b0
-
-#define NVC0_2D_BLIT_DST_Y					0x000008b4
-
-#define NVC0_2D_BLIT_DST_W					0x000008b8
-
-#define NVC0_2D_BLIT_DST_H					0x000008bc
-
-#define NVC0_2D_BLIT_DU_DX_FRACT				0x000008c0
-
-#define NVC0_2D_BLIT_DU_DX_INT					0x000008c4
-
-#define NVC0_2D_BLIT_DV_DY_FRACT				0x000008c8
-
-#define NVC0_2D_BLIT_DV_DY_INT					0x000008cc
-
-#define NVC0_2D_BLIT_SRC_X_FRACT				0x000008d0
-
-#define NVC0_2D_BLIT_SRC_X_INT					0x000008d4
-
-#define NVC0_2D_BLIT_SRC_Y_FRACT				0x000008d8
-
-#define NVC0_2D_BLIT_SRC_Y_INT					0x000008dc
-
-
-#endif /* NVC0_2D_XML */
src/gallium/drivers/nouveau/nvc0/nvc0_3d.xml.h +905 -210

1,804 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nvc0_3ddefs.xml.h deleted +0 -98

98 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nvc0_compute.xml.h +33 -34

190 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nvc0_context.h +3 -2
index 63e73ae..ef251f3 100644
@@ -21,11 +21,12 @@
 #include "nouveau_context.h"
 #include "nouveau_debug.h"
 
-#include "nvc0/nvc0_3ddefs.xml.h"
+#include "nv50/nv50_3ddefs.xml.h"
 #include "nvc0/nvc0_3d.xml.h"
-#include "nvc0/nvc0_2d.xml.h"
+#include "nv50/nv50_2d.xml.h"
 #include "nvc0/nvc0_m2mf.xml.h"
 #include "nvc0/nve4_p2mf.xml.h"
+#include "nvc0/nvc0_macros.h"
 
 /* NOTE: must keep NVC0_NEW_...PROG in consecutive bits in this order */
 #define NVC0_NEW_BLEND        (1 << 0)
src/gallium/drivers/nouveau/nvc0/nvc0_m2mf.xml.h +47 -20

116 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nvc0_macros.h new file +32 -0
new file mode 100644
index 0000000..bf2798a
@@ -0,0 +1,32 @@
+#ifndef __NVC0_MACROS_H__
+#define __NVC0_MACROS_H__
+
+/**
+ * The list of macros defined in the 3d object
+ */
+
+#define NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE			0x00003800
+
+#define NVC0_3D_MACRO_VERTEX_ARRAY_SELECT			0x00003808
+
+#define NVC0_3D_MACRO_BLEND_ENABLES				0x00003810
+
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT			0x00003818
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_POINT			0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_LINE			0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_FILL			0x00001b02
+
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK				0x00003820
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_POINT			0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_LINE			0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_FILL			0x00001b02
+
+#define NVC0_3D_MACRO_GP_SELECT					0x00003828
+
+#define NVC0_3D_MACRO_TEP_SELECT				0x00003830
+
+#define NVC0_3D_MACRO_DRAW_ARRAYS_INDIRECT			0x00003838
+
+#define NVC0_3D_MACRO_DRAW_ELEMENTS_INDIRECT			0x00003840
+
+#endif /* __NVC0_MACROS_H__ */
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +3 -3
index 5032c7f..5069e5a 100644
@@ -696,10 +696,10 @@ nvc0_screen_create(struct nouveau_device *dev)
 
    BEGIN_NVC0(push, SUBC_2D(NV01_SUBCHAN_OBJECT), 1);
    PUSH_DATA (push, screen->eng2d->oclass);
-   BEGIN_NVC0(push, NVC0_2D(SINGLE_GPC), 1);
+   BEGIN_NVC0(push, SUBC_2D(NVC0_2D_SINGLE_GPC), 1);
    PUSH_DATA (push, 0);
    BEGIN_NVC0(push, NVC0_2D(OPERATION), 1);
-   PUSH_DATA (push, NVC0_2D_OPERATION_SRCCOPY);
+   PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY);
    BEGIN_NVC0(push, NVC0_2D(CLIP_ENABLE), 1);
    PUSH_DATA (push, 0);
    BEGIN_NVC0(push, NVC0_2D(COLOR_KEY_ENABLE), 1);
@@ -709,7 +709,7 @@ nvc0_screen_create(struct nouveau_device *dev)
    BEGIN_NVC0(push, SUBC_2D(0x0888), 1);
    PUSH_DATA (push, 1);
    BEGIN_NVC0(push, NVC0_2D(COND_MODE), 1);
-   PUSH_DATA (push, NVC0_2D_COND_MODE_ALWAYS);
+   PUSH_DATA (push, NV50_2D_COND_MODE_ALWAYS);
 
    BEGIN_NVC0(push, SUBC_2D(NVC0_GRAPH_NOTIFY_ADDRESS_HIGH), 2);
    PUSH_DATAh(push, screen->fence.bo->offset + 16);
src/gallium/drivers/nouveau/nvc0/nvc0_state.c +3 -3
index 728618f..b6666ca 100644
@@ -53,7 +53,7 @@ nvc0_colormask(unsigned mask)
 }
 
 #define NVC0_BLEND_FACTOR_CASE(a, b) \
-   case PIPE_BLENDFACTOR_##a: return NV50_3D_BLEND_FACTOR_##b
+   case PIPE_BLENDFACTOR_##a: return NV50_BLEND_FACTOR_##b
 
 static INLINE uint32_t
 nvc0_blend_fac(unsigned factor)
@@ -79,7 +79,7 @@ nvc0_blend_fac(unsigned factor)
    NVC0_BLEND_FACTOR_CASE(INV_SRC1_COLOR, ONE_MINUS_SRC1_COLOR);
    NVC0_BLEND_FACTOR_CASE(INV_SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA);
    default:
-      return NV50_3D_BLEND_FACTOR_ZERO;
+      return NV50_BLEND_FACTOR_ZERO;
    }
 }
 
@@ -248,7 +248,7 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
 
     }
 
-    SB_IMMED_3D(so, VP_POINT_SIZE_EN, cso->point_size_per_vertex);
+    SB_IMMED_3D(so, VP_POINT_SIZE, cso->point_size_per_vertex);
     if (!cso->point_size_per_vertex) {
        SB_BEGIN_3D(so, POINT_SIZE, 1);
        SB_DATA    (so, fui(cso->point_size));
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +11 -11
index 980fd12..4130d36 100644
@@ -88,7 +88,7 @@ nvc0_2d_texture_set(struct nouveau_pushbuf *push, boolean dst,
    struct nouveau_bo *bo = mt->base.bo;
    uint32_t width, height, depth;
    uint32_t format;
-   uint32_t mthd = dst ? NVC0_2D_DST_FORMAT : NVC0_2D_SRC_FORMAT;
+   uint32_t mthd = dst ? NV50_2D_DST_FORMAT : NV50_2D_SRC_FORMAT;
    uint32_t offset = mt->level[level].offset;
 
    format = nvc0_2d_format(pformat, dst, dst_src_pformat_equal);
@@ -1214,10 +1214,10 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
    boolean b;
 
    mode = nv50_blit_get_filter(info) ?
-      NVC0_2D_BLIT_CONTROL_FILTER_BILINEAR :
-      NVC0_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE;
+      NV50_2D_BLIT_CONTROL_FILTER_BILINEAR :
+      NV50_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE;
    mode |= (src->base.base.nr_samples > dst->base.base.nr_samples) ?
-      NVC0_2D_BLIT_CONTROL_ORIGIN_CORNER : NVC0_2D_BLIT_CONTROL_ORIGIN_CENTER;
+      NV50_2D_BLIT_CONTROL_ORIGIN_CORNER : NV50_2D_BLIT_CONTROL_ORIGIN_CENTER;
 
    du_dx = ((int64_t)info->src.box.width << 32) / info->dst.box.width;
    dv_dy = ((int64_t)info->src.box.height << 32) / info->dst.box.height;
@@ -1241,13 +1241,13 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
    if (mask != 0xffffffff) {
       IMMED_NVC0(push, NVC0_2D(ROP), 0xca); /* DPSDxax */
       IMMED_NVC0(push, NVC0_2D(PATTERN_COLOR_FORMAT),
-                       NVC0_2D_PATTERN_COLOR_FORMAT_32BPP);
-      BEGIN_NVC0(push, NVC0_2D(PATTERN_COLOR(0)), 4);
+                       NV50_2D_PATTERN_COLOR_FORMAT_A8R8G8B8);
+      BEGIN_NVC0(push, NVC0_2D(PATTERN_BITMAP_COLOR(0)), 4);
       PUSH_DATA (push, 0x00000000);
       PUSH_DATA (push, mask);
       PUSH_DATA (push, 0xffffffff);
       PUSH_DATA (push, 0xffffffff);
-      IMMED_NVC0(push, NVC0_2D(OPERATION), NVC0_2D_OPERATION_ROP);
+      IMMED_NVC0(push, NVC0_2D(OPERATION), NV50_2D_OPERATION_ROP);
    } else
    if (info->src.format != info->dst.format) {
       if (info->src.format == PIPE_FORMAT_R8_UNORM ||
@@ -1259,13 +1259,13 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
          mask = 0xffff0000; /* also makes condition for OPERATION reset true */
          BEGIN_NVC0(push, NVC0_2D(BETA4), 2);
          PUSH_DATA (push, mask);
-         PUSH_DATA (push, NVC0_2D_OPERATION_SRCCOPY_PREMULT);
+         PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY_PREMULT);
       } else
       if (info->src.format == PIPE_FORMAT_A8_UNORM) {
          mask = 0xff000000;
          BEGIN_NVC0(push, NVC0_2D(BETA4), 2);
          PUSH_DATA (push, mask);
-         PUSH_DATA (push, NVC0_2D_OPERATION_SRCCOPY_PREMULT);
+         PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY_PREMULT);
       }
    }
 
@@ -1361,9 +1361,9 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
    if (info->scissor_enable)
       IMMED_NVC0(push, NVC0_2D(CLIP_ENABLE), 0);
    if (mask != 0xffffffff)
-      IMMED_NVC0(push, NVC0_2D(OPERATION), NVC0_2D_OPERATION_SRCCOPY);
+      IMMED_NVC0(push, NVC0_2D(OPERATION), NV50_2D_OPERATION_SRCCOPY);
    if (nvc0->cond_query && info->render_condition_enable)
-      IMMED_NVC0(push, NVC0_2D(COND_MODE), NVC0_2D_COND_MODE_ALWAYS);
+      IMMED_NVC0(push, NVC0_2D(COND_MODE), NV50_2D_COND_MODE_ALWAYS);
 }
 
 static void
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c +6 -6
index db6b603..457f27c 100644
@@ -318,13 +318,13 @@ nve4_validate_tic(struct nvc0_context *nvc0, unsigned s)
          tic->id = nvc0_screen_tic_alloc(nvc0->screen, tic);
 
          PUSH_SPACE(push, 16);
-         BEGIN_NVC0(push, NVE4_P2MF(DST_ADDRESS_HIGH), 2);
+         BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_DST_ADDRESS_HIGH), 2);
          PUSH_DATAh(push, txc->offset + (tic->id * 32));
          PUSH_DATA (push, txc->offset + (tic->id * 32));
-         BEGIN_NVC0(push, NVE4_P2MF(LINE_LENGTH_IN), 2);
+         BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_LINE_LENGTH_IN), 2);
          PUSH_DATA (push, 32);
          PUSH_DATA (push, 1);
-         BEGIN_1IC0(push, NVE4_P2MF(EXEC), 9);
+         BEGIN_1IC0(push, NVE4_P2MF(UPLOAD_EXEC), 9);
          PUSH_DATA (push, 0x1001);
          PUSH_DATAp(push, &tic->tic[0], 8);
 
@@ -437,13 +437,13 @@ nve4_validate_tsc(struct nvc0_context *nvc0, int s)
          tsc->id = nvc0_screen_tsc_alloc(nvc0->screen, tsc);
 
          PUSH_SPACE(push, 16);
-         BEGIN_NVC0(push, NVE4_P2MF(DST_ADDRESS_HIGH), 2);
+         BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_DST_ADDRESS_HIGH), 2);
          PUSH_DATAh(push, txc->offset + 65536 + (tsc->id * 32));
          PUSH_DATA (push, txc->offset + 65536 + (tsc->id * 32));
-         BEGIN_NVC0(push, NVE4_P2MF(LINE_LENGTH_IN), 2);
+         BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_LINE_LENGTH_IN), 2);
          PUSH_DATA (push, 32);
          PUSH_DATA (push, 1);
-         BEGIN_1IC0(push, NVE4_P2MF(EXEC), 9);
+         BEGIN_1IC0(push, NVE4_P2MF(UPLOAD_EXEC), 9);
          PUSH_DATA (push, 0x1001);
          PUSH_DATAp(push, &tsc->tsc[0], 8);
 
src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c +4 -4
index 82f1ffc..45c6f7c 100644
@@ -243,14 +243,14 @@ nve4_p2mf_push_linear(struct nouveau_context *nv,
       nr = MIN2(count, nr - 8);
       nr = MIN2(nr, (NV04_PFIFO_MAX_PACKET_LEN - 1));
 
-      BEGIN_NVC0(push, NVE4_P2MF(DST_ADDRESS_HIGH), 2);
+      BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_DST_ADDRESS_HIGH), 2);
       PUSH_DATAh(push, dst->offset + offset);
       PUSH_DATA (push, dst->offset + offset);
-      BEGIN_NVC0(push, NVE4_P2MF(LINE_LENGTH_IN), 2);
+      BEGIN_NVC0(push, NVE4_P2MF(UPLOAD_LINE_LENGTH_IN), 2);
       PUSH_DATA (push, MIN2(size, nr * 4));
       PUSH_DATA (push, 1);
       /* must not be interrupted (trap on QUERY fence, 0x50 works however) */
-      BEGIN_1IC0(push, NVE4_P2MF(EXEC), nr + 1);
+      BEGIN_1IC0(push, NVE4_P2MF(UPLOAD_EXEC), nr + 1);
       PUSH_DATA (push, 0x1001);
       PUSH_DATAp(push, src, nr);
 
@@ -290,7 +290,7 @@ nvc0_m2mf_copy_linear(struct nouveau_context *nv,
       PUSH_DATA (push, bytes);
       PUSH_DATA (push, 1);
       BEGIN_NVC0(push, NVC0_M2MF(EXEC), 1);
-      PUSH_DATA (push, (1 << NVC0_M2MF_EXEC_INC__SHIFT) |
+      PUSH_DATA (push, NVC0_M2MF_EXEC_QUERY_SHORT |
                  NVC0_M2MF_EXEC_LINEAR_IN | NVC0_M2MF_EXEC_LINEAR_OUT);
 
       srcoff += bytes;
src/gallium/drivers/nouveau/nvc0/nvc0_winsys.h +3 -1
index a83b31d..725e889 100644
@@ -60,13 +60,15 @@ PUSH_REFN(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint32_t flags)
 #define NVE4_P2MF(n) SUBC_P2MF(NVE4_P2MF_##n)
 
 #define SUBC_2D(m) 3, (m)
-#define NVC0_2D(n) SUBC_2D(NVC0_2D_##n)
+#define NVC0_2D(n) SUBC_2D(NV50_2D_##n)
 
 #define SUBC_COPY(m) 4, (m)
 #define NVE4_COPY(m) SUBC_COPY(NVE4_COPY_##n)
 
 #define SUBC_SW(m) 7, (m)
 
+#define NVC0_3D_SERIALIZE NV50_GRAPH_SERIALIZE
+
 static INLINE uint32_t
 NVC0_FIFO_PKHDR_SQ(int subc, int mthd, unsigned size)
 {
src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h +30 -31

168 lines not on this page · raw message

src/gallium/drivers/nouveau/nvc0/nve4_p2mf.xml.h +73 -29

18 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.0.5

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Part of the diff is not shown here. View the raw message.

#3 lore raw

Re: [Nouveau] [PATCH 2/2] nvc0: regenerate rnndb headers

Quoted 24 lines · Ilia Mirkin

The headers hadn't been regenerated in a long time and had seen a number of manual modifications. A few changes:
- remove nvc0_2d entirely, use the nv50 header which has the nvc0 values too
- remove 3ddefs, it's identical to the nv50 file
- move macros out into a separate file

Also the upstream rnndb changed the overall chip naming convention; this was fixed up manually in the generated files until a better solution is determined.

---
 src/gallium/drivers/nouveau/nvc0/nvc0_2d.xml.h     |  380 -------
 src/gallium/drivers/nouveau/nvc0/nvc0_3d.xml.h     | 1115 ++++++++++++++++----
 src/gallium/drivers/nouveau/nvc0/nvc0_3ddefs.xml.h |   98 --
 .../drivers/nouveau/nvc0/nvc0_compute.xml.h        |   67 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_context.h    |    5 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_m2mf.xml.h   |   67 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_macros.h     |   32 +
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |    6 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c      |    6 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_surface.c    |   22 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_tex.c        |   12 +-
Quoted 9 lines
 src/gallium/drivers/nouveau/nvc0/nvc0_transfer.c   |    8 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_winsys.h     |    4 +-
 .../drivers/nouveau/nvc0/nve4_compute.xml.h        |   61 +-
 src/gallium/drivers/nouveau/nvc0/nve4_p2mf.xml.h   |  102 +-
 15 files changed, 1153 insertions(+), 832 deletions(-)
 delete mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_2d.xml.h
 delete mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_3ddefs.xml.h
 create mode 100644 src/gallium/drivers/nouveau/nvc0/nvc0_macros.h

Hi Ilia,

Please squash the following before pushing. Thanks.

-Emil

(quoted diff) +0 -0

b/src/gallium/drivers/nouveau/Makefile.sources
index 64f9608..3fae3bc 100644

src/gallium/drivers/nouveau/Makefile.sources +1 -2
@@ -137,8 +137,6 @@ NVC0_CODEGEN_SOURCES := \
 	codegen/nv50_ir_target_nvc0.h
 
 NVC0_C_SOURCES := \
-	nvc0/nvc0_2d.xml.h \
-	nvc0/nvc0_3ddefs.xml.h \
 	nvc0/nvc0_3d.xml.h \
 	nvc0/nvc0_compute.c \
 	nvc0/nvc0_compute.h \
@@ -147,6 +145,7 @@ NVC0_C_SOURCES := \
 	nvc0/nvc0_context.h \
 	nvc0/nvc0_formats.c \
 	nvc0/nvc0_m2mf.xml.h \
+	nvc0/nvc0_macros.h \
 	nvc0/nvc0_miptree.c \
 	nvc0/nvc0_program.c \
 	nvc0/nvc0_program.h \

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev