regs/bits: improve vap_reg_prog_stream_cntl* parsing
This commit is contained in:
parent
8eef9776ba
commit
1f99e67169
@ -1516,12 +1516,36 @@
|
||||
#define VAP_PORT_DATA_IDX_128__DATA_IDX_PORT_128(n) (((n) & 0xffffffff) << 0)
|
||||
#define VAP_PORT_IDX__IDXPORT0(n) (((n) & 0xffffffff) << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0(n) (((n) & 0xf) << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLOAT_1 (0x0 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLOAT_2 (0x1 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLOAT_3 (0x2 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLOAT_4 (0x3 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__BYTE (0x4 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__D3DCOLOR (0x5 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__SHORT_2 (0x6 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__SHORT_4 (0x7 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__VECTOR_3_TTT (0x8 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__VECTOR_3_EET (0x9 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLOAT_8 (0xa << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_0__FLT16_2 (0xb << 0)
|
||||
#define VAP_PROG_STREAM_CNTL__SKIP_DWORDS_0(n) (((n) & 0xf) << 4)
|
||||
#define VAP_PROG_STREAM_CNTL__DST_VEC_LOC_0(n) (((n) & 0x1f) << 8)
|
||||
#define VAP_PROG_STREAM_CNTL__LAST_VEC_0(n) (((n) & 0x1) << 13)
|
||||
#define VAP_PROG_STREAM_CNTL__SIGNED_0(n) (((n) & 0x1) << 14)
|
||||
#define VAP_PROG_STREAM_CNTL__NORMALIZE_0(n) (((n) & 0x1) << 15)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1(n) (((n) & 0xf) << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLOAT_1 (0x0 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLOAT_2 (0x1 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLOAT_3 (0x2 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLOAT_4 (0x3 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__BYTE (0x4 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__D3DCOLOR (0x5 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__SHORT_2 (0x6 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__SHORT_4 (0x7 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__VECTOR_3_TTT (0x8 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__VECTOR_3_EET (0x9 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLOAT_8 (0xa << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__DATA_TYPE_1__FLT16_2 (0xb << 16)
|
||||
#define VAP_PROG_STREAM_CNTL__SKIP_DWORDS_1(n) (((n) & 0xf) << 20)
|
||||
#define VAP_PROG_STREAM_CNTL__DST_VEC_LOC_1(n) (((n) & 0x1f) << 24)
|
||||
#define VAP_PROG_STREAM_CNTL__LAST_VEC_1(n) (((n) & 0x1) << 29)
|
||||
@ -1532,42 +1556,58 @@
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_0__SELECT_Y (0x1 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_0__SELECT_Z (0x2 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_0__SELECT_W (0x3 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_0__SELECT_FP_ZERO (0x4 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_0__SELECT_FP_ONE (0x5 << 0)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0(n) (((n) & 0x7) << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_X (0x0 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_Y (0x1 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_Z (0x2 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_W (0x3 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_FP_ZERO (0x4 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_0__SELECT_FP_ONE (0x5 << 3)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0(n) (((n) & 0x7) << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_X (0x0 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_Y (0x1 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_Z (0x2 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_W (0x3 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_FP_ZERO (0x4 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_0__SELECT_FP_ONE (0x5 << 6)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0(n) (((n) & 0x7) << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_X (0x0 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_Y (0x1 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_Z (0x2 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_W (0x3 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_FP_ZERO (0x4 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_0__SELECT_FP_ONE (0x5 << 9)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__WRITE_ENA_0(n) (((n) & 0xf) << 12)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1(n) (((n) & 0x7) << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_X (0x0 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_Y (0x1 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_Z (0x2 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_W (0x3 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_FP_ZERO (0x4 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_X_1__SELECT_FP_ONE (0x5 << 16)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1(n) (((n) & 0x7) << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_X (0x0 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_Y (0x1 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_Z (0x2 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_W (0x3 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_FP_ZERO (0x4 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Y_1__SELECT_FP_ONE (0x5 << 19)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1(n) (((n) & 0x7) << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_X (0x0 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_Y (0x1 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_Z (0x2 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_W (0x3 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_FP_ZERO (0x4 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_Z_1__SELECT_FP_ONE (0x5 << 22)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1(n) (((n) & 0x7) << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_X (0x0 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_Y (0x1 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_Z (0x2 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_W (0x3 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_FP_ZERO (0x4 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__SWIZZLE_SELECT_W_1__SELECT_FP_ONE (0x5 << 25)
|
||||
#define VAP_PROG_STREAM_CNTL_EXT__WRITE_ENA_1(n) (((n) & 0xf) << 28)
|
||||
#define VAP_PSC_SGN_NORM_CNTL__SGN_NORM_METHOD_0(n) (((n) & 0x3) << 0)
|
||||
#define VAP_PSC_SGN_NORM_CNTL__SGN_NORM_METHOD_1(n) (((n) & 0x3) << 2)
|
||||
|
||||
@ -2,18 +2,18 @@ Field Name Bits Default Description
|
||||
DATA_TYPE_0 3:0 0x0 The data type for element 0
|
||||
* These data types use the SIGNED and NORMALIZE flags described below.
|
||||
POSSIBLE VALUES:
|
||||
00 - FLOAT_1 (Single IEEE Float)
|
||||
01 - FLOAT_2 (2 IEEE floats)
|
||||
02 - FLOAT_3 (3 IEEE Floats)
|
||||
03 - FLOAT_4 (4 IEEE Floats)
|
||||
04 - BYTE * (1 DWORD w 4 8-bit fixed point values) (X = [7:0], Y = [15:8], Z = [23:16], W = [31:24])
|
||||
05 - D3DCOLOR * (Same as BYTE except has X->Z,Z->X swap for D3D color def) (Z = [7:0], Y = [15:8], X = [23:16], W = [31:24])
|
||||
06 - SHORT_2 * (1 DWORD with 2 16-bit fixed point values) (X = [15:0], Y = [31:16], Z = 0.0, W = 1.0)
|
||||
07 - SHORT_4 * (2 DWORDS with 4(2 per dword) 16-bit fixed point values) (X = DW0 [15:0], Y = DW0 [31:16], Z = DW1 [15:0], W = DW1 [31:16])
|
||||
08 - VECTOR_3_TTT * (1 DWORD with 3 10-bit fixed point values) (X = [9:0], Y = [19:10], Z = [29:20], W = 1.0)
|
||||
09 - VECTOR_3_EET * (1 DWORD with 2 11-bit and 1 10-bit fixed point values) (X = [10:0], Y = [21:11], Z = [31:22], W = 1.0)
|
||||
10 - FLOAT_8 (8 IEEE Floats) Sames as 2 FLOAT_4 but must use consecutive DST_VEC_LOC. Used to allow > 16 PSC for OGL path.
|
||||
11 - FLT16_2 (1 DWORD with 2 16-bit floating point values (SE5M10 exp bias of 15, supports denormalized numbers)) (X = [15:0], Y = [31:16], Z = 0.0, W = 1.0)
|
||||
00 - FLOAT_1: (Single IEEE Float)
|
||||
01 - FLOAT_2: (2 IEEE floats)
|
||||
02 - FLOAT_3: (3 IEEE Floats)
|
||||
03 - FLOAT_4: (4 IEEE Floats)
|
||||
04 - BYTE: * (1 DWORD w 4 8-bit fixed point values) (X = [7:0], Y = [15:8], Z = [23:16], W = [31:24])
|
||||
05 - D3DCOLOR: * (Same as BYTE except has X->Z,Z->X swap for D3D color def) (Z = [7:0], Y = [15:8], X = [23:16], W = [31:24])
|
||||
06 - SHORT_2: * (1 DWORD with 2 16-bit fixed point values) (X = [15:0], Y = [31:16], Z = 0.0, W = 1.0)
|
||||
07 - SHORT_4: * (2 DWORDS with 4(2 per dword) 16-bit fixed point values) (X = DW0 [15:0], Y = DW0 [31:16], Z = DW1 [15:0], W = DW1 [31:16])
|
||||
08 - VECTOR_3_TTT: * (1 DWORD with 3 10-bit fixed point values) (X = [9:0], Y = [19:10], Z = [29:20], W = 1.0)
|
||||
09 - VECTOR_3_EET: * (1 DWORD with 2 11-bit and 1 10-bit fixed point values) (X = [10:0], Y = [21:11], Z = [31:22], W = 1.0)
|
||||
10 - FLOAT_8: (8 IEEE Floats) Sames as 2 FLOAT_4 but must use consecutive DST_VEC_LOC. Used to allow > 16 PSC for OGL path.
|
||||
11 - FLT16_2: (1 DWORD with 2 16-bit floating point values (SE5M10 exp bias of 15, supports denormalized numbers)) (X = [15:0], Y = [31:16], Z = 0.0, W = 1.0)
|
||||
12 - FLT16_4 (2 DWORDS with 4(2 per dword) 16-bit floating point values (SE5M10 exp bias of 15, supports denormalized numbers))) (X = DW0 [15:0], Y = DW0 [31:16], Z = DW1 [15:0], W = DW1 [31:16])
|
||||
SKIP_DWORDS_0 7:4 0x0 The number of DWORDS to skip (discard) after
|
||||
processing the current element.
|
||||
@ -40,7 +40,7 @@ NORMALIZE_0 15 0x0 Determines whether the fixed to floating p
|
||||
range is not evenly distributed around 0, there are 3
|
||||
different methods supported by R300. See the
|
||||
VAP_PSC_SGN_NORM_CNTL description for details.
|
||||
DATA_TYPE_1 19:16 0x0 Similar to DATA_TYPE_0
|
||||
DATA_TYPE_1 19:16 0x0 See DATA_TYPE_0
|
||||
SKIP_DWORDS_1 23:20 0x0 See SKIP_DWORDS_0
|
||||
DST_VEC_LOC_1 28:24 0x0 See DST_VEC_LOC_0
|
||||
LAST_VEC_1 29 0x0 See LAST_VEC_0
|
||||
|
||||
@ -5,69 +5,41 @@ SWIZZLE_SELECT_X_0 2:0 0x0 X-Component Swizzle Select
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
04 - SELECT_FP_ZERO: (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE: (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_Y_0 5:3 0x0 Y-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
04 - SELECT_FP_ZERO: (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE: (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_Z_0 8:6 0x0 Z-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
04 - SELECT_FP_ZERO: (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE: (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_W_0 11:9 0x0 W-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
04 - SELECT_FP_ZERO: (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE: (Floating Point 1.0)
|
||||
WRITE_ENA_0 15:12 0x0 4-bit write enable.
|
||||
Bit 0 maps to X
|
||||
Bit 1 maps to Y
|
||||
Bit 2 maps to Z
|
||||
Bit 3 maps to W
|
||||
SWIZZLE_SELECT_X_1 18:16 0x0 X-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_Y_1 21:19 0x0 Y-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_Z_1 24:22 0x0 Z-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_W_1 27:25 0x0 W-Component Swizzle Select
|
||||
POSSIBLE VALUES:
|
||||
00 - SELECT_X
|
||||
01 - SELECT_Y
|
||||
02 - SELECT_Z
|
||||
03 - SELECT_W
|
||||
04 - SELECT_FP_ZERO (Floating Point 0.0)
|
||||
05 - SELECT_FP_ONE (Floating Point 1.0)
|
||||
SWIZZLE_SELECT_X_1 18:16 0x0 See SWIZZLE_SELECT_X_0
|
||||
SWIZZLE_SELECT_Y_1 21:19 0x0 See SWIZZLE_SELECT_Y_0
|
||||
SWIZZLE_SELECT_Z_1 24:22 0x0 See SWIZZLE_SELECT_Z_0
|
||||
SWIZZLE_SELECT_W_1 27:25 0x0 See SWIZZLE_SELECT_W_0
|
||||
WRITE_ENA_1 31:28 0x0 4-bit write enable.
|
||||
Bit 0 maps to X
|
||||
Bit 1 maps to Y
|
||||
|
||||
@ -5,18 +5,18 @@ PVS_FC_OPC_0 1:0 0x0 This opcode field determines what type of
|
||||
1 = JUMP
|
||||
2 = LOOP
|
||||
3 = JSR (Jump to Subroutine)
|
||||
PVS_FC_OPC_1 3:2 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_2 5:4 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_3 7:6 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_4 9:8 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_5 11:10 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_6 13:12 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_7 15:14 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_8 17:16 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_9 19:18 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_10 21:20 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_11 23:22 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_12 25:24 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_13 27:26 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_14 29:28 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_15 31:30 0x0 See PVS_FC_OPC_0.
|
||||
PVS_FC_OPC_1 3:2 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_2 5:4 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_3 7:6 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_4 9:8 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_5 11:10 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_6 13:12 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_7 15:14 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_8 17:16 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_9 19:18 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_10 21:20 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_11 23:22 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_12 25:24 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_13 27:26 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_14 29:28 0x0 See PVS_FC_OPC_0
|
||||
PVS_FC_OPC_15 31:30 0x0 See PVS_FC_OPC_0
|
||||
|
||||
@ -8,3 +8,5 @@ echo >> 3d_registers_bits.h
|
||||
for filename in bits/*; do
|
||||
python generate_bits_python.py $filename >> 3d_registers_bits.h
|
||||
done
|
||||
|
||||
mv 3d_registers_bits.h ../drm
|
||||
|
||||
@ -123,6 +123,8 @@ def aggregate(fields):
|
||||
yield description
|
||||
ix += 1
|
||||
|
||||
previous_fields = dict()
|
||||
|
||||
while ix < len(fields):
|
||||
field_name, bits, default, description = fields[ix]
|
||||
if description == 'POSSIBLE VALUES:':
|
||||
@ -133,14 +135,24 @@ def aggregate(fields):
|
||||
description_lines.extend(parse_description_lines())
|
||||
possible_values = OrderedDict(parse_possible_values())
|
||||
|
||||
description = ' '.join(description_lines)
|
||||
|
||||
if len(description.split(' ')) == 2 and description.lower().startswith("see"):
|
||||
_, see_field_name = description.split(' ')
|
||||
assert see_field_name in previous_fields, see_field_name
|
||||
description = previous_fields[see_field_name].description
|
||||
possible_values = previous_fields[see_field_name].possible_values
|
||||
|
||||
assert default.startswith('0x') or default == 'none', default
|
||||
yield Descriptor(
|
||||
descriptor = Descriptor(
|
||||
field_name = field_name,
|
||||
bits = parse_bits(bits),
|
||||
default = 0 if default == 'none' else int(default, 16),
|
||||
description = ' '.join(description_lines),
|
||||
description = description,
|
||||
possible_values = possible_values
|
||||
)
|
||||
previous_fields[descriptor.field_name] = descriptor
|
||||
yield descriptor
|
||||
|
||||
ix += 1
|
||||
next_nonempty()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user