17ec681f3Smrg/*
27ec681f3Smrg * Copyright © 2020 Advanced Micro Devices, Inc.
37ec681f3Smrg *
47ec681f3Smrg * Permission is hereby granted, free of charge, to any person obtaining
57ec681f3Smrg * a copy of this software and associated documentation files (the
67ec681f3Smrg * "Software"), to deal in the Software without restriction, including
77ec681f3Smrg * without limitation the rights to use, copy, modify, merge, publish,
87ec681f3Smrg * distribute, sub license, and/or sell copies of the Software, and to
97ec681f3Smrg * permit persons to whom the Software is furnished to do so, subject to
107ec681f3Smrg * the following conditions:
117ec681f3Smrg *
127ec681f3Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
137ec681f3Smrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
147ec681f3Smrg * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
157ec681f3Smrg * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
167ec681f3Smrg * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
177ec681f3Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
187ec681f3Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
197ec681f3Smrg * USE OR OTHER DEALINGS IN THE SOFTWARE.
207ec681f3Smrg *
217ec681f3Smrg * The above copyright notice and this permission notice (including the
227ec681f3Smrg * next paragraph) shall be included in all copies or substantial portions
237ec681f3Smrg * of the Software.
247ec681f3Smrg */
257ec681f3Smrg
267ec681f3Smrg/* These tables define the set of ranges of registers we shadow when
277ec681f3Smrg * mid command buffer preemption is enabled.
287ec681f3Smrg */
297ec681f3Smrg
307ec681f3Smrg#include "ac_shadowed_regs.h"
317ec681f3Smrg
327ec681f3Smrg#include "ac_debug.h"
337ec681f3Smrg#include "sid.h"
347ec681f3Smrg#include "util/macros.h"
357ec681f3Smrg#include "util/u_debug.h"
367ec681f3Smrg
377ec681f3Smrg#include <stdio.h>
387ec681f3Smrg
397ec681f3Smrgstatic const struct ac_reg_range Gfx9UserConfigShadowRange[] = {
407ec681f3Smrg   {
417ec681f3Smrg      R_0300FC_CP_STRMOUT_CNTL,
427ec681f3Smrg      4,
437ec681f3Smrg   },
447ec681f3Smrg   {
457ec681f3Smrg      R_0301EC_CP_COHER_START_DELAY,
467ec681f3Smrg      4,
477ec681f3Smrg   },
487ec681f3Smrg   {
497ec681f3Smrg      R_030904_VGT_GSVS_RING_SIZE,
507ec681f3Smrg      R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE + 4,
517ec681f3Smrg   },
527ec681f3Smrg   {
537ec681f3Smrg      R_030920_VGT_MAX_VTX_INDX,
547ec681f3Smrg      R_03092C_VGT_MULTI_PRIM_IB_RESET_EN - R_030920_VGT_MAX_VTX_INDX + 4,
557ec681f3Smrg   },
567ec681f3Smrg   {
577ec681f3Smrg      R_030934_VGT_NUM_INSTANCES,
587ec681f3Smrg      R_030944_VGT_TF_MEMORY_BASE_HI - R_030934_VGT_NUM_INSTANCES + 4,
597ec681f3Smrg   },
607ec681f3Smrg   {
617ec681f3Smrg      R_030960_IA_MULTI_VGT_PARAM,
627ec681f3Smrg      4,
637ec681f3Smrg   },
647ec681f3Smrg   {
657ec681f3Smrg      R_030968_VGT_INSTANCE_BASE_ID,
667ec681f3Smrg      4,
677ec681f3Smrg   },
687ec681f3Smrg   {
697ec681f3Smrg      R_030E00_TA_CS_BC_BASE_ADDR,
707ec681f3Smrg      R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4,
717ec681f3Smrg   },
727ec681f3Smrg   {
737ec681f3Smrg      R_030AD4_PA_STATE_STEREO_X,
747ec681f3Smrg      4,
757ec681f3Smrg   },
767ec681f3Smrg};
777ec681f3Smrg
787ec681f3Smrgstatic const struct ac_reg_range Gfx9ContextShadowRange[] = {
797ec681f3Smrg   {
807ec681f3Smrg      R_028000_DB_RENDER_CONTROL,
817ec681f3Smrg      R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4,
827ec681f3Smrg   },
837ec681f3Smrg   {
847ec681f3Smrg      R_0281E8_COHER_DEST_BASE_HI_0,
857ec681f3Smrg      R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4,
867ec681f3Smrg   },
877ec681f3Smrg   {
887ec681f3Smrg      R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
897ec681f3Smrg      4,
907ec681f3Smrg   },
917ec681f3Smrg   {
927ec681f3Smrg      R_028414_CB_BLEND_RED,
937ec681f3Smrg      R_028618_PA_CL_UCP_5_W - R_028414_CB_BLEND_RED + 4,
947ec681f3Smrg   },
957ec681f3Smrg   {
967ec681f3Smrg      R_028644_SPI_PS_INPUT_CNTL_0,
977ec681f3Smrg      R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4,
987ec681f3Smrg   },
997ec681f3Smrg   {
1007ec681f3Smrg      R_028754_SX_PS_DOWNCONVERT,
1017ec681f3Smrg      R_0287BC_CB_MRT7_EPITCH - R_028754_SX_PS_DOWNCONVERT + 4,
1027ec681f3Smrg   },
1037ec681f3Smrg   {
1047ec681f3Smrg      R_028800_DB_DEPTH_CONTROL,
1057ec681f3Smrg      R_028820_PA_CL_NANINF_CNTL - R_028800_DB_DEPTH_CONTROL + 4,
1067ec681f3Smrg   },
1077ec681f3Smrg   {
1087ec681f3Smrg      R_02882C_PA_SU_PRIM_FILTER_CNTL,
1097ec681f3Smrg      R_028840_PA_STEREO_CNTL - R_02882C_PA_SU_PRIM_FILTER_CNTL + 4,
1107ec681f3Smrg   },
1117ec681f3Smrg   {
1127ec681f3Smrg      R_028A00_PA_SU_POINT_SIZE,
1137ec681f3Smrg      R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4,
1147ec681f3Smrg   },
1157ec681f3Smrg   {
1167ec681f3Smrg      R_028A18_VGT_HOS_MAX_TESS_LEVEL,
1177ec681f3Smrg      R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4,
1187ec681f3Smrg   },
1197ec681f3Smrg   {
1207ec681f3Smrg      R_028A40_VGT_GS_MODE,
1217ec681f3Smrg      R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4,
1227ec681f3Smrg   },
1237ec681f3Smrg   {
1247ec681f3Smrg      R_028A84_VGT_PRIMITIVEID_EN,
1257ec681f3Smrg      4,
1267ec681f3Smrg   },
1277ec681f3Smrg   {
1287ec681f3Smrg      R_028A8C_VGT_PRIMITIVEID_RESET,
1297ec681f3Smrg      4,
1307ec681f3Smrg   },
1317ec681f3Smrg   {
1327ec681f3Smrg      R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP,
1337ec681f3Smrg      R_028AD4_VGT_STRMOUT_VTX_STRIDE_0 - R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP + 4,
1347ec681f3Smrg   },
1357ec681f3Smrg   {
1367ec681f3Smrg      R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1,
1377ec681f3Smrg      R_028AE4_VGT_STRMOUT_VTX_STRIDE_1 - R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1 + 4,
1387ec681f3Smrg   },
1397ec681f3Smrg   {
1407ec681f3Smrg      R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2,
1417ec681f3Smrg      R_028AF4_VGT_STRMOUT_VTX_STRIDE_2 - R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2 + 4,
1427ec681f3Smrg   },
1437ec681f3Smrg   {
1447ec681f3Smrg      R_028B00_VGT_STRMOUT_BUFFER_SIZE_3,
1457ec681f3Smrg      R_028B04_VGT_STRMOUT_VTX_STRIDE_3 - R_028B00_VGT_STRMOUT_BUFFER_SIZE_3 + 4,
1467ec681f3Smrg   },
1477ec681f3Smrg   {
1487ec681f3Smrg      R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET,
1497ec681f3Smrg      R_028B30_VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE - R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET + 4,
1507ec681f3Smrg   },
1517ec681f3Smrg   {
1527ec681f3Smrg      R_028B38_VGT_GS_MAX_VERT_OUT,
1537ec681f3Smrg      R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028B38_VGT_GS_MAX_VERT_OUT + 4,
1547ec681f3Smrg   },
1557ec681f3Smrg   {
1567ec681f3Smrg      R_028BD4_PA_SC_CENTROID_PRIORITY_0,
1577ec681f3Smrg      R_028E3C_CB_COLOR7_DCC_BASE_EXT - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4,
1587ec681f3Smrg   },
1597ec681f3Smrg};
1607ec681f3Smrg
1617ec681f3Smrgstatic const struct ac_reg_range Gfx9ShShadowRange[] = {
1627ec681f3Smrg   {
1637ec681f3Smrg      R_00B020_SPI_SHADER_PGM_LO_PS,
1647ec681f3Smrg      R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4,
1657ec681f3Smrg   },
1667ec681f3Smrg   {
1677ec681f3Smrg      R_00B11C_SPI_SHADER_LATE_ALLOC_VS,
1687ec681f3Smrg      R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4,
1697ec681f3Smrg   },
1707ec681f3Smrg   {
1717ec681f3Smrg      R_00B204_SPI_SHADER_PGM_RSRC4_GS,
1727ec681f3Smrg      R_00B214_SPI_SHADER_PGM_HI_ES - R_00B204_SPI_SHADER_PGM_RSRC4_GS + 4,
1737ec681f3Smrg   },
1747ec681f3Smrg   {
1757ec681f3Smrg      R_00B220_SPI_SHADER_PGM_LO_GS,
1767ec681f3Smrg      R_00B22C_SPI_SHADER_PGM_RSRC2_GS - R_00B220_SPI_SHADER_PGM_LO_GS + 4,
1777ec681f3Smrg   },
1787ec681f3Smrg   {
1797ec681f3Smrg      R_00B330_SPI_SHADER_USER_DATA_ES_0,
1807ec681f3Smrg      R_00B3AC_SPI_SHADER_USER_DATA_ES_31 - R_00B330_SPI_SHADER_USER_DATA_ES_0 + 4,
1817ec681f3Smrg   },
1827ec681f3Smrg   {
1837ec681f3Smrg      R_00B404_SPI_SHADER_PGM_RSRC4_HS,
1847ec681f3Smrg      R_00B414_SPI_SHADER_PGM_HI_LS - R_00B404_SPI_SHADER_PGM_RSRC4_HS + 4,
1857ec681f3Smrg   },
1867ec681f3Smrg   {
1877ec681f3Smrg      R_00B420_SPI_SHADER_PGM_LO_HS,
1887ec681f3Smrg      R_00B4AC_SPI_SHADER_USER_DATA_LS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4,
1897ec681f3Smrg   },
1907ec681f3Smrg};
1917ec681f3Smrg
1927ec681f3Smrgstatic const struct ac_reg_range Gfx9CsShShadowRange[] = {
1937ec681f3Smrg   {
1947ec681f3Smrg      R_00B810_COMPUTE_START_X,
1957ec681f3Smrg      R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4,
1967ec681f3Smrg   },
1977ec681f3Smrg   {
1987ec681f3Smrg      R_00B82C_COMPUTE_PERFCOUNT_ENABLE,
1997ec681f3Smrg      R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4,
2007ec681f3Smrg   },
2017ec681f3Smrg   {
2027ec681f3Smrg      R_00B848_COMPUTE_PGM_RSRC1,
2037ec681f3Smrg      R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4,
2047ec681f3Smrg   },
2057ec681f3Smrg   {
2067ec681f3Smrg      R_00B854_COMPUTE_RESOURCE_LIMITS,
2077ec681f3Smrg      4,
2087ec681f3Smrg   },
2097ec681f3Smrg   {
2107ec681f3Smrg      R_00B860_COMPUTE_TMPRING_SIZE,
2117ec681f3Smrg      4,
2127ec681f3Smrg   },
2137ec681f3Smrg   {
2147ec681f3Smrg      R_00B878_COMPUTE_THREAD_TRACE_ENABLE,
2157ec681f3Smrg      4,
2167ec681f3Smrg   },
2177ec681f3Smrg   {
2187ec681f3Smrg      R_00B900_COMPUTE_USER_DATA_0,
2197ec681f3Smrg      R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4,
2207ec681f3Smrg   },
2217ec681f3Smrg};
2227ec681f3Smrg
2237ec681f3Smrgstatic const struct ac_reg_range Gfx9ShShadowRangeRaven2[] = {
2247ec681f3Smrg   {
2257ec681f3Smrg      R_00B018_SPI_SHADER_PGM_CHKSUM_PS,
2267ec681f3Smrg      4,
2277ec681f3Smrg   },
2287ec681f3Smrg   {
2297ec681f3Smrg      R_00B020_SPI_SHADER_PGM_LO_PS,
2307ec681f3Smrg      R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4,
2317ec681f3Smrg   },
2327ec681f3Smrg   {
2337ec681f3Smrg      R_00B114_SPI_SHADER_PGM_CHKSUM_VS,
2347ec681f3Smrg      4,
2357ec681f3Smrg   },
2367ec681f3Smrg   {
2377ec681f3Smrg      R_00B11C_SPI_SHADER_LATE_ALLOC_VS,
2387ec681f3Smrg      R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4,
2397ec681f3Smrg   },
2407ec681f3Smrg   {
2417ec681f3Smrg      R_00B200_SPI_SHADER_PGM_CHKSUM_GS,
2427ec681f3Smrg      R_00B214_SPI_SHADER_PGM_HI_ES - R_00B200_SPI_SHADER_PGM_CHKSUM_GS + 4,
2437ec681f3Smrg   },
2447ec681f3Smrg   {
2457ec681f3Smrg      R_00B220_SPI_SHADER_PGM_LO_GS,
2467ec681f3Smrg      R_00B22C_SPI_SHADER_PGM_RSRC2_GS - R_00B220_SPI_SHADER_PGM_LO_GS + 4,
2477ec681f3Smrg   },
2487ec681f3Smrg   {
2497ec681f3Smrg      R_00B330_SPI_SHADER_USER_DATA_ES_0,
2507ec681f3Smrg      R_00B3AC_SPI_SHADER_USER_DATA_ES_31 - R_00B330_SPI_SHADER_USER_DATA_ES_0 + 4,
2517ec681f3Smrg   },
2527ec681f3Smrg   {
2537ec681f3Smrg      R_00B400_SPI_SHADER_PGM_CHKSUM_HS,
2547ec681f3Smrg      R_00B414_SPI_SHADER_PGM_HI_LS - R_00B400_SPI_SHADER_PGM_CHKSUM_HS + 4,
2557ec681f3Smrg   },
2567ec681f3Smrg   {
2577ec681f3Smrg      R_00B420_SPI_SHADER_PGM_LO_HS,
2587ec681f3Smrg      R_00B4AC_SPI_SHADER_USER_DATA_LS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4,
2597ec681f3Smrg   },
2607ec681f3Smrg};
2617ec681f3Smrg
2627ec681f3Smrgstatic const struct ac_reg_range Gfx9CsShShadowRangeRaven2[] = {
2637ec681f3Smrg   {
2647ec681f3Smrg      R_00B810_COMPUTE_START_X,
2657ec681f3Smrg      R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4,
2667ec681f3Smrg   },
2677ec681f3Smrg   {
2687ec681f3Smrg      R_00B82C_COMPUTE_PERFCOUNT_ENABLE,
2697ec681f3Smrg      R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4,
2707ec681f3Smrg   },
2717ec681f3Smrg   {
2727ec681f3Smrg      R_00B848_COMPUTE_PGM_RSRC1,
2737ec681f3Smrg      R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4,
2747ec681f3Smrg   },
2757ec681f3Smrg   {
2767ec681f3Smrg      R_00B854_COMPUTE_RESOURCE_LIMITS,
2777ec681f3Smrg      4,
2787ec681f3Smrg   },
2797ec681f3Smrg   {
2807ec681f3Smrg      R_00B860_COMPUTE_TMPRING_SIZE,
2817ec681f3Smrg      4,
2827ec681f3Smrg   },
2837ec681f3Smrg   {
2847ec681f3Smrg      R_00B878_COMPUTE_THREAD_TRACE_ENABLE,
2857ec681f3Smrg      4,
2867ec681f3Smrg   },
2877ec681f3Smrg   {
2887ec681f3Smrg      R_00B894_COMPUTE_SHADER_CHKSUM,
2897ec681f3Smrg      4,
2907ec681f3Smrg   },
2917ec681f3Smrg   {
2927ec681f3Smrg      R_00B900_COMPUTE_USER_DATA_0,
2937ec681f3Smrg      R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4,
2947ec681f3Smrg   },
2957ec681f3Smrg};
2967ec681f3Smrg
2977ec681f3Smrgstatic const struct ac_reg_range Nv10ContextShadowRange[] = {
2987ec681f3Smrg   {
2997ec681f3Smrg      R_028000_DB_RENDER_CONTROL,
3007ec681f3Smrg      R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4,
3017ec681f3Smrg   },
3027ec681f3Smrg   {
3037ec681f3Smrg      R_0281E8_COHER_DEST_BASE_HI_0,
3047ec681f3Smrg      R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4,
3057ec681f3Smrg   },
3067ec681f3Smrg   {
3077ec681f3Smrg      R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
3087ec681f3Smrg      R_028618_PA_CL_UCP_5_W - R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX + 4,
3097ec681f3Smrg   },
3107ec681f3Smrg   {
3117ec681f3Smrg      R_028644_SPI_PS_INPUT_CNTL_0,
3127ec681f3Smrg      R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4,
3137ec681f3Smrg   },
3147ec681f3Smrg   {
3157ec681f3Smrg      R_028754_SX_PS_DOWNCONVERT,
3167ec681f3Smrg      R_02879C_CB_BLEND7_CONTROL - R_028754_SX_PS_DOWNCONVERT + 4,
3177ec681f3Smrg   },
3187ec681f3Smrg   {
3197ec681f3Smrg      R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP,
3207ec681f3Smrg      R_028820_PA_CL_NANINF_CNTL - R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP + 4,
3217ec681f3Smrg   },
3227ec681f3Smrg   {
3237ec681f3Smrg      R_02882C_PA_SU_PRIM_FILTER_CNTL,
3247ec681f3Smrg      R_028844_PA_STATE_STEREO_X - R_02882C_PA_SU_PRIM_FILTER_CNTL + 4,
3257ec681f3Smrg   },
3267ec681f3Smrg   {
3277ec681f3Smrg      R_028A00_PA_SU_POINT_SIZE,
3287ec681f3Smrg      R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4,
3297ec681f3Smrg   },
3307ec681f3Smrg   {
3317ec681f3Smrg      R_028A18_VGT_HOS_MAX_TESS_LEVEL,
3327ec681f3Smrg      R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4,
3337ec681f3Smrg   },
3347ec681f3Smrg   {
3357ec681f3Smrg      R_028A40_VGT_GS_MODE,
3367ec681f3Smrg      R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4,
3377ec681f3Smrg   },
3387ec681f3Smrg   {
3397ec681f3Smrg      R_028A84_VGT_PRIMITIVEID_EN,
3407ec681f3Smrg      4,
3417ec681f3Smrg   },
3427ec681f3Smrg   {
3437ec681f3Smrg      R_028A8C_VGT_PRIMITIVEID_RESET,
3447ec681f3Smrg      4,
3457ec681f3Smrg   },
3467ec681f3Smrg   {
3477ec681f3Smrg      R_028A98_VGT_DRAW_PAYLOAD_CNTL,
3487ec681f3Smrg      R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028A98_VGT_DRAW_PAYLOAD_CNTL + 4,
3497ec681f3Smrg   },
3507ec681f3Smrg   {
3517ec681f3Smrg      R_028BD4_PA_SC_CENTROID_PRIORITY_0,
3527ec681f3Smrg      R_028EFC_CB_COLOR7_ATTRIB3 - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4,
3537ec681f3Smrg   },
3547ec681f3Smrg};
3557ec681f3Smrg
3567ec681f3Smrgstatic const struct ac_reg_range Nv10UserConfigShadowRange[] = {
3577ec681f3Smrg   {
3587ec681f3Smrg      R_0300FC_CP_STRMOUT_CNTL,
3597ec681f3Smrg      4,
3607ec681f3Smrg   },
3617ec681f3Smrg   {
3627ec681f3Smrg      R_0301EC_CP_COHER_START_DELAY,
3637ec681f3Smrg      4,
3647ec681f3Smrg   },
3657ec681f3Smrg   {
3667ec681f3Smrg      R_030904_VGT_GSVS_RING_SIZE_UMD,
3677ec681f3Smrg      R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE_UMD + 4,
3687ec681f3Smrg   },
3697ec681f3Smrg   {
3707ec681f3Smrg      R_030964_GE_MAX_VTX_INDX,
3717ec681f3Smrg      4,
3727ec681f3Smrg   },
3737ec681f3Smrg   {
3747ec681f3Smrg      R_030924_GE_MIN_VTX_INDX,
3757ec681f3Smrg      R_03092C_GE_MULTI_PRIM_IB_RESET_EN - R_030924_GE_MIN_VTX_INDX + 4,
3767ec681f3Smrg   },
3777ec681f3Smrg   {
3787ec681f3Smrg      R_030934_VGT_NUM_INSTANCES,
3797ec681f3Smrg      R_030940_VGT_TF_MEMORY_BASE_UMD - R_030934_VGT_NUM_INSTANCES + 4,
3807ec681f3Smrg   },
3817ec681f3Smrg   {
3827ec681f3Smrg      R_03097C_GE_STEREO_CNTL,
3837ec681f3Smrg      R_030984_VGT_TF_MEMORY_BASE_HI_UMD - R_03097C_GE_STEREO_CNTL + 4,
3847ec681f3Smrg   },
3857ec681f3Smrg   {
3867ec681f3Smrg      R_03096C_GE_CNTL,
3877ec681f3Smrg      4,
3887ec681f3Smrg   },
3897ec681f3Smrg   {
3907ec681f3Smrg      R_030968_VGT_INSTANCE_BASE_ID,
3917ec681f3Smrg      4,
3927ec681f3Smrg   },
3937ec681f3Smrg   {
3947ec681f3Smrg      R_030988_GE_USER_VGPR_EN,
3957ec681f3Smrg      4,
3967ec681f3Smrg   },
3977ec681f3Smrg   {
3987ec681f3Smrg      R_030E00_TA_CS_BC_BASE_ADDR,
3997ec681f3Smrg      R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4,
4007ec681f3Smrg   },
4017ec681f3Smrg};
4027ec681f3Smrg
4037ec681f3Smrgstatic const struct ac_reg_range Gfx10ShShadowRange[] = {
4047ec681f3Smrg   {
4057ec681f3Smrg      R_00B018_SPI_SHADER_PGM_CHKSUM_PS,
4067ec681f3Smrg      4,
4077ec681f3Smrg   },
4087ec681f3Smrg   {
4097ec681f3Smrg      R_00B020_SPI_SHADER_PGM_LO_PS,
4107ec681f3Smrg      R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4,
4117ec681f3Smrg   },
4127ec681f3Smrg   {
4137ec681f3Smrg      R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0,
4147ec681f3Smrg      R_00B0D4_SPI_SHADER_USER_ACCUM_PS_3 - R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0 + 4,
4157ec681f3Smrg   },
4167ec681f3Smrg   {
4177ec681f3Smrg      R_00B114_SPI_SHADER_PGM_CHKSUM_VS,
4187ec681f3Smrg      4,
4197ec681f3Smrg   },
4207ec681f3Smrg   {
4217ec681f3Smrg      R_00B11C_SPI_SHADER_LATE_ALLOC_VS,
4227ec681f3Smrg      R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4,
4237ec681f3Smrg   },
4247ec681f3Smrg   {
4257ec681f3Smrg      R_00B1C8_SPI_SHADER_USER_ACCUM_VS_0,
4267ec681f3Smrg      R_00B1D4_SPI_SHADER_USER_ACCUM_VS_3 - R_00B1C8_SPI_SHADER_USER_ACCUM_VS_0 + 4,
4277ec681f3Smrg   },
4287ec681f3Smrg   {
4297ec681f3Smrg      R_00B320_SPI_SHADER_PGM_LO_ES,
4307ec681f3Smrg      R_00B324_SPI_SHADER_PGM_HI_ES - R_00B320_SPI_SHADER_PGM_LO_ES + 4,
4317ec681f3Smrg   },
4327ec681f3Smrg   {
4337ec681f3Smrg      R_00B520_SPI_SHADER_PGM_LO_LS,
4347ec681f3Smrg      R_00B524_SPI_SHADER_PGM_HI_LS - R_00B520_SPI_SHADER_PGM_LO_LS + 4,
4357ec681f3Smrg   },
4367ec681f3Smrg   {
4377ec681f3Smrg      R_00B200_SPI_SHADER_PGM_CHKSUM_GS,
4387ec681f3Smrg      4,
4397ec681f3Smrg   },
4407ec681f3Smrg   {
4417ec681f3Smrg      R_00B21C_SPI_SHADER_PGM_RSRC3_GS,
4427ec681f3Smrg      R_00B2AC_SPI_SHADER_USER_DATA_GS_31 - R_00B21C_SPI_SHADER_PGM_RSRC3_GS + 4,
4437ec681f3Smrg   },
4447ec681f3Smrg   {
4457ec681f3Smrg      R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS,
4467ec681f3Smrg      R_00B20C_SPI_SHADER_USER_DATA_ADDR_HI_GS - R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS + 4,
4477ec681f3Smrg   },
4487ec681f3Smrg   {
4497ec681f3Smrg      R_00B408_SPI_SHADER_USER_DATA_ADDR_LO_HS,
4507ec681f3Smrg      R_00B40C_SPI_SHADER_USER_DATA_ADDR_HI_HS - R_00B408_SPI_SHADER_USER_DATA_ADDR_LO_HS + 4,
4517ec681f3Smrg   },
4527ec681f3Smrg   {
4537ec681f3Smrg      R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0,
4547ec681f3Smrg      R_00B2D4_SPI_SHADER_USER_ACCUM_ESGS_3 - R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0 + 4,
4557ec681f3Smrg   },
4567ec681f3Smrg   {
4577ec681f3Smrg      R_00B400_SPI_SHADER_PGM_CHKSUM_HS,
4587ec681f3Smrg      4,
4597ec681f3Smrg   },
4607ec681f3Smrg   {
4617ec681f3Smrg      R_00B41C_SPI_SHADER_PGM_RSRC3_HS,
4627ec681f3Smrg      R_00B4AC_SPI_SHADER_USER_DATA_HS_31 - R_00B41C_SPI_SHADER_PGM_RSRC3_HS + 4,
4637ec681f3Smrg   },
4647ec681f3Smrg   {
4657ec681f3Smrg      R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0,
4667ec681f3Smrg      R_00B4D4_SPI_SHADER_USER_ACCUM_LSHS_3 - R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0 + 4,
4677ec681f3Smrg   },
4687ec681f3Smrg   {
4697ec681f3Smrg      R_00B0C0_SPI_SHADER_REQ_CTRL_PS,
4707ec681f3Smrg      4,
4717ec681f3Smrg   },
4727ec681f3Smrg   {
4737ec681f3Smrg      R_00B1C0_SPI_SHADER_REQ_CTRL_VS,
4747ec681f3Smrg      4,
4757ec681f3Smrg   },
4767ec681f3Smrg};
4777ec681f3Smrg
4787ec681f3Smrgstatic const struct ac_reg_range Gfx10CsShShadowRange[] = {
4797ec681f3Smrg   {
4807ec681f3Smrg      R_00B810_COMPUTE_START_X,
4817ec681f3Smrg      R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4,
4827ec681f3Smrg   },
4837ec681f3Smrg   {
4847ec681f3Smrg      R_00B82C_COMPUTE_PERFCOUNT_ENABLE,
4857ec681f3Smrg      R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4,
4867ec681f3Smrg   },
4877ec681f3Smrg   {
4887ec681f3Smrg      R_00B848_COMPUTE_PGM_RSRC1,
4897ec681f3Smrg      R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4,
4907ec681f3Smrg   },
4917ec681f3Smrg   {
4927ec681f3Smrg      R_00B854_COMPUTE_RESOURCE_LIMITS,
4937ec681f3Smrg      4,
4947ec681f3Smrg   },
4957ec681f3Smrg   {
4967ec681f3Smrg      R_00B860_COMPUTE_TMPRING_SIZE,
4977ec681f3Smrg      4,
4987ec681f3Smrg   },
4997ec681f3Smrg   {
5007ec681f3Smrg      R_00B878_COMPUTE_THREAD_TRACE_ENABLE,
5017ec681f3Smrg      4,
5027ec681f3Smrg   },
5037ec681f3Smrg   {
5047ec681f3Smrg      R_00B890_COMPUTE_USER_ACCUM_0,
5057ec681f3Smrg      R_00B8A0_COMPUTE_PGM_RSRC3 - R_00B890_COMPUTE_USER_ACCUM_0 + 4,
5067ec681f3Smrg   },
5077ec681f3Smrg   {
5087ec681f3Smrg      R_00B8A8_COMPUTE_SHADER_CHKSUM,
5097ec681f3Smrg      4,
5107ec681f3Smrg   },
5117ec681f3Smrg   {
5127ec681f3Smrg      R_00B900_COMPUTE_USER_DATA_0,
5137ec681f3Smrg      R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4,
5147ec681f3Smrg   },
5157ec681f3Smrg   {
5167ec681f3Smrg      R_00B9F4_COMPUTE_DISPATCH_TUNNEL,
5177ec681f3Smrg      4,
5187ec681f3Smrg   },
5197ec681f3Smrg};
5207ec681f3Smrg
5217ec681f3Smrgstatic const struct ac_reg_range Navi10NonShadowedRanges[] = {
5227ec681f3Smrg   /* These are not defined in Mesa. */
5237ec681f3Smrg   /*{
5247ec681f3Smrg      VGT_DMA_PRIMITIVE_TYPE,
5257ec681f3Smrg      VGT_DMA_LS_HS_CONFIG - VGT_DMA_PRIMITIVE_TYPE + 4,
5267ec681f3Smrg   },*/
5277ec681f3Smrg   /* VGT_INDEX_TYPE and VGT_DMA_INDEX_TYPE are a special case and neither of these should be
5287ec681f3Smrg      shadowed. */
5297ec681f3Smrg   {
5307ec681f3Smrg      R_028A7C_VGT_DMA_INDEX_TYPE,
5317ec681f3Smrg      4,
5327ec681f3Smrg   },
5337ec681f3Smrg   {
5347ec681f3Smrg      R_03090C_VGT_INDEX_TYPE,
5357ec681f3Smrg      R_03091C_VGT_STRMOUT_BUFFER_FILLED_SIZE_3 - R_03090C_VGT_INDEX_TYPE + 4,
5367ec681f3Smrg   },
5377ec681f3Smrg   {
5387ec681f3Smrg      R_028A88_VGT_DMA_NUM_INSTANCES,
5397ec681f3Smrg      4,
5407ec681f3Smrg   },
5417ec681f3Smrg   {
5427ec681f3Smrg      R_00B118_SPI_SHADER_PGM_RSRC3_VS,
5437ec681f3Smrg      4,
5447ec681f3Smrg   },
5457ec681f3Smrg   {
5467ec681f3Smrg      R_00B01C_SPI_SHADER_PGM_RSRC3_PS,
5477ec681f3Smrg      4,
5487ec681f3Smrg   },
5497ec681f3Smrg   {
5507ec681f3Smrg      R_00B004_SPI_SHADER_PGM_RSRC4_PS,
5517ec681f3Smrg      4,
5527ec681f3Smrg   },
5537ec681f3Smrg   {
5547ec681f3Smrg      R_00B104_SPI_SHADER_PGM_RSRC4_VS,
5557ec681f3Smrg      4,
5567ec681f3Smrg   },
5577ec681f3Smrg   {
5587ec681f3Smrg      R_00B404_SPI_SHADER_PGM_RSRC4_HS,
5597ec681f3Smrg      4,
5607ec681f3Smrg   },
5617ec681f3Smrg   {
5627ec681f3Smrg      R_00B204_SPI_SHADER_PGM_RSRC4_GS,
5637ec681f3Smrg      4,
5647ec681f3Smrg   },
5657ec681f3Smrg   {
5667ec681f3Smrg      R_00B858_COMPUTE_DESTINATION_EN_SE0,
5677ec681f3Smrg      R_00B85C_COMPUTE_DESTINATION_EN_SE1 - R_00B858_COMPUTE_DESTINATION_EN_SE0 + 4,
5687ec681f3Smrg   },
5697ec681f3Smrg   {
5707ec681f3Smrg      R_00B864_COMPUTE_DESTINATION_EN_SE2,
5717ec681f3Smrg      R_00B868_COMPUTE_DESTINATION_EN_SE3 - R_00B864_COMPUTE_DESTINATION_EN_SE2 + 4,
5727ec681f3Smrg   },
5737ec681f3Smrg   {
5747ec681f3Smrg      R_030800_GRBM_GFX_INDEX,
5757ec681f3Smrg      4,
5767ec681f3Smrg   },
5777ec681f3Smrg   {
5787ec681f3Smrg      R_031100_SPI_CONFIG_CNTL_REMAP,
5797ec681f3Smrg      4,
5807ec681f3Smrg   },
5817ec681f3Smrg   /* SQ thread trace registers are always not shadowed. */
5827ec681f3Smrg   {
5837ec681f3Smrg      R_008D00_SQ_THREAD_TRACE_BUF0_BASE,
5847ec681f3Smrg      R_008D38_SQ_THREAD_TRACE_HP3D_MARKER_CNTR - R_008D00_SQ_THREAD_TRACE_BUF0_BASE + 4,
5857ec681f3Smrg   },
5867ec681f3Smrg   {
5877ec681f3Smrg      R_030D00_SQ_THREAD_TRACE_USERDATA_0,
5887ec681f3Smrg      R_030D1C_SQ_THREAD_TRACE_USERDATA_7 - R_030D00_SQ_THREAD_TRACE_USERDATA_0 + 4,
5897ec681f3Smrg   },
5907ec681f3Smrg   /* Perf counter registers are always not shadowed. Most of them are in the perf
5917ec681f3Smrg    * register space but some legacy registers are still outside of it. The SPM
5927ec681f3Smrg    * registers are in the perf range as well.
5937ec681f3Smrg    */
5947ec681f3Smrg   {
5957ec681f3Smrg      SI_UCONFIG_PERF_REG_OFFSET,
5967ec681f3Smrg      SI_UCONFIG_PERF_REG_SPACE_SIZE,
5977ec681f3Smrg   },
5987ec681f3Smrg   /* These are not defined in Mesa. */
5997ec681f3Smrg   /*{
6007ec681f3Smrg      ATC_PERFCOUNTER0_CFG,
6017ec681f3Smrg      ATC_PERFCOUNTER_HI - ATC_PERFCOUNTER0_CFG + 4,
6027ec681f3Smrg   },
6037ec681f3Smrg   {
6047ec681f3Smrg      RPB_PERFCOUNTER_LO,
6057ec681f3Smrg      RPB_PERFCOUNTER_RSLT_CNTL - RPB_PERFCOUNTER_LO + 4,
6067ec681f3Smrg   },
6077ec681f3Smrg   {
6087ec681f3Smrg      SDMA0_PERFCOUNTER0_SELECT,
6097ec681f3Smrg      SDMA0_PERFCOUNTER1_HI - SDMA0_PERFCOUNTER0_SELECT + 4,
6107ec681f3Smrg   },
6117ec681f3Smrg   {
6127ec681f3Smrg      SDMA1_PERFCOUNTER0_SELECT,
6137ec681f3Smrg      SDMA1_PERFCOUNTER1_HI - SDMA1_PERFCOUNTER0_SELECT + 4,
6147ec681f3Smrg   },
6157ec681f3Smrg   {
6167ec681f3Smrg      GCEA_PERFCOUNTER_LO,
6177ec681f3Smrg      GCEA_PERFCOUNTER_RSLT_CNTL - GCEA_PERFCOUNTER_LO + 4,
6187ec681f3Smrg   },
6197ec681f3Smrg   {
6207ec681f3Smrg      GUS_PERFCOUNTER_LO,
6217ec681f3Smrg      GUS_PERFCOUNTER_RSLT_CNTL - GUS_PERFCOUNTER_LO + 4,
6227ec681f3Smrg   },*/
6237ec681f3Smrg};
6247ec681f3Smrg
6257ec681f3Smrgstatic const struct ac_reg_range Gfx103ContextShadowRange[] = {
6267ec681f3Smrg   {
6277ec681f3Smrg      R_028000_DB_RENDER_CONTROL,
6287ec681f3Smrg      R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4,
6297ec681f3Smrg   },
6307ec681f3Smrg   {
6317ec681f3Smrg      R_0281E8_COHER_DEST_BASE_HI_0,
6327ec681f3Smrg      R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4,
6337ec681f3Smrg   },
6347ec681f3Smrg   {
6357ec681f3Smrg      R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
6367ec681f3Smrg      R_028618_PA_CL_UCP_5_W - R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX + 4,
6377ec681f3Smrg   },
6387ec681f3Smrg   {
6397ec681f3Smrg      R_028644_SPI_PS_INPUT_CNTL_0,
6407ec681f3Smrg      R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4,
6417ec681f3Smrg   },
6427ec681f3Smrg   {
6437ec681f3Smrg      R_028750_SX_PS_DOWNCONVERT_CONTROL,
6447ec681f3Smrg      R_02879C_CB_BLEND7_CONTROL - R_028750_SX_PS_DOWNCONVERT_CONTROL + 4,
6457ec681f3Smrg   },
6467ec681f3Smrg   {
6477ec681f3Smrg      R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP,
6487ec681f3Smrg      R_028820_PA_CL_NANINF_CNTL - R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP + 4,
6497ec681f3Smrg   },
6507ec681f3Smrg   {
6517ec681f3Smrg      R_02882C_PA_SU_PRIM_FILTER_CNTL,
6527ec681f3Smrg      R_028848_PA_CL_VRS_CNTL - R_02882C_PA_SU_PRIM_FILTER_CNTL + 4,
6537ec681f3Smrg   },
6547ec681f3Smrg   {
6557ec681f3Smrg      R_028A00_PA_SU_POINT_SIZE,
6567ec681f3Smrg      R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4,
6577ec681f3Smrg   },
6587ec681f3Smrg   {
6597ec681f3Smrg      R_028A18_VGT_HOS_MAX_TESS_LEVEL,
6607ec681f3Smrg      R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4,
6617ec681f3Smrg   },
6627ec681f3Smrg   {
6637ec681f3Smrg      R_028A40_VGT_GS_MODE,
6647ec681f3Smrg      R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4,
6657ec681f3Smrg   },
6667ec681f3Smrg   {
6677ec681f3Smrg      R_028A84_VGT_PRIMITIVEID_EN,
6687ec681f3Smrg      4,
6697ec681f3Smrg   },
6707ec681f3Smrg   {
6717ec681f3Smrg      R_028A8C_VGT_PRIMITIVEID_RESET,
6727ec681f3Smrg      4,
6737ec681f3Smrg   },
6747ec681f3Smrg   {
6757ec681f3Smrg      R_028A98_VGT_DRAW_PAYLOAD_CNTL,
6767ec681f3Smrg      R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028A98_VGT_DRAW_PAYLOAD_CNTL + 4,
6777ec681f3Smrg   },
6787ec681f3Smrg   {
6797ec681f3Smrg      R_028BD4_PA_SC_CENTROID_PRIORITY_0,
6807ec681f3Smrg      R_028EFC_CB_COLOR7_ATTRIB3 - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4,
6817ec681f3Smrg   },
6827ec681f3Smrg};
6837ec681f3Smrg
6847ec681f3Smrgstatic const struct ac_reg_range Gfx103UserConfigShadowRange[] = {
6857ec681f3Smrg   {
6867ec681f3Smrg      R_0300FC_CP_STRMOUT_CNTL,
6877ec681f3Smrg      4,
6887ec681f3Smrg   },
6897ec681f3Smrg   {
6907ec681f3Smrg      R_0301EC_CP_COHER_START_DELAY,
6917ec681f3Smrg      4,
6927ec681f3Smrg   },
6937ec681f3Smrg   {
6947ec681f3Smrg      R_030904_VGT_GSVS_RING_SIZE_UMD,
6957ec681f3Smrg      R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE_UMD + 4,
6967ec681f3Smrg   },
6977ec681f3Smrg   {
6987ec681f3Smrg      R_030964_GE_MAX_VTX_INDX,
6997ec681f3Smrg      4,
7007ec681f3Smrg   },
7017ec681f3Smrg   {
7027ec681f3Smrg      R_030924_GE_MIN_VTX_INDX,
7037ec681f3Smrg      R_03092C_GE_MULTI_PRIM_IB_RESET_EN - R_030924_GE_MIN_VTX_INDX + 4,
7047ec681f3Smrg   },
7057ec681f3Smrg   {
7067ec681f3Smrg      R_030934_VGT_NUM_INSTANCES,
7077ec681f3Smrg      R_030940_VGT_TF_MEMORY_BASE_UMD - R_030934_VGT_NUM_INSTANCES + 4,
7087ec681f3Smrg   },
7097ec681f3Smrg   {
7107ec681f3Smrg      R_03097C_GE_STEREO_CNTL,
7117ec681f3Smrg      R_030984_VGT_TF_MEMORY_BASE_HI_UMD - R_03097C_GE_STEREO_CNTL + 4,
7127ec681f3Smrg   },
7137ec681f3Smrg   {
7147ec681f3Smrg      R_03096C_GE_CNTL,
7157ec681f3Smrg      4,
7167ec681f3Smrg   },
7177ec681f3Smrg   {
7187ec681f3Smrg      R_030968_VGT_INSTANCE_BASE_ID,
7197ec681f3Smrg      4,
7207ec681f3Smrg   },
7217ec681f3Smrg   {
7227ec681f3Smrg      R_030E00_TA_CS_BC_BASE_ADDR,
7237ec681f3Smrg      R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4,
7247ec681f3Smrg   },
7257ec681f3Smrg   {
7267ec681f3Smrg      R_030988_GE_USER_VGPR_EN,
7277ec681f3Smrg      0x03098C - R_030988_GE_USER_VGPR_EN + 4,
7287ec681f3Smrg   },
7297ec681f3Smrg};
7307ec681f3Smrg
7317ec681f3Smrgstatic const struct ac_reg_range Gfx103NonShadowedRanges[] = {
7327ec681f3Smrg   /* These are not defined in Mesa. */
7337ec681f3Smrg   /*{
7347ec681f3Smrg      VGT_DMA_PRIMITIVE_TYPE,
7357ec681f3Smrg      VGT_DMA_LS_HS_CONFIG - VGT_DMA_PRIMITIVE_TYPE + 4,
7367ec681f3Smrg   },*/
7377ec681f3Smrg   /* VGT_INDEX_TYPE and VGT_DMA_INDEX_TYPE are a special case and neither of these should be
7387ec681f3Smrg      shadowed. */
7397ec681f3Smrg   {
7407ec681f3Smrg      R_028A7C_VGT_DMA_INDEX_TYPE,
7417ec681f3Smrg      4,
7427ec681f3Smrg   },
7437ec681f3Smrg   {
7447ec681f3Smrg      R_03090C_VGT_INDEX_TYPE,
7457ec681f3Smrg      R_03091C_VGT_STRMOUT_BUFFER_FILLED_SIZE_3 - R_03090C_VGT_INDEX_TYPE + 4,
7467ec681f3Smrg   },
7477ec681f3Smrg   {
7487ec681f3Smrg      R_028A88_VGT_DMA_NUM_INSTANCES,
7497ec681f3Smrg      4,
7507ec681f3Smrg   },
7517ec681f3Smrg   {
7527ec681f3Smrg      R_00B118_SPI_SHADER_PGM_RSRC3_VS,
7537ec681f3Smrg      4,
7547ec681f3Smrg   },
7557ec681f3Smrg   {
7567ec681f3Smrg      R_00B01C_SPI_SHADER_PGM_RSRC3_PS,
7577ec681f3Smrg      4,
7587ec681f3Smrg   },
7597ec681f3Smrg   {
7607ec681f3Smrg      R_00B004_SPI_SHADER_PGM_RSRC4_PS,
7617ec681f3Smrg      4,
7627ec681f3Smrg   },
7637ec681f3Smrg   {
7647ec681f3Smrg      R_00B104_SPI_SHADER_PGM_RSRC4_VS,
7657ec681f3Smrg      4,
7667ec681f3Smrg   },
7677ec681f3Smrg   {
7687ec681f3Smrg      R_00B404_SPI_SHADER_PGM_RSRC4_HS,
7697ec681f3Smrg      4,
7707ec681f3Smrg   },
7717ec681f3Smrg   {
7727ec681f3Smrg      R_00B204_SPI_SHADER_PGM_RSRC4_GS,
7737ec681f3Smrg      4,
7747ec681f3Smrg   },
7757ec681f3Smrg   {
7767ec681f3Smrg      R_00B858_COMPUTE_DESTINATION_EN_SE0,
7777ec681f3Smrg      R_00B85C_COMPUTE_DESTINATION_EN_SE1 - R_00B858_COMPUTE_DESTINATION_EN_SE0 + 4,
7787ec681f3Smrg   },
7797ec681f3Smrg   {
7807ec681f3Smrg      R_00B864_COMPUTE_DESTINATION_EN_SE2,
7817ec681f3Smrg      R_00B868_COMPUTE_DESTINATION_EN_SE3 - R_00B864_COMPUTE_DESTINATION_EN_SE2 + 4,
7827ec681f3Smrg   },
7837ec681f3Smrg   {
7847ec681f3Smrg      R_030800_GRBM_GFX_INDEX,
7857ec681f3Smrg      4,
7867ec681f3Smrg   },
7877ec681f3Smrg   {
7887ec681f3Smrg      R_031100_SPI_CONFIG_CNTL_REMAP,
7897ec681f3Smrg      4,
7907ec681f3Smrg   },
7917ec681f3Smrg   /* SQ thread trace registers are always not shadowed. */
7927ec681f3Smrg   {
7937ec681f3Smrg      R_008D00_SQ_THREAD_TRACE_BUF0_BASE,
7947ec681f3Smrg      R_008D3C_SQ_THREAD_TRACE_STATUS2 - R_008D00_SQ_THREAD_TRACE_BUF0_BASE + 4,
7957ec681f3Smrg   },
7967ec681f3Smrg   {
7977ec681f3Smrg      R_030D00_SQ_THREAD_TRACE_USERDATA_0,
7987ec681f3Smrg      R_030D1C_SQ_THREAD_TRACE_USERDATA_7 - R_030D00_SQ_THREAD_TRACE_USERDATA_0 + 4,
7997ec681f3Smrg   },
8007ec681f3Smrg   /* Perf counter registers are always not shadowed. Most of them are in the perf
8017ec681f3Smrg    * register space but some legacy registers are still outside of it. The SPM
8027ec681f3Smrg    * registers are in the perf range as well.
8037ec681f3Smrg    */
8047ec681f3Smrg   {
8057ec681f3Smrg      SI_UCONFIG_PERF_REG_OFFSET,
8067ec681f3Smrg      SI_UCONFIG_PERF_REG_SPACE_SIZE,
8077ec681f3Smrg   },
8087ec681f3Smrg   /* These are not defined in Mesa. */
8097ec681f3Smrg   /*{
8107ec681f3Smrg      mmATC_PERFCOUNTER0_CFG,
8117ec681f3Smrg      mmATC_PERFCOUNTER_HI - mmATC_PERFCOUNTER0_CFG + 1
8127ec681f3Smrg   },
8137ec681f3Smrg   {
8147ec681f3Smrg      mmRPB_PERFCOUNTER_LO,
8157ec681f3Smrg      mmRPB_PERFCOUNTER_RSLT_CNTL - mmRPB_PERFCOUNTER_LO + 1
8167ec681f3Smrg   },*/
8177ec681f3Smrg};
8187ec681f3Smrg
8197ec681f3Smrgvoid ac_get_reg_ranges(enum chip_class chip_class, enum radeon_family family,
8207ec681f3Smrg                       enum ac_reg_range_type type, unsigned *num_ranges,
8217ec681f3Smrg                       const struct ac_reg_range **ranges)
8227ec681f3Smrg{
8237ec681f3Smrg#define RETURN(array)                                                                              \
8247ec681f3Smrg   do {                                                                                            \
8257ec681f3Smrg      *ranges = array;                                                                             \
8267ec681f3Smrg      *num_ranges = ARRAY_SIZE(array);                                                             \
8277ec681f3Smrg   } while (0)
8287ec681f3Smrg
8297ec681f3Smrg   *num_ranges = 0;
8307ec681f3Smrg   *ranges = NULL;
8317ec681f3Smrg
8327ec681f3Smrg   switch (type) {
8337ec681f3Smrg   case SI_REG_RANGE_UCONFIG:
8347ec681f3Smrg      if (chip_class == GFX10_3)
8357ec681f3Smrg         RETURN(Gfx103UserConfigShadowRange);
8367ec681f3Smrg      else if (chip_class == GFX10)
8377ec681f3Smrg         RETURN(Nv10UserConfigShadowRange);
8387ec681f3Smrg      else if (chip_class == GFX9)
8397ec681f3Smrg         RETURN(Gfx9UserConfigShadowRange);
8407ec681f3Smrg      break;
8417ec681f3Smrg   case SI_REG_RANGE_CONTEXT:
8427ec681f3Smrg      if (chip_class == GFX10_3)
8437ec681f3Smrg         RETURN(Gfx103ContextShadowRange);
8447ec681f3Smrg      else if (chip_class == GFX10)
8457ec681f3Smrg         RETURN(Nv10ContextShadowRange);
8467ec681f3Smrg      else if (chip_class == GFX9)
8477ec681f3Smrg         RETURN(Gfx9ContextShadowRange);
8487ec681f3Smrg      break;
8497ec681f3Smrg   case SI_REG_RANGE_SH:
8507ec681f3Smrg      if (chip_class == GFX10_3 || chip_class == GFX10)
8517ec681f3Smrg         RETURN(Gfx10ShShadowRange);
8527ec681f3Smrg      else if (family == CHIP_RAVEN2 || family == CHIP_RENOIR)
8537ec681f3Smrg         RETURN(Gfx9ShShadowRangeRaven2);
8547ec681f3Smrg      else if (chip_class == GFX9)
8557ec681f3Smrg         RETURN(Gfx9ShShadowRange);
8567ec681f3Smrg      break;
8577ec681f3Smrg   case SI_REG_RANGE_CS_SH:
8587ec681f3Smrg      if (chip_class == GFX10_3 || chip_class == GFX10)
8597ec681f3Smrg         RETURN(Gfx10CsShShadowRange);
8607ec681f3Smrg      else if (family == CHIP_RAVEN2 || family == CHIP_RENOIR)
8617ec681f3Smrg         RETURN(Gfx9CsShShadowRangeRaven2);
8627ec681f3Smrg      else if (chip_class == GFX9)
8637ec681f3Smrg         RETURN(Gfx9CsShShadowRange);
8647ec681f3Smrg      break;
8657ec681f3Smrg   case SI_REG_RANGE_NON_SHADOWED:
8667ec681f3Smrg      if (chip_class == GFX10_3)
8677ec681f3Smrg         RETURN(Gfx103NonShadowedRanges);
8687ec681f3Smrg      else if (chip_class == GFX10)
8697ec681f3Smrg         RETURN(Navi10NonShadowedRanges);
8707ec681f3Smrg      else
8717ec681f3Smrg         assert(0);
8727ec681f3Smrg      break;
8737ec681f3Smrg   default:
8747ec681f3Smrg      break;
8757ec681f3Smrg   }
8767ec681f3Smrg}
8777ec681f3Smrg
8787ec681f3Smrg/**
8797ec681f3Smrg * Emulate CLEAR_STATE.
8807ec681f3Smrg */
8817ec681f3Smrgstatic void gfx9_emulate_clear_state(struct radeon_cmdbuf *cs,
8827ec681f3Smrg                                     set_context_reg_seq_array_fn set_context_reg_seq_array)
8837ec681f3Smrg{
8847ec681f3Smrg   static const uint32_t DbRenderControlGfx9[] = {
8857ec681f3Smrg      0x0,        // DB_RENDER_CONTROL
8867ec681f3Smrg      0x0,        // DB_COUNT_CONTROL
8877ec681f3Smrg      0x0,        // DB_DEPTH_VIEW
8887ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE
8897ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE2
8907ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE
8917ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE_HI
8927ec681f3Smrg      0x0,        // DB_DEPTH_SIZE
8937ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MIN
8947ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MAX
8957ec681f3Smrg      0x0,        // DB_STENCIL_CLEAR
8967ec681f3Smrg      0x0,        // DB_DEPTH_CLEAR
8977ec681f3Smrg      0x0,        // PA_SC_SCREEN_SCISSOR_TL
8987ec681f3Smrg      0x40004000, // PA_SC_SCREEN_SCISSOR_BR
8997ec681f3Smrg      0x0,        // DB_Z_INFO
9007ec681f3Smrg      0x0,        // DB_STENCIL_INFO
9017ec681f3Smrg      0x0,        // DB_Z_READ_BASE
9027ec681f3Smrg      0x0,        // DB_Z_READ_BASE_HI
9037ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE
9047ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE_HI
9057ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE
9067ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE_HI
9077ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE
9087ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE_HI
9097ec681f3Smrg      0x0,        // DB_DFSM_CONTROL
9107ec681f3Smrg      0x0,        //
9117ec681f3Smrg      0x0,        // DB_Z_INFO2
9127ec681f3Smrg      0x0,        // DB_STENCIL_INFO2
9137ec681f3Smrg      0x0,        //
9147ec681f3Smrg      0x0,        //
9157ec681f3Smrg      0x0,        //
9167ec681f3Smrg      0x0,        //
9177ec681f3Smrg      0x0,        // TA_BC_BASE_ADDR
9187ec681f3Smrg      0x0         // TA_BC_BASE_ADDR_HI
9197ec681f3Smrg   };
9207ec681f3Smrg   static const uint32_t CoherDestBaseHi0Gfx9[] = {
9217ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_0
9227ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_1
9237ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_2
9247ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_3
9257ec681f3Smrg      0x0,        // COHER_DEST_BASE_2
9267ec681f3Smrg      0x0,        // COHER_DEST_BASE_3
9277ec681f3Smrg      0x0,        // PA_SC_WINDOW_OFFSET
9287ec681f3Smrg      0x80000000, // PA_SC_WINDOW_SCISSOR_TL
9297ec681f3Smrg      0x40004000, // PA_SC_WINDOW_SCISSOR_BR
9307ec681f3Smrg      0xffff,     // PA_SC_CLIPRECT_RULE
9317ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_0_TL
9327ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_0_BR
9337ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_1_TL
9347ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_1_BR
9357ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_2_TL
9367ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_2_BR
9377ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_3_TL
9387ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_3_BR
9397ec681f3Smrg      0xaa99aaaa, // PA_SC_EDGERULE
9407ec681f3Smrg      0x0,        // PA_SU_HARDWARE_SCREEN_OFFSET
9417ec681f3Smrg      0xffffffff, // CB_TARGET_MASK
9427ec681f3Smrg      0xffffffff, // CB_SHADER_MASK
9437ec681f3Smrg      0x80000000, // PA_SC_GENERIC_SCISSOR_TL
9447ec681f3Smrg      0x40004000, // PA_SC_GENERIC_SCISSOR_BR
9457ec681f3Smrg      0x0,        // COHER_DEST_BASE_0
9467ec681f3Smrg      0x0,        // COHER_DEST_BASE_1
9477ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_0_TL
9487ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_0_BR
9497ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_1_TL
9507ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_1_BR
9517ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_2_TL
9527ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_2_BR
9537ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_3_TL
9547ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_3_BR
9557ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_4_TL
9567ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_4_BR
9577ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_5_TL
9587ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_5_BR
9597ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_6_TL
9607ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_6_BR
9617ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_7_TL
9627ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_7_BR
9637ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_8_TL
9647ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_8_BR
9657ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_9_TL
9667ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_9_BR
9677ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_10_TL
9687ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_10_BR
9697ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_11_TL
9707ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_11_BR
9717ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_12_TL
9727ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_12_BR
9737ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_13_TL
9747ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_13_BR
9757ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_14_TL
9767ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_14_BR
9777ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_15_TL
9787ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_15_BR
9797ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_0
9807ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_0
9817ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_1
9827ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_1
9837ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_2
9847ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_2
9857ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_3
9867ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_3
9877ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_4
9887ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_4
9897ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_5
9907ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_5
9917ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_6
9927ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_6
9937ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_7
9947ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_7
9957ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_8
9967ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_8
9977ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_9
9987ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_9
9997ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_10
10007ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_10
10017ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_11
10027ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_11
10037ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_12
10047ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_12
10057ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_13
10067ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_13
10077ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_14
10087ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_14
10097ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_15
10107ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_15
10117ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG
10127ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG_1
10137ec681f3Smrg      0x0,        //
10147ec681f3Smrg      0x0         // PA_SC_TILE_STEERING_OVERRIDE
10157ec681f3Smrg   };
10167ec681f3Smrg   static const uint32_t VgtMultiPrimIbResetIndxGfx9[] = {
10177ec681f3Smrg      0x0 // VGT_MULTI_PRIM_IB_RESET_INDX
10187ec681f3Smrg   };
10197ec681f3Smrg   static const uint32_t CbBlendRedGfx9[] = {
10207ec681f3Smrg      0x0,       // CB_BLEND_RED
10217ec681f3Smrg      0x0,       // CB_BLEND_GREEN
10227ec681f3Smrg      0x0,       // CB_BLEND_BLUE
10237ec681f3Smrg      0x0,       // CB_BLEND_ALPHA
10247ec681f3Smrg      0x0,       // CB_DCC_CONTROL
10257ec681f3Smrg      0x0,       //
10267ec681f3Smrg      0x0,       // DB_STENCIL_CONTROL
10277ec681f3Smrg      0x1000000, // DB_STENCILREFMASK
10287ec681f3Smrg      0x1000000, // DB_STENCILREFMASK_BF
10297ec681f3Smrg      0x0,       //
10307ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE
10317ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET
10327ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE
10337ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET
10347ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE
10357ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET
10367ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_1
10377ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_1
10387ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_1
10397ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_1
10407ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_1
10417ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_1
10427ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_2
10437ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_2
10447ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_2
10457ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_2
10467ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_2
10477ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_2
10487ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_3
10497ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_3
10507ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_3
10517ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_3
10527ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_3
10537ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_3
10547ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_4
10557ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_4
10567ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_4
10577ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_4
10587ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_4
10597ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_4
10607ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_5
10617ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_5
10627ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_5
10637ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_5
10647ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_5
10657ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_5
10667ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_6
10677ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_6
10687ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_6
10697ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_6
10707ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_6
10717ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_6
10727ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_7
10737ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_7
10747ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_7
10757ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_7
10767ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_7
10777ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_7
10787ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_8
10797ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_8
10807ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_8
10817ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_8
10827ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_8
10837ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_8
10847ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_9
10857ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_9
10867ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_9
10877ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_9
10887ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_9
10897ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_9
10907ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_10
10917ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_10
10927ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_10
10937ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_10
10947ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_10
10957ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_10
10967ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_11
10977ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_11
10987ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_11
10997ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_11
11007ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_11
11017ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_11
11027ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_12
11037ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_12
11047ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_12
11057ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_12
11067ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_12
11077ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_12
11087ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_13
11097ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_13
11107ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_13
11117ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_13
11127ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_13
11137ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_13
11147ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_14
11157ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_14
11167ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_14
11177ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_14
11187ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_14
11197ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_14
11207ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_15
11217ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_15
11227ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_15
11237ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_15
11247ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_15
11257ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_15
11267ec681f3Smrg      0x0,       // PA_CL_UCP_0_X
11277ec681f3Smrg      0x0,       // PA_CL_UCP_0_Y
11287ec681f3Smrg      0x0,       // PA_CL_UCP_0_Z
11297ec681f3Smrg      0x0,       // PA_CL_UCP_0_W
11307ec681f3Smrg      0x0,       // PA_CL_UCP_1_X
11317ec681f3Smrg      0x0,       // PA_CL_UCP_1_Y
11327ec681f3Smrg      0x0,       // PA_CL_UCP_1_Z
11337ec681f3Smrg      0x0,       // PA_CL_UCP_1_W
11347ec681f3Smrg      0x0,       // PA_CL_UCP_2_X
11357ec681f3Smrg      0x0,       // PA_CL_UCP_2_Y
11367ec681f3Smrg      0x0,       // PA_CL_UCP_2_Z
11377ec681f3Smrg      0x0,       // PA_CL_UCP_2_W
11387ec681f3Smrg      0x0,       // PA_CL_UCP_3_X
11397ec681f3Smrg      0x0,       // PA_CL_UCP_3_Y
11407ec681f3Smrg      0x0,       // PA_CL_UCP_3_Z
11417ec681f3Smrg      0x0,       // PA_CL_UCP_3_W
11427ec681f3Smrg      0x0,       // PA_CL_UCP_4_X
11437ec681f3Smrg      0x0,       // PA_CL_UCP_4_Y
11447ec681f3Smrg      0x0,       // PA_CL_UCP_4_Z
11457ec681f3Smrg      0x0,       // PA_CL_UCP_4_W
11467ec681f3Smrg      0x0,       // PA_CL_UCP_5_X
11477ec681f3Smrg      0x0,       // PA_CL_UCP_5_Y
11487ec681f3Smrg      0x0,       // PA_CL_UCP_5_Z
11497ec681f3Smrg      0x0        // PA_CL_UCP_5_W
11507ec681f3Smrg   };
11517ec681f3Smrg   static const uint32_t SpiPsInputCntl0Gfx9[] = {
11527ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_0
11537ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_1
11547ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_2
11557ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_3
11567ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_4
11577ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_5
11587ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_6
11597ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_7
11607ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_8
11617ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_9
11627ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_10
11637ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_11
11647ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_12
11657ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_13
11667ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_14
11677ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_15
11687ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_16
11697ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_17
11707ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_18
11717ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_19
11727ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_20
11737ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_21
11747ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_22
11757ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_23
11767ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_24
11777ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_25
11787ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_26
11797ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_27
11807ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_28
11817ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_29
11827ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_30
11837ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_31
11847ec681f3Smrg      0x0, // SPI_VS_OUT_CONFIG
11857ec681f3Smrg      0x0, //
11867ec681f3Smrg      0x0, // SPI_PS_INPUT_ENA
11877ec681f3Smrg      0x0, // SPI_PS_INPUT_ADDR
11887ec681f3Smrg      0x0, // SPI_INTERP_CONTROL_0
11897ec681f3Smrg      0x2, // SPI_PS_IN_CONTROL
11907ec681f3Smrg      0x0, //
11917ec681f3Smrg      0x0, // SPI_BARYC_CNTL
11927ec681f3Smrg      0x0, //
11937ec681f3Smrg      0x0, // SPI_TMPRING_SIZE
11947ec681f3Smrg      0x0, //
11957ec681f3Smrg      0x0, //
11967ec681f3Smrg      0x0, //
11977ec681f3Smrg      0x0, //
11987ec681f3Smrg      0x0, //
11997ec681f3Smrg      0x0, //
12007ec681f3Smrg      0x0, //
12017ec681f3Smrg      0x0, //
12027ec681f3Smrg      0x0, // SPI_SHADER_POS_FORMAT
12037ec681f3Smrg      0x0, // SPI_SHADER_Z_FORMAT
12047ec681f3Smrg      0x0  // SPI_SHADER_COL_FORMAT
12057ec681f3Smrg   };
12067ec681f3Smrg   static const uint32_t SxPsDownconvertGfx9[] = {
12077ec681f3Smrg      0x0, // SX_PS_DOWNCONVERT
12087ec681f3Smrg      0x0, // SX_BLEND_OPT_EPSILON
12097ec681f3Smrg      0x0, // SX_BLEND_OPT_CONTROL
12107ec681f3Smrg      0x0, // SX_MRT0_BLEND_OPT
12117ec681f3Smrg      0x0, // SX_MRT1_BLEND_OPT
12127ec681f3Smrg      0x0, // SX_MRT2_BLEND_OPT
12137ec681f3Smrg      0x0, // SX_MRT3_BLEND_OPT
12147ec681f3Smrg      0x0, // SX_MRT4_BLEND_OPT
12157ec681f3Smrg      0x0, // SX_MRT5_BLEND_OPT
12167ec681f3Smrg      0x0, // SX_MRT6_BLEND_OPT
12177ec681f3Smrg      0x0, // SX_MRT7_BLEND_OPT
12187ec681f3Smrg      0x0, // CB_BLEND0_CONTROL
12197ec681f3Smrg      0x0, // CB_BLEND1_CONTROL
12207ec681f3Smrg      0x0, // CB_BLEND2_CONTROL
12217ec681f3Smrg      0x0, // CB_BLEND3_CONTROL
12227ec681f3Smrg      0x0, // CB_BLEND4_CONTROL
12237ec681f3Smrg      0x0, // CB_BLEND5_CONTROL
12247ec681f3Smrg      0x0, // CB_BLEND6_CONTROL
12257ec681f3Smrg      0x0, // CB_BLEND7_CONTROL
12267ec681f3Smrg      0x0, // CB_MRT0_EPITCH
12277ec681f3Smrg      0x0, // CB_MRT1_EPITCH
12287ec681f3Smrg      0x0, // CB_MRT2_EPITCH
12297ec681f3Smrg      0x0, // CB_MRT3_EPITCH
12307ec681f3Smrg      0x0, // CB_MRT4_EPITCH
12317ec681f3Smrg      0x0, // CB_MRT5_EPITCH
12327ec681f3Smrg      0x0, // CB_MRT6_EPITCH
12337ec681f3Smrg      0x0  // CB_MRT7_EPITCH
12347ec681f3Smrg   };
12357ec681f3Smrg   static const uint32_t DbDepthControlGfx9[] = {
12367ec681f3Smrg      0x0,     // DB_DEPTH_CONTROL
12377ec681f3Smrg      0x0,     // DB_EQAA
12387ec681f3Smrg      0x0,     // CB_COLOR_CONTROL
12397ec681f3Smrg      0x0,     // DB_SHADER_CONTROL
12407ec681f3Smrg      0x90000, // PA_CL_CLIP_CNTL
12417ec681f3Smrg      0x4,     // PA_SU_SC_MODE_CNTL
12427ec681f3Smrg      0x0,     // PA_CL_VTE_CNTL
12437ec681f3Smrg      0x0,     // PA_CL_VS_OUT_CNTL
12447ec681f3Smrg      0x0      // PA_CL_NANINF_CNTL
12457ec681f3Smrg   };
12467ec681f3Smrg   static const uint32_t PaSuPrimFilterCntlGfx9[] = {
12477ec681f3Smrg      0x0, // PA_SU_PRIM_FILTER_CNTL
12487ec681f3Smrg      0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL
12497ec681f3Smrg      0x0, // PA_CL_OBJPRIM_ID_CNTL
12507ec681f3Smrg      0x0, // PA_CL_NGG_CNTL
12517ec681f3Smrg      0x0, // PA_SU_OVER_RASTERIZATION_CNTL
12527ec681f3Smrg      0x0  // PA_STEREO_CNTL
12537ec681f3Smrg   };
12547ec681f3Smrg   static const uint32_t PaSuPointSizeGfx9[] = {
12557ec681f3Smrg      0x0, // PA_SU_POINT_SIZE
12567ec681f3Smrg      0x0, // PA_SU_POINT_MINMAX
12577ec681f3Smrg      0x0, // PA_SU_LINE_CNTL
12587ec681f3Smrg      0x0  // PA_SC_LINE_STIPPLE
12597ec681f3Smrg   };
12607ec681f3Smrg   static const uint32_t VgtHosMaxTessLevelGfx9[] = {
12617ec681f3Smrg      0x0, // VGT_HOS_MAX_TESS_LEVEL
12627ec681f3Smrg      0x0  // VGT_HOS_MIN_TESS_LEVEL
12637ec681f3Smrg   };
12647ec681f3Smrg   static const uint32_t VgtGsModeGfx9[] = {
12657ec681f3Smrg      0x0,   // VGT_GS_MODE
12667ec681f3Smrg      0x0,   // VGT_GS_ONCHIP_CNTL
12677ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_0
12687ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_1
12697ec681f3Smrg      0x0,   // VGT_ENHANCE
12707ec681f3Smrg      0x100, // VGT_GS_PER_ES
12717ec681f3Smrg      0x80,  // VGT_ES_PER_GS
12727ec681f3Smrg      0x2,   // VGT_GS_PER_VS
12737ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_1
12747ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_2
12757ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_3
12767ec681f3Smrg      0x0    // VGT_GS_OUT_PRIM_TYPE
12777ec681f3Smrg   };
12787ec681f3Smrg   static const uint32_t VgtPrimitiveidEnGfx9[] = {
12797ec681f3Smrg      0x0 // VGT_PRIMITIVEID_EN
12807ec681f3Smrg   };
12817ec681f3Smrg   static const uint32_t VgtPrimitiveidResetGfx9[] = {
12827ec681f3Smrg      0x0 // VGT_PRIMITIVEID_RESET
12837ec681f3Smrg   };
12847ec681f3Smrg   static const uint32_t VgtGsMaxPrimsPerSubgroupGfx9[] = {
12857ec681f3Smrg      0x0, // VGT_GS_MAX_PRIMS_PER_SUBGROUP
12867ec681f3Smrg      0x0, // VGT_DRAW_PAYLOAD_CNTL
12877ec681f3Smrg      0x0, //
12887ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_0
12897ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_1
12907ec681f3Smrg      0x0, //
12917ec681f3Smrg      0x0, // VGT_ESGS_RING_ITEMSIZE
12927ec681f3Smrg      0x0, // VGT_GSVS_RING_ITEMSIZE
12937ec681f3Smrg      0x0, // VGT_REUSE_OFF
12947ec681f3Smrg      0x0, // VGT_VTX_CNT_EN
12957ec681f3Smrg      0x0, // DB_HTILE_SURFACE
12967ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE0
12977ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE1
12987ec681f3Smrg      0x0, // DB_PRELOAD_CONTROL
12997ec681f3Smrg      0x0, //
13007ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_0
13017ec681f3Smrg      0x0  // VGT_STRMOUT_VTX_STRIDE_0
13027ec681f3Smrg   };
13037ec681f3Smrg   static const uint32_t VgtStrmoutBufferSize1Gfx9[] = {
13047ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_1
13057ec681f3Smrg      0x0  // VGT_STRMOUT_VTX_STRIDE_1
13067ec681f3Smrg   };
13077ec681f3Smrg   static const uint32_t VgtStrmoutBufferSize2Gfx9[] = {
13087ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_2
13097ec681f3Smrg      0x0  // VGT_STRMOUT_VTX_STRIDE_2
13107ec681f3Smrg   };
13117ec681f3Smrg   static const uint32_t VgtStrmoutBufferSize3Gfx9[] = {
13127ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_3
13137ec681f3Smrg      0x0  // VGT_STRMOUT_VTX_STRIDE_3
13147ec681f3Smrg   };
13157ec681f3Smrg   static const uint32_t VgtStrmoutDrawOpaqueOffsetGfx9[] = {
13167ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET
13177ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE
13187ec681f3Smrg      0x0  // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE
13197ec681f3Smrg   };
13207ec681f3Smrg   static const uint32_t VgtGsMaxVertOutGfx9[] = {
13217ec681f3Smrg      0x0, // VGT_GS_MAX_VERT_OUT
13227ec681f3Smrg      0x0, //
13237ec681f3Smrg      0x0, //
13247ec681f3Smrg      0x0, //
13257ec681f3Smrg      0x0, //
13267ec681f3Smrg      0x0, //
13277ec681f3Smrg      0x0, // VGT_TESS_DISTRIBUTION
13287ec681f3Smrg      0x0, // VGT_SHADER_STAGES_EN
13297ec681f3Smrg      0x0, // VGT_LS_HS_CONFIG
13307ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE
13317ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_1
13327ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_2
13337ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_3
13347ec681f3Smrg      0x0, // VGT_TF_PARAM
13357ec681f3Smrg      0x0, // DB_ALPHA_TO_MASK
13367ec681f3Smrg      0x0, // VGT_DISPATCH_DRAW_INDEX
13377ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL
13387ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_CLAMP
13397ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE
13407ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET
13417ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_SCALE
13427ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET
13437ec681f3Smrg      0x0, // VGT_GS_INSTANCE_CNT
13447ec681f3Smrg      0x0, // VGT_STRMOUT_CONFIG
13457ec681f3Smrg      0x0  // VGT_STRMOUT_BUFFER_CONFIG
13467ec681f3Smrg   };
13477ec681f3Smrg   static const uint32_t PaScCentroidPriority0Gfx9[] = {
13487ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_0
13497ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_1
13507ec681f3Smrg      0x1000,     // PA_SC_LINE_CNTL
13517ec681f3Smrg      0x0,        // PA_SC_AA_CONFIG
13527ec681f3Smrg      0x5,        // PA_SU_VTX_CNTL
13537ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ
13547ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_DISC_ADJ
13557ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ
13567ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ
13577ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0
13587ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1
13597ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2
13607ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3
13617ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0
13627ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1
13637ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2
13647ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3
13657ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0
13667ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1
13677ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2
13687ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3
13697ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0
13707ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1
13717ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2
13727ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3
13737ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0
13747ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1
13757ec681f3Smrg      0x0,        // PA_SC_SHADER_CONTROL
13767ec681f3Smrg      0x3,        // PA_SC_BINNER_CNTL_0
13777ec681f3Smrg      0x0,        // PA_SC_BINNER_CNTL_1
13787ec681f3Smrg      0x100000,   // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL
13797ec681f3Smrg      0x0,        // PA_SC_NGG_MODE_CNTL
13807ec681f3Smrg      0x0,        //
13817ec681f3Smrg      0x1e,       // VGT_VERTEX_REUSE_BLOCK_CNTL
13827ec681f3Smrg      0x20,       // VGT_OUT_DEALLOC_CNTL
13837ec681f3Smrg      0x0,        // CB_COLOR0_BASE
13847ec681f3Smrg      0x0,        // CB_COLOR0_BASE_EXT
13857ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB2
13867ec681f3Smrg      0x0,        // CB_COLOR0_VIEW
13877ec681f3Smrg      0x0,        // CB_COLOR0_INFO
13887ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB
13897ec681f3Smrg      0x0,        // CB_COLOR0_DCC_CONTROL
13907ec681f3Smrg      0x0,        // CB_COLOR0_CMASK
13917ec681f3Smrg      0x0,        // CB_COLOR0_CMASK_BASE_EXT
13927ec681f3Smrg      0x0,        // CB_COLOR0_FMASK
13937ec681f3Smrg      0x0,        // CB_COLOR0_FMASK_BASE_EXT
13947ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD0
13957ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD1
13967ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE
13977ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE_EXT
13987ec681f3Smrg      0x0,        // CB_COLOR1_BASE
13997ec681f3Smrg      0x0,        // CB_COLOR1_BASE_EXT
14007ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB2
14017ec681f3Smrg      0x0,        // CB_COLOR1_VIEW
14027ec681f3Smrg      0x0,        // CB_COLOR1_INFO
14037ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB
14047ec681f3Smrg      0x0,        // CB_COLOR1_DCC_CONTROL
14057ec681f3Smrg      0x0,        // CB_COLOR1_CMASK
14067ec681f3Smrg      0x0,        // CB_COLOR1_CMASK_BASE_EXT
14077ec681f3Smrg      0x0,        // CB_COLOR1_FMASK
14087ec681f3Smrg      0x0,        // CB_COLOR1_FMASK_BASE_EXT
14097ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD0
14107ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD1
14117ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE
14127ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE_EXT
14137ec681f3Smrg      0x0,        // CB_COLOR2_BASE
14147ec681f3Smrg      0x0,        // CB_COLOR2_BASE_EXT
14157ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB2
14167ec681f3Smrg      0x0,        // CB_COLOR2_VIEW
14177ec681f3Smrg      0x0,        // CB_COLOR2_INFO
14187ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB
14197ec681f3Smrg      0x0,        // CB_COLOR2_DCC_CONTROL
14207ec681f3Smrg      0x0,        // CB_COLOR2_CMASK
14217ec681f3Smrg      0x0,        // CB_COLOR2_CMASK_BASE_EXT
14227ec681f3Smrg      0x0,        // CB_COLOR2_FMASK
14237ec681f3Smrg      0x0,        // CB_COLOR2_FMASK_BASE_EXT
14247ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD0
14257ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD1
14267ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE
14277ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE_EXT
14287ec681f3Smrg      0x0,        // CB_COLOR3_BASE
14297ec681f3Smrg      0x0,        // CB_COLOR3_BASE_EXT
14307ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB2
14317ec681f3Smrg      0x0,        // CB_COLOR3_VIEW
14327ec681f3Smrg      0x0,        // CB_COLOR3_INFO
14337ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB
14347ec681f3Smrg      0x0,        // CB_COLOR3_DCC_CONTROL
14357ec681f3Smrg      0x0,        // CB_COLOR3_CMASK
14367ec681f3Smrg      0x0,        // CB_COLOR3_CMASK_BASE_EXT
14377ec681f3Smrg      0x0,        // CB_COLOR3_FMASK
14387ec681f3Smrg      0x0,        // CB_COLOR3_FMASK_BASE_EXT
14397ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD0
14407ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD1
14417ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE
14427ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE_EXT
14437ec681f3Smrg      0x0,        // CB_COLOR4_BASE
14447ec681f3Smrg      0x0,        // CB_COLOR4_BASE_EXT
14457ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB2
14467ec681f3Smrg      0x0,        // CB_COLOR4_VIEW
14477ec681f3Smrg      0x0,        // CB_COLOR4_INFO
14487ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB
14497ec681f3Smrg      0x0,        // CB_COLOR4_DCC_CONTROL
14507ec681f3Smrg      0x0,        // CB_COLOR4_CMASK
14517ec681f3Smrg      0x0,        // CB_COLOR4_CMASK_BASE_EXT
14527ec681f3Smrg      0x0,        // CB_COLOR4_FMASK
14537ec681f3Smrg      0x0,        // CB_COLOR4_FMASK_BASE_EXT
14547ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD0
14557ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD1
14567ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE
14577ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE_EXT
14587ec681f3Smrg      0x0,        // CB_COLOR5_BASE
14597ec681f3Smrg      0x0,        // CB_COLOR5_BASE_EXT
14607ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB2
14617ec681f3Smrg      0x0,        // CB_COLOR5_VIEW
14627ec681f3Smrg      0x0,        // CB_COLOR5_INFO
14637ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB
14647ec681f3Smrg      0x0,        // CB_COLOR5_DCC_CONTROL
14657ec681f3Smrg      0x0,        // CB_COLOR5_CMASK
14667ec681f3Smrg      0x0,        // CB_COLOR5_CMASK_BASE_EXT
14677ec681f3Smrg      0x0,        // CB_COLOR5_FMASK
14687ec681f3Smrg      0x0,        // CB_COLOR5_FMASK_BASE_EXT
14697ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD0
14707ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD1
14717ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE
14727ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE_EXT
14737ec681f3Smrg      0x0,        // CB_COLOR6_BASE
14747ec681f3Smrg      0x0,        // CB_COLOR6_BASE_EXT
14757ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB2
14767ec681f3Smrg      0x0,        // CB_COLOR6_VIEW
14777ec681f3Smrg      0x0,        // CB_COLOR6_INFO
14787ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB
14797ec681f3Smrg      0x0,        // CB_COLOR6_DCC_CONTROL
14807ec681f3Smrg      0x0,        // CB_COLOR6_CMASK
14817ec681f3Smrg      0x0,        // CB_COLOR6_CMASK_BASE_EXT
14827ec681f3Smrg      0x0,        // CB_COLOR6_FMASK
14837ec681f3Smrg      0x0,        // CB_COLOR6_FMASK_BASE_EXT
14847ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD0
14857ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD1
14867ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE
14877ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE_EXT
14887ec681f3Smrg      0x0,        // CB_COLOR7_BASE
14897ec681f3Smrg      0x0,        // CB_COLOR7_BASE_EXT
14907ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB2
14917ec681f3Smrg      0x0,        // CB_COLOR7_VIEW
14927ec681f3Smrg      0x0,        // CB_COLOR7_INFO
14937ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB
14947ec681f3Smrg      0x0,        // CB_COLOR7_DCC_CONTROL
14957ec681f3Smrg      0x0,        // CB_COLOR7_CMASK
14967ec681f3Smrg      0x0,        // CB_COLOR7_CMASK_BASE_EXT
14977ec681f3Smrg      0x0,        // CB_COLOR7_FMASK
14987ec681f3Smrg      0x0,        // CB_COLOR7_FMASK_BASE_EXT
14997ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD0
15007ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD1
15017ec681f3Smrg      0x0,        // CB_COLOR7_DCC_BASE
15027ec681f3Smrg      0x0         // CB_COLOR7_DCC_BASE_EXT
15037ec681f3Smrg   };
15047ec681f3Smrg
15057ec681f3Smrg#define SET(array) ARRAY_SIZE(array), array
15067ec681f3Smrg
15077ec681f3Smrg   set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlGfx9));
15087ec681f3Smrg   set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Gfx9));
15097ec681f3Smrg   set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
15107ec681f3Smrg                             SET(VgtMultiPrimIbResetIndxGfx9));
15117ec681f3Smrg   set_context_reg_seq_array(cs, R_028414_CB_BLEND_RED, SET(CbBlendRedGfx9));
15127ec681f3Smrg   set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Gfx9));
15137ec681f3Smrg   set_context_reg_seq_array(cs, R_028754_SX_PS_DOWNCONVERT, SET(SxPsDownconvertGfx9));
15147ec681f3Smrg   set_context_reg_seq_array(cs, R_028800_DB_DEPTH_CONTROL, SET(DbDepthControlGfx9));
15157ec681f3Smrg   set_context_reg_seq_array(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL, SET(PaSuPrimFilterCntlGfx9));
15167ec681f3Smrg   set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeGfx9));
15177ec681f3Smrg   set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelGfx9));
15187ec681f3Smrg   set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeGfx9));
15197ec681f3Smrg   set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnGfx9));
15207ec681f3Smrg   set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetGfx9));
15217ec681f3Smrg   set_context_reg_seq_array(cs, R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP,
15227ec681f3Smrg                             SET(VgtGsMaxPrimsPerSubgroupGfx9));
15237ec681f3Smrg   set_context_reg_seq_array(cs, R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1,
15247ec681f3Smrg                             SET(VgtStrmoutBufferSize1Gfx9));
15257ec681f3Smrg   set_context_reg_seq_array(cs, R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2,
15267ec681f3Smrg                             SET(VgtStrmoutBufferSize2Gfx9));
15277ec681f3Smrg   set_context_reg_seq_array(cs, R_028B00_VGT_STRMOUT_BUFFER_SIZE_3,
15287ec681f3Smrg                             SET(VgtStrmoutBufferSize3Gfx9));
15297ec681f3Smrg   set_context_reg_seq_array(cs, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET,
15307ec681f3Smrg                             SET(VgtStrmoutDrawOpaqueOffsetGfx9));
15317ec681f3Smrg   set_context_reg_seq_array(cs, R_028B38_VGT_GS_MAX_VERT_OUT, SET(VgtGsMaxVertOutGfx9));
15327ec681f3Smrg   set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0,
15337ec681f3Smrg                             SET(PaScCentroidPriority0Gfx9));
15347ec681f3Smrg}
15357ec681f3Smrg
15367ec681f3Smrg/**
15377ec681f3Smrg * Emulate CLEAR_STATE. Additionally, initialize num_reg_pairs registers specified
15387ec681f3Smrg * via reg_offsets and reg_values.
15397ec681f3Smrg */
15407ec681f3Smrgstatic void gfx10_emulate_clear_state(struct radeon_cmdbuf *cs, unsigned num_reg_pairs,
15417ec681f3Smrg                                      unsigned *reg_offsets, uint32_t *reg_values,
15427ec681f3Smrg                                      set_context_reg_seq_array_fn set_context_reg_seq_array)
15437ec681f3Smrg{
15447ec681f3Smrg   static const uint32_t DbRenderControlNv10[] = {
15457ec681f3Smrg      0x0,        // DB_RENDER_CONTROL
15467ec681f3Smrg      0x0,        // DB_COUNT_CONTROL
15477ec681f3Smrg      0x0,        // DB_DEPTH_VIEW
15487ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE
15497ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE2
15507ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE
15517ec681f3Smrg      0x0,        //
15527ec681f3Smrg      0x0,        // DB_DEPTH_SIZE_XY
15537ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MIN
15547ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MAX
15557ec681f3Smrg      0x0,        // DB_STENCIL_CLEAR
15567ec681f3Smrg      0x0,        // DB_DEPTH_CLEAR
15577ec681f3Smrg      0x0,        // PA_SC_SCREEN_SCISSOR_TL
15587ec681f3Smrg      0x40004000, // PA_SC_SCREEN_SCISSOR_BR
15597ec681f3Smrg      0x0,        // DB_DFSM_CONTROL
15607ec681f3Smrg      0x0,        // DB_RESERVED_REG_2
15617ec681f3Smrg      0x0,        // DB_Z_INFO
15627ec681f3Smrg      0x0,        // DB_STENCIL_INFO
15637ec681f3Smrg      0x0,        // DB_Z_READ_BASE
15647ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE
15657ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE
15667ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE
15677ec681f3Smrg      0x0,        //
15687ec681f3Smrg      0x0,        //
15697ec681f3Smrg      0x0,        //
15707ec681f3Smrg      0x0,        //
15717ec681f3Smrg      0x0,        // DB_Z_READ_BASE_HI
15727ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE_HI
15737ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE_HI
15747ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE_HI
15757ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE_HI
15767ec681f3Smrg      0x0,        // DB_RMI_L2_CACHE_CONTROL
15777ec681f3Smrg      0x0,        // TA_BC_BASE_ADDR
15787ec681f3Smrg      0x0         // TA_BC_BASE_ADDR_HI
15797ec681f3Smrg   };
15807ec681f3Smrg   static const uint32_t CoherDestBaseHi0Nv10[] = {
15817ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_0
15827ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_1
15837ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_2
15847ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_3
15857ec681f3Smrg      0x0,        // COHER_DEST_BASE_2
15867ec681f3Smrg      0x0,        // COHER_DEST_BASE_3
15877ec681f3Smrg      0x0,        // PA_SC_WINDOW_OFFSET
15887ec681f3Smrg      0x80000000, // PA_SC_WINDOW_SCISSOR_TL
15897ec681f3Smrg      0x40004000, // PA_SC_WINDOW_SCISSOR_BR
15907ec681f3Smrg      0xffff,     // PA_SC_CLIPRECT_RULE
15917ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_0_TL
15927ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_0_BR
15937ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_1_TL
15947ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_1_BR
15957ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_2_TL
15967ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_2_BR
15977ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_3_TL
15987ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_3_BR
15997ec681f3Smrg      0xaa99aaaa, // PA_SC_EDGERULE
16007ec681f3Smrg      0x0,        // PA_SU_HARDWARE_SCREEN_OFFSET
16017ec681f3Smrg      0xffffffff, // CB_TARGET_MASK
16027ec681f3Smrg      0xffffffff, // CB_SHADER_MASK
16037ec681f3Smrg      0x80000000, // PA_SC_GENERIC_SCISSOR_TL
16047ec681f3Smrg      0x40004000, // PA_SC_GENERIC_SCISSOR_BR
16057ec681f3Smrg      0x0,        // COHER_DEST_BASE_0
16067ec681f3Smrg      0x0,        // COHER_DEST_BASE_1
16077ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_0_TL
16087ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_0_BR
16097ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_1_TL
16107ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_1_BR
16117ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_2_TL
16127ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_2_BR
16137ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_3_TL
16147ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_3_BR
16157ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_4_TL
16167ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_4_BR
16177ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_5_TL
16187ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_5_BR
16197ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_6_TL
16207ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_6_BR
16217ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_7_TL
16227ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_7_BR
16237ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_8_TL
16247ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_8_BR
16257ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_9_TL
16267ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_9_BR
16277ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_10_TL
16287ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_10_BR
16297ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_11_TL
16307ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_11_BR
16317ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_12_TL
16327ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_12_BR
16337ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_13_TL
16347ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_13_BR
16357ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_14_TL
16367ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_14_BR
16377ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_15_TL
16387ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_15_BR
16397ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_0
16407ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_0
16417ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_1
16427ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_1
16437ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_2
16447ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_2
16457ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_3
16467ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_3
16477ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_4
16487ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_4
16497ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_5
16507ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_5
16517ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_6
16527ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_6
16537ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_7
16547ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_7
16557ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_8
16567ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_8
16577ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_9
16587ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_9
16597ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_10
16607ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_10
16617ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_11
16627ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_11
16637ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_12
16647ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_12
16657ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_13
16667ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_13
16677ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_14
16687ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_14
16697ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_15
16707ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_15
16717ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG
16727ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG_1
16737ec681f3Smrg      0x0,        //
16747ec681f3Smrg      0x0         // PA_SC_TILE_STEERING_OVERRIDE
16757ec681f3Smrg   };
16767ec681f3Smrg   static const uint32_t VgtMultiPrimIbResetIndxNv10[] = {
16777ec681f3Smrg      0x0,       // VGT_MULTI_PRIM_IB_RESET_INDX
16787ec681f3Smrg      0x0,       // CB_RMI_GL2_CACHE_CONTROL
16797ec681f3Smrg      0x0,       // CB_BLEND_RED
16807ec681f3Smrg      0x0,       // CB_BLEND_GREEN
16817ec681f3Smrg      0x0,       // CB_BLEND_BLUE
16827ec681f3Smrg      0x0,       // CB_BLEND_ALPHA
16837ec681f3Smrg      0x0,       // CB_DCC_CONTROL
16847ec681f3Smrg      0x0,       // CB_COVERAGE_OUT_CONTROL
16857ec681f3Smrg      0x0,       // DB_STENCIL_CONTROL
16867ec681f3Smrg      0x1000000, // DB_STENCILREFMASK
16877ec681f3Smrg      0x1000000, // DB_STENCILREFMASK_BF
16887ec681f3Smrg      0x0,       //
16897ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE
16907ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET
16917ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE
16927ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET
16937ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE
16947ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET
16957ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_1
16967ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_1
16977ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_1
16987ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_1
16997ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_1
17007ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_1
17017ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_2
17027ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_2
17037ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_2
17047ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_2
17057ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_2
17067ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_2
17077ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_3
17087ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_3
17097ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_3
17107ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_3
17117ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_3
17127ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_3
17137ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_4
17147ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_4
17157ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_4
17167ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_4
17177ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_4
17187ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_4
17197ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_5
17207ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_5
17217ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_5
17227ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_5
17237ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_5
17247ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_5
17257ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_6
17267ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_6
17277ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_6
17287ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_6
17297ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_6
17307ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_6
17317ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_7
17327ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_7
17337ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_7
17347ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_7
17357ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_7
17367ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_7
17377ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_8
17387ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_8
17397ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_8
17407ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_8
17417ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_8
17427ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_8
17437ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_9
17447ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_9
17457ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_9
17467ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_9
17477ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_9
17487ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_9
17497ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_10
17507ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_10
17517ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_10
17527ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_10
17537ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_10
17547ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_10
17557ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_11
17567ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_11
17577ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_11
17587ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_11
17597ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_11
17607ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_11
17617ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_12
17627ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_12
17637ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_12
17647ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_12
17657ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_12
17667ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_12
17677ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_13
17687ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_13
17697ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_13
17707ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_13
17717ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_13
17727ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_13
17737ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_14
17747ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_14
17757ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_14
17767ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_14
17777ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_14
17787ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_14
17797ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_15
17807ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_15
17817ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_15
17827ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_15
17837ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_15
17847ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_15
17857ec681f3Smrg      0x0,       // PA_CL_UCP_0_X
17867ec681f3Smrg      0x0,       // PA_CL_UCP_0_Y
17877ec681f3Smrg      0x0,       // PA_CL_UCP_0_Z
17887ec681f3Smrg      0x0,       // PA_CL_UCP_0_W
17897ec681f3Smrg      0x0,       // PA_CL_UCP_1_X
17907ec681f3Smrg      0x0,       // PA_CL_UCP_1_Y
17917ec681f3Smrg      0x0,       // PA_CL_UCP_1_Z
17927ec681f3Smrg      0x0,       // PA_CL_UCP_1_W
17937ec681f3Smrg      0x0,       // PA_CL_UCP_2_X
17947ec681f3Smrg      0x0,       // PA_CL_UCP_2_Y
17957ec681f3Smrg      0x0,       // PA_CL_UCP_2_Z
17967ec681f3Smrg      0x0,       // PA_CL_UCP_2_W
17977ec681f3Smrg      0x0,       // PA_CL_UCP_3_X
17987ec681f3Smrg      0x0,       // PA_CL_UCP_3_Y
17997ec681f3Smrg      0x0,       // PA_CL_UCP_3_Z
18007ec681f3Smrg      0x0,       // PA_CL_UCP_3_W
18017ec681f3Smrg      0x0,       // PA_CL_UCP_4_X
18027ec681f3Smrg      0x0,       // PA_CL_UCP_4_Y
18037ec681f3Smrg      0x0,       // PA_CL_UCP_4_Z
18047ec681f3Smrg      0x0,       // PA_CL_UCP_4_W
18057ec681f3Smrg      0x0,       // PA_CL_UCP_5_X
18067ec681f3Smrg      0x0,       // PA_CL_UCP_5_Y
18077ec681f3Smrg      0x0,       // PA_CL_UCP_5_Z
18087ec681f3Smrg      0x0        // PA_CL_UCP_5_W
18097ec681f3Smrg   };
18107ec681f3Smrg   static const uint32_t SpiPsInputCntl0Nv10[] = {
18117ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_0
18127ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_1
18137ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_2
18147ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_3
18157ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_4
18167ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_5
18177ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_6
18187ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_7
18197ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_8
18207ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_9
18217ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_10
18227ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_11
18237ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_12
18247ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_13
18257ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_14
18267ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_15
18277ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_16
18287ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_17
18297ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_18
18307ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_19
18317ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_20
18327ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_21
18337ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_22
18347ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_23
18357ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_24
18367ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_25
18377ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_26
18387ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_27
18397ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_28
18407ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_29
18417ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_30
18427ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_31
18437ec681f3Smrg      0x0, // SPI_VS_OUT_CONFIG
18447ec681f3Smrg      0x0, //
18457ec681f3Smrg      0x0, // SPI_PS_INPUT_ENA
18467ec681f3Smrg      0x0, // SPI_PS_INPUT_ADDR
18477ec681f3Smrg      0x0, // SPI_INTERP_CONTROL_0
18487ec681f3Smrg      0x2, // SPI_PS_IN_CONTROL
18497ec681f3Smrg      0x0, //
18507ec681f3Smrg      0x0, // SPI_BARYC_CNTL
18517ec681f3Smrg      0x0, //
18527ec681f3Smrg      0x0, // SPI_TMPRING_SIZE
18537ec681f3Smrg      0x0, //
18547ec681f3Smrg      0x0, //
18557ec681f3Smrg      0x0, //
18567ec681f3Smrg      0x0, //
18577ec681f3Smrg      0x0, //
18587ec681f3Smrg      0x0, //
18597ec681f3Smrg      0x0, //
18607ec681f3Smrg      0x0, // SPI_SHADER_IDX_FORMAT
18617ec681f3Smrg      0x0, // SPI_SHADER_POS_FORMAT
18627ec681f3Smrg      0x0, // SPI_SHADER_Z_FORMAT
18637ec681f3Smrg      0x0  // SPI_SHADER_COL_FORMAT
18647ec681f3Smrg   };
18657ec681f3Smrg   static const uint32_t SxPsDownconvertNv10[] = {
18667ec681f3Smrg      0x0, // SX_PS_DOWNCONVERT
18677ec681f3Smrg      0x0, // SX_BLEND_OPT_EPSILON
18687ec681f3Smrg      0x0, // SX_BLEND_OPT_CONTROL
18697ec681f3Smrg      0x0, // SX_MRT0_BLEND_OPT
18707ec681f3Smrg      0x0, // SX_MRT1_BLEND_OPT
18717ec681f3Smrg      0x0, // SX_MRT2_BLEND_OPT
18727ec681f3Smrg      0x0, // SX_MRT3_BLEND_OPT
18737ec681f3Smrg      0x0, // SX_MRT4_BLEND_OPT
18747ec681f3Smrg      0x0, // SX_MRT5_BLEND_OPT
18757ec681f3Smrg      0x0, // SX_MRT6_BLEND_OPT
18767ec681f3Smrg      0x0, // SX_MRT7_BLEND_OPT
18777ec681f3Smrg      0x0, // CB_BLEND0_CONTROL
18787ec681f3Smrg      0x0, // CB_BLEND1_CONTROL
18797ec681f3Smrg      0x0, // CB_BLEND2_CONTROL
18807ec681f3Smrg      0x0, // CB_BLEND3_CONTROL
18817ec681f3Smrg      0x0, // CB_BLEND4_CONTROL
18827ec681f3Smrg      0x0, // CB_BLEND5_CONTROL
18837ec681f3Smrg      0x0, // CB_BLEND6_CONTROL
18847ec681f3Smrg      0x0  // CB_BLEND7_CONTROL
18857ec681f3Smrg   };
18867ec681f3Smrg   static const uint32_t GeMaxOutputPerSubgroupNv10[] = {
18877ec681f3Smrg      0x0,     // GE_MAX_OUTPUT_PER_SUBGROUP
18887ec681f3Smrg      0x0,     // DB_DEPTH_CONTROL
18897ec681f3Smrg      0x0,     // DB_EQAA
18907ec681f3Smrg      0x0,     // CB_COLOR_CONTROL
18917ec681f3Smrg      0x0,     // DB_SHADER_CONTROL
18927ec681f3Smrg      0x90000, // PA_CL_CLIP_CNTL
18937ec681f3Smrg      0x4,     // PA_SU_SC_MODE_CNTL
18947ec681f3Smrg      0x0,     // PA_CL_VTE_CNTL
18957ec681f3Smrg      0x0,     // PA_CL_VS_OUT_CNTL
18967ec681f3Smrg      0x0      // PA_CL_NANINF_CNTL
18977ec681f3Smrg   };
18987ec681f3Smrg   static const uint32_t PaSuPrimFilterCntlNv10[] = {
18997ec681f3Smrg      0x0, // PA_SU_PRIM_FILTER_CNTL
19007ec681f3Smrg      0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL
19017ec681f3Smrg      0x0, // PA_CL_OBJPRIM_ID_CNTL
19027ec681f3Smrg      0x0, // PA_CL_NGG_CNTL
19037ec681f3Smrg      0x0, // PA_SU_OVER_RASTERIZATION_CNTL
19047ec681f3Smrg      0x0, // PA_STEREO_CNTL
19057ec681f3Smrg      0x0  // PA_STATE_STEREO_X
19067ec681f3Smrg   };
19077ec681f3Smrg   static const uint32_t PaSuPointSizeNv10[] = {
19087ec681f3Smrg      0x0, // PA_SU_POINT_SIZE
19097ec681f3Smrg      0x0, // PA_SU_POINT_MINMAX
19107ec681f3Smrg      0x0, // PA_SU_LINE_CNTL
19117ec681f3Smrg      0x0  // PA_SC_LINE_STIPPLE
19127ec681f3Smrg   };
19137ec681f3Smrg   static const uint32_t VgtHosMaxTessLevelNv10[] = {
19147ec681f3Smrg      0x0, // VGT_HOS_MAX_TESS_LEVEL
19157ec681f3Smrg      0x0  // VGT_HOS_MIN_TESS_LEVEL
19167ec681f3Smrg   };
19177ec681f3Smrg   static const uint32_t VgtGsModeNv10[] = {
19187ec681f3Smrg      0x0,   // VGT_GS_MODE
19197ec681f3Smrg      0x0,   // VGT_GS_ONCHIP_CNTL
19207ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_0
19217ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_1
19227ec681f3Smrg      0x0,   // VGT_ENHANCE
19237ec681f3Smrg      0x100, // VGT_GS_PER_ES
19247ec681f3Smrg      0x80,  // VGT_ES_PER_GS
19257ec681f3Smrg      0x2,   // VGT_GS_PER_VS
19267ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_1
19277ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_2
19287ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_3
19297ec681f3Smrg      0x0    // VGT_GS_OUT_PRIM_TYPE
19307ec681f3Smrg   };
19317ec681f3Smrg   static const uint32_t VgtPrimitiveidEnNv10[] = {
19327ec681f3Smrg      0x0 // VGT_PRIMITIVEID_EN
19337ec681f3Smrg   };
19347ec681f3Smrg   static const uint32_t VgtPrimitiveidResetNv10[] = {
19357ec681f3Smrg      0x0 // VGT_PRIMITIVEID_RESET
19367ec681f3Smrg   };
19377ec681f3Smrg   static const uint32_t VgtDrawPayloadCntlNv10[] = {
19387ec681f3Smrg      0x0, // VGT_DRAW_PAYLOAD_CNTL
19397ec681f3Smrg      0x0, //
19407ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_0
19417ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_1
19427ec681f3Smrg      0x0, // IA_MULTI_VGT_PARAM
19437ec681f3Smrg      0x0, // VGT_ESGS_RING_ITEMSIZE
19447ec681f3Smrg      0x0, // VGT_GSVS_RING_ITEMSIZE
19457ec681f3Smrg      0x0, // VGT_REUSE_OFF
19467ec681f3Smrg      0x0, // VGT_VTX_CNT_EN
19477ec681f3Smrg      0x0, // DB_HTILE_SURFACE
19487ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE0
19497ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE1
19507ec681f3Smrg      0x0, // DB_PRELOAD_CONTROL
19517ec681f3Smrg      0x0, //
19527ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_0
19537ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_0
19547ec681f3Smrg      0x0, //
19557ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_0
19567ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_1
19577ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_1
19587ec681f3Smrg      0x0, //
19597ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_1
19607ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_2
19617ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_2
19627ec681f3Smrg      0x0, //
19637ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_2
19647ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_3
19657ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_3
19667ec681f3Smrg      0x0, //
19677ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_3
19687ec681f3Smrg      0x0, //
19697ec681f3Smrg      0x0, //
19707ec681f3Smrg      0x0, //
19717ec681f3Smrg      0x0, //
19727ec681f3Smrg      0x0, //
19737ec681f3Smrg      0x0, //
19747ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET
19757ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE
19767ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE
19777ec681f3Smrg      0x0, //
19787ec681f3Smrg      0x0, // VGT_GS_MAX_VERT_OUT
19797ec681f3Smrg      0x0, //
19807ec681f3Smrg      0x0, //
19817ec681f3Smrg      0x0, //
19827ec681f3Smrg      0x0, //
19837ec681f3Smrg      0x0, // GE_NGG_SUBGRP_CNTL
19847ec681f3Smrg      0x0, // VGT_TESS_DISTRIBUTION
19857ec681f3Smrg      0x0, // VGT_SHADER_STAGES_EN
19867ec681f3Smrg      0x0, // VGT_LS_HS_CONFIG
19877ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE
19887ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_1
19897ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_2
19907ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_3
19917ec681f3Smrg      0x0, // VGT_TF_PARAM
19927ec681f3Smrg      0x0, // DB_ALPHA_TO_MASK
19937ec681f3Smrg      0x0, // VGT_DISPATCH_DRAW_INDEX
19947ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL
19957ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_CLAMP
19967ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE
19977ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET
19987ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_SCALE
19997ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET
20007ec681f3Smrg      0x0, // VGT_GS_INSTANCE_CNT
20017ec681f3Smrg      0x0, // VGT_STRMOUT_CONFIG
20027ec681f3Smrg      0x0  // VGT_STRMOUT_BUFFER_CONFIG
20037ec681f3Smrg   };
20047ec681f3Smrg   static const uint32_t PaScCentroidPriority0Nv10[] = {
20057ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_0
20067ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_1
20077ec681f3Smrg      0x1000,     // PA_SC_LINE_CNTL
20087ec681f3Smrg      0x0,        // PA_SC_AA_CONFIG
20097ec681f3Smrg      0x5,        // PA_SU_VTX_CNTL
20107ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ
20117ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_DISC_ADJ
20127ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ
20137ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ
20147ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0
20157ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1
20167ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2
20177ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3
20187ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0
20197ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1
20207ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2
20217ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3
20227ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0
20237ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1
20247ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2
20257ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3
20267ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0
20277ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1
20287ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2
20297ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3
20307ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0
20317ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1
20327ec681f3Smrg      0x0,        // PA_SC_SHADER_CONTROL
20337ec681f3Smrg      0x3,        // PA_SC_BINNER_CNTL_0
20347ec681f3Smrg      0x0,        // PA_SC_BINNER_CNTL_1
20357ec681f3Smrg      0x100000,   // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL
20367ec681f3Smrg      0x0,        // PA_SC_NGG_MODE_CNTL
20377ec681f3Smrg      0x0,        //
20387ec681f3Smrg      0x1e,       // VGT_VERTEX_REUSE_BLOCK_CNTL
20397ec681f3Smrg      0x20,       // VGT_OUT_DEALLOC_CNTL
20407ec681f3Smrg      0x0,        // CB_COLOR0_BASE
20417ec681f3Smrg      0x0,        //
20427ec681f3Smrg      0x0,        //
20437ec681f3Smrg      0x0,        // CB_COLOR0_VIEW
20447ec681f3Smrg      0x0,        // CB_COLOR0_INFO
20457ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB
20467ec681f3Smrg      0x0,        // CB_COLOR0_DCC_CONTROL
20477ec681f3Smrg      0x0,        // CB_COLOR0_CMASK
20487ec681f3Smrg      0x0,        //
20497ec681f3Smrg      0x0,        // CB_COLOR0_FMASK
20507ec681f3Smrg      0x0,        //
20517ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD0
20527ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD1
20537ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE
20547ec681f3Smrg      0x0,        //
20557ec681f3Smrg      0x0,        // CB_COLOR1_BASE
20567ec681f3Smrg      0x0,        //
20577ec681f3Smrg      0x0,        //
20587ec681f3Smrg      0x0,        // CB_COLOR1_VIEW
20597ec681f3Smrg      0x0,        // CB_COLOR1_INFO
20607ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB
20617ec681f3Smrg      0x0,        // CB_COLOR1_DCC_CONTROL
20627ec681f3Smrg      0x0,        // CB_COLOR1_CMASK
20637ec681f3Smrg      0x0,        //
20647ec681f3Smrg      0x0,        // CB_COLOR1_FMASK
20657ec681f3Smrg      0x0,        //
20667ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD0
20677ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD1
20687ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE
20697ec681f3Smrg      0x0,        //
20707ec681f3Smrg      0x0,        // CB_COLOR2_BASE
20717ec681f3Smrg      0x0,        //
20727ec681f3Smrg      0x0,        //
20737ec681f3Smrg      0x0,        // CB_COLOR2_VIEW
20747ec681f3Smrg      0x0,        // CB_COLOR2_INFO
20757ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB
20767ec681f3Smrg      0x0,        // CB_COLOR2_DCC_CONTROL
20777ec681f3Smrg      0x0,        // CB_COLOR2_CMASK
20787ec681f3Smrg      0x0,        //
20797ec681f3Smrg      0x0,        // CB_COLOR2_FMASK
20807ec681f3Smrg      0x0,        //
20817ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD0
20827ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD1
20837ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE
20847ec681f3Smrg      0x0,        //
20857ec681f3Smrg      0x0,        // CB_COLOR3_BASE
20867ec681f3Smrg      0x0,        //
20877ec681f3Smrg      0x0,        //
20887ec681f3Smrg      0x0,        // CB_COLOR3_VIEW
20897ec681f3Smrg      0x0,        // CB_COLOR3_INFO
20907ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB
20917ec681f3Smrg      0x0,        // CB_COLOR3_DCC_CONTROL
20927ec681f3Smrg      0x0,        // CB_COLOR3_CMASK
20937ec681f3Smrg      0x0,        //
20947ec681f3Smrg      0x0,        // CB_COLOR3_FMASK
20957ec681f3Smrg      0x0,        //
20967ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD0
20977ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD1
20987ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE
20997ec681f3Smrg      0x0,        //
21007ec681f3Smrg      0x0,        // CB_COLOR4_BASE
21017ec681f3Smrg      0x0,        //
21027ec681f3Smrg      0x0,        //
21037ec681f3Smrg      0x0,        // CB_COLOR4_VIEW
21047ec681f3Smrg      0x0,        // CB_COLOR4_INFO
21057ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB
21067ec681f3Smrg      0x0,        // CB_COLOR4_DCC_CONTROL
21077ec681f3Smrg      0x0,        // CB_COLOR4_CMASK
21087ec681f3Smrg      0x0,        //
21097ec681f3Smrg      0x0,        // CB_COLOR4_FMASK
21107ec681f3Smrg      0x0,        //
21117ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD0
21127ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD1
21137ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE
21147ec681f3Smrg      0x0,        //
21157ec681f3Smrg      0x0,        // CB_COLOR5_BASE
21167ec681f3Smrg      0x0,        //
21177ec681f3Smrg      0x0,        //
21187ec681f3Smrg      0x0,        // CB_COLOR5_VIEW
21197ec681f3Smrg      0x0,        // CB_COLOR5_INFO
21207ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB
21217ec681f3Smrg      0x0,        // CB_COLOR5_DCC_CONTROL
21227ec681f3Smrg      0x0,        // CB_COLOR5_CMASK
21237ec681f3Smrg      0x0,        //
21247ec681f3Smrg      0x0,        // CB_COLOR5_FMASK
21257ec681f3Smrg      0x0,        //
21267ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD0
21277ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD1
21287ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE
21297ec681f3Smrg      0x0,        //
21307ec681f3Smrg      0x0,        // CB_COLOR6_BASE
21317ec681f3Smrg      0x0,        //
21327ec681f3Smrg      0x0,        //
21337ec681f3Smrg      0x0,        // CB_COLOR6_VIEW
21347ec681f3Smrg      0x0,        // CB_COLOR6_INFO
21357ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB
21367ec681f3Smrg      0x0,        // CB_COLOR6_DCC_CONTROL
21377ec681f3Smrg      0x0,        // CB_COLOR6_CMASK
21387ec681f3Smrg      0x0,        //
21397ec681f3Smrg      0x0,        // CB_COLOR6_FMASK
21407ec681f3Smrg      0x0,        //
21417ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD0
21427ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD1
21437ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE
21447ec681f3Smrg      0x0,        //
21457ec681f3Smrg      0x0,        // CB_COLOR7_BASE
21467ec681f3Smrg      0x0,        //
21477ec681f3Smrg      0x0,        //
21487ec681f3Smrg      0x0,        // CB_COLOR7_VIEW
21497ec681f3Smrg      0x0,        // CB_COLOR7_INFO
21507ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB
21517ec681f3Smrg      0x0,        // CB_COLOR7_DCC_CONTROL
21527ec681f3Smrg      0x0,        // CB_COLOR7_CMASK
21537ec681f3Smrg      0x0,        //
21547ec681f3Smrg      0x0,        // CB_COLOR7_FMASK
21557ec681f3Smrg      0x0,        //
21567ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD0
21577ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD1
21587ec681f3Smrg      0x0,        // CB_COLOR7_DCC_BASE
21597ec681f3Smrg      0x0,        //
21607ec681f3Smrg      0x0,        // CB_COLOR0_BASE_EXT
21617ec681f3Smrg      0x0,        // CB_COLOR1_BASE_EXT
21627ec681f3Smrg      0x0,        // CB_COLOR2_BASE_EXT
21637ec681f3Smrg      0x0,        // CB_COLOR3_BASE_EXT
21647ec681f3Smrg      0x0,        // CB_COLOR4_BASE_EXT
21657ec681f3Smrg      0x0,        // CB_COLOR5_BASE_EXT
21667ec681f3Smrg      0x0,        // CB_COLOR6_BASE_EXT
21677ec681f3Smrg      0x0,        // CB_COLOR7_BASE_EXT
21687ec681f3Smrg      0x0,        // CB_COLOR0_CMASK_BASE_EXT
21697ec681f3Smrg      0x0,        // CB_COLOR1_CMASK_BASE_EXT
21707ec681f3Smrg      0x0,        // CB_COLOR2_CMASK_BASE_EXT
21717ec681f3Smrg      0x0,        // CB_COLOR3_CMASK_BASE_EXT
21727ec681f3Smrg      0x0,        // CB_COLOR4_CMASK_BASE_EXT
21737ec681f3Smrg      0x0,        // CB_COLOR5_CMASK_BASE_EXT
21747ec681f3Smrg      0x0,        // CB_COLOR6_CMASK_BASE_EXT
21757ec681f3Smrg      0x0,        // CB_COLOR7_CMASK_BASE_EXT
21767ec681f3Smrg      0x0,        // CB_COLOR0_FMASK_BASE_EXT
21777ec681f3Smrg      0x0,        // CB_COLOR1_FMASK_BASE_EXT
21787ec681f3Smrg      0x0,        // CB_COLOR2_FMASK_BASE_EXT
21797ec681f3Smrg      0x0,        // CB_COLOR3_FMASK_BASE_EXT
21807ec681f3Smrg      0x0,        // CB_COLOR4_FMASK_BASE_EXT
21817ec681f3Smrg      0x0,        // CB_COLOR5_FMASK_BASE_EXT
21827ec681f3Smrg      0x0,        // CB_COLOR6_FMASK_BASE_EXT
21837ec681f3Smrg      0x0,        // CB_COLOR7_FMASK_BASE_EXT
21847ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE_EXT
21857ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE_EXT
21867ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE_EXT
21877ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE_EXT
21887ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE_EXT
21897ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE_EXT
21907ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE_EXT
21917ec681f3Smrg      0x0,        // CB_COLOR7_DCC_BASE_EXT
21927ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB2
21937ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB2
21947ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB2
21957ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB2
21967ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB2
21977ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB2
21987ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB2
21997ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB2
22007ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB3
22017ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB3
22027ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB3
22037ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB3
22047ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB3
22057ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB3
22067ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB3
22077ec681f3Smrg      0x0         // CB_COLOR7_ATTRIB3
22087ec681f3Smrg   };
22097ec681f3Smrg
22107ec681f3Smrg   set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlNv10));
22117ec681f3Smrg   set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Nv10));
22127ec681f3Smrg   set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
22137ec681f3Smrg                             SET(VgtMultiPrimIbResetIndxNv10));
22147ec681f3Smrg   set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Nv10));
22157ec681f3Smrg   set_context_reg_seq_array(cs, R_028754_SX_PS_DOWNCONVERT, SET(SxPsDownconvertNv10));
22167ec681f3Smrg   set_context_reg_seq_array(cs, R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP,
22177ec681f3Smrg                             SET(GeMaxOutputPerSubgroupNv10));
22187ec681f3Smrg   set_context_reg_seq_array(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL, SET(PaSuPrimFilterCntlNv10));
22197ec681f3Smrg   set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeNv10));
22207ec681f3Smrg   set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelNv10));
22217ec681f3Smrg   set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeNv10));
22227ec681f3Smrg   set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnNv10));
22237ec681f3Smrg   set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetNv10));
22247ec681f3Smrg   set_context_reg_seq_array(cs, R_028A98_VGT_DRAW_PAYLOAD_CNTL, SET(VgtDrawPayloadCntlNv10));
22257ec681f3Smrg   set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0,
22267ec681f3Smrg                             SET(PaScCentroidPriority0Nv10));
22277ec681f3Smrg
22287ec681f3Smrg   for (unsigned i = 0; i < num_reg_pairs; i++)
22297ec681f3Smrg      set_context_reg_seq_array(cs, reg_offsets[i], 1, &reg_values[i]);
22307ec681f3Smrg}
22317ec681f3Smrg
22327ec681f3Smrg/**
22337ec681f3Smrg * Emulate CLEAR_STATE. Additionally, initialize num_reg_pairs registers specified
22347ec681f3Smrg * via reg_offsets and reg_values.
22357ec681f3Smrg */
22367ec681f3Smrgstatic void gfx103_emulate_clear_state(struct radeon_cmdbuf *cs, unsigned num_reg_pairs,
22377ec681f3Smrg                                       unsigned *reg_offsets, uint32_t *reg_values,
22387ec681f3Smrg                                       set_context_reg_seq_array_fn set_context_reg_seq_array)
22397ec681f3Smrg{
22407ec681f3Smrg   static const uint32_t DbRenderControlGfx103[] = {
22417ec681f3Smrg      0x0,        // DB_RENDER_CONTROL
22427ec681f3Smrg      0x0,        // DB_COUNT_CONTROL
22437ec681f3Smrg      0x0,        // DB_DEPTH_VIEW
22447ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE
22457ec681f3Smrg      0x0,        // DB_RENDER_OVERRIDE2
22467ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE
22477ec681f3Smrg      0x0,        //
22487ec681f3Smrg      0x0,        // DB_DEPTH_SIZE_XY
22497ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MIN
22507ec681f3Smrg      0x0,        // DB_DEPTH_BOUNDS_MAX
22517ec681f3Smrg      0x0,        // DB_STENCIL_CLEAR
22527ec681f3Smrg      0x0,        // DB_DEPTH_CLEAR
22537ec681f3Smrg      0x0,        // PA_SC_SCREEN_SCISSOR_TL
22547ec681f3Smrg      0x40004000, // PA_SC_SCREEN_SCISSOR_BR
22557ec681f3Smrg      0x0,        // DB_DFSM_CONTROL
22567ec681f3Smrg      0x0,        // DB_RESERVED_REG_2
22577ec681f3Smrg      0x0,        // DB_Z_INFO
22587ec681f3Smrg      0x0,        // DB_STENCIL_INFO
22597ec681f3Smrg      0x0,        // DB_Z_READ_BASE
22607ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE
22617ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE
22627ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE
22637ec681f3Smrg      0x0,        //
22647ec681f3Smrg      0x0,        //
22657ec681f3Smrg      0x0,        //
22667ec681f3Smrg      0x0,        //
22677ec681f3Smrg      0x0,        // DB_Z_READ_BASE_HI
22687ec681f3Smrg      0x0,        // DB_STENCIL_READ_BASE_HI
22697ec681f3Smrg      0x0,        // DB_Z_WRITE_BASE_HI
22707ec681f3Smrg      0x0,        // DB_STENCIL_WRITE_BASE_HI
22717ec681f3Smrg      0x0,        // DB_HTILE_DATA_BASE_HI
22727ec681f3Smrg      0x0,        // DB_RMI_L2_CACHE_CONTROL
22737ec681f3Smrg      0x0,        // TA_BC_BASE_ADDR
22747ec681f3Smrg      0x0         // TA_BC_BASE_ADDR_HI
22757ec681f3Smrg   };
22767ec681f3Smrg   static const uint32_t CoherDestBaseHi0Gfx103[] = {
22777ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_0
22787ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_1
22797ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_2
22807ec681f3Smrg      0x0,        // COHER_DEST_BASE_HI_3
22817ec681f3Smrg      0x0,        // COHER_DEST_BASE_2
22827ec681f3Smrg      0x0,        // COHER_DEST_BASE_3
22837ec681f3Smrg      0x0,        // PA_SC_WINDOW_OFFSET
22847ec681f3Smrg      0x80000000, // PA_SC_WINDOW_SCISSOR_TL
22857ec681f3Smrg      0x40004000, // PA_SC_WINDOW_SCISSOR_BR
22867ec681f3Smrg      0xffff,     // PA_SC_CLIPRECT_RULE
22877ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_0_TL
22887ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_0_BR
22897ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_1_TL
22907ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_1_BR
22917ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_2_TL
22927ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_2_BR
22937ec681f3Smrg      0x0,        // PA_SC_CLIPRECT_3_TL
22947ec681f3Smrg      0x40004000, // PA_SC_CLIPRECT_3_BR
22957ec681f3Smrg      0xaa99aaaa, // PA_SC_EDGERULE
22967ec681f3Smrg      0x0,        // PA_SU_HARDWARE_SCREEN_OFFSET
22977ec681f3Smrg      0xffffffff, // CB_TARGET_MASK
22987ec681f3Smrg      0xffffffff, // CB_SHADER_MASK
22997ec681f3Smrg      0x80000000, // PA_SC_GENERIC_SCISSOR_TL
23007ec681f3Smrg      0x40004000, // PA_SC_GENERIC_SCISSOR_BR
23017ec681f3Smrg      0x0,        // COHER_DEST_BASE_0
23027ec681f3Smrg      0x0,        // COHER_DEST_BASE_1
23037ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_0_TL
23047ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_0_BR
23057ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_1_TL
23067ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_1_BR
23077ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_2_TL
23087ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_2_BR
23097ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_3_TL
23107ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_3_BR
23117ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_4_TL
23127ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_4_BR
23137ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_5_TL
23147ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_5_BR
23157ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_6_TL
23167ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_6_BR
23177ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_7_TL
23187ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_7_BR
23197ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_8_TL
23207ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_8_BR
23217ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_9_TL
23227ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_9_BR
23237ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_10_TL
23247ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_10_BR
23257ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_11_TL
23267ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_11_BR
23277ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_12_TL
23287ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_12_BR
23297ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_13_TL
23307ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_13_BR
23317ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_14_TL
23327ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_14_BR
23337ec681f3Smrg      0x80000000, // PA_SC_VPORT_SCISSOR_15_TL
23347ec681f3Smrg      0x40004000, // PA_SC_VPORT_SCISSOR_15_BR
23357ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_0
23367ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_0
23377ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_1
23387ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_1
23397ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_2
23407ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_2
23417ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_3
23427ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_3
23437ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_4
23447ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_4
23457ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_5
23467ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_5
23477ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_6
23487ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_6
23497ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_7
23507ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_7
23517ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_8
23527ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_8
23537ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_9
23547ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_9
23557ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_10
23567ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_10
23577ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_11
23587ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_11
23597ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_12
23607ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_12
23617ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_13
23627ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_13
23637ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_14
23647ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_14
23657ec681f3Smrg      0x0,        // PA_SC_VPORT_ZMIN_15
23667ec681f3Smrg      0x3f800000, // PA_SC_VPORT_ZMAX_15
23677ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG
23687ec681f3Smrg      0x0,        // PA_SC_RASTER_CONFIG_1
23697ec681f3Smrg      0x0,        //
23707ec681f3Smrg      0x0         // PA_SC_TILE_STEERING_OVERRIDE
23717ec681f3Smrg   };
23727ec681f3Smrg   static const uint32_t VgtMultiPrimIbResetIndxGfx103[] = {
23737ec681f3Smrg      0x0,       // VGT_MULTI_PRIM_IB_RESET_INDX
23747ec681f3Smrg      0x0,       // CB_RMI_GL2_CACHE_CONTROL
23757ec681f3Smrg      0x0,       // CB_BLEND_RED
23767ec681f3Smrg      0x0,       // CB_BLEND_GREEN
23777ec681f3Smrg      0x0,       // CB_BLEND_BLUE
23787ec681f3Smrg      0x0,       // CB_BLEND_ALPHA
23797ec681f3Smrg      0x0,       // CB_DCC_CONTROL
23807ec681f3Smrg      0x0,       // CB_COVERAGE_OUT_CONTROL
23817ec681f3Smrg      0x0,       // DB_STENCIL_CONTROL
23827ec681f3Smrg      0x1000000, // DB_STENCILREFMASK
23837ec681f3Smrg      0x1000000, // DB_STENCILREFMASK_BF
23847ec681f3Smrg      0x0,       //
23857ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE
23867ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET
23877ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE
23887ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET
23897ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE
23907ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET
23917ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_1
23927ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_1
23937ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_1
23947ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_1
23957ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_1
23967ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_1
23977ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_2
23987ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_2
23997ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_2
24007ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_2
24017ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_2
24027ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_2
24037ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_3
24047ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_3
24057ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_3
24067ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_3
24077ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_3
24087ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_3
24097ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_4
24107ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_4
24117ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_4
24127ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_4
24137ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_4
24147ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_4
24157ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_5
24167ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_5
24177ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_5
24187ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_5
24197ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_5
24207ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_5
24217ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_6
24227ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_6
24237ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_6
24247ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_6
24257ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_6
24267ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_6
24277ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_7
24287ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_7
24297ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_7
24307ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_7
24317ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_7
24327ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_7
24337ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_8
24347ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_8
24357ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_8
24367ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_8
24377ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_8
24387ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_8
24397ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_9
24407ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_9
24417ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_9
24427ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_9
24437ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_9
24447ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_9
24457ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_10
24467ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_10
24477ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_10
24487ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_10
24497ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_10
24507ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_10
24517ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_11
24527ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_11
24537ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_11
24547ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_11
24557ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_11
24567ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_11
24577ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_12
24587ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_12
24597ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_12
24607ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_12
24617ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_12
24627ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_12
24637ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_13
24647ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_13
24657ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_13
24667ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_13
24677ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_13
24687ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_13
24697ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_14
24707ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_14
24717ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_14
24727ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_14
24737ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_14
24747ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_14
24757ec681f3Smrg      0x0,       // PA_CL_VPORT_XSCALE_15
24767ec681f3Smrg      0x0,       // PA_CL_VPORT_XOFFSET_15
24777ec681f3Smrg      0x0,       // PA_CL_VPORT_YSCALE_15
24787ec681f3Smrg      0x0,       // PA_CL_VPORT_YOFFSET_15
24797ec681f3Smrg      0x0,       // PA_CL_VPORT_ZSCALE_15
24807ec681f3Smrg      0x0,       // PA_CL_VPORT_ZOFFSET_15
24817ec681f3Smrg      0x0,       // PA_CL_UCP_0_X
24827ec681f3Smrg      0x0,       // PA_CL_UCP_0_Y
24837ec681f3Smrg      0x0,       // PA_CL_UCP_0_Z
24847ec681f3Smrg      0x0,       // PA_CL_UCP_0_W
24857ec681f3Smrg      0x0,       // PA_CL_UCP_1_X
24867ec681f3Smrg      0x0,       // PA_CL_UCP_1_Y
24877ec681f3Smrg      0x0,       // PA_CL_UCP_1_Z
24887ec681f3Smrg      0x0,       // PA_CL_UCP_1_W
24897ec681f3Smrg      0x0,       // PA_CL_UCP_2_X
24907ec681f3Smrg      0x0,       // PA_CL_UCP_2_Y
24917ec681f3Smrg      0x0,       // PA_CL_UCP_2_Z
24927ec681f3Smrg      0x0,       // PA_CL_UCP_2_W
24937ec681f3Smrg      0x0,       // PA_CL_UCP_3_X
24947ec681f3Smrg      0x0,       // PA_CL_UCP_3_Y
24957ec681f3Smrg      0x0,       // PA_CL_UCP_3_Z
24967ec681f3Smrg      0x0,       // PA_CL_UCP_3_W
24977ec681f3Smrg      0x0,       // PA_CL_UCP_4_X
24987ec681f3Smrg      0x0,       // PA_CL_UCP_4_Y
24997ec681f3Smrg      0x0,       // PA_CL_UCP_4_Z
25007ec681f3Smrg      0x0,       // PA_CL_UCP_4_W
25017ec681f3Smrg      0x0,       // PA_CL_UCP_5_X
25027ec681f3Smrg      0x0,       // PA_CL_UCP_5_Y
25037ec681f3Smrg      0x0,       // PA_CL_UCP_5_Z
25047ec681f3Smrg      0x0        // PA_CL_UCP_5_W
25057ec681f3Smrg   };
25067ec681f3Smrg   static const uint32_t SpiPsInputCntl0Gfx103[] = {
25077ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_0
25087ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_1
25097ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_2
25107ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_3
25117ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_4
25127ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_5
25137ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_6
25147ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_7
25157ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_8
25167ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_9
25177ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_10
25187ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_11
25197ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_12
25207ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_13
25217ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_14
25227ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_15
25237ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_16
25247ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_17
25257ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_18
25267ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_19
25277ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_20
25287ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_21
25297ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_22
25307ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_23
25317ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_24
25327ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_25
25337ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_26
25347ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_27
25357ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_28
25367ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_29
25377ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_30
25387ec681f3Smrg      0x0, // SPI_PS_INPUT_CNTL_31
25397ec681f3Smrg      0x0, // SPI_VS_OUT_CONFIG
25407ec681f3Smrg      0x0, //
25417ec681f3Smrg      0x0, // SPI_PS_INPUT_ENA
25427ec681f3Smrg      0x0, // SPI_PS_INPUT_ADDR
25437ec681f3Smrg      0x0, // SPI_INTERP_CONTROL_0
25447ec681f3Smrg      0x2, // SPI_PS_IN_CONTROL
25457ec681f3Smrg      0x0, //
25467ec681f3Smrg      0x0, // SPI_BARYC_CNTL
25477ec681f3Smrg      0x0, //
25487ec681f3Smrg      0x0, // SPI_TMPRING_SIZE
25497ec681f3Smrg      0x0, //
25507ec681f3Smrg      0x0, //
25517ec681f3Smrg      0x0, //
25527ec681f3Smrg      0x0, //
25537ec681f3Smrg      0x0, //
25547ec681f3Smrg      0x0, //
25557ec681f3Smrg      0x0, //
25567ec681f3Smrg      0x0, // SPI_SHADER_IDX_FORMAT
25577ec681f3Smrg      0x0, // SPI_SHADER_POS_FORMAT
25587ec681f3Smrg      0x0, // SPI_SHADER_Z_FORMAT
25597ec681f3Smrg      0x0  // SPI_SHADER_COL_FORMAT
25607ec681f3Smrg   };
25617ec681f3Smrg   static const uint32_t SxPsDownconvertControlGfx103[] = {
25627ec681f3Smrg      0x0, // SX_PS_DOWNCONVERT_CONTROL
25637ec681f3Smrg      0x0, // SX_PS_DOWNCONVERT
25647ec681f3Smrg      0x0, // SX_BLEND_OPT_EPSILON
25657ec681f3Smrg      0x0, // SX_BLEND_OPT_CONTROL
25667ec681f3Smrg      0x0, // SX_MRT0_BLEND_OPT
25677ec681f3Smrg      0x0, // SX_MRT1_BLEND_OPT
25687ec681f3Smrg      0x0, // SX_MRT2_BLEND_OPT
25697ec681f3Smrg      0x0, // SX_MRT3_BLEND_OPT
25707ec681f3Smrg      0x0, // SX_MRT4_BLEND_OPT
25717ec681f3Smrg      0x0, // SX_MRT5_BLEND_OPT
25727ec681f3Smrg      0x0, // SX_MRT6_BLEND_OPT
25737ec681f3Smrg      0x0, // SX_MRT7_BLEND_OPT
25747ec681f3Smrg      0x0, // CB_BLEND0_CONTROL
25757ec681f3Smrg      0x0, // CB_BLEND1_CONTROL
25767ec681f3Smrg      0x0, // CB_BLEND2_CONTROL
25777ec681f3Smrg      0x0, // CB_BLEND3_CONTROL
25787ec681f3Smrg      0x0, // CB_BLEND4_CONTROL
25797ec681f3Smrg      0x0, // CB_BLEND5_CONTROL
25807ec681f3Smrg      0x0, // CB_BLEND6_CONTROL
25817ec681f3Smrg      0x0  // CB_BLEND7_CONTROL
25827ec681f3Smrg   };
25837ec681f3Smrg   static const uint32_t GeMaxOutputPerSubgroupGfx103[] = {
25847ec681f3Smrg      0x0,     // GE_MAX_OUTPUT_PER_SUBGROUP
25857ec681f3Smrg      0x0,     // DB_DEPTH_CONTROL
25867ec681f3Smrg      0x0,     // DB_EQAA
25877ec681f3Smrg      0x0,     // CB_COLOR_CONTROL
25887ec681f3Smrg      0x0,     // DB_SHADER_CONTROL
25897ec681f3Smrg      0x90000, // PA_CL_CLIP_CNTL
25907ec681f3Smrg      0x4,     // PA_SU_SC_MODE_CNTL
25917ec681f3Smrg      0x0,     // PA_CL_VTE_CNTL
25927ec681f3Smrg      0x0,     // PA_CL_VS_OUT_CNTL
25937ec681f3Smrg      0x0      // PA_CL_NANINF_CNTL
25947ec681f3Smrg   };
25957ec681f3Smrg   static const uint32_t PaSuPrimFilterCntlGfx103[] = {
25967ec681f3Smrg      0x0, // PA_SU_PRIM_FILTER_CNTL
25977ec681f3Smrg      0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL
25987ec681f3Smrg      0x0, //
25997ec681f3Smrg      0x0, // PA_CL_NGG_CNTL
26007ec681f3Smrg      0x0, // PA_SU_OVER_RASTERIZATION_CNTL
26017ec681f3Smrg      0x0, // PA_STEREO_CNTL
26027ec681f3Smrg      0x0, // PA_STATE_STEREO_X
26037ec681f3Smrg      0x0  //
26047ec681f3Smrg   };
26057ec681f3Smrg   static const uint32_t PaSuPointSizeGfx103[] = {
26067ec681f3Smrg      0x0, // PA_SU_POINT_SIZE
26077ec681f3Smrg      0x0, // PA_SU_POINT_MINMAX
26087ec681f3Smrg      0x0, // PA_SU_LINE_CNTL
26097ec681f3Smrg      0x0  // PA_SC_LINE_STIPPLE
26107ec681f3Smrg   };
26117ec681f3Smrg   static const uint32_t VgtHosMaxTessLevelGfx103[] = {
26127ec681f3Smrg      0x0, // VGT_HOS_MAX_TESS_LEVEL
26137ec681f3Smrg      0x0  // VGT_HOS_MIN_TESS_LEVEL
26147ec681f3Smrg   };
26157ec681f3Smrg   static const uint32_t VgtGsModeGfx103[] = {
26167ec681f3Smrg      0x0,   // VGT_GS_MODE
26177ec681f3Smrg      0x0,   // VGT_GS_ONCHIP_CNTL
26187ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_0
26197ec681f3Smrg      0x0,   // PA_SC_MODE_CNTL_1
26207ec681f3Smrg      0x0,   // VGT_ENHANCE
26217ec681f3Smrg      0x100, // VGT_GS_PER_ES
26227ec681f3Smrg      0x80,  // VGT_ES_PER_GS
26237ec681f3Smrg      0x2,   // VGT_GS_PER_VS
26247ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_1
26257ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_2
26267ec681f3Smrg      0x0,   // VGT_GSVS_RING_OFFSET_3
26277ec681f3Smrg      0x0    // VGT_GS_OUT_PRIM_TYPE
26287ec681f3Smrg   };
26297ec681f3Smrg   static const uint32_t VgtPrimitiveidEnGfx103[] = {
26307ec681f3Smrg      0x0 // VGT_PRIMITIVEID_EN
26317ec681f3Smrg   };
26327ec681f3Smrg   static const uint32_t VgtPrimitiveidResetGfx103[] = {
26337ec681f3Smrg      0x0 // VGT_PRIMITIVEID_RESET
26347ec681f3Smrg   };
26357ec681f3Smrg   static const uint32_t VgtDrawPayloadCntlGfx103[] = {
26367ec681f3Smrg      0x0, // VGT_DRAW_PAYLOAD_CNTL
26377ec681f3Smrg      0x0, //
26387ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_0
26397ec681f3Smrg      0x0, // VGT_INSTANCE_STEP_RATE_1
26407ec681f3Smrg      0x0, // IA_MULTI_VGT_PARAM
26417ec681f3Smrg      0x0, // VGT_ESGS_RING_ITEMSIZE
26427ec681f3Smrg      0x0, // VGT_GSVS_RING_ITEMSIZE
26437ec681f3Smrg      0x0, // VGT_REUSE_OFF
26447ec681f3Smrg      0x0, // VGT_VTX_CNT_EN
26457ec681f3Smrg      0x0, // DB_HTILE_SURFACE
26467ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE0
26477ec681f3Smrg      0x0, // DB_SRESULTS_COMPARE_STATE1
26487ec681f3Smrg      0x0, // DB_PRELOAD_CONTROL
26497ec681f3Smrg      0x0, //
26507ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_0
26517ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_0
26527ec681f3Smrg      0x0, //
26537ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_0
26547ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_1
26557ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_1
26567ec681f3Smrg      0x0, //
26577ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_1
26587ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_2
26597ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_2
26607ec681f3Smrg      0x0, //
26617ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_2
26627ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_SIZE_3
26637ec681f3Smrg      0x0, // VGT_STRMOUT_VTX_STRIDE_3
26647ec681f3Smrg      0x0, //
26657ec681f3Smrg      0x0, // VGT_STRMOUT_BUFFER_OFFSET_3
26667ec681f3Smrg      0x0, //
26677ec681f3Smrg      0x0, //
26687ec681f3Smrg      0x0, //
26697ec681f3Smrg      0x0, //
26707ec681f3Smrg      0x0, //
26717ec681f3Smrg      0x0, //
26727ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET
26737ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE
26747ec681f3Smrg      0x0, // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE
26757ec681f3Smrg      0x0, //
26767ec681f3Smrg      0x0, // VGT_GS_MAX_VERT_OUT
26777ec681f3Smrg      0x0, //
26787ec681f3Smrg      0x0, //
26797ec681f3Smrg      0x0, //
26807ec681f3Smrg      0x0, //
26817ec681f3Smrg      0x0, // GE_NGG_SUBGRP_CNTL
26827ec681f3Smrg      0x0, // VGT_TESS_DISTRIBUTION
26837ec681f3Smrg      0x0, // VGT_SHADER_STAGES_EN
26847ec681f3Smrg      0x0, // VGT_LS_HS_CONFIG
26857ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE
26867ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_1
26877ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_2
26887ec681f3Smrg      0x0, // VGT_GS_VERT_ITEMSIZE_3
26897ec681f3Smrg      0x0, // VGT_TF_PARAM
26907ec681f3Smrg      0x0, // DB_ALPHA_TO_MASK
26917ec681f3Smrg      0x0, //
26927ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL
26937ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_CLAMP
26947ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE
26957ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET
26967ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_SCALE
26977ec681f3Smrg      0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET
26987ec681f3Smrg      0x0, // VGT_GS_INSTANCE_CNT
26997ec681f3Smrg      0x0, // VGT_STRMOUT_CONFIG
27007ec681f3Smrg      0x0  // VGT_STRMOUT_BUFFER_CONFIG
27017ec681f3Smrg   };
27027ec681f3Smrg   static const uint32_t PaScCentroidPriority0Gfx103[] = {
27037ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_0
27047ec681f3Smrg      0x0,        // PA_SC_CENTROID_PRIORITY_1
27057ec681f3Smrg      0x1000,     // PA_SC_LINE_CNTL
27067ec681f3Smrg      0x0,        // PA_SC_AA_CONFIG
27077ec681f3Smrg      0x5,        // PA_SU_VTX_CNTL
27087ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ
27097ec681f3Smrg      0x3f800000, // PA_CL_GB_VERT_DISC_ADJ
27107ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ
27117ec681f3Smrg      0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ
27127ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0
27137ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1
27147ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2
27157ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3
27167ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0
27177ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1
27187ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2
27197ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3
27207ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0
27217ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1
27227ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2
27237ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3
27247ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0
27257ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1
27267ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2
27277ec681f3Smrg      0x0,        // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3
27287ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0
27297ec681f3Smrg      0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1
27307ec681f3Smrg      0x0,        // PA_SC_SHADER_CONTROL
27317ec681f3Smrg      0x3,        // PA_SC_BINNER_CNTL_0
27327ec681f3Smrg      0x0,        // PA_SC_BINNER_CNTL_1
27337ec681f3Smrg      0x100000,   // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL
27347ec681f3Smrg      0x0,        // PA_SC_NGG_MODE_CNTL
27357ec681f3Smrg      0x0,        //
27367ec681f3Smrg      0x1e,       // VGT_VERTEX_REUSE_BLOCK_CNTL
27377ec681f3Smrg      0x20,       // VGT_OUT_DEALLOC_CNTL
27387ec681f3Smrg      0x0,        // CB_COLOR0_BASE
27397ec681f3Smrg      0x0,        //
27407ec681f3Smrg      0x0,        //
27417ec681f3Smrg      0x0,        // CB_COLOR0_VIEW
27427ec681f3Smrg      0x0,        // CB_COLOR0_INFO
27437ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB
27447ec681f3Smrg      0x0,        // CB_COLOR0_DCC_CONTROL
27457ec681f3Smrg      0x0,        // CB_COLOR0_CMASK
27467ec681f3Smrg      0x0,        //
27477ec681f3Smrg      0x0,        // CB_COLOR0_FMASK
27487ec681f3Smrg      0x0,        //
27497ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD0
27507ec681f3Smrg      0x0,        // CB_COLOR0_CLEAR_WORD1
27517ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE
27527ec681f3Smrg      0x0,        //
27537ec681f3Smrg      0x0,        // CB_COLOR1_BASE
27547ec681f3Smrg      0x0,        //
27557ec681f3Smrg      0x0,        //
27567ec681f3Smrg      0x0,        // CB_COLOR1_VIEW
27577ec681f3Smrg      0x0,        // CB_COLOR1_INFO
27587ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB
27597ec681f3Smrg      0x0,        // CB_COLOR1_DCC_CONTROL
27607ec681f3Smrg      0x0,        // CB_COLOR1_CMASK
27617ec681f3Smrg      0x0,        //
27627ec681f3Smrg      0x0,        // CB_COLOR1_FMASK
27637ec681f3Smrg      0x0,        //
27647ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD0
27657ec681f3Smrg      0x0,        // CB_COLOR1_CLEAR_WORD1
27667ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE
27677ec681f3Smrg      0x0,        //
27687ec681f3Smrg      0x0,        // CB_COLOR2_BASE
27697ec681f3Smrg      0x0,        //
27707ec681f3Smrg      0x0,        //
27717ec681f3Smrg      0x0,        // CB_COLOR2_VIEW
27727ec681f3Smrg      0x0,        // CB_COLOR2_INFO
27737ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB
27747ec681f3Smrg      0x0,        // CB_COLOR2_DCC_CONTROL
27757ec681f3Smrg      0x0,        // CB_COLOR2_CMASK
27767ec681f3Smrg      0x0,        //
27777ec681f3Smrg      0x0,        // CB_COLOR2_FMASK
27787ec681f3Smrg      0x0,        //
27797ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD0
27807ec681f3Smrg      0x0,        // CB_COLOR2_CLEAR_WORD1
27817ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE
27827ec681f3Smrg      0x0,        //
27837ec681f3Smrg      0x0,        // CB_COLOR3_BASE
27847ec681f3Smrg      0x0,        //
27857ec681f3Smrg      0x0,        //
27867ec681f3Smrg      0x0,        // CB_COLOR3_VIEW
27877ec681f3Smrg      0x0,        // CB_COLOR3_INFO
27887ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB
27897ec681f3Smrg      0x0,        // CB_COLOR3_DCC_CONTROL
27907ec681f3Smrg      0x0,        // CB_COLOR3_CMASK
27917ec681f3Smrg      0x0,        //
27927ec681f3Smrg      0x0,        // CB_COLOR3_FMASK
27937ec681f3Smrg      0x0,        //
27947ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD0
27957ec681f3Smrg      0x0,        // CB_COLOR3_CLEAR_WORD1
27967ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE
27977ec681f3Smrg      0x0,        //
27987ec681f3Smrg      0x0,        // CB_COLOR4_BASE
27997ec681f3Smrg      0x0,        //
28007ec681f3Smrg      0x0,        //
28017ec681f3Smrg      0x0,        // CB_COLOR4_VIEW
28027ec681f3Smrg      0x0,        // CB_COLOR4_INFO
28037ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB
28047ec681f3Smrg      0x0,        // CB_COLOR4_DCC_CONTROL
28057ec681f3Smrg      0x0,        // CB_COLOR4_CMASK
28067ec681f3Smrg      0x0,        //
28077ec681f3Smrg      0x0,        // CB_COLOR4_FMASK
28087ec681f3Smrg      0x0,        //
28097ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD0
28107ec681f3Smrg      0x0,        // CB_COLOR4_CLEAR_WORD1
28117ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE
28127ec681f3Smrg      0x0,        //
28137ec681f3Smrg      0x0,        // CB_COLOR5_BASE
28147ec681f3Smrg      0x0,        //
28157ec681f3Smrg      0x0,        //
28167ec681f3Smrg      0x0,        // CB_COLOR5_VIEW
28177ec681f3Smrg      0x0,        // CB_COLOR5_INFO
28187ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB
28197ec681f3Smrg      0x0,        // CB_COLOR5_DCC_CONTROL
28207ec681f3Smrg      0x0,        // CB_COLOR5_CMASK
28217ec681f3Smrg      0x0,        //
28227ec681f3Smrg      0x0,        // CB_COLOR5_FMASK
28237ec681f3Smrg      0x0,        //
28247ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD0
28257ec681f3Smrg      0x0,        // CB_COLOR5_CLEAR_WORD1
28267ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE
28277ec681f3Smrg      0x0,        //
28287ec681f3Smrg      0x0,        // CB_COLOR6_BASE
28297ec681f3Smrg      0x0,        //
28307ec681f3Smrg      0x0,        //
28317ec681f3Smrg      0x0,        // CB_COLOR6_VIEW
28327ec681f3Smrg      0x0,        // CB_COLOR6_INFO
28337ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB
28347ec681f3Smrg      0x0,        // CB_COLOR6_DCC_CONTROL
28357ec681f3Smrg      0x0,        // CB_COLOR6_CMASK
28367ec681f3Smrg      0x0,        //
28377ec681f3Smrg      0x0,        // CB_COLOR6_FMASK
28387ec681f3Smrg      0x0,        //
28397ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD0
28407ec681f3Smrg      0x0,        // CB_COLOR6_CLEAR_WORD1
28417ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE
28427ec681f3Smrg      0x0,        //
28437ec681f3Smrg      0x0,        // CB_COLOR7_BASE
28447ec681f3Smrg      0x0,        //
28457ec681f3Smrg      0x0,        //
28467ec681f3Smrg      0x0,        // CB_COLOR7_VIEW
28477ec681f3Smrg      0x0,        // CB_COLOR7_INFO
28487ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB
28497ec681f3Smrg      0x0,        // CB_COLOR7_DCC_CONTROL
28507ec681f3Smrg      0x0,        // CB_COLOR7_CMASK
28517ec681f3Smrg      0x0,        //
28527ec681f3Smrg      0x0,        // CB_COLOR7_FMASK
28537ec681f3Smrg      0x0,        //
28547ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD0
28557ec681f3Smrg      0x0,        // CB_COLOR7_CLEAR_WORD1
28567ec681f3Smrg      0x0,        // CB_COLOR7_DCC_BASE
28577ec681f3Smrg      0x0,        //
28587ec681f3Smrg      0x0,        // CB_COLOR0_BASE_EXT
28597ec681f3Smrg      0x0,        // CB_COLOR1_BASE_EXT
28607ec681f3Smrg      0x0,        // CB_COLOR2_BASE_EXT
28617ec681f3Smrg      0x0,        // CB_COLOR3_BASE_EXT
28627ec681f3Smrg      0x0,        // CB_COLOR4_BASE_EXT
28637ec681f3Smrg      0x0,        // CB_COLOR5_BASE_EXT
28647ec681f3Smrg      0x0,        // CB_COLOR6_BASE_EXT
28657ec681f3Smrg      0x0,        // CB_COLOR7_BASE_EXT
28667ec681f3Smrg      0x0,        // CB_COLOR0_CMASK_BASE_EXT
28677ec681f3Smrg      0x0,        // CB_COLOR1_CMASK_BASE_EXT
28687ec681f3Smrg      0x0,        // CB_COLOR2_CMASK_BASE_EXT
28697ec681f3Smrg      0x0,        // CB_COLOR3_CMASK_BASE_EXT
28707ec681f3Smrg      0x0,        // CB_COLOR4_CMASK_BASE_EXT
28717ec681f3Smrg      0x0,        // CB_COLOR5_CMASK_BASE_EXT
28727ec681f3Smrg      0x0,        // CB_COLOR6_CMASK_BASE_EXT
28737ec681f3Smrg      0x0,        // CB_COLOR7_CMASK_BASE_EXT
28747ec681f3Smrg      0x0,        // CB_COLOR0_FMASK_BASE_EXT
28757ec681f3Smrg      0x0,        // CB_COLOR1_FMASK_BASE_EXT
28767ec681f3Smrg      0x0,        // CB_COLOR2_FMASK_BASE_EXT
28777ec681f3Smrg      0x0,        // CB_COLOR3_FMASK_BASE_EXT
28787ec681f3Smrg      0x0,        // CB_COLOR4_FMASK_BASE_EXT
28797ec681f3Smrg      0x0,        // CB_COLOR5_FMASK_BASE_EXT
28807ec681f3Smrg      0x0,        // CB_COLOR6_FMASK_BASE_EXT
28817ec681f3Smrg      0x0,        // CB_COLOR7_FMASK_BASE_EXT
28827ec681f3Smrg      0x0,        // CB_COLOR0_DCC_BASE_EXT
28837ec681f3Smrg      0x0,        // CB_COLOR1_DCC_BASE_EXT
28847ec681f3Smrg      0x0,        // CB_COLOR2_DCC_BASE_EXT
28857ec681f3Smrg      0x0,        // CB_COLOR3_DCC_BASE_EXT
28867ec681f3Smrg      0x0,        // CB_COLOR4_DCC_BASE_EXT
28877ec681f3Smrg      0x0,        // CB_COLOR5_DCC_BASE_EXT
28887ec681f3Smrg      0x0,        // CB_COLOR6_DCC_BASE_EXT
28897ec681f3Smrg      0x0,        // CB_COLOR7_DCC_BASE_EXT
28907ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB2
28917ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB2
28927ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB2
28937ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB2
28947ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB2
28957ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB2
28967ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB2
28977ec681f3Smrg      0x0,        // CB_COLOR7_ATTRIB2
28987ec681f3Smrg      0x0,        // CB_COLOR0_ATTRIB3
28997ec681f3Smrg      0x0,        // CB_COLOR1_ATTRIB3
29007ec681f3Smrg      0x0,        // CB_COLOR2_ATTRIB3
29017ec681f3Smrg      0x0,        // CB_COLOR3_ATTRIB3
29027ec681f3Smrg      0x0,        // CB_COLOR4_ATTRIB3
29037ec681f3Smrg      0x0,        // CB_COLOR5_ATTRIB3
29047ec681f3Smrg      0x0,        // CB_COLOR6_ATTRIB3
29057ec681f3Smrg      0x0         // CB_COLOR7_ATTRIB3
29067ec681f3Smrg   };
29077ec681f3Smrg
29087ec681f3Smrg   set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlGfx103));
29097ec681f3Smrg   set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Gfx103));
29107ec681f3Smrg   set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX,
29117ec681f3Smrg                             SET(VgtMultiPrimIbResetIndxGfx103));
29127ec681f3Smrg   set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Gfx103));
29137ec681f3Smrg   set_context_reg_seq_array(cs, R_028750_SX_PS_DOWNCONVERT_CONTROL,
29147ec681f3Smrg                             SET(SxPsDownconvertControlGfx103));
29157ec681f3Smrg   set_context_reg_seq_array(cs, R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP,
29167ec681f3Smrg                             SET(GeMaxOutputPerSubgroupGfx103));
29177ec681f3Smrg   set_context_reg_seq_array(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL, SET(PaSuPrimFilterCntlGfx103));
29187ec681f3Smrg   set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeGfx103));
29197ec681f3Smrg   set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelGfx103));
29207ec681f3Smrg   set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeGfx103));
29217ec681f3Smrg   set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnGfx103));
29227ec681f3Smrg   set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetGfx103));
29237ec681f3Smrg   set_context_reg_seq_array(cs, R_028A98_VGT_DRAW_PAYLOAD_CNTL, SET(VgtDrawPayloadCntlGfx103));
29247ec681f3Smrg   set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0,
29257ec681f3Smrg                             SET(PaScCentroidPriority0Gfx103));
29267ec681f3Smrg
29277ec681f3Smrg   for (unsigned i = 0; i < num_reg_pairs; i++)
29287ec681f3Smrg      set_context_reg_seq_array(cs, reg_offsets[i], 1, &reg_values[i]);
29297ec681f3Smrg}
29307ec681f3Smrg
29317ec681f3Smrgvoid ac_emulate_clear_state(const struct radeon_info *info, struct radeon_cmdbuf *cs,
29327ec681f3Smrg                            set_context_reg_seq_array_fn set_context_reg_seq_array)
29337ec681f3Smrg{
29347ec681f3Smrg   /* Set context registers same as CLEAR_STATE to initialize shadow memory. */
29357ec681f3Smrg   unsigned reg_offset = R_02835C_PA_SC_TILE_STEERING_OVERRIDE;
29367ec681f3Smrg   uint32_t reg_value = info->pa_sc_tile_steering_override;
29377ec681f3Smrg
29387ec681f3Smrg   if (info->chip_class == GFX10_3) {
29397ec681f3Smrg      gfx103_emulate_clear_state(cs, 1, &reg_offset, &reg_value, set_context_reg_seq_array);
29407ec681f3Smrg   } else if (info->chip_class == GFX10) {
29417ec681f3Smrg      gfx10_emulate_clear_state(cs, 1, &reg_offset, &reg_value, set_context_reg_seq_array);
29427ec681f3Smrg   } else if (info->chip_class == GFX9) {
29437ec681f3Smrg      gfx9_emulate_clear_state(cs, set_context_reg_seq_array);
29447ec681f3Smrg   } else {
29457ec681f3Smrg      unreachable("unimplemented");
29467ec681f3Smrg   }
29477ec681f3Smrg}
29487ec681f3Smrg
29497ec681f3Smrg/* Debug helper to find if any registers are missing in the tables above.
29507ec681f3Smrg * Call this in the driver whenever you set a register.
29517ec681f3Smrg */
29527ec681f3Smrgvoid ac_check_shadowed_regs(enum chip_class chip_class, enum radeon_family family,
29537ec681f3Smrg                            unsigned reg_offset, unsigned count)
29547ec681f3Smrg{
29557ec681f3Smrg   bool found = false;
29567ec681f3Smrg   bool shadowed = false;
29577ec681f3Smrg
29587ec681f3Smrg   for (unsigned type = 0; type < SI_NUM_ALL_REG_RANGES && !found; type++) {
29597ec681f3Smrg      const struct ac_reg_range *ranges;
29607ec681f3Smrg      unsigned num_ranges;
29617ec681f3Smrg
29627ec681f3Smrg      ac_get_reg_ranges(chip_class, family, type, &num_ranges, &ranges);
29637ec681f3Smrg
29647ec681f3Smrg      for (unsigned i = 0; i < num_ranges; i++) {
29657ec681f3Smrg         unsigned end_reg_offset = reg_offset + count * 4;
29667ec681f3Smrg         unsigned end_range_offset = ranges[i].offset + ranges[i].size;
29677ec681f3Smrg
29687ec681f3Smrg         /* Test if the ranges interect. */
29697ec681f3Smrg         if (MAX2(ranges[i].offset, reg_offset) < MIN2(end_range_offset, end_reg_offset)) {
29707ec681f3Smrg            /* Assertion: A register can be listed only once. */
29717ec681f3Smrg            assert(!found);
29727ec681f3Smrg            found = true;
29737ec681f3Smrg            shadowed = type != SI_REG_RANGE_NON_SHADOWED;
29747ec681f3Smrg         }
29757ec681f3Smrg      }
29767ec681f3Smrg   }
29777ec681f3Smrg
29787ec681f3Smrg   if (reg_offset == R_00B858_COMPUTE_DESTINATION_EN_SE0 ||
29797ec681f3Smrg       reg_offset == R_00B864_COMPUTE_DESTINATION_EN_SE2)
29807ec681f3Smrg      return;
29817ec681f3Smrg
29827ec681f3Smrg   if (!found || !shadowed) {
29837ec681f3Smrg      printf("register %s: ", !found ? "not found" : "not shadowed");
29847ec681f3Smrg      if (count > 1) {
29857ec681f3Smrg         printf("%s .. %s\n", ac_get_register_name(chip_class, reg_offset),
29867ec681f3Smrg                ac_get_register_name(chip_class, reg_offset + (count - 1) * 4));
29877ec681f3Smrg      } else {
29887ec681f3Smrg         printf("%s\n", ac_get_register_name(chip_class, reg_offset));
29897ec681f3Smrg      }
29907ec681f3Smrg   }
29917ec681f3Smrg}
29927ec681f3Smrg
29937ec681f3Smrg/* Debug helper to print all shadowed registers and their current values read
29947ec681f3Smrg * by umr. This can be used to verify whether register shadowing doesn't affect
29957ec681f3Smrg * apps that don't enable it, because the shadowed register tables might contain
29967ec681f3Smrg * registers that the driver doesn't set.
29977ec681f3Smrg */
29987ec681f3Smrgvoid ac_print_shadowed_regs(const struct radeon_info *info)
29997ec681f3Smrg{
30007ec681f3Smrg   if (!debug_get_bool_option("AMD_PRINT_SHADOW_REGS", false))
30017ec681f3Smrg      return;
30027ec681f3Smrg
30037ec681f3Smrg   for (unsigned type = 0; type < SI_NUM_SHADOWED_REG_RANGES; type++) {
30047ec681f3Smrg      const struct ac_reg_range *ranges;
30057ec681f3Smrg      unsigned num_ranges;
30067ec681f3Smrg
30077ec681f3Smrg      ac_get_reg_ranges(info->chip_class, info->family, type, &num_ranges, &ranges);
30087ec681f3Smrg
30097ec681f3Smrg      for (unsigned i = 0; i < num_ranges; i++) {
30107ec681f3Smrg         for (unsigned j = 0; j < ranges[i].size / 4; j++) {
30117ec681f3Smrg            unsigned offset = ranges[i].offset + j * 4;
30127ec681f3Smrg
30137ec681f3Smrg            const char *name = ac_get_register_name(info->chip_class, offset);
30147ec681f3Smrg            unsigned value = -1;
30157ec681f3Smrg
30167ec681f3Smrg#ifndef _WIN32
30177ec681f3Smrg            char cmd[1024];
30187ec681f3Smrg            snprintf(cmd, sizeof(cmd), "umr -r 0x%x", offset);
30197ec681f3Smrg            FILE *p = popen(cmd, "r");
30207ec681f3Smrg            if (p) {
30217ec681f3Smrg               ASSERTED int r = fscanf(p, "%x", &value);
30227ec681f3Smrg               assert(r == 1);
30237ec681f3Smrg               pclose(p);
30247ec681f3Smrg            }
30257ec681f3Smrg#endif
30267ec681f3Smrg
30277ec681f3Smrg            printf("0x%X %s = 0x%X\n", offset, name, value);
30287ec681f3Smrg         }
30297ec681f3Smrg         printf("--------------------------------------------\n");
30307ec681f3Smrg      }
30317ec681f3Smrg   }
30327ec681f3Smrg}
3033