[Mesa-dev] [PATCH 062/140] amd: normalize register definition formatting
Marek Olšák
maraeo at gmail.com
Mon Mar 20 22:43:12 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
This resolves trivial conflicts with gfx9d.h caused by different formatting.
Some fields are also renamed.
---
src/amd/common/r600d_common.h | 68 ++++++++++++-----
src/amd/common/sid.h | 138 +++++++++++++++++++---------------
src/gallium/drivers/r600/evergreend.h | 60 +++++++++++----
3 files changed, 174 insertions(+), 92 deletions(-)
diff --git a/src/amd/common/r600d_common.h b/src/amd/common/r600d_common.h
index 3dbe43a..a35108f 100644
--- a/src/amd/common/r600d_common.h
+++ b/src/amd/common/r600d_common.h
@@ -177,51 +177,85 @@
#define S_028B98_STREAM_3_BUFFER_EN(x) (((unsigned)(x) & 0x0F) << 12)
#define G_028B98_STREAM_3_BUFFER_EN(x) (((x) >> 12) & 0x0F)
#define C_028B98_STREAM_3_BUFFER_EN 0xFFFF0FFF
#define EG_R_028A4C_PA_SC_MODE_CNTL_1 0x028A4C
#define EG_S_028A4C_PS_ITER_SAMPLE(x) (((unsigned)(x) & 0x1) << 16)
#define EG_S_028A4C_FORCE_EOV_CNTDWN_ENABLE(x) (((unsigned)(x) & 0x1) << 25)
#define EG_S_028A4C_FORCE_EOV_REZ_ENABLE(x) (((unsigned)(x) & 0x1) << 26)
#define CM_R_028804_DB_EQAA 0x00028804
-#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
-#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x7) << 4)
-#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 8)
-#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 12)
-#define S_028804_HIGH_QUALITY_INTERSECTIONS(x) (((unsigned)(x) & 0x1) << 16)
-#define S_028804_INCOHERENT_EQAA_READS(x) (((unsigned)(x) & 0x1) << 17)
-#define S_028804_INTERPOLATE_COMP_Z(x) (((unsigned)(x) & 0x1) << 18)
-#define S_028804_INTERPOLATE_SRC_Z(x) (((unsigned)(x) & 0x1) << 19)
-#define S_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((unsigned)(x) & 0x1) << 20)
-#define S_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((unsigned)(x) & 0x1) << 21)
-#define S_028804_OVERRASTERIZATION_AMOUNT(x) (((unsigned)(x) & 0x07) << 24)
-#define S_028804_ENABLE_POSTZ_OVERRASTERIZATION(x) (((unsigned)(x) & 0x1) << 27)
+#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
+#define G_028804_MAX_ANCHOR_SAMPLES(x) (((x) >> 0) & 0x07)
+#define C_028804_MAX_ANCHOR_SAMPLES 0xFFFFFFF8
+#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x07) << 4)
+#define G_028804_PS_ITER_SAMPLES(x) (((x) >> 4) & 0x07)
+#define C_028804_PS_ITER_SAMPLES 0xFFFFFF8F
+#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 8)
+#define G_028804_MASK_EXPORT_NUM_SAMPLES(x) (((x) >> 8) & 0x07)
+#define C_028804_MASK_EXPORT_NUM_SAMPLES 0xFFFFF8FF
+#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 12)
+#define G_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((x) >> 12) & 0x07)
+#define C_028804_ALPHA_TO_MASK_NUM_SAMPLES 0xFFFF8FFF
+#define S_028804_HIGH_QUALITY_INTERSECTIONS(x) (((unsigned)(x) & 0x1) << 16)
+#define G_028804_HIGH_QUALITY_INTERSECTIONS(x) (((x) >> 16) & 0x1)
+#define C_028804_HIGH_QUALITY_INTERSECTIONS 0xFFFEFFFF
+#define S_028804_INCOHERENT_EQAA_READS(x) (((unsigned)(x) & 0x1) << 17)
+#define G_028804_INCOHERENT_EQAA_READS(x) (((x) >> 17) & 0x1)
+#define C_028804_INCOHERENT_EQAA_READS 0xFFFDFFFF
+#define S_028804_INTERPOLATE_COMP_Z(x) (((unsigned)(x) & 0x1) << 18)
+#define G_028804_INTERPOLATE_COMP_Z(x) (((x) >> 18) & 0x1)
+#define C_028804_INTERPOLATE_COMP_Z 0xFFFBFFFF
+#define S_028804_INTERPOLATE_SRC_Z(x) (((unsigned)(x) & 0x1) << 19)
+#define G_028804_INTERPOLATE_SRC_Z(x) (((x) >> 19) & 0x1)
+#define C_028804_INTERPOLATE_SRC_Z 0xFFF7FFFF
+#define S_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((unsigned)(x) & 0x1) << 20)
+#define G_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((x) >> 20) & 0x1)
+#define C_028804_STATIC_ANCHOR_ASSOCIATIONS 0xFFEFFFFF
+#define S_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((unsigned)(x) & 0x1) << 21)
+#define G_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((x) >> 21) & 0x1)
+#define C_028804_ALPHA_TO_MASK_EQAA_DISABLE 0xFFDFFFFF
+#define S_028804_OVERRASTERIZATION_AMOUNT(x) (((unsigned)(x) & 0x07) << 24)
+#define G_028804_OVERRASTERIZATION_AMOUNT(x) (((x) >> 24) & 0x07)
+#define C_028804_OVERRASTERIZATION_AMOUNT 0xF8FFFFFF
+#define S_028804_ENABLE_POSTZ_OVERRASTERIZATION(x) (((unsigned)(x) & 0x1) << 27)
+#define G_028804_ENABLE_POSTZ_OVERRASTERIZATION(x) (((x) >> 27) & 0x1)
+#define C_028804_ENABLE_POSTZ_OVERRASTERIZATION 0xF7FFFFFF
#define CM_R_028BDC_PA_SC_LINE_CNTL 0x28bdc
#define S_028BDC_EXPAND_LINE_WIDTH(x) (((unsigned)(x) & 0x1) << 9)
#define G_028BDC_EXPAND_LINE_WIDTH(x) (((x) >> 9) & 0x1)
#define C_028BDC_EXPAND_LINE_WIDTH 0xFFFFFDFF
#define S_028BDC_LAST_PIXEL(x) (((unsigned)(x) & 0x1) << 10)
#define G_028BDC_LAST_PIXEL(x) (((x) >> 10) & 0x1)
#define C_028BDC_LAST_PIXEL 0xFFFFFBFF
#define S_028BDC_PERPENDICULAR_ENDCAP_ENA(x) (((unsigned)(x) & 0x1) << 11)
#define G_028BDC_PERPENDICULAR_ENDCAP_ENA(x) (((x) >> 11) & 0x1)
#define C_028BDC_PERPENDICULAR_ENDCAP_ENA 0xFFFFF7FF
#define S_028BDC_DX10_DIAMOND_TEST_ENA(x) (((unsigned)(x) & 0x1) << 12)
#define G_028BDC_DX10_DIAMOND_TEST_ENA(x) (((x) >> 12) & 0x1)
#define C_028BDC_DX10_DIAMOND_TEST_ENA 0xFFFFEFFF
#define CM_R_028BE0_PA_SC_AA_CONFIG 0x28be0
-#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
-#define S_028BE0_AA_MASK_CENTROID_DTMN(x) (((unsigned)(x) & 0x1) << 4)
-#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0xf) << 13)
-#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x7) << 20)
-#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x3) << 24)
+#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
+#define G_028BE0_MSAA_NUM_SAMPLES(x) (((x) >> 0) & 0x07)
+#define C_028BE0_MSAA_NUM_SAMPLES 0xFFFFFFF8
+#define S_028BE0_AA_MASK_CENTROID_DTMN(x) (((unsigned)(x) & 0x1) << 4)
+#define G_028BE0_AA_MASK_CENTROID_DTMN(x) (((x) >> 4) & 0x1)
+#define C_028BE0_AA_MASK_CENTROID_DTMN 0xFFFFFFEF
+#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0x0F) << 13)
+#define G_028BE0_MAX_SAMPLE_DIST(x) (((x) >> 13) & 0x0F)
+#define C_028BE0_MAX_SAMPLE_DIST 0xFFFE1FFF
+#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x07) << 20)
+#define G_028BE0_MSAA_EXPOSED_SAMPLES(x) (((x) >> 20) & 0x07)
+#define C_028BE0_MSAA_EXPOSED_SAMPLES 0xFF8FFFFF
+#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x03) << 24)
+#define G_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((x) >> 24) & 0x03)
+#define C_028BE0_DETAIL_TO_EXPOSED_MODE 0xFCFFFFFF
#define CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 0x28bf8
#define CM_R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 0x28c08
#define CM_R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 0x28c18
#define CM_R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 0x28c28
#define EG_S_028C70_FAST_CLEAR(x) (((unsigned)(x) & 0x1) << 17)
#define SI_S_028C70_FAST_CLEAR(x) (((unsigned)(x) & 0x1) << 13)
/*CIK+*/
#define R_0300FC_CP_STRMOUT_CNTL 0x0300FC
diff --git a/src/amd/common/sid.h b/src/amd/common/sid.h
index 7789add..cb353d6 100644
--- a/src/amd/common/sid.h
+++ b/src/amd/common/sid.h
@@ -2922,26 +2922,26 @@
#define C_00B02C_USER_SGPR 0xFFFFFFC1
#define S_00B02C_TRAP_PRESENT(x) (((unsigned)(x) & 0x1) << 6)
#define G_00B02C_TRAP_PRESENT(x) (((x) >> 6) & 0x1)
#define C_00B02C_TRAP_PRESENT 0xFFFFFFBF
#define S_00B02C_WAVE_CNT_EN(x) (((unsigned)(x) & 0x1) << 7)
#define G_00B02C_WAVE_CNT_EN(x) (((x) >> 7) & 0x1)
#define C_00B02C_WAVE_CNT_EN 0xFFFFFF7F
#define S_00B02C_EXTRA_LDS_SIZE(x) (((unsigned)(x) & 0xFF) << 8)
#define G_00B02C_EXTRA_LDS_SIZE(x) (((x) >> 8) & 0xFF)
#define C_00B02C_EXTRA_LDS_SIZE 0xFFFF00FF
-#define S_00B02C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 16) /* mask is 0x1FF on CIK */
-#define G_00B02C_EXCP_EN(x) (((x) >> 16) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B02C_EXCP_EN 0xFF80FFFF /* mask is 0x1FF on CIK */
-#define S_00B02C_EXCP_EN_CIK(x) (((unsigned)(x) & 0x1FF) << 16)
-#define G_00B02C_EXCP_EN_CIK(x) (((x) >> 16) & 0x1FF)
-#define C_00B02C_EXCP_EN_CIK 0xFE00FFFF
+#define S_00B02C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 16)
+#define G_00B02C_EXCP_EN_SI(x) (((x) >> 16) & 0x7F)
+#define C_00B02C_EXCP_EN_SI 0xFF80FFFF
+#define S_00B02C_EXCP_EN(x) (((unsigned)(x) & 0x1FF) << 16)
+#define G_00B02C_EXCP_EN(x) (((x) >> 16) & 0x1FF)
+#define C_00B02C_EXCP_EN 0xFE00FFFF
#define R_00B030_SPI_SHADER_USER_DATA_PS_0 0x00B030
#define R_00B034_SPI_SHADER_USER_DATA_PS_1 0x00B034
#define R_00B038_SPI_SHADER_USER_DATA_PS_2 0x00B038
#define R_00B03C_SPI_SHADER_USER_DATA_PS_3 0x00B03C
#define R_00B040_SPI_SHADER_USER_DATA_PS_4 0x00B040
#define R_00B044_SPI_SHADER_USER_DATA_PS_5 0x00B044
#define R_00B048_SPI_SHADER_USER_DATA_PS_6 0x00B048
#define R_00B04C_SPI_SHADER_USER_DATA_PS_7 0x00B04C
#define R_00B050_SPI_SHADER_USER_DATA_PS_8 0x00B050
#define R_00B054_SPI_SHADER_USER_DATA_PS_9 0x00B054
@@ -3042,26 +3042,26 @@
#define C_00B12C_SO_BASE1_EN 0xFFFFFDFF
#define S_00B12C_SO_BASE2_EN(x) (((unsigned)(x) & 0x1) << 10)
#define G_00B12C_SO_BASE2_EN(x) (((x) >> 10) & 0x1)
#define C_00B12C_SO_BASE2_EN 0xFFFFFBFF
#define S_00B12C_SO_BASE3_EN(x) (((unsigned)(x) & 0x1) << 11)
#define G_00B12C_SO_BASE3_EN(x) (((x) >> 11) & 0x1)
#define C_00B12C_SO_BASE3_EN 0xFFFFF7FF
#define S_00B12C_SO_EN(x) (((unsigned)(x) & 0x1) << 12)
#define G_00B12C_SO_EN(x) (((x) >> 12) & 0x1)
#define C_00B12C_SO_EN 0xFFFFEFFF
-#define S_00B12C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 13) /* mask is 0x1FF on CIK */
-#define G_00B12C_EXCP_EN(x) (((x) >> 13) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B12C_EXCP_EN 0xFFF01FFF /* mask is 0x1FF on CIK */
-#define S_00B12C_EXCP_EN_CIK(x) (((unsigned)(x) & 0x1FF) << 13)
-#define G_00B12C_EXCP_EN_CIK(x) (((x) >> 13) & 0x1FF)
-#define C_00B12C_EXCP_EN_CIK 0xFFC01FFF
+#define S_00B12C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 13)
+#define G_00B12C_EXCP_EN_SI(x) (((x) >> 13) & 0x7F)
+#define C_00B12C_EXCP_EN_SI 0xFFF01FFF
+#define S_00B12C_EXCP_EN(x) (((unsigned)(x) & 0x1FF) << 13)
+#define G_00B12C_EXCP_EN(x) (((x) >> 13) & 0x1FF)
+#define C_00B12C_EXCP_EN 0xFFC01FFF
/* VI */
#define S_00B12C_DISPATCH_DRAW_EN(x) (((unsigned)(x) & 0x1) << 24)
#define G_00B12C_DISPATCH_DRAW_EN(x) (((x) >> 24) & 0x1)
#define C_00B12C_DISPATCH_DRAW_EN 0xFEFFFFFF
/* */
#define R_00B130_SPI_SHADER_USER_DATA_VS_0 0x00B130
#define R_00B134_SPI_SHADER_USER_DATA_VS_1 0x00B134
#define R_00B138_SPI_SHADER_USER_DATA_VS_2 0x00B138
#define R_00B13C_SPI_SHADER_USER_DATA_VS_3 0x00B13C
#define R_00B140_SPI_SHADER_USER_DATA_VS_4 0x00B140
@@ -3147,26 +3147,26 @@
#define R_00B22C_SPI_SHADER_PGM_RSRC2_GS 0x00B22C
#define S_00B22C_SCRATCH_EN(x) (((unsigned)(x) & 0x1) << 0)
#define G_00B22C_SCRATCH_EN(x) (((x) >> 0) & 0x1)
#define C_00B22C_SCRATCH_EN 0xFFFFFFFE
#define S_00B22C_USER_SGPR(x) (((unsigned)(x) & 0x1F) << 1)
#define G_00B22C_USER_SGPR(x) (((x) >> 1) & 0x1F)
#define C_00B22C_USER_SGPR 0xFFFFFFC1
#define S_00B22C_TRAP_PRESENT(x) (((unsigned)(x) & 0x1) << 6)
#define G_00B22C_TRAP_PRESENT(x) (((x) >> 6) & 0x1)
#define C_00B22C_TRAP_PRESENT 0xFFFFFFBF
-#define S_00B22C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 7) /* mask is 0x1FF on CIK */
-#define G_00B22C_EXCP_EN(x) (((x) >> 7) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B22C_EXCP_EN 0xFFFFC07F /* mask is 0x1FF on CIK */
-#define S_00B22C_EXCP_EN_CIK(x) (((unsigned)(x) & 0x1FF) << 7)
-#define G_00B22C_EXCP_EN_CIK(x) (((x) >> 7) & 0x1FF)
-#define C_00B22C_EXCP_EN_CIK 0xFFFF007F
+#define S_00B22C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 7)
+#define G_00B22C_EXCP_EN_SI(x) (((x) >> 7) & 0x7F)
+#define C_00B22C_EXCP_EN_SI 0xFFFFC07F
+#define S_00B22C_EXCP_EN(x) (((unsigned)(x) & 0x1FF) << 7)
+#define G_00B22C_EXCP_EN(x) (((x) >> 7) & 0x1FF)
+#define C_00B22C_EXCP_EN 0xFFFF007F
#define R_00B230_SPI_SHADER_USER_DATA_GS_0 0x00B230
#define R_00B234_SPI_SHADER_USER_DATA_GS_1 0x00B234
#define R_00B238_SPI_SHADER_USER_DATA_GS_2 0x00B238
#define R_00B23C_SPI_SHADER_USER_DATA_GS_3 0x00B23C
#define R_00B240_SPI_SHADER_USER_DATA_GS_4 0x00B240
#define R_00B244_SPI_SHADER_USER_DATA_GS_5 0x00B244
#define R_00B248_SPI_SHADER_USER_DATA_GS_6 0x00B248
#define R_00B24C_SPI_SHADER_USER_DATA_GS_7 0x00B24C
#define R_00B250_SPI_SHADER_USER_DATA_GS_8 0x00B250
#define R_00B254_SPI_SHADER_USER_DATA_GS_9 0x00B254
@@ -3253,23 +3253,26 @@
#define C_00B32C_SCRATCH_EN 0xFFFFFFFE
#define S_00B32C_USER_SGPR(x) (((unsigned)(x) & 0x1F) << 1)
#define G_00B32C_USER_SGPR(x) (((x) >> 1) & 0x1F)
#define C_00B32C_USER_SGPR 0xFFFFFFC1
#define S_00B32C_TRAP_PRESENT(x) (((unsigned)(x) & 0x1) << 6)
#define G_00B32C_TRAP_PRESENT(x) (((x) >> 6) & 0x1)
#define C_00B32C_TRAP_PRESENT 0xFFFFFFBF
#define S_00B32C_OC_LDS_EN(x) (((unsigned)(x) & 0x1) << 7)
#define G_00B32C_OC_LDS_EN(x) (((x) >> 7) & 0x1)
#define C_00B32C_OC_LDS_EN 0xFFFFFF7F
-#define S_00B32C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 8) /* mask is 0x1FF on CIK */
-#define G_00B32C_EXCP_EN(x) (((x) >> 8) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B32C_EXCP_EN 0xFFFF80FF /* mask is 0x1FF on CIK */
+#define S_00B32C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 8)
+#define G_00B32C_EXCP_EN_SI(x) (((x) >> 8) & 0x7F)
+#define C_00B32C_EXCP_EN_SI 0xFFFF80FF
+#define S_00B32C_EXCP_EN(x) (((unsigned)(x) & 0x1FF) << 8)
+#define G_00B32C_EXCP_EN(x) (((x) >> 8) & 0x1FF)
+#define C_00B32C_EXCP_EN 0xFFFE00FF
#define S_00B32C_LDS_SIZE(x) (((unsigned)(x) & 0x1FF) << 20) /* CIK, for on-chip GS */
#define G_00B32C_LDS_SIZE(x) (((x) >> 20) & 0x1FF) /* CIK, for on-chip GS */
#define C_00B32C_LDS_SIZE 0xE00FFFFF /* CIK, for on-chip GS */
#define R_00B330_SPI_SHADER_USER_DATA_ES_0 0x00B330
#define R_00B334_SPI_SHADER_USER_DATA_ES_1 0x00B334
#define R_00B338_SPI_SHADER_USER_DATA_ES_2 0x00B338
#define R_00B33C_SPI_SHADER_USER_DATA_ES_3 0x00B33C
#define R_00B340_SPI_SHADER_USER_DATA_ES_4 0x00B340
#define R_00B344_SPI_SHADER_USER_DATA_ES_5 0x00B344
#define R_00B348_SPI_SHADER_USER_DATA_ES_6 0x00B348
@@ -3353,23 +3356,26 @@
#define C_00B42C_USER_SGPR 0xFFFFFFC1
#define S_00B42C_TRAP_PRESENT(x) (((unsigned)(x) & 0x1) << 6)
#define G_00B42C_TRAP_PRESENT(x) (((x) >> 6) & 0x1)
#define C_00B42C_TRAP_PRESENT 0xFFFFFFBF
#define S_00B42C_OC_LDS_EN(x) (((unsigned)(x) & 0x1) << 7)
#define G_00B42C_OC_LDS_EN(x) (((x) >> 7) & 0x1)
#define C_00B42C_OC_LDS_EN 0xFFFFFF7F
#define S_00B42C_TG_SIZE_EN(x) (((unsigned)(x) & 0x1) << 8)
#define G_00B42C_TG_SIZE_EN(x) (((x) >> 8) & 0x1)
#define C_00B42C_TG_SIZE_EN 0xFFFFFEFF
-#define S_00B42C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 9) /* mask is 0x1FF on CIK */
-#define G_00B42C_EXCP_EN(x) (((x) >> 9) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B42C_EXCP_EN 0xFFFF01FF /* mask is 0x1FF on CIK */
+#define S_00B42C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 9)
+#define G_00B42C_EXCP_EN_SI(x) (((x) >> 9) & 0x7F)
+#define C_00B42C_EXCP_EN_SI 0xFFFF01FF
+#define S_00B42C_EXCP_EN_CIK_VI(x) (((unsigned)(x) & 0x1FF) << 9)
+#define G_00B42C_EXCP_EN_CIK_VI(x) (((x) >> 9) & 0x1FF)
+#define C_00B42C_EXCP_EN_CIK_VI 0xFFFC01FF
#define R_00B430_SPI_SHADER_USER_DATA_HS_0 0x00B430
#define R_00B434_SPI_SHADER_USER_DATA_HS_1 0x00B434
#define R_00B438_SPI_SHADER_USER_DATA_HS_2 0x00B438
#define R_00B43C_SPI_SHADER_USER_DATA_HS_3 0x00B43C
#define R_00B440_SPI_SHADER_USER_DATA_HS_4 0x00B440
#define R_00B444_SPI_SHADER_USER_DATA_HS_5 0x00B444
#define R_00B448_SPI_SHADER_USER_DATA_HS_6 0x00B448
#define R_00B44C_SPI_SHADER_USER_DATA_HS_7 0x00B44C
#define R_00B450_SPI_SHADER_USER_DATA_HS_8 0x00B450
#define R_00B454_SPI_SHADER_USER_DATA_HS_9 0x00B454
@@ -3453,23 +3459,26 @@
#define C_00B52C_SCRATCH_EN 0xFFFFFFFE
#define S_00B52C_USER_SGPR(x) (((unsigned)(x) & 0x1F) << 1)
#define G_00B52C_USER_SGPR(x) (((x) >> 1) & 0x1F)
#define C_00B52C_USER_SGPR 0xFFFFFFC1
#define S_00B52C_TRAP_PRESENT(x) (((unsigned)(x) & 0x1) << 6)
#define G_00B52C_TRAP_PRESENT(x) (((x) >> 6) & 0x1)
#define C_00B52C_TRAP_PRESENT 0xFFFFFFBF
#define S_00B52C_LDS_SIZE(x) (((unsigned)(x) & 0x1FF) << 7)
#define G_00B52C_LDS_SIZE(x) (((x) >> 7) & 0x1FF)
#define C_00B52C_LDS_SIZE 0xFFFF007F
-#define S_00B52C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 16) /* mask is 0x1FF on CIK */
-#define G_00B52C_EXCP_EN(x) (((x) >> 16) & 0x7F) /* mask is 0x1FF on CIK */
-#define C_00B52C_EXCP_EN 0xFF80FFFF /* mask is 0x1FF on CIK */
+#define S_00B52C_EXCP_EN_SI(x) (((unsigned)(x) & 0x7F) << 16)
+#define G_00B52C_EXCP_EN_SI(x) (((x) >> 16) & 0x7F)
+#define C_00B52C_EXCP_EN_SI 0xFF80FFFF
+#define S_00B52C_EXCP_EN(x) (((unsigned)(x) & 0x1FF) << 16)
+#define G_00B52C_EXCP_EN(x) (((x) >> 16) & 0x1FF)
+#define C_00B52C_EXCP_EN 0xFE00FFFF
#define R_00B530_SPI_SHADER_USER_DATA_LS_0 0x00B530
#define R_00B534_SPI_SHADER_USER_DATA_LS_1 0x00B534
#define R_00B538_SPI_SHADER_USER_DATA_LS_2 0x00B538
#define R_00B53C_SPI_SHADER_USER_DATA_LS_3 0x00B53C
#define R_00B540_SPI_SHADER_USER_DATA_LS_4 0x00B540
#define R_00B544_SPI_SHADER_USER_DATA_LS_5 0x00B544
#define R_00B548_SPI_SHADER_USER_DATA_LS_6 0x00B548
#define R_00B54C_SPI_SHADER_USER_DATA_LS_7 0x00B54C
#define R_00B550_SPI_SHADER_USER_DATA_LS_8 0x00B550
#define R_00B554_SPI_SHADER_USER_DATA_LS_9 0x00B554
@@ -3646,26 +3655,26 @@
#define G_00B84C_LDS_SIZE(x) (((x) >> 15) & 0x1FF)
#define C_00B84C_LDS_SIZE 0xFF007FFF
#define S_00B84C_EXCP_EN(x) (((unsigned)(x) & 0x7F) << 24)
#define G_00B84C_EXCP_EN(x) (((x) >> 24) & 0x7F)
#define C_00B84C_EXCP_EN 0x80FFFFFF
#define R_00B850_COMPUTE_VMID 0x00B850
#define S_00B850_DATA(x) (((unsigned)(x) & 0x0F) << 0)
#define G_00B850_DATA(x) (((x) >> 0) & 0x0F)
#define C_00B850_DATA 0xFFFFFFF0
#define R_00B854_COMPUTE_RESOURCE_LIMITS 0x00B854
-#define S_00B854_WAVES_PER_SH(x) (((unsigned)(x) & 0x3F) << 0) /* mask is 0x3FF on CIK */
-#define G_00B854_WAVES_PER_SH(x) (((x) >> 0) & 0x3F) /* mask is 0x3FF on CIK */
-#define C_00B854_WAVES_PER_SH 0xFFFFFFC0 /* mask is 0x3FF on CIK */
-#define S_00B854_WAVES_PER_SH_CIK(x) (((unsigned)(x) & 0x3FF) << 0)
-#define G_00B854_WAVES_PER_SH_CIK(x) (((x) >> 0) & 0x3FF)
-#define C_00B854_WAVES_PER_SH_CIK 0xFFFFFC00
+#define S_00B854_WAVES_PER_SH_SI(x) (((unsigned)(x) & 0x3F) << 0)
+#define G_00B854_WAVES_PER_SH_SI(x) (((x) >> 0) & 0x3F)
+#define C_00B854_WAVES_PER_SH_SI 0xFFFFFFC0
+#define S_00B854_WAVES_PER_SH(x) (((unsigned)(x) & 0x3FF) << 0) /* CIK+ */
+#define G_00B854_WAVES_PER_SH(x) (((x) >> 0) & 0x3FF)
+#define C_00B854_WAVES_PER_SH 0xFFFFFC00
#define S_00B854_TG_PER_CU(x) (((unsigned)(x) & 0x0F) << 12)
#define G_00B854_TG_PER_CU(x) (((x) >> 12) & 0x0F)
#define C_00B854_TG_PER_CU 0xFFFF0FFF
#define S_00B854_LOCK_THRESHOLD(x) (((unsigned)(x) & 0x3F) << 16)
#define G_00B854_LOCK_THRESHOLD(x) (((x) >> 16) & 0x3F)
#define C_00B854_LOCK_THRESHOLD 0xFFC0FFFF
#define S_00B854_SIMD_DEST_CNTL(x) (((unsigned)(x) & 0x1) << 22)
#define G_00B854_SIMD_DEST_CNTL(x) (((x) >> 22) & 0x1)
#define C_00B854_SIMD_DEST_CNTL 0xFFBFFFFF
/* CIK */
@@ -6772,30 +6781,30 @@
#define V_028800_REF_NOTEQUAL 0x05
#define V_028800_REF_GEQUAL 0x06
#define V_028800_REF_ALWAYS 0x07
#define S_028800_ENABLE_COLOR_WRITES_ON_DEPTH_FAIL(x) (((unsigned)(x) & 0x1) << 30)
#define G_028800_ENABLE_COLOR_WRITES_ON_DEPTH_FAIL(x) (((x) >> 30) & 0x1)
#define C_028800_ENABLE_COLOR_WRITES_ON_DEPTH_FAIL 0xBFFFFFFF
#define S_028800_DISABLE_COLOR_WRITES_ON_DEPTH_PASS(x) (((unsigned)(x) & 0x1) << 31)
#define G_028800_DISABLE_COLOR_WRITES_ON_DEPTH_PASS(x) (((x) >> 31) & 0x1)
#define C_028800_DISABLE_COLOR_WRITES_ON_DEPTH_PASS 0x7FFFFFFF
#define R_028804_DB_EQAA 0x028804
-#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
+#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
#define G_028804_MAX_ANCHOR_SAMPLES(x) (((x) >> 0) & 0x07)
#define C_028804_MAX_ANCHOR_SAMPLES 0xFFFFFFF8
-#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x7) << 4)
+#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x07) << 4)
#define G_028804_PS_ITER_SAMPLES(x) (((x) >> 4) & 0x07)
#define C_028804_PS_ITER_SAMPLES 0xFFFFFF8F
-#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 8)
+#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 8)
#define G_028804_MASK_EXPORT_NUM_SAMPLES(x) (((x) >> 8) & 0x07)
#define C_028804_MASK_EXPORT_NUM_SAMPLES 0xFFFFF8FF
-#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 12)
+#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 12)
#define G_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((x) >> 12) & 0x07)
#define C_028804_ALPHA_TO_MASK_NUM_SAMPLES 0xFFFF8FFF
#define S_028804_HIGH_QUALITY_INTERSECTIONS(x) (((unsigned)(x) & 0x1) << 16)
#define G_028804_HIGH_QUALITY_INTERSECTIONS(x) (((x) >> 16) & 0x1)
#define C_028804_HIGH_QUALITY_INTERSECTIONS 0xFFFEFFFF
#define S_028804_INCOHERENT_EQAA_READS(x) (((unsigned)(x) & 0x1) << 17)
#define G_028804_INCOHERENT_EQAA_READS(x) (((x) >> 17) & 0x1)
#define C_028804_INCOHERENT_EQAA_READS 0xFFFDFFFF
#define S_028804_INTERPOLATE_COMP_Z(x) (((unsigned)(x) & 0x1) << 18)
#define G_028804_INTERPOLATE_COMP_Z(x) (((x) >> 18) & 0x1)
@@ -7225,26 +7234,35 @@
#define C_02882C_PRIM_EXPAND_CONSTANT 0xFFFF00FF
/* CIK */
#define S_02882C_XMAX_RIGHT_EXCLUSION(x) (((unsigned)(x) & 0x1) << 30)
#define G_02882C_XMAX_RIGHT_EXCLUSION(x) (((x) >> 30) & 0x1)
#define C_02882C_XMAX_RIGHT_EXCLUSION 0xBFFFFFFF
#define S_02882C_YMAX_BOTTOM_EXCLUSION(x) (((unsigned)(x) & 0x1) << 31)
#define G_02882C_YMAX_BOTTOM_EXCLUSION(x) (((x) >> 31) & 0x1)
#define C_02882C_YMAX_BOTTOM_EXCLUSION 0x7FFFFFFF
/* */
#define R_028830_PA_SU_SMALL_PRIM_FILTER_CNTL 0x028830 /* Polaris */
-#define S_028830_SMALL_PRIM_FILTER_ENABLE(x) (((x) & 0x1) << 0)
+#define S_028830_SMALL_PRIM_FILTER_ENABLE(x) (((unsigned)(x) & 0x1) << 0)
+#define G_028830_SMALL_PRIM_FILTER_ENABLE(x) (((x) >> 0) & 0x1)
#define C_028830_SMALL_PRIM_FILTER_ENABLE 0xFFFFFFFE
-#define S_028830_TRIANGLE_FILTER_DISABLE(x) (((x) & 0x1) << 1)
-#define S_028830_LINE_FILTER_DISABLE(x) (((x) & 0x1) << 2)
-#define S_028830_POINT_FILTER_DISABLE(x) (((x) & 0x1) << 3)
-#define S_028830_RECTANGLE_FILTER_DISABLE(x) (((x) & 0x1) << 4)
+#define S_028830_TRIANGLE_FILTER_DISABLE(x) (((unsigned)(x) & 0x1) << 1)
+#define G_028830_TRIANGLE_FILTER_DISABLE(x) (((x) >> 1) & 0x1)
+#define C_028830_TRIANGLE_FILTER_DISABLE 0xFFFFFFFD
+#define S_028830_LINE_FILTER_DISABLE(x) (((unsigned)(x) & 0x1) << 2)
+#define G_028830_LINE_FILTER_DISABLE(x) (((x) >> 2) & 0x1)
+#define C_028830_LINE_FILTER_DISABLE 0xFFFFFFFB
+#define S_028830_POINT_FILTER_DISABLE(x) (((unsigned)(x) & 0x1) << 3)
+#define G_028830_POINT_FILTER_DISABLE(x) (((x) >> 3) & 0x1)
+#define C_028830_POINT_FILTER_DISABLE 0xFFFFFFF7
+#define S_028830_RECTANGLE_FILTER_DISABLE(x) (((unsigned)(x) & 0x1) << 4)
+#define G_028830_RECTANGLE_FILTER_DISABLE(x) (((x) >> 4) & 0x1)
+#define C_028830_RECTANGLE_FILTER_DISABLE 0xFFFFFFEF
#define R_028A00_PA_SU_POINT_SIZE 0x028A00
#define S_028A00_HEIGHT(x) (((unsigned)(x) & 0xFFFF) << 0)
#define G_028A00_HEIGHT(x) (((x) >> 0) & 0xFFFF)
#define C_028A00_HEIGHT 0xFFFF0000
#define S_028A00_WIDTH(x) (((unsigned)(x) & 0xFFFF) << 16)
#define G_028A00_WIDTH(x) (((x) >> 16) & 0xFFFF)
#define C_028A00_WIDTH 0x0000FFFF
#define R_028A04_PA_SU_POINT_MINMAX 0x028A04
#define S_028A04_MIN_SIZE(x) (((unsigned)(x) & 0xFFFF) << 0)
#define G_028A04_MIN_SIZE(x) (((x) >> 0) & 0xFFFF)
@@ -7708,28 +7726,28 @@
#define V_028A7C_VGT_DMA_SWAP_16_BIT 0x01
#define V_028A7C_VGT_DMA_SWAP_32_BIT 0x02
#define V_028A7C_VGT_DMA_SWAP_WORD 0x03
/* CIK */
#define S_028A7C_BUF_TYPE(x) (((unsigned)(x) & 0x03) << 4)
#define G_028A7C_BUF_TYPE(x) (((x) >> 4) & 0x03)
#define C_028A7C_BUF_TYPE 0xFFFFFFCF
#define V_028A7C_VGT_DMA_BUF_MEM 0x00
#define V_028A7C_VGT_DMA_BUF_RING 0x01
#define V_028A7C_VGT_DMA_BUF_SETUP 0x02
-#define S_028A7C_RDREQ_POLICY(x) (((unsigned)(x) & 0x03) << 6)
-#define G_028A7C_RDREQ_POLICY(x) (((x) >> 6) & 0x03)
-#define C_028A7C_RDREQ_POLICY 0xFFFFFF3F
+#define S_028A7C_RDREQ_POLICY_CIK(x) (((unsigned)(x) & 0x03) << 6)
+#define G_028A7C_RDREQ_POLICY_CIK(x) (((x) >> 6) & 0x03)
+#define C_028A7C_RDREQ_POLICY_CIK 0xFFFFFF3F
#define V_028A7C_VGT_POLICY_LRU 0x00
#define V_028A7C_VGT_POLICY_STREAM 0x01
-#define S_028A7C_RDREQ_POLICY_VI(x) (((unsigned)(x) & 0x1) << 6)
-#define G_028A7C_RDREQ_POLICY_VI(x) (((x) >> 6) & 0x1)
-#define C_028A7C_RDREQ_POLICY_VI 0xFFFFFFBF
+#define S_028A7C_RDREQ_POLICY(x) (((unsigned)(x) & 0x1) << 6) /* VI+ */
+#define G_028A7C_RDREQ_POLICY(x) (((x) >> 6) & 0x1)
+#define C_028A7C_RDREQ_POLICY 0xFFFFFFBF
#define S_028A7C_ATC(x) (((unsigned)(x) & 0x1) << 8)
#define G_028A7C_ATC(x) (((x) >> 8) & 0x1)
#define C_028A7C_ATC 0xFFFFFEFF
#define S_028A7C_NOT_EOP(x) (((unsigned)(x) & 0x1) << 9)
#define G_028A7C_NOT_EOP(x) (((x) >> 9) & 0x1)
#define C_028A7C_NOT_EOP 0xFFFFFDFF
#define S_028A7C_REQ_PATH(x) (((unsigned)(x) & 0x1) << 10)
#define G_028A7C_REQ_PATH(x) (((x) >> 10) & 0x1)
#define C_028A7C_REQ_PATH 0xFFFFFBFF
/* */
@@ -7981,22 +7999,22 @@
#define C_028B50_ACCUM_ISOLINE 0xFFFFFF00
#define S_028B50_ACCUM_TRI(x) (((unsigned)(x) & 0xFF) << 8)
#define G_028B50_ACCUM_TRI(x) (((x) >> 8) & 0xFF)
#define C_028B50_ACCUM_TRI 0xFFFF00FF
#define S_028B50_ACCUM_QUAD(x) (((unsigned)(x) & 0xFF) << 16)
#define G_028B50_ACCUM_QUAD(x) (((x) >> 16) & 0xFF)
#define C_028B50_ACCUM_QUAD 0xFF00FFFF
#define S_028B50_DONUT_SPLIT(x) (((unsigned)(x) & 0x1F) << 24)
#define G_028B50_DONUT_SPLIT(x) (((x) >> 24) & 0x1F)
#define C_028B50_DONUT_SPLIT 0xE0FFFFFF
-#define S_028B50_TRAP_SPLIT(x) (((unsigned)(x) & 0x7) << 29) /* Fiji+ */
-#define G_028B50_TRAP_SPLIT(x) (((x) >> 29) & 0x7)
+#define S_028B50_TRAP_SPLIT(x) (((unsigned)(x) & 0x07) << 29) /* Fiji+ */
+#define G_028B50_TRAP_SPLIT(x) (((x) >> 29) & 0x07)
#define C_028B50_TRAP_SPLIT 0x1FFFFFFF
/* */
#define R_028B54_VGT_SHADER_STAGES_EN 0x028B54
#define S_028B54_LS_EN(x) (((unsigned)(x) & 0x03) << 0)
#define G_028B54_LS_EN(x) (((x) >> 0) & 0x03)
#define C_028B54_LS_EN 0xFFFFFFFC
#define V_028B54_LS_STAGE_OFF 0x00
#define V_028B54_LS_STAGE_ON 0x01
#define V_028B54_CS_STAGE_ON 0x02
#define S_028B54_HS_EN(x) (((unsigned)(x) & 0x1) << 2)
@@ -8087,31 +8105,31 @@
#define S_028B6C_DEPRECATED(x) (((unsigned)(x) & 0x1) << 9)
#define G_028B6C_DEPRECATED(x) (((x) >> 9) & 0x1)
#define C_028B6C_DEPRECATED 0xFFFFFDFF
#define S_028B6C_NUM_DS_WAVES_PER_SIMD(x) (((unsigned)(x) & 0x0F) << 10)
#define G_028B6C_NUM_DS_WAVES_PER_SIMD(x) (((x) >> 10) & 0x0F)
#define C_028B6C_NUM_DS_WAVES_PER_SIMD 0xFFFFC3FF
#define S_028B6C_DISABLE_DONUTS(x) (((unsigned)(x) & 0x1) << 14)
#define G_028B6C_DISABLE_DONUTS(x) (((x) >> 14) & 0x1)
#define C_028B6C_DISABLE_DONUTS 0xFFFFBFFF
/* CIK */
-#define S_028B6C_RDREQ_POLICY(x) (((unsigned)(x) & 0x03) << 15)
-#define G_028B6C_RDREQ_POLICY(x) (((x) >> 15) & 0x03)
-#define C_028B6C_RDREQ_POLICY 0xFFFE7FFF
+#define S_028B6C_RDREQ_POLICY_CIK(x) (((unsigned)(x) & 0x03) << 15)
+#define G_028B6C_RDREQ_POLICY_CIK(x) (((x) >> 15) & 0x03)
+#define C_028B6C_RDREQ_POLICY_CIK 0xFFFE7FFF
#define V_028B6C_VGT_POLICY_LRU 0x00
#define V_028B6C_VGT_POLICY_STREAM 0x01
#define V_028B6C_VGT_POLICY_BYPASS 0x02
/* */
/* VI */
-#define S_028B6C_RDREQ_POLICY_VI(x) (((unsigned)(x) & 0x1) << 15)
-#define G_028B6C_RDREQ_POLICY_VI(x) (((x) >> 15) & 0x1)
-#define C_028B6C_RDREQ_POLICY_VI 0xFFFF7FFF
+#define S_028B6C_RDREQ_POLICY(x) (((unsigned)(x) & 0x1) << 15) /* VI+ */
+#define G_028B6C_RDREQ_POLICY(x) (((x) >> 15) & 0x1)
+#define C_028B6C_RDREQ_POLICY 0xFFFF7FFF
#define S_028B6C_DISTRIBUTION_MODE(x) (((unsigned)(x) & 0x03) << 17)
#define G_028B6C_DISTRIBUTION_MODE(x) (((x) >> 17) & 0x03)
#define C_028B6C_DISTRIBUTION_MODE 0xFFF9FFFF
#define V_028B6C_DISTRIBUTION_MODE_NO_DIST 0x00
#define V_028B6C_DISTRIBUTION_MODE_PATCHES 0x01
#define V_028B6C_DISTRIBUTION_MODE_DONUTS 0x02
#define V_028B6C_DISTRIBUTION_MODE_TRAPEZOIDS 0x03 /* Fiji+ */
#define S_028B6C_MTYPE(x) (((unsigned)(x) & 0x03) << 19)
#define G_028B6C_MTYPE(x) (((x) >> 19) & 0x03)
#define C_028B6C_MTYPE 0xFFE7FFFF
@@ -8249,33 +8267,33 @@
#define S_028BDC_LAST_PIXEL(x) (((unsigned)(x) & 0x1) << 10)
#define G_028BDC_LAST_PIXEL(x) (((x) >> 10) & 0x1)
#define C_028BDC_LAST_PIXEL 0xFFFFFBFF
#define S_028BDC_PERPENDICULAR_ENDCAP_ENA(x) (((unsigned)(x) & 0x1) << 11)
#define G_028BDC_PERPENDICULAR_ENDCAP_ENA(x) (((x) >> 11) & 0x1)
#define C_028BDC_PERPENDICULAR_ENDCAP_ENA 0xFFFFF7FF
#define S_028BDC_DX10_DIAMOND_TEST_ENA(x) (((unsigned)(x) & 0x1) << 12)
#define G_028BDC_DX10_DIAMOND_TEST_ENA(x) (((x) >> 12) & 0x1)
#define C_028BDC_DX10_DIAMOND_TEST_ENA 0xFFFFEFFF
#define R_028BE0_PA_SC_AA_CONFIG 0x028BE0
-#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
+#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
#define G_028BE0_MSAA_NUM_SAMPLES(x) (((x) >> 0) & 0x07)
#define C_028BE0_MSAA_NUM_SAMPLES 0xFFFFFFF8
#define S_028BE0_AA_MASK_CENTROID_DTMN(x) (((unsigned)(x) & 0x1) << 4)
#define G_028BE0_AA_MASK_CENTROID_DTMN(x) (((x) >> 4) & 0x1)
#define C_028BE0_AA_MASK_CENTROID_DTMN 0xFFFFFFEF
-#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0xf) << 13)
+#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0x0F) << 13)
#define G_028BE0_MAX_SAMPLE_DIST(x) (((x) >> 13) & 0x0F)
#define C_028BE0_MAX_SAMPLE_DIST 0xFFFE1FFF
-#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x7) << 20)
+#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x07) << 20)
#define G_028BE0_MSAA_EXPOSED_SAMPLES(x) (((x) >> 20) & 0x07)
#define C_028BE0_MSAA_EXPOSED_SAMPLES 0xFF8FFFFF
-#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x3) << 24)
+#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x03) << 24)
#define G_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((x) >> 24) & 0x03)
#define C_028BE0_DETAIL_TO_EXPOSED_MODE 0xFCFFFFFF
#define R_028BE4_PA_SU_VTX_CNTL 0x028BE4
#define S_028BE4_PIX_CENTER(x) (((unsigned)(x) & 0x1) << 0)
#define G_028BE4_PIX_CENTER(x) (((x) >> 0) & 0x1)
#define C_028BE4_PIX_CENTER 0xFFFFFFFE
#define S_028BE4_ROUND_MODE(x) (((unsigned)(x) & 0x03) << 1)
#define G_028BE4_ROUND_MODE(x) (((x) >> 1) & 0x03)
#define C_028BE4_ROUND_MODE 0xFFFFFFF9
#define V_028BE4_X_TRUNCATE 0x00
diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h
index 40ba7c1..0173ea3 100644
--- a/src/gallium/drivers/r600/evergreend.h
+++ b/src/gallium/drivers/r600/evergreend.h
@@ -2497,40 +2497,70 @@
#define ENDIAN_NONE 0
#define ENDIAN_8IN16 1
#define ENDIAN_8IN32 2
#define ENDIAN_8IN64 3
#define CM_R_0286FC_SPI_LDS_MGMT 0x286fc
#define S_0286FC_NUM_PS_LDS(x) ((x) & 0xff)
#define S_0286FC_NUM_LS_LDS(x) ((x) & 0xff) << 8
#define CM_R_028804_DB_EQAA 0x00028804
-#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
-#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x7) << 4)
-#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 8)
-#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 12)
-#define S_028804_HIGH_QUALITY_INTERSECTIONS(x) (((unsigned)(x) & 0x1) << 16)
-#define S_028804_INCOHERENT_EQAA_READS(x) (((unsigned)(x) & 0x1) << 17)
-#define S_028804_INTERPOLATE_COMP_Z(x) (((unsigned)(x) & 0x1) << 18)
-#define S_028804_INTERPOLATE_SRC_Z(x) (((unsigned)(x) & 0x1) << 19)
-#define S_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((unsigned)(x) & 0x1) << 20)
-#define S_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((unsigned)(x) & 0x1) << 21)
+#define S_028804_MAX_ANCHOR_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
+#define G_028804_MAX_ANCHOR_SAMPLES(x) (((x) >> 0) & 0x07)
+#define C_028804_MAX_ANCHOR_SAMPLES 0xFFFFFFF8
+#define S_028804_PS_ITER_SAMPLES(x) (((unsigned)(x) & 0x07) << 4)
+#define G_028804_PS_ITER_SAMPLES(x) (((x) >> 4) & 0x07)
+#define C_028804_PS_ITER_SAMPLES 0xFFFFFF8F
+#define S_028804_MASK_EXPORT_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 8)
+#define G_028804_MASK_EXPORT_NUM_SAMPLES(x) (((x) >> 8) & 0x07)
+#define C_028804_MASK_EXPORT_NUM_SAMPLES 0xFFFFF8FF
+#define S_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 12)
+#define G_028804_ALPHA_TO_MASK_NUM_SAMPLES(x) (((x) >> 12) & 0x07)
+#define C_028804_ALPHA_TO_MASK_NUM_SAMPLES 0xFFFF8FFF
+#define S_028804_HIGH_QUALITY_INTERSECTIONS(x) (((unsigned)(x) & 0x1) << 16)
+#define G_028804_HIGH_QUALITY_INTERSECTIONS(x) (((x) >> 16) & 0x1)
+#define C_028804_HIGH_QUALITY_INTERSECTIONS 0xFFFEFFFF
+#define S_028804_INCOHERENT_EQAA_READS(x) (((unsigned)(x) & 0x1) << 17)
+#define G_028804_INCOHERENT_EQAA_READS(x) (((x) >> 17) & 0x1)
+#define C_028804_INCOHERENT_EQAA_READS 0xFFFDFFFF
+#define S_028804_INTERPOLATE_COMP_Z(x) (((unsigned)(x) & 0x1) << 18)
+#define G_028804_INTERPOLATE_COMP_Z(x) (((x) >> 18) & 0x1)
+#define C_028804_INTERPOLATE_COMP_Z 0xFFFBFFFF
+#define S_028804_INTERPOLATE_SRC_Z(x) (((unsigned)(x) & 0x1) << 19)
+#define G_028804_INTERPOLATE_SRC_Z(x) (((x) >> 19) & 0x1)
+#define C_028804_INTERPOLATE_SRC_Z 0xFFF7FFFF
+#define S_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((unsigned)(x) & 0x1) << 20)
+#define G_028804_STATIC_ANCHOR_ASSOCIATIONS(x) (((x) >> 20) & 0x1)
+#define C_028804_STATIC_ANCHOR_ASSOCIATIONS 0xFFEFFFFF
+#define S_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((unsigned)(x) & 0x1) << 21)
+#define G_028804_ALPHA_TO_MASK_EQAA_DISABLE(x) (((x) >> 21) & 0x1)
+#define C_028804_ALPHA_TO_MASK_EQAA_DISABLE 0xFFDFFFFF
#define CM_R_028BD4_PA_SC_CENTROID_PRIORITY_0 0x00028BD4
#define CM_R_028BD8_PA_SC_CENTROID_PRIORITY_1 0x00028BD8
#define CM_R_028BDC_PA_SC_LINE_CNTL 0x28bdc
#define CM_R_028BE0_PA_SC_AA_CONFIG 0x28be0
-#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x7) << 0)
-#define S_028BE0_AA_MASK_CENTROID_DTMN(x) (((unsigned)(x) & 0x1) << 4)
-#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0xf) << 13)
-#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x7) << 20)
-#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x3) << 24)
+#define S_028BE0_MSAA_NUM_SAMPLES(x) (((unsigned)(x) & 0x07) << 0)
+#define G_028BE0_MSAA_NUM_SAMPLES(x) (((x) >> 0) & 0x07)
+#define C_028BE0_MSAA_NUM_SAMPLES 0xFFFFFFF8
+#define S_028BE0_AA_MASK_CENTROID_DTMN(x) (((unsigned)(x) & 0x1) << 4)
+#define G_028BE0_AA_MASK_CENTROID_DTMN(x) (((x) >> 4) & 0x1)
+#define C_028BE0_AA_MASK_CENTROID_DTMN 0xFFFFFFEF
+#define S_028BE0_MAX_SAMPLE_DIST(x) (((unsigned)(x) & 0x0F) << 13)
+#define G_028BE0_MAX_SAMPLE_DIST(x) (((x) >> 13) & 0x0F)
+#define C_028BE0_MAX_SAMPLE_DIST 0xFFFE1FFF
+#define S_028BE0_MSAA_EXPOSED_SAMPLES(x) (((unsigned)(x) & 0x07) << 20)
+#define G_028BE0_MSAA_EXPOSED_SAMPLES(x) (((x) >> 20) & 0x07)
+#define C_028BE0_MSAA_EXPOSED_SAMPLES 0xFF8FFFFF
+#define S_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((unsigned)(x) & 0x03) << 24)
+#define G_028BE0_DETAIL_TO_EXPOSED_MODE(x) (((x) >> 24) & 0x03)
+#define C_028BE0_DETAIL_TO_EXPOSED_MODE 0xFCFFFFFF
#define CM_R_028BE4_PA_SU_VTX_CNTL 0x28be4
#define CM_R_028BE8_PA_CL_GB_VERT_CLIP_ADJ 0x28be8
#define CM_R_028BEC_PA_CL_GB_VERT_DISC_ADJ 0x28bec
#define CM_R_028BF0_PA_CL_GB_HORZ_CLIP_ADJ 0x28bf0
#define CM_R_028BF4_PA_CL_GB_HORZ_DISC_ADJ 0x28bf4
#define CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 0x28bf8
#define CM_R_028BFC_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 0x28bfc
#define CM_R_028C00_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 0x28c00
#define CM_R_028C04_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 0x28c04
--
2.7.4
More information about the mesa-dev
mailing list