1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright © 2020 Advanced Micro Devices, Inc. 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining 5bf215546Sopenharmony_ci * a copy of this software and associated documentation files (the 6bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 7bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 8bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to 9bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to 10bf215546Sopenharmony_ci * the following conditions: 11bf215546Sopenharmony_ci * 12bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13bf215546Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 14bf215546Sopenharmony_ci * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15bf215546Sopenharmony_ci * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS 16bf215546Sopenharmony_ci * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18bf215546Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 19bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 20bf215546Sopenharmony_ci * 21bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the 22bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 23bf215546Sopenharmony_ci * of the Software. 24bf215546Sopenharmony_ci */ 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci/* These tables define the set of ranges of registers we shadow when 27bf215546Sopenharmony_ci * mid command buffer preemption is enabled. 28bf215546Sopenharmony_ci */ 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci#include "ac_shadowed_regs.h" 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_ci#include "ac_debug.h" 33bf215546Sopenharmony_ci#include "sid.h" 34bf215546Sopenharmony_ci#include "util/macros.h" 35bf215546Sopenharmony_ci#include "util/u_debug.h" 36bf215546Sopenharmony_ci 37bf215546Sopenharmony_ci#include <stdio.h> 38bf215546Sopenharmony_ci 39bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9UserConfigShadowRange[] = { 40bf215546Sopenharmony_ci { 41bf215546Sopenharmony_ci R_0300FC_CP_STRMOUT_CNTL, 42bf215546Sopenharmony_ci 4, 43bf215546Sopenharmony_ci }, 44bf215546Sopenharmony_ci { 45bf215546Sopenharmony_ci R_0301EC_CP_COHER_START_DELAY, 46bf215546Sopenharmony_ci 4, 47bf215546Sopenharmony_ci }, 48bf215546Sopenharmony_ci { 49bf215546Sopenharmony_ci R_030904_VGT_GSVS_RING_SIZE, 50bf215546Sopenharmony_ci R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE + 4, 51bf215546Sopenharmony_ci }, 52bf215546Sopenharmony_ci { 53bf215546Sopenharmony_ci R_030920_VGT_MAX_VTX_INDX, 54bf215546Sopenharmony_ci R_03092C_VGT_MULTI_PRIM_IB_RESET_EN - R_030920_VGT_MAX_VTX_INDX + 4, 55bf215546Sopenharmony_ci }, 56bf215546Sopenharmony_ci { 57bf215546Sopenharmony_ci R_030934_VGT_NUM_INSTANCES, 58bf215546Sopenharmony_ci R_030944_VGT_TF_MEMORY_BASE_HI - R_030934_VGT_NUM_INSTANCES + 4, 59bf215546Sopenharmony_ci }, 60bf215546Sopenharmony_ci { 61bf215546Sopenharmony_ci R_030960_IA_MULTI_VGT_PARAM, 62bf215546Sopenharmony_ci 4, 63bf215546Sopenharmony_ci }, 64bf215546Sopenharmony_ci { 65bf215546Sopenharmony_ci R_030968_VGT_INSTANCE_BASE_ID, 66bf215546Sopenharmony_ci 4, 67bf215546Sopenharmony_ci }, 68bf215546Sopenharmony_ci { 69bf215546Sopenharmony_ci R_030E00_TA_CS_BC_BASE_ADDR, 70bf215546Sopenharmony_ci R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4, 71bf215546Sopenharmony_ci }, 72bf215546Sopenharmony_ci { 73bf215546Sopenharmony_ci R_030AD4_PA_STATE_STEREO_X, 74bf215546Sopenharmony_ci 4, 75bf215546Sopenharmony_ci }, 76bf215546Sopenharmony_ci}; 77bf215546Sopenharmony_ci 78bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9ContextShadowRange[] = { 79bf215546Sopenharmony_ci { 80bf215546Sopenharmony_ci R_028000_DB_RENDER_CONTROL, 81bf215546Sopenharmony_ci R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4, 82bf215546Sopenharmony_ci }, 83bf215546Sopenharmony_ci { 84bf215546Sopenharmony_ci R_0281E8_COHER_DEST_BASE_HI_0, 85bf215546Sopenharmony_ci R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4, 86bf215546Sopenharmony_ci }, 87bf215546Sopenharmony_ci { 88bf215546Sopenharmony_ci R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 89bf215546Sopenharmony_ci 4, 90bf215546Sopenharmony_ci }, 91bf215546Sopenharmony_ci { 92bf215546Sopenharmony_ci R_028414_CB_BLEND_RED, 93bf215546Sopenharmony_ci R_028618_PA_CL_UCP_5_W - R_028414_CB_BLEND_RED + 4, 94bf215546Sopenharmony_ci }, 95bf215546Sopenharmony_ci { 96bf215546Sopenharmony_ci R_028644_SPI_PS_INPUT_CNTL_0, 97bf215546Sopenharmony_ci R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4, 98bf215546Sopenharmony_ci }, 99bf215546Sopenharmony_ci { 100bf215546Sopenharmony_ci R_028754_SX_PS_DOWNCONVERT, 101bf215546Sopenharmony_ci R_0287BC_CB_MRT7_EPITCH - R_028754_SX_PS_DOWNCONVERT + 4, 102bf215546Sopenharmony_ci }, 103bf215546Sopenharmony_ci { 104bf215546Sopenharmony_ci R_028800_DB_DEPTH_CONTROL, 105bf215546Sopenharmony_ci R_028840_PA_STEREO_CNTL - R_028800_DB_DEPTH_CONTROL + 4, 106bf215546Sopenharmony_ci }, 107bf215546Sopenharmony_ci { 108bf215546Sopenharmony_ci R_028A00_PA_SU_POINT_SIZE, 109bf215546Sopenharmony_ci R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4, 110bf215546Sopenharmony_ci }, 111bf215546Sopenharmony_ci { 112bf215546Sopenharmony_ci R_028A18_VGT_HOS_MAX_TESS_LEVEL, 113bf215546Sopenharmony_ci R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4, 114bf215546Sopenharmony_ci }, 115bf215546Sopenharmony_ci { 116bf215546Sopenharmony_ci R_028A40_VGT_GS_MODE, 117bf215546Sopenharmony_ci R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4, 118bf215546Sopenharmony_ci }, 119bf215546Sopenharmony_ci { 120bf215546Sopenharmony_ci R_028A84_VGT_PRIMITIVEID_EN, 121bf215546Sopenharmony_ci 4, 122bf215546Sopenharmony_ci }, 123bf215546Sopenharmony_ci { 124bf215546Sopenharmony_ci R_028A8C_VGT_PRIMITIVEID_RESET, 125bf215546Sopenharmony_ci 4, 126bf215546Sopenharmony_ci }, 127bf215546Sopenharmony_ci { 128bf215546Sopenharmony_ci R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP, 129bf215546Sopenharmony_ci R_028AD4_VGT_STRMOUT_VTX_STRIDE_0 - R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP + 4, 130bf215546Sopenharmony_ci }, 131bf215546Sopenharmony_ci { 132bf215546Sopenharmony_ci R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1, 133bf215546Sopenharmony_ci R_028AE4_VGT_STRMOUT_VTX_STRIDE_1 - R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1 + 4, 134bf215546Sopenharmony_ci }, 135bf215546Sopenharmony_ci { 136bf215546Sopenharmony_ci R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2, 137bf215546Sopenharmony_ci R_028AF4_VGT_STRMOUT_VTX_STRIDE_2 - R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2 + 4, 138bf215546Sopenharmony_ci }, 139bf215546Sopenharmony_ci { 140bf215546Sopenharmony_ci R_028B00_VGT_STRMOUT_BUFFER_SIZE_3, 141bf215546Sopenharmony_ci R_028B04_VGT_STRMOUT_VTX_STRIDE_3 - R_028B00_VGT_STRMOUT_BUFFER_SIZE_3 + 4, 142bf215546Sopenharmony_ci }, 143bf215546Sopenharmony_ci { 144bf215546Sopenharmony_ci R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 145bf215546Sopenharmony_ci R_028B30_VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE - R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET + 4, 146bf215546Sopenharmony_ci }, 147bf215546Sopenharmony_ci { 148bf215546Sopenharmony_ci R_028B38_VGT_GS_MAX_VERT_OUT, 149bf215546Sopenharmony_ci R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028B38_VGT_GS_MAX_VERT_OUT + 4, 150bf215546Sopenharmony_ci }, 151bf215546Sopenharmony_ci { 152bf215546Sopenharmony_ci R_028BD4_PA_SC_CENTROID_PRIORITY_0, 153bf215546Sopenharmony_ci R_028E3C_CB_COLOR7_DCC_BASE_EXT - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4, 154bf215546Sopenharmony_ci }, 155bf215546Sopenharmony_ci}; 156bf215546Sopenharmony_ci 157bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9ShShadowRange[] = { 158bf215546Sopenharmony_ci { 159bf215546Sopenharmony_ci R_00B020_SPI_SHADER_PGM_LO_PS, 160bf215546Sopenharmony_ci R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4, 161bf215546Sopenharmony_ci }, 162bf215546Sopenharmony_ci { 163bf215546Sopenharmony_ci R_00B11C_SPI_SHADER_LATE_ALLOC_VS, 164bf215546Sopenharmony_ci R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4, 165bf215546Sopenharmony_ci }, 166bf215546Sopenharmony_ci { 167bf215546Sopenharmony_ci R_00B204_SPI_SHADER_PGM_RSRC4_GS, 168bf215546Sopenharmony_ci R_00B214_SPI_SHADER_PGM_HI_ES - R_00B204_SPI_SHADER_PGM_RSRC4_GS + 4, 169bf215546Sopenharmony_ci }, 170bf215546Sopenharmony_ci { 171bf215546Sopenharmony_ci R_00B220_SPI_SHADER_PGM_LO_GS, 172bf215546Sopenharmony_ci R_00B22C_SPI_SHADER_PGM_RSRC2_GS - R_00B220_SPI_SHADER_PGM_LO_GS + 4, 173bf215546Sopenharmony_ci }, 174bf215546Sopenharmony_ci { 175bf215546Sopenharmony_ci R_00B330_SPI_SHADER_USER_DATA_ES_0, 176bf215546Sopenharmony_ci R_00B3AC_SPI_SHADER_USER_DATA_ES_31 - R_00B330_SPI_SHADER_USER_DATA_ES_0 + 4, 177bf215546Sopenharmony_ci }, 178bf215546Sopenharmony_ci { 179bf215546Sopenharmony_ci R_00B404_SPI_SHADER_PGM_RSRC4_HS, 180bf215546Sopenharmony_ci R_00B414_SPI_SHADER_PGM_HI_LS - R_00B404_SPI_SHADER_PGM_RSRC4_HS + 4, 181bf215546Sopenharmony_ci }, 182bf215546Sopenharmony_ci { 183bf215546Sopenharmony_ci R_00B420_SPI_SHADER_PGM_LO_HS, 184bf215546Sopenharmony_ci R_00B4AC_SPI_SHADER_USER_DATA_LS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4, 185bf215546Sopenharmony_ci }, 186bf215546Sopenharmony_ci}; 187bf215546Sopenharmony_ci 188bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9CsShShadowRange[] = { 189bf215546Sopenharmony_ci { 190bf215546Sopenharmony_ci R_00B810_COMPUTE_START_X, 191bf215546Sopenharmony_ci R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4, 192bf215546Sopenharmony_ci }, 193bf215546Sopenharmony_ci { 194bf215546Sopenharmony_ci R_00B82C_COMPUTE_PERFCOUNT_ENABLE, 195bf215546Sopenharmony_ci R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4, 196bf215546Sopenharmony_ci }, 197bf215546Sopenharmony_ci { 198bf215546Sopenharmony_ci R_00B848_COMPUTE_PGM_RSRC1, 199bf215546Sopenharmony_ci R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4, 200bf215546Sopenharmony_ci }, 201bf215546Sopenharmony_ci { 202bf215546Sopenharmony_ci R_00B854_COMPUTE_RESOURCE_LIMITS, 203bf215546Sopenharmony_ci 4, 204bf215546Sopenharmony_ci }, 205bf215546Sopenharmony_ci { 206bf215546Sopenharmony_ci R_00B860_COMPUTE_TMPRING_SIZE, 207bf215546Sopenharmony_ci 4, 208bf215546Sopenharmony_ci }, 209bf215546Sopenharmony_ci { 210bf215546Sopenharmony_ci R_00B878_COMPUTE_THREAD_TRACE_ENABLE, 211bf215546Sopenharmony_ci 4, 212bf215546Sopenharmony_ci }, 213bf215546Sopenharmony_ci { 214bf215546Sopenharmony_ci R_00B900_COMPUTE_USER_DATA_0, 215bf215546Sopenharmony_ci R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4, 216bf215546Sopenharmony_ci }, 217bf215546Sopenharmony_ci}; 218bf215546Sopenharmony_ci 219bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9ShShadowRangeRaven2[] = { 220bf215546Sopenharmony_ci { 221bf215546Sopenharmony_ci R_00B018_SPI_SHADER_PGM_CHKSUM_PS, 222bf215546Sopenharmony_ci 4, 223bf215546Sopenharmony_ci }, 224bf215546Sopenharmony_ci { 225bf215546Sopenharmony_ci R_00B020_SPI_SHADER_PGM_LO_PS, 226bf215546Sopenharmony_ci R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4, 227bf215546Sopenharmony_ci }, 228bf215546Sopenharmony_ci { 229bf215546Sopenharmony_ci R_00B114_SPI_SHADER_PGM_CHKSUM_VS, 230bf215546Sopenharmony_ci 4, 231bf215546Sopenharmony_ci }, 232bf215546Sopenharmony_ci { 233bf215546Sopenharmony_ci R_00B11C_SPI_SHADER_LATE_ALLOC_VS, 234bf215546Sopenharmony_ci R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4, 235bf215546Sopenharmony_ci }, 236bf215546Sopenharmony_ci { 237bf215546Sopenharmony_ci R_00B200_SPI_SHADER_PGM_CHKSUM_GS, 238bf215546Sopenharmony_ci R_00B214_SPI_SHADER_PGM_HI_ES - R_00B200_SPI_SHADER_PGM_CHKSUM_GS + 4, 239bf215546Sopenharmony_ci }, 240bf215546Sopenharmony_ci { 241bf215546Sopenharmony_ci R_00B220_SPI_SHADER_PGM_LO_GS, 242bf215546Sopenharmony_ci R_00B22C_SPI_SHADER_PGM_RSRC2_GS - R_00B220_SPI_SHADER_PGM_LO_GS + 4, 243bf215546Sopenharmony_ci }, 244bf215546Sopenharmony_ci { 245bf215546Sopenharmony_ci R_00B330_SPI_SHADER_USER_DATA_ES_0, 246bf215546Sopenharmony_ci R_00B3AC_SPI_SHADER_USER_DATA_ES_31 - R_00B330_SPI_SHADER_USER_DATA_ES_0 + 4, 247bf215546Sopenharmony_ci }, 248bf215546Sopenharmony_ci { 249bf215546Sopenharmony_ci R_00B400_SPI_SHADER_PGM_CHKSUM_HS, 250bf215546Sopenharmony_ci R_00B414_SPI_SHADER_PGM_HI_LS - R_00B400_SPI_SHADER_PGM_CHKSUM_HS + 4, 251bf215546Sopenharmony_ci }, 252bf215546Sopenharmony_ci { 253bf215546Sopenharmony_ci R_00B420_SPI_SHADER_PGM_LO_HS, 254bf215546Sopenharmony_ci R_00B4AC_SPI_SHADER_USER_DATA_LS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4, 255bf215546Sopenharmony_ci }, 256bf215546Sopenharmony_ci}; 257bf215546Sopenharmony_ci 258bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx9CsShShadowRangeRaven2[] = { 259bf215546Sopenharmony_ci { 260bf215546Sopenharmony_ci R_00B810_COMPUTE_START_X, 261bf215546Sopenharmony_ci R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4, 262bf215546Sopenharmony_ci }, 263bf215546Sopenharmony_ci { 264bf215546Sopenharmony_ci R_00B82C_COMPUTE_PERFCOUNT_ENABLE, 265bf215546Sopenharmony_ci R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4, 266bf215546Sopenharmony_ci }, 267bf215546Sopenharmony_ci { 268bf215546Sopenharmony_ci R_00B848_COMPUTE_PGM_RSRC1, 269bf215546Sopenharmony_ci R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4, 270bf215546Sopenharmony_ci }, 271bf215546Sopenharmony_ci { 272bf215546Sopenharmony_ci R_00B854_COMPUTE_RESOURCE_LIMITS, 273bf215546Sopenharmony_ci 4, 274bf215546Sopenharmony_ci }, 275bf215546Sopenharmony_ci { 276bf215546Sopenharmony_ci R_00B860_COMPUTE_TMPRING_SIZE, 277bf215546Sopenharmony_ci 4, 278bf215546Sopenharmony_ci }, 279bf215546Sopenharmony_ci { 280bf215546Sopenharmony_ci R_00B878_COMPUTE_THREAD_TRACE_ENABLE, 281bf215546Sopenharmony_ci 4, 282bf215546Sopenharmony_ci }, 283bf215546Sopenharmony_ci { 284bf215546Sopenharmony_ci R_00B894_COMPUTE_SHADER_CHKSUM, 285bf215546Sopenharmony_ci 4, 286bf215546Sopenharmony_ci }, 287bf215546Sopenharmony_ci { 288bf215546Sopenharmony_ci R_00B900_COMPUTE_USER_DATA_0, 289bf215546Sopenharmony_ci R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4, 290bf215546Sopenharmony_ci }, 291bf215546Sopenharmony_ci}; 292bf215546Sopenharmony_ci 293bf215546Sopenharmony_cistatic const struct ac_reg_range Nv10ContextShadowRange[] = { 294bf215546Sopenharmony_ci { 295bf215546Sopenharmony_ci R_028000_DB_RENDER_CONTROL, 296bf215546Sopenharmony_ci R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4, 297bf215546Sopenharmony_ci }, 298bf215546Sopenharmony_ci { 299bf215546Sopenharmony_ci R_0281E8_COHER_DEST_BASE_HI_0, 300bf215546Sopenharmony_ci R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4, 301bf215546Sopenharmony_ci }, 302bf215546Sopenharmony_ci { 303bf215546Sopenharmony_ci R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 304bf215546Sopenharmony_ci R_028618_PA_CL_UCP_5_W - R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX + 4, 305bf215546Sopenharmony_ci }, 306bf215546Sopenharmony_ci { 307bf215546Sopenharmony_ci R_028644_SPI_PS_INPUT_CNTL_0, 308bf215546Sopenharmony_ci R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4, 309bf215546Sopenharmony_ci }, 310bf215546Sopenharmony_ci { 311bf215546Sopenharmony_ci R_028754_SX_PS_DOWNCONVERT, 312bf215546Sopenharmony_ci R_02879C_CB_BLEND7_CONTROL - R_028754_SX_PS_DOWNCONVERT + 4, 313bf215546Sopenharmony_ci }, 314bf215546Sopenharmony_ci { 315bf215546Sopenharmony_ci R_0287D4_PA_CL_POINT_X_RAD, 316bf215546Sopenharmony_ci R_0287E0_PA_CL_POINT_CULL_RAD - R_0287D4_PA_CL_POINT_X_RAD + 4, 317bf215546Sopenharmony_ci }, 318bf215546Sopenharmony_ci { 319bf215546Sopenharmony_ci R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, 320bf215546Sopenharmony_ci R_028844_PA_STATE_STEREO_X - R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP + 4, 321bf215546Sopenharmony_ci }, 322bf215546Sopenharmony_ci { 323bf215546Sopenharmony_ci R_028A00_PA_SU_POINT_SIZE, 324bf215546Sopenharmony_ci R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4, 325bf215546Sopenharmony_ci }, 326bf215546Sopenharmony_ci { 327bf215546Sopenharmony_ci R_028A18_VGT_HOS_MAX_TESS_LEVEL, 328bf215546Sopenharmony_ci R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4, 329bf215546Sopenharmony_ci }, 330bf215546Sopenharmony_ci { 331bf215546Sopenharmony_ci R_028A40_VGT_GS_MODE, 332bf215546Sopenharmony_ci R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4, 333bf215546Sopenharmony_ci }, 334bf215546Sopenharmony_ci { 335bf215546Sopenharmony_ci R_028A84_VGT_PRIMITIVEID_EN, 336bf215546Sopenharmony_ci 4, 337bf215546Sopenharmony_ci }, 338bf215546Sopenharmony_ci { 339bf215546Sopenharmony_ci R_028A8C_VGT_PRIMITIVEID_RESET, 340bf215546Sopenharmony_ci 4, 341bf215546Sopenharmony_ci }, 342bf215546Sopenharmony_ci { 343bf215546Sopenharmony_ci R_028A98_VGT_DRAW_PAYLOAD_CNTL, 344bf215546Sopenharmony_ci R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028A98_VGT_DRAW_PAYLOAD_CNTL + 4, 345bf215546Sopenharmony_ci }, 346bf215546Sopenharmony_ci { 347bf215546Sopenharmony_ci R_028BD4_PA_SC_CENTROID_PRIORITY_0, 348bf215546Sopenharmony_ci R_028EFC_CB_COLOR7_ATTRIB3 - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4, 349bf215546Sopenharmony_ci }, 350bf215546Sopenharmony_ci}; 351bf215546Sopenharmony_ci 352bf215546Sopenharmony_cistatic const struct ac_reg_range Nv10UserConfigShadowRange[] = { 353bf215546Sopenharmony_ci { 354bf215546Sopenharmony_ci R_0300FC_CP_STRMOUT_CNTL, 355bf215546Sopenharmony_ci 4, 356bf215546Sopenharmony_ci }, 357bf215546Sopenharmony_ci { 358bf215546Sopenharmony_ci R_0301EC_CP_COHER_START_DELAY, 359bf215546Sopenharmony_ci 4, 360bf215546Sopenharmony_ci }, 361bf215546Sopenharmony_ci { 362bf215546Sopenharmony_ci R_030904_VGT_GSVS_RING_SIZE, 363bf215546Sopenharmony_ci R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE + 4, 364bf215546Sopenharmony_ci }, 365bf215546Sopenharmony_ci { 366bf215546Sopenharmony_ci R_030964_GE_MAX_VTX_INDX, 367bf215546Sopenharmony_ci 4, 368bf215546Sopenharmony_ci }, 369bf215546Sopenharmony_ci { 370bf215546Sopenharmony_ci R_030924_GE_MIN_VTX_INDX, 371bf215546Sopenharmony_ci R_03092C_GE_MULTI_PRIM_IB_RESET_EN - R_030924_GE_MIN_VTX_INDX + 4, 372bf215546Sopenharmony_ci }, 373bf215546Sopenharmony_ci { 374bf215546Sopenharmony_ci R_030934_VGT_NUM_INSTANCES, 375bf215546Sopenharmony_ci R_030940_VGT_TF_MEMORY_BASE - R_030934_VGT_NUM_INSTANCES + 4, 376bf215546Sopenharmony_ci }, 377bf215546Sopenharmony_ci { 378bf215546Sopenharmony_ci R_03097C_GE_STEREO_CNTL, 379bf215546Sopenharmony_ci R_030984_VGT_TF_MEMORY_BASE_HI - R_03097C_GE_STEREO_CNTL + 4, 380bf215546Sopenharmony_ci }, 381bf215546Sopenharmony_ci { 382bf215546Sopenharmony_ci R_03096C_GE_CNTL, 383bf215546Sopenharmony_ci 4, 384bf215546Sopenharmony_ci }, 385bf215546Sopenharmony_ci { 386bf215546Sopenharmony_ci R_030968_VGT_INSTANCE_BASE_ID, 387bf215546Sopenharmony_ci 4, 388bf215546Sopenharmony_ci }, 389bf215546Sopenharmony_ci { 390bf215546Sopenharmony_ci R_030988_GE_USER_VGPR_EN, 391bf215546Sopenharmony_ci 4, 392bf215546Sopenharmony_ci }, 393bf215546Sopenharmony_ci { 394bf215546Sopenharmony_ci R_030E00_TA_CS_BC_BASE_ADDR, 395bf215546Sopenharmony_ci R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4, 396bf215546Sopenharmony_ci }, 397bf215546Sopenharmony_ci}; 398bf215546Sopenharmony_ci 399bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx10ShShadowRange[] = { 400bf215546Sopenharmony_ci { 401bf215546Sopenharmony_ci R_00B018_SPI_SHADER_PGM_CHKSUM_PS, 402bf215546Sopenharmony_ci 4, 403bf215546Sopenharmony_ci }, 404bf215546Sopenharmony_ci { 405bf215546Sopenharmony_ci R_00B020_SPI_SHADER_PGM_LO_PS, 406bf215546Sopenharmony_ci R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4, 407bf215546Sopenharmony_ci }, 408bf215546Sopenharmony_ci { 409bf215546Sopenharmony_ci R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0, 410bf215546Sopenharmony_ci R_00B0D4_SPI_SHADER_USER_ACCUM_PS_3 - R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0 + 4, 411bf215546Sopenharmony_ci }, 412bf215546Sopenharmony_ci { 413bf215546Sopenharmony_ci R_00B114_SPI_SHADER_PGM_CHKSUM_VS, 414bf215546Sopenharmony_ci 4, 415bf215546Sopenharmony_ci }, 416bf215546Sopenharmony_ci { 417bf215546Sopenharmony_ci R_00B11C_SPI_SHADER_LATE_ALLOC_VS, 418bf215546Sopenharmony_ci R_00B1AC_SPI_SHADER_USER_DATA_VS_31 - R_00B11C_SPI_SHADER_LATE_ALLOC_VS + 4, 419bf215546Sopenharmony_ci }, 420bf215546Sopenharmony_ci { 421bf215546Sopenharmony_ci R_00B1C8_SPI_SHADER_USER_ACCUM_VS_0, 422bf215546Sopenharmony_ci R_00B1D4_SPI_SHADER_USER_ACCUM_VS_3 - R_00B1C8_SPI_SHADER_USER_ACCUM_VS_0 + 4, 423bf215546Sopenharmony_ci }, 424bf215546Sopenharmony_ci { 425bf215546Sopenharmony_ci R_00B320_SPI_SHADER_PGM_LO_ES, 426bf215546Sopenharmony_ci R_00B324_SPI_SHADER_PGM_HI_ES - R_00B320_SPI_SHADER_PGM_LO_ES + 4, 427bf215546Sopenharmony_ci }, 428bf215546Sopenharmony_ci { 429bf215546Sopenharmony_ci R_00B520_SPI_SHADER_PGM_LO_LS, 430bf215546Sopenharmony_ci R_00B524_SPI_SHADER_PGM_HI_LS - R_00B520_SPI_SHADER_PGM_LO_LS + 4, 431bf215546Sopenharmony_ci }, 432bf215546Sopenharmony_ci { 433bf215546Sopenharmony_ci R_00B200_SPI_SHADER_PGM_CHKSUM_GS, 434bf215546Sopenharmony_ci 4, 435bf215546Sopenharmony_ci }, 436bf215546Sopenharmony_ci { 437bf215546Sopenharmony_ci R_00B220_SPI_SHADER_PGM_LO_GS, 438bf215546Sopenharmony_ci R_00B2AC_SPI_SHADER_USER_DATA_GS_31 - R_00B220_SPI_SHADER_PGM_LO_GS + 4, 439bf215546Sopenharmony_ci }, 440bf215546Sopenharmony_ci { 441bf215546Sopenharmony_ci R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS, 442bf215546Sopenharmony_ci R_00B20C_SPI_SHADER_USER_DATA_ADDR_HI_GS - R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS + 4, 443bf215546Sopenharmony_ci }, 444bf215546Sopenharmony_ci { 445bf215546Sopenharmony_ci R_00B408_SPI_SHADER_USER_DATA_ADDR_LO_HS, 446bf215546Sopenharmony_ci R_00B40C_SPI_SHADER_USER_DATA_ADDR_HI_HS - R_00B408_SPI_SHADER_USER_DATA_ADDR_LO_HS + 4, 447bf215546Sopenharmony_ci }, 448bf215546Sopenharmony_ci { 449bf215546Sopenharmony_ci R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0, 450bf215546Sopenharmony_ci R_00B2D4_SPI_SHADER_USER_ACCUM_ESGS_3 - R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0 + 4, 451bf215546Sopenharmony_ci }, 452bf215546Sopenharmony_ci { 453bf215546Sopenharmony_ci R_00B400_SPI_SHADER_PGM_CHKSUM_HS, 454bf215546Sopenharmony_ci 4, 455bf215546Sopenharmony_ci }, 456bf215546Sopenharmony_ci { 457bf215546Sopenharmony_ci R_00B420_SPI_SHADER_PGM_LO_HS, 458bf215546Sopenharmony_ci R_00B4AC_SPI_SHADER_USER_DATA_HS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4, 459bf215546Sopenharmony_ci }, 460bf215546Sopenharmony_ci { 461bf215546Sopenharmony_ci R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0, 462bf215546Sopenharmony_ci R_00B4D4_SPI_SHADER_USER_ACCUM_LSHS_3 - R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0 + 4, 463bf215546Sopenharmony_ci }, 464bf215546Sopenharmony_ci { 465bf215546Sopenharmony_ci R_00B0C0_SPI_SHADER_REQ_CTRL_PS, 466bf215546Sopenharmony_ci 4, 467bf215546Sopenharmony_ci }, 468bf215546Sopenharmony_ci { 469bf215546Sopenharmony_ci R_00B1C0_SPI_SHADER_REQ_CTRL_VS, 470bf215546Sopenharmony_ci 4, 471bf215546Sopenharmony_ci }, 472bf215546Sopenharmony_ci}; 473bf215546Sopenharmony_ci 474bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx10CsShShadowRange[] = { 475bf215546Sopenharmony_ci { 476bf215546Sopenharmony_ci R_00B810_COMPUTE_START_X, 477bf215546Sopenharmony_ci R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4, 478bf215546Sopenharmony_ci }, 479bf215546Sopenharmony_ci { 480bf215546Sopenharmony_ci R_00B82C_COMPUTE_PERFCOUNT_ENABLE, 481bf215546Sopenharmony_ci R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4, 482bf215546Sopenharmony_ci }, 483bf215546Sopenharmony_ci { 484bf215546Sopenharmony_ci R_00B848_COMPUTE_PGM_RSRC1, 485bf215546Sopenharmony_ci R_00B84C_COMPUTE_PGM_RSRC2 - R_00B848_COMPUTE_PGM_RSRC1 + 4, 486bf215546Sopenharmony_ci }, 487bf215546Sopenharmony_ci { 488bf215546Sopenharmony_ci R_00B854_COMPUTE_RESOURCE_LIMITS, 489bf215546Sopenharmony_ci 4, 490bf215546Sopenharmony_ci }, 491bf215546Sopenharmony_ci { 492bf215546Sopenharmony_ci R_00B860_COMPUTE_TMPRING_SIZE, 493bf215546Sopenharmony_ci 4, 494bf215546Sopenharmony_ci }, 495bf215546Sopenharmony_ci { 496bf215546Sopenharmony_ci R_00B878_COMPUTE_THREAD_TRACE_ENABLE, 497bf215546Sopenharmony_ci 4, 498bf215546Sopenharmony_ci }, 499bf215546Sopenharmony_ci { 500bf215546Sopenharmony_ci R_00B890_COMPUTE_USER_ACCUM_0, 501bf215546Sopenharmony_ci R_00B8A0_COMPUTE_PGM_RSRC3 - R_00B890_COMPUTE_USER_ACCUM_0 + 4, 502bf215546Sopenharmony_ci }, 503bf215546Sopenharmony_ci { 504bf215546Sopenharmony_ci R_00B8A8_COMPUTE_SHADER_CHKSUM, 505bf215546Sopenharmony_ci 4, 506bf215546Sopenharmony_ci }, 507bf215546Sopenharmony_ci { 508bf215546Sopenharmony_ci R_00B900_COMPUTE_USER_DATA_0, 509bf215546Sopenharmony_ci R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4, 510bf215546Sopenharmony_ci }, 511bf215546Sopenharmony_ci { 512bf215546Sopenharmony_ci R_00B9F4_COMPUTE_DISPATCH_TUNNEL, 513bf215546Sopenharmony_ci 4, 514bf215546Sopenharmony_ci }, 515bf215546Sopenharmony_ci}; 516bf215546Sopenharmony_ci 517bf215546Sopenharmony_cistatic const struct ac_reg_range Navi10NonShadowedRanges[] = { 518bf215546Sopenharmony_ci /* These are not defined in Mesa. */ 519bf215546Sopenharmony_ci /*{ 520bf215546Sopenharmony_ci VGT_DMA_PRIMITIVE_TYPE, 521bf215546Sopenharmony_ci VGT_DMA_LS_HS_CONFIG - VGT_DMA_PRIMITIVE_TYPE + 4, 522bf215546Sopenharmony_ci },*/ 523bf215546Sopenharmony_ci /* VGT_INDEX_TYPE and VGT_DMA_INDEX_TYPE are a special case and neither of these should be 524bf215546Sopenharmony_ci shadowed. */ 525bf215546Sopenharmony_ci { 526bf215546Sopenharmony_ci R_028A7C_VGT_DMA_INDEX_TYPE, 527bf215546Sopenharmony_ci 4, 528bf215546Sopenharmony_ci }, 529bf215546Sopenharmony_ci { 530bf215546Sopenharmony_ci R_03090C_VGT_INDEX_TYPE, 531bf215546Sopenharmony_ci R_03091C_VGT_STRMOUT_BUFFER_FILLED_SIZE_3 - R_03090C_VGT_INDEX_TYPE + 4, 532bf215546Sopenharmony_ci }, 533bf215546Sopenharmony_ci { 534bf215546Sopenharmony_ci R_028A88_VGT_DMA_NUM_INSTANCES, 535bf215546Sopenharmony_ci 4, 536bf215546Sopenharmony_ci }, 537bf215546Sopenharmony_ci /* RSRC{3,4}_{VS,PS,HS,GS} are not shadowed because they are set by SET_SH_REG_INDEX. */ 538bf215546Sopenharmony_ci { 539bf215546Sopenharmony_ci R_00B118_SPI_SHADER_PGM_RSRC3_VS, 540bf215546Sopenharmony_ci 4, 541bf215546Sopenharmony_ci }, 542bf215546Sopenharmony_ci { 543bf215546Sopenharmony_ci R_00B01C_SPI_SHADER_PGM_RSRC3_PS, 544bf215546Sopenharmony_ci 4, 545bf215546Sopenharmony_ci }, 546bf215546Sopenharmony_ci { 547bf215546Sopenharmony_ci R_00B41C_SPI_SHADER_PGM_RSRC3_HS, 548bf215546Sopenharmony_ci 4, 549bf215546Sopenharmony_ci }, 550bf215546Sopenharmony_ci { 551bf215546Sopenharmony_ci R_00B21C_SPI_SHADER_PGM_RSRC3_GS, 552bf215546Sopenharmony_ci 4, 553bf215546Sopenharmony_ci }, 554bf215546Sopenharmony_ci { 555bf215546Sopenharmony_ci R_00B004_SPI_SHADER_PGM_RSRC4_PS, 556bf215546Sopenharmony_ci 4, 557bf215546Sopenharmony_ci }, 558bf215546Sopenharmony_ci { 559bf215546Sopenharmony_ci R_00B104_SPI_SHADER_PGM_RSRC4_VS, 560bf215546Sopenharmony_ci 4, 561bf215546Sopenharmony_ci }, 562bf215546Sopenharmony_ci { 563bf215546Sopenharmony_ci R_00B404_SPI_SHADER_PGM_RSRC4_HS, 564bf215546Sopenharmony_ci 4, 565bf215546Sopenharmony_ci }, 566bf215546Sopenharmony_ci { 567bf215546Sopenharmony_ci R_00B204_SPI_SHADER_PGM_RSRC4_GS, 568bf215546Sopenharmony_ci 4, 569bf215546Sopenharmony_ci }, 570bf215546Sopenharmony_ci { 571bf215546Sopenharmony_ci R_00B858_COMPUTE_DESTINATION_EN_SE0, 572bf215546Sopenharmony_ci R_00B85C_COMPUTE_DESTINATION_EN_SE1 - R_00B858_COMPUTE_DESTINATION_EN_SE0 + 4, 573bf215546Sopenharmony_ci }, 574bf215546Sopenharmony_ci { 575bf215546Sopenharmony_ci R_00B864_COMPUTE_DESTINATION_EN_SE2, 576bf215546Sopenharmony_ci R_00B868_COMPUTE_DESTINATION_EN_SE3 - R_00B864_COMPUTE_DESTINATION_EN_SE2 + 4, 577bf215546Sopenharmony_ci }, 578bf215546Sopenharmony_ci { 579bf215546Sopenharmony_ci R_030800_GRBM_GFX_INDEX, 580bf215546Sopenharmony_ci 4, 581bf215546Sopenharmony_ci }, 582bf215546Sopenharmony_ci { 583bf215546Sopenharmony_ci R_030A00_PA_SU_LINE_STIPPLE_VALUE, 584bf215546Sopenharmony_ci R_030A04_PA_SC_LINE_STIPPLE_STATE - R_030A00_PA_SU_LINE_STIPPLE_VALUE + 4, 585bf215546Sopenharmony_ci }, 586bf215546Sopenharmony_ci { 587bf215546Sopenharmony_ci R_031100_SPI_CONFIG_CNTL_REMAP, 588bf215546Sopenharmony_ci 4, 589bf215546Sopenharmony_ci }, 590bf215546Sopenharmony_ci /* SQ thread trace registers are always not shadowed. */ 591bf215546Sopenharmony_ci { 592bf215546Sopenharmony_ci R_008D00_SQ_THREAD_TRACE_BUF0_BASE, 593bf215546Sopenharmony_ci R_008D38_SQ_THREAD_TRACE_HP3D_MARKER_CNTR - R_008D00_SQ_THREAD_TRACE_BUF0_BASE + 4, 594bf215546Sopenharmony_ci }, 595bf215546Sopenharmony_ci { 596bf215546Sopenharmony_ci R_030D00_SQ_THREAD_TRACE_USERDATA_0, 597bf215546Sopenharmony_ci R_030D1C_SQ_THREAD_TRACE_USERDATA_7 - R_030D00_SQ_THREAD_TRACE_USERDATA_0 + 4, 598bf215546Sopenharmony_ci }, 599bf215546Sopenharmony_ci /* Perf counter registers are always not shadowed. Most of them are in the perf 600bf215546Sopenharmony_ci * register space but some legacy registers are still outside of it. The SPM 601bf215546Sopenharmony_ci * registers are in the perf range as well. 602bf215546Sopenharmony_ci */ 603bf215546Sopenharmony_ci { 604bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_OFFSET, 605bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_SPACE_SIZE, 606bf215546Sopenharmony_ci }, 607bf215546Sopenharmony_ci /* These are not defined in Mesa. */ 608bf215546Sopenharmony_ci /*{ 609bf215546Sopenharmony_ci ATC_PERFCOUNTER0_CFG, 610bf215546Sopenharmony_ci ATC_PERFCOUNTER_HI - ATC_PERFCOUNTER0_CFG + 4, 611bf215546Sopenharmony_ci }, 612bf215546Sopenharmony_ci { 613bf215546Sopenharmony_ci RPB_PERFCOUNTER_LO, 614bf215546Sopenharmony_ci RPB_PERFCOUNTER_RSLT_CNTL - RPB_PERFCOUNTER_LO + 4, 615bf215546Sopenharmony_ci }, 616bf215546Sopenharmony_ci { 617bf215546Sopenharmony_ci SDMA0_PERFCOUNTER0_SELECT, 618bf215546Sopenharmony_ci SDMA0_PERFCOUNTER1_HI - SDMA0_PERFCOUNTER0_SELECT + 4, 619bf215546Sopenharmony_ci }, 620bf215546Sopenharmony_ci { 621bf215546Sopenharmony_ci SDMA1_PERFCOUNTER0_SELECT, 622bf215546Sopenharmony_ci SDMA1_PERFCOUNTER1_HI - SDMA1_PERFCOUNTER0_SELECT + 4, 623bf215546Sopenharmony_ci }, 624bf215546Sopenharmony_ci { 625bf215546Sopenharmony_ci GCEA_PERFCOUNTER_LO, 626bf215546Sopenharmony_ci GCEA_PERFCOUNTER_RSLT_CNTL - GCEA_PERFCOUNTER_LO + 4, 627bf215546Sopenharmony_ci }, 628bf215546Sopenharmony_ci { 629bf215546Sopenharmony_ci GUS_PERFCOUNTER_LO, 630bf215546Sopenharmony_ci GUS_PERFCOUNTER_RSLT_CNTL - GUS_PERFCOUNTER_LO + 4, 631bf215546Sopenharmony_ci },*/ 632bf215546Sopenharmony_ci}; 633bf215546Sopenharmony_ci 634bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx103ContextShadowRange[] = { 635bf215546Sopenharmony_ci { 636bf215546Sopenharmony_ci R_028000_DB_RENDER_CONTROL, 637bf215546Sopenharmony_ci R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4, 638bf215546Sopenharmony_ci }, 639bf215546Sopenharmony_ci { 640bf215546Sopenharmony_ci R_0281E8_COHER_DEST_BASE_HI_0, 641bf215546Sopenharmony_ci R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4, 642bf215546Sopenharmony_ci }, 643bf215546Sopenharmony_ci { 644bf215546Sopenharmony_ci R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 645bf215546Sopenharmony_ci R_028618_PA_CL_UCP_5_W - R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX + 4, 646bf215546Sopenharmony_ci }, 647bf215546Sopenharmony_ci { 648bf215546Sopenharmony_ci R_028644_SPI_PS_INPUT_CNTL_0, 649bf215546Sopenharmony_ci R_028714_SPI_SHADER_COL_FORMAT - R_028644_SPI_PS_INPUT_CNTL_0 + 4, 650bf215546Sopenharmony_ci }, 651bf215546Sopenharmony_ci { 652bf215546Sopenharmony_ci R_028750_SX_PS_DOWNCONVERT_CONTROL, 653bf215546Sopenharmony_ci R_02879C_CB_BLEND7_CONTROL - R_028750_SX_PS_DOWNCONVERT_CONTROL + 4, 654bf215546Sopenharmony_ci }, 655bf215546Sopenharmony_ci { 656bf215546Sopenharmony_ci R_0287D4_PA_CL_POINT_X_RAD, 657bf215546Sopenharmony_ci R_0287E0_PA_CL_POINT_CULL_RAD - R_0287D4_PA_CL_POINT_X_RAD + 4, 658bf215546Sopenharmony_ci }, 659bf215546Sopenharmony_ci { 660bf215546Sopenharmony_ci R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, 661bf215546Sopenharmony_ci R_028848_PA_CL_VRS_CNTL - R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP + 4, 662bf215546Sopenharmony_ci }, 663bf215546Sopenharmony_ci { 664bf215546Sopenharmony_ci R_028A00_PA_SU_POINT_SIZE, 665bf215546Sopenharmony_ci R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4, 666bf215546Sopenharmony_ci }, 667bf215546Sopenharmony_ci { 668bf215546Sopenharmony_ci R_028A18_VGT_HOS_MAX_TESS_LEVEL, 669bf215546Sopenharmony_ci R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4, 670bf215546Sopenharmony_ci }, 671bf215546Sopenharmony_ci { 672bf215546Sopenharmony_ci R_028A40_VGT_GS_MODE, 673bf215546Sopenharmony_ci R_028A6C_VGT_GS_OUT_PRIM_TYPE - R_028A40_VGT_GS_MODE + 4, 674bf215546Sopenharmony_ci }, 675bf215546Sopenharmony_ci { 676bf215546Sopenharmony_ci R_028A84_VGT_PRIMITIVEID_EN, 677bf215546Sopenharmony_ci 4, 678bf215546Sopenharmony_ci }, 679bf215546Sopenharmony_ci { 680bf215546Sopenharmony_ci R_028A8C_VGT_PRIMITIVEID_RESET, 681bf215546Sopenharmony_ci 4, 682bf215546Sopenharmony_ci }, 683bf215546Sopenharmony_ci { 684bf215546Sopenharmony_ci R_028A98_VGT_DRAW_PAYLOAD_CNTL, 685bf215546Sopenharmony_ci R_028B98_VGT_STRMOUT_BUFFER_CONFIG - R_028A98_VGT_DRAW_PAYLOAD_CNTL + 4, 686bf215546Sopenharmony_ci }, 687bf215546Sopenharmony_ci { 688bf215546Sopenharmony_ci R_028BD4_PA_SC_CENTROID_PRIORITY_0, 689bf215546Sopenharmony_ci R_028EFC_CB_COLOR7_ATTRIB3 - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4, 690bf215546Sopenharmony_ci }, 691bf215546Sopenharmony_ci}; 692bf215546Sopenharmony_ci 693bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx103UserConfigShadowRange[] = { 694bf215546Sopenharmony_ci { 695bf215546Sopenharmony_ci R_0300FC_CP_STRMOUT_CNTL, 696bf215546Sopenharmony_ci 4, 697bf215546Sopenharmony_ci }, 698bf215546Sopenharmony_ci { 699bf215546Sopenharmony_ci R_0301EC_CP_COHER_START_DELAY, 700bf215546Sopenharmony_ci 4, 701bf215546Sopenharmony_ci }, 702bf215546Sopenharmony_ci { 703bf215546Sopenharmony_ci R_030904_VGT_GSVS_RING_SIZE, 704bf215546Sopenharmony_ci R_030908_VGT_PRIMITIVE_TYPE - R_030904_VGT_GSVS_RING_SIZE + 4, 705bf215546Sopenharmony_ci }, 706bf215546Sopenharmony_ci { 707bf215546Sopenharmony_ci R_030964_GE_MAX_VTX_INDX, 708bf215546Sopenharmony_ci 4, 709bf215546Sopenharmony_ci }, 710bf215546Sopenharmony_ci { 711bf215546Sopenharmony_ci R_030924_GE_MIN_VTX_INDX, 712bf215546Sopenharmony_ci R_03092C_GE_MULTI_PRIM_IB_RESET_EN - R_030924_GE_MIN_VTX_INDX + 4, 713bf215546Sopenharmony_ci }, 714bf215546Sopenharmony_ci { 715bf215546Sopenharmony_ci R_030934_VGT_NUM_INSTANCES, 716bf215546Sopenharmony_ci R_030940_VGT_TF_MEMORY_BASE - R_030934_VGT_NUM_INSTANCES + 4, 717bf215546Sopenharmony_ci }, 718bf215546Sopenharmony_ci { 719bf215546Sopenharmony_ci R_03097C_GE_STEREO_CNTL, 720bf215546Sopenharmony_ci R_030984_VGT_TF_MEMORY_BASE_HI - R_03097C_GE_STEREO_CNTL + 4, 721bf215546Sopenharmony_ci }, 722bf215546Sopenharmony_ci { 723bf215546Sopenharmony_ci R_03096C_GE_CNTL, 724bf215546Sopenharmony_ci 4, 725bf215546Sopenharmony_ci }, 726bf215546Sopenharmony_ci { 727bf215546Sopenharmony_ci R_030968_VGT_INSTANCE_BASE_ID, 728bf215546Sopenharmony_ci 4, 729bf215546Sopenharmony_ci }, 730bf215546Sopenharmony_ci { 731bf215546Sopenharmony_ci R_030E00_TA_CS_BC_BASE_ADDR, 732bf215546Sopenharmony_ci R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4, 733bf215546Sopenharmony_ci }, 734bf215546Sopenharmony_ci { 735bf215546Sopenharmony_ci R_030988_GE_USER_VGPR_EN, 736bf215546Sopenharmony_ci 0x03098C - R_030988_GE_USER_VGPR_EN + 4, 737bf215546Sopenharmony_ci }, 738bf215546Sopenharmony_ci}; 739bf215546Sopenharmony_ci 740bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx103NonShadowedRanges[] = { 741bf215546Sopenharmony_ci /* These are not defined in Mesa. */ 742bf215546Sopenharmony_ci /*{ 743bf215546Sopenharmony_ci VGT_DMA_PRIMITIVE_TYPE, 744bf215546Sopenharmony_ci VGT_DMA_LS_HS_CONFIG - VGT_DMA_PRIMITIVE_TYPE + 4, 745bf215546Sopenharmony_ci },*/ 746bf215546Sopenharmony_ci /* VGT_INDEX_TYPE and VGT_DMA_INDEX_TYPE are a special case and neither of these should be 747bf215546Sopenharmony_ci shadowed. */ 748bf215546Sopenharmony_ci { 749bf215546Sopenharmony_ci R_028A7C_VGT_DMA_INDEX_TYPE, 750bf215546Sopenharmony_ci 4, 751bf215546Sopenharmony_ci }, 752bf215546Sopenharmony_ci { 753bf215546Sopenharmony_ci R_03090C_VGT_INDEX_TYPE, 754bf215546Sopenharmony_ci R_03091C_VGT_STRMOUT_BUFFER_FILLED_SIZE_3 - R_03090C_VGT_INDEX_TYPE + 4, 755bf215546Sopenharmony_ci }, 756bf215546Sopenharmony_ci { 757bf215546Sopenharmony_ci R_028A88_VGT_DMA_NUM_INSTANCES, 758bf215546Sopenharmony_ci 4, 759bf215546Sopenharmony_ci }, 760bf215546Sopenharmony_ci /* RSRC{3,4}_{VS,PS,HS,GS} are not shadowed because they are set by SET_SH_REG_INDEX. */ 761bf215546Sopenharmony_ci { 762bf215546Sopenharmony_ci R_00B118_SPI_SHADER_PGM_RSRC3_VS, 763bf215546Sopenharmony_ci 4, 764bf215546Sopenharmony_ci }, 765bf215546Sopenharmony_ci { 766bf215546Sopenharmony_ci R_00B01C_SPI_SHADER_PGM_RSRC3_PS, 767bf215546Sopenharmony_ci 4, 768bf215546Sopenharmony_ci }, 769bf215546Sopenharmony_ci { 770bf215546Sopenharmony_ci R_00B41C_SPI_SHADER_PGM_RSRC3_HS, 771bf215546Sopenharmony_ci 4, 772bf215546Sopenharmony_ci }, 773bf215546Sopenharmony_ci { 774bf215546Sopenharmony_ci R_00B21C_SPI_SHADER_PGM_RSRC3_GS, 775bf215546Sopenharmony_ci 4, 776bf215546Sopenharmony_ci }, 777bf215546Sopenharmony_ci { 778bf215546Sopenharmony_ci R_00B004_SPI_SHADER_PGM_RSRC4_PS, 779bf215546Sopenharmony_ci 4, 780bf215546Sopenharmony_ci }, 781bf215546Sopenharmony_ci { 782bf215546Sopenharmony_ci R_00B104_SPI_SHADER_PGM_RSRC4_VS, 783bf215546Sopenharmony_ci 4, 784bf215546Sopenharmony_ci }, 785bf215546Sopenharmony_ci { 786bf215546Sopenharmony_ci R_00B404_SPI_SHADER_PGM_RSRC4_HS, 787bf215546Sopenharmony_ci 4, 788bf215546Sopenharmony_ci }, 789bf215546Sopenharmony_ci { 790bf215546Sopenharmony_ci R_00B204_SPI_SHADER_PGM_RSRC4_GS, 791bf215546Sopenharmony_ci 4, 792bf215546Sopenharmony_ci }, 793bf215546Sopenharmony_ci { 794bf215546Sopenharmony_ci R_00B858_COMPUTE_DESTINATION_EN_SE0, 795bf215546Sopenharmony_ci R_00B85C_COMPUTE_DESTINATION_EN_SE1 - R_00B858_COMPUTE_DESTINATION_EN_SE0 + 4, 796bf215546Sopenharmony_ci }, 797bf215546Sopenharmony_ci { 798bf215546Sopenharmony_ci R_00B864_COMPUTE_DESTINATION_EN_SE2, 799bf215546Sopenharmony_ci R_00B868_COMPUTE_DESTINATION_EN_SE3 - R_00B864_COMPUTE_DESTINATION_EN_SE2 + 4, 800bf215546Sopenharmony_ci }, 801bf215546Sopenharmony_ci { 802bf215546Sopenharmony_ci R_030800_GRBM_GFX_INDEX, 803bf215546Sopenharmony_ci 4, 804bf215546Sopenharmony_ci }, 805bf215546Sopenharmony_ci { 806bf215546Sopenharmony_ci R_030A00_PA_SU_LINE_STIPPLE_VALUE, 807bf215546Sopenharmony_ci R_030A04_PA_SC_LINE_STIPPLE_STATE - R_030A00_PA_SU_LINE_STIPPLE_VALUE + 4, 808bf215546Sopenharmony_ci }, 809bf215546Sopenharmony_ci { 810bf215546Sopenharmony_ci R_031100_SPI_CONFIG_CNTL_REMAP, 811bf215546Sopenharmony_ci 4, 812bf215546Sopenharmony_ci }, 813bf215546Sopenharmony_ci /* SQ thread trace registers are always not shadowed. */ 814bf215546Sopenharmony_ci { 815bf215546Sopenharmony_ci R_008D00_SQ_THREAD_TRACE_BUF0_BASE, 816bf215546Sopenharmony_ci R_008D3C_SQ_THREAD_TRACE_STATUS2 - R_008D00_SQ_THREAD_TRACE_BUF0_BASE + 4, 817bf215546Sopenharmony_ci }, 818bf215546Sopenharmony_ci { 819bf215546Sopenharmony_ci R_030D00_SQ_THREAD_TRACE_USERDATA_0, 820bf215546Sopenharmony_ci R_030D1C_SQ_THREAD_TRACE_USERDATA_7 - R_030D00_SQ_THREAD_TRACE_USERDATA_0 + 4, 821bf215546Sopenharmony_ci }, 822bf215546Sopenharmony_ci /* Perf counter registers are always not shadowed. Most of them are in the perf 823bf215546Sopenharmony_ci * register space but some legacy registers are still outside of it. The SPM 824bf215546Sopenharmony_ci * registers are in the perf range as well. 825bf215546Sopenharmony_ci */ 826bf215546Sopenharmony_ci { 827bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_OFFSET, 828bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_SPACE_SIZE, 829bf215546Sopenharmony_ci }, 830bf215546Sopenharmony_ci /* These are not defined in Mesa. */ 831bf215546Sopenharmony_ci /*{ 832bf215546Sopenharmony_ci ATC_PERFCOUNTER0_CFG, 833bf215546Sopenharmony_ci ATC_PERFCOUNTER_HI - ATC_PERFCOUNTER0_CFG + 4 834bf215546Sopenharmony_ci }, 835bf215546Sopenharmony_ci { 836bf215546Sopenharmony_ci RPB_PERFCOUNTER_LO, 837bf215546Sopenharmony_ci RPB_PERFCOUNTER_RSLT_CNTL - RPB_PERFCOUNTER_LO + 4 838bf215546Sopenharmony_ci },*/ 839bf215546Sopenharmony_ci}; 840bf215546Sopenharmony_ci 841bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx11ShShadowRange[] = 842bf215546Sopenharmony_ci{ 843bf215546Sopenharmony_ci { 844bf215546Sopenharmony_ci R_00B018_SPI_SHADER_PGM_CHKSUM_PS, 845bf215546Sopenharmony_ci 4, 846bf215546Sopenharmony_ci }, 847bf215546Sopenharmony_ci { 848bf215546Sopenharmony_ci R_00B020_SPI_SHADER_PGM_LO_PS, 849bf215546Sopenharmony_ci R_00B0AC_SPI_SHADER_USER_DATA_PS_31 - R_00B020_SPI_SHADER_PGM_LO_PS + 4, 850bf215546Sopenharmony_ci }, 851bf215546Sopenharmony_ci { 852bf215546Sopenharmony_ci R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0, 853bf215546Sopenharmony_ci R_00B0D4_SPI_SHADER_USER_ACCUM_PS_3 - R_00B0C8_SPI_SHADER_USER_ACCUM_PS_0 + 4, 854bf215546Sopenharmony_ci }, 855bf215546Sopenharmony_ci { 856bf215546Sopenharmony_ci R_00B320_SPI_SHADER_PGM_LO_ES, 857bf215546Sopenharmony_ci R_00B324_SPI_SHADER_PGM_HI_ES - R_00B320_SPI_SHADER_PGM_LO_ES + 4, 858bf215546Sopenharmony_ci }, 859bf215546Sopenharmony_ci { 860bf215546Sopenharmony_ci R_00B520_SPI_SHADER_PGM_LO_LS, 861bf215546Sopenharmony_ci R_00B524_SPI_SHADER_PGM_HI_LS - R_00B520_SPI_SHADER_PGM_LO_LS + 4, 862bf215546Sopenharmony_ci }, 863bf215546Sopenharmony_ci { 864bf215546Sopenharmony_ci R_00B200_SPI_SHADER_PGM_CHKSUM_GS, 865bf215546Sopenharmony_ci 4, 866bf215546Sopenharmony_ci }, 867bf215546Sopenharmony_ci { 868bf215546Sopenharmony_ci R_00B220_SPI_SHADER_PGM_LO_GS, 869bf215546Sopenharmony_ci R_00B2AC_SPI_SHADER_USER_DATA_GS_31 - R_00B220_SPI_SHADER_PGM_LO_GS + 4, 870bf215546Sopenharmony_ci }, 871bf215546Sopenharmony_ci { 872bf215546Sopenharmony_ci R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0, 873bf215546Sopenharmony_ci R_00B2D4_SPI_SHADER_USER_ACCUM_ESGS_3 - R_00B2C8_SPI_SHADER_USER_ACCUM_ESGS_0 + 4, 874bf215546Sopenharmony_ci }, 875bf215546Sopenharmony_ci { 876bf215546Sopenharmony_ci R_00B400_SPI_SHADER_PGM_CHKSUM_HS, 877bf215546Sopenharmony_ci 4, 878bf215546Sopenharmony_ci }, 879bf215546Sopenharmony_ci { 880bf215546Sopenharmony_ci R_00B420_SPI_SHADER_PGM_LO_HS, 881bf215546Sopenharmony_ci R_00B4AC_SPI_SHADER_USER_DATA_HS_31 - R_00B420_SPI_SHADER_PGM_LO_HS + 4, 882bf215546Sopenharmony_ci }, 883bf215546Sopenharmony_ci { 884bf215546Sopenharmony_ci R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0, 885bf215546Sopenharmony_ci R_00B4D4_SPI_SHADER_USER_ACCUM_LSHS_3 - R_00B4C8_SPI_SHADER_USER_ACCUM_LSHS_0 + 4, 886bf215546Sopenharmony_ci }, 887bf215546Sopenharmony_ci { 888bf215546Sopenharmony_ci R_00B0C0_SPI_SHADER_REQ_CTRL_PS, 889bf215546Sopenharmony_ci 4, 890bf215546Sopenharmony_ci }, 891bf215546Sopenharmony_ci}; 892bf215546Sopenharmony_ci 893bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx11CsShShadowRange[] = 894bf215546Sopenharmony_ci{ 895bf215546Sopenharmony_ci { 896bf215546Sopenharmony_ci R_00B810_COMPUTE_START_X, 897bf215546Sopenharmony_ci R_00B824_COMPUTE_NUM_THREAD_Z - R_00B810_COMPUTE_START_X + 4, 898bf215546Sopenharmony_ci }, 899bf215546Sopenharmony_ci { 900bf215546Sopenharmony_ci R_00B82C_COMPUTE_PERFCOUNT_ENABLE, 901bf215546Sopenharmony_ci R_00B834_COMPUTE_PGM_HI - R_00B82C_COMPUTE_PERFCOUNT_ENABLE + 4, 902bf215546Sopenharmony_ci }, 903bf215546Sopenharmony_ci { 904bf215546Sopenharmony_ci R_00B840_COMPUTE_DISPATCH_SCRATCH_BASE_LO, 905bf215546Sopenharmony_ci R_00B84C_COMPUTE_PGM_RSRC2 - R_00B840_COMPUTE_DISPATCH_SCRATCH_BASE_LO + 4, 906bf215546Sopenharmony_ci }, 907bf215546Sopenharmony_ci { 908bf215546Sopenharmony_ci R_00B854_COMPUTE_RESOURCE_LIMITS, 909bf215546Sopenharmony_ci 4, 910bf215546Sopenharmony_ci }, 911bf215546Sopenharmony_ci { 912bf215546Sopenharmony_ci R_00B860_COMPUTE_TMPRING_SIZE, 913bf215546Sopenharmony_ci 4, 914bf215546Sopenharmony_ci }, 915bf215546Sopenharmony_ci { 916bf215546Sopenharmony_ci R_00B878_COMPUTE_THREAD_TRACE_ENABLE, 917bf215546Sopenharmony_ci 4, 918bf215546Sopenharmony_ci }, 919bf215546Sopenharmony_ci { 920bf215546Sopenharmony_ci R_00B890_COMPUTE_USER_ACCUM_0, 921bf215546Sopenharmony_ci R_00B8A0_COMPUTE_PGM_RSRC3 - R_00B890_COMPUTE_USER_ACCUM_0 + 4, 922bf215546Sopenharmony_ci }, 923bf215546Sopenharmony_ci { 924bf215546Sopenharmony_ci R_00B8A8_COMPUTE_SHADER_CHKSUM, 925bf215546Sopenharmony_ci 4, 926bf215546Sopenharmony_ci }, 927bf215546Sopenharmony_ci { 928bf215546Sopenharmony_ci R_00B8BC_COMPUTE_DISPATCH_INTERLEAVE, 929bf215546Sopenharmony_ci 4, 930bf215546Sopenharmony_ci }, 931bf215546Sopenharmony_ci { 932bf215546Sopenharmony_ci R_00B900_COMPUTE_USER_DATA_0, 933bf215546Sopenharmony_ci R_00B93C_COMPUTE_USER_DATA_15 - R_00B900_COMPUTE_USER_DATA_0 + 4, 934bf215546Sopenharmony_ci }, 935bf215546Sopenharmony_ci { 936bf215546Sopenharmony_ci R_00B9F4_COMPUTE_DISPATCH_TUNNEL, 937bf215546Sopenharmony_ci 4, 938bf215546Sopenharmony_ci }, 939bf215546Sopenharmony_ci}; 940bf215546Sopenharmony_ci 941bf215546Sopenharmony_ci/* Defines the set of ranges of context registers we shadow when mid command buffer preemption 942bf215546Sopenharmony_ci * is enabled. 943bf215546Sopenharmony_ci */ 944bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx11ContextShadowRange[] = 945bf215546Sopenharmony_ci{ 946bf215546Sopenharmony_ci { 947bf215546Sopenharmony_ci R_028000_DB_RENDER_CONTROL, 948bf215546Sopenharmony_ci R_028084_TA_BC_BASE_ADDR_HI - R_028000_DB_RENDER_CONTROL + 4, 949bf215546Sopenharmony_ci }, 950bf215546Sopenharmony_ci { 951bf215546Sopenharmony_ci R_0281E8_COHER_DEST_BASE_HI_0, 952bf215546Sopenharmony_ci R_02835C_PA_SC_TILE_STEERING_OVERRIDE - R_0281E8_COHER_DEST_BASE_HI_0 + 4, 953bf215546Sopenharmony_ci }, 954bf215546Sopenharmony_ci { 955bf215546Sopenharmony_ci R_0283D0_PA_SC_VRS_OVERRIDE_CNTL, 956bf215546Sopenharmony_ci R_0283E4_PA_SC_VRS_RATE_CACHE_CNTL - R_0283D0_PA_SC_VRS_OVERRIDE_CNTL + 4, 957bf215546Sopenharmony_ci }, 958bf215546Sopenharmony_ci { 959bf215546Sopenharmony_ci R_0283F0_PA_SC_VRS_RATE_BASE, 960bf215546Sopenharmony_ci R_0283F8_PA_SC_VRS_RATE_SIZE_XY - R_0283F0_PA_SC_VRS_RATE_BASE + 4, 961bf215546Sopenharmony_ci }, 962bf215546Sopenharmony_ci { 963bf215546Sopenharmony_ci R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 964bf215546Sopenharmony_ci R_028618_PA_CL_UCP_5_W - R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX + 4, 965bf215546Sopenharmony_ci }, 966bf215546Sopenharmony_ci { 967bf215546Sopenharmony_ci R_028644_SPI_PS_INPUT_CNTL_0, 968bf215546Sopenharmony_ci R_0286F0_SPI_GFX_SCRATCH_BASE_HI - R_028644_SPI_PS_INPUT_CNTL_0 + 4, 969bf215546Sopenharmony_ci }, 970bf215546Sopenharmony_ci { 971bf215546Sopenharmony_ci R_028708_SPI_SHADER_IDX_FORMAT, 972bf215546Sopenharmony_ci R_028714_SPI_SHADER_COL_FORMAT - R_028708_SPI_SHADER_IDX_FORMAT + 4, 973bf215546Sopenharmony_ci }, 974bf215546Sopenharmony_ci { 975bf215546Sopenharmony_ci R_028750_SX_PS_DOWNCONVERT_CONTROL, 976bf215546Sopenharmony_ci R_02879C_CB_BLEND7_CONTROL - R_028750_SX_PS_DOWNCONVERT_CONTROL + 4, 977bf215546Sopenharmony_ci }, 978bf215546Sopenharmony_ci { 979bf215546Sopenharmony_ci R_0287D4_PA_CL_POINT_X_RAD, 980bf215546Sopenharmony_ci R_0287E0_PA_CL_POINT_CULL_RAD - R_0287D4_PA_CL_POINT_X_RAD + 4, 981bf215546Sopenharmony_ci }, 982bf215546Sopenharmony_ci { 983bf215546Sopenharmony_ci R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, 984bf215546Sopenharmony_ci R_028848_PA_CL_VRS_CNTL - R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP + 4, 985bf215546Sopenharmony_ci }, 986bf215546Sopenharmony_ci { 987bf215546Sopenharmony_ci R_028A00_PA_SU_POINT_SIZE, 988bf215546Sopenharmony_ci R_028A0C_PA_SC_LINE_STIPPLE - R_028A00_PA_SU_POINT_SIZE + 4, 989bf215546Sopenharmony_ci }, 990bf215546Sopenharmony_ci { 991bf215546Sopenharmony_ci R_028A18_VGT_HOS_MAX_TESS_LEVEL, 992bf215546Sopenharmony_ci R_028A1C_VGT_HOS_MIN_TESS_LEVEL - R_028A18_VGT_HOS_MAX_TESS_LEVEL + 4, 993bf215546Sopenharmony_ci }, 994bf215546Sopenharmony_ci { 995bf215546Sopenharmony_ci R_028A48_PA_SC_MODE_CNTL_0, 996bf215546Sopenharmony_ci R_028A50_VGT_ENHANCE - R_028A48_PA_SC_MODE_CNTL_0 + 4, 997bf215546Sopenharmony_ci }, 998bf215546Sopenharmony_ci { 999bf215546Sopenharmony_ci R_028A84_VGT_PRIMITIVEID_EN, 1000bf215546Sopenharmony_ci 4, 1001bf215546Sopenharmony_ci }, 1002bf215546Sopenharmony_ci { 1003bf215546Sopenharmony_ci R_028A8C_VGT_PRIMITIVEID_RESET, 1004bf215546Sopenharmony_ci 4, 1005bf215546Sopenharmony_ci }, 1006bf215546Sopenharmony_ci { 1007bf215546Sopenharmony_ci R_028A98_VGT_DRAW_PAYLOAD_CNTL, 1008bf215546Sopenharmony_ci 4, 1009bf215546Sopenharmony_ci }, 1010bf215546Sopenharmony_ci { 1011bf215546Sopenharmony_ci R_028AAC_VGT_ESGS_RING_ITEMSIZE, 1012bf215546Sopenharmony_ci R_028AC4_DB_SRESULTS_COMPARE_STATE1 - R_028AAC_VGT_ESGS_RING_ITEMSIZE + 4, 1013bf215546Sopenharmony_ci }, 1014bf215546Sopenharmony_ci { 1015bf215546Sopenharmony_ci R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 1016bf215546Sopenharmony_ci R_028B38_VGT_GS_MAX_VERT_OUT - R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET + 4, 1017bf215546Sopenharmony_ci }, 1018bf215546Sopenharmony_ci { 1019bf215546Sopenharmony_ci R_028B4C_GE_NGG_SUBGRP_CNTL, 1020bf215546Sopenharmony_ci R_028B58_VGT_LS_HS_CONFIG - R_028B4C_GE_NGG_SUBGRP_CNTL + 4, 1021bf215546Sopenharmony_ci }, 1022bf215546Sopenharmony_ci { 1023bf215546Sopenharmony_ci R_028B6C_VGT_TF_PARAM, 1024bf215546Sopenharmony_ci R_028B90_VGT_GS_INSTANCE_CNT - R_028B6C_VGT_TF_PARAM + 4, 1025bf215546Sopenharmony_ci }, 1026bf215546Sopenharmony_ci { 1027bf215546Sopenharmony_ci R_028BD4_PA_SC_CENTROID_PRIORITY_0, 1028bf215546Sopenharmony_ci R_028C54_PA_SC_BINNER_CNTL_2 - R_028BD4_PA_SC_CENTROID_PRIORITY_0 + 4, 1029bf215546Sopenharmony_ci }, 1030bf215546Sopenharmony_ci { 1031bf215546Sopenharmony_ci R_028C60_CB_COLOR0_BASE, 1032bf215546Sopenharmony_ci 4, 1033bf215546Sopenharmony_ci }, 1034bf215546Sopenharmony_ci { 1035bf215546Sopenharmony_ci R_028C6C_CB_COLOR0_VIEW, 1036bf215546Sopenharmony_ci R_028C78_CB_COLOR0_FDCC_CONTROL - R_028C6C_CB_COLOR0_VIEW + 4, 1037bf215546Sopenharmony_ci }, 1038bf215546Sopenharmony_ci { 1039bf215546Sopenharmony_ci R_028C94_CB_COLOR0_DCC_BASE, 1040bf215546Sopenharmony_ci R_028C9C_CB_COLOR1_BASE - R_028C94_CB_COLOR0_DCC_BASE + 4, 1041bf215546Sopenharmony_ci }, 1042bf215546Sopenharmony_ci { 1043bf215546Sopenharmony_ci R_028CA8_CB_COLOR1_VIEW, 1044bf215546Sopenharmony_ci R_028CB4_CB_COLOR1_FDCC_CONTROL - R_028CA8_CB_COLOR1_VIEW + 4, 1045bf215546Sopenharmony_ci }, 1046bf215546Sopenharmony_ci { 1047bf215546Sopenharmony_ci R_028CD0_CB_COLOR1_DCC_BASE, 1048bf215546Sopenharmony_ci R_028CD8_CB_COLOR2_BASE - R_028CD0_CB_COLOR1_DCC_BASE + 4, 1049bf215546Sopenharmony_ci }, 1050bf215546Sopenharmony_ci { 1051bf215546Sopenharmony_ci R_028CE4_CB_COLOR2_VIEW, 1052bf215546Sopenharmony_ci R_028CF0_CB_COLOR2_FDCC_CONTROL - R_028CE4_CB_COLOR2_VIEW + 4, 1053bf215546Sopenharmony_ci }, 1054bf215546Sopenharmony_ci { 1055bf215546Sopenharmony_ci R_028D0C_CB_COLOR2_DCC_BASE, 1056bf215546Sopenharmony_ci R_028D14_CB_COLOR3_BASE - R_028D0C_CB_COLOR2_DCC_BASE + 4, 1057bf215546Sopenharmony_ci }, 1058bf215546Sopenharmony_ci { 1059bf215546Sopenharmony_ci R_028D20_CB_COLOR3_VIEW, 1060bf215546Sopenharmony_ci R_028D2C_CB_COLOR3_FDCC_CONTROL - R_028D20_CB_COLOR3_VIEW + 4, 1061bf215546Sopenharmony_ci }, 1062bf215546Sopenharmony_ci { 1063bf215546Sopenharmony_ci R_028D48_CB_COLOR3_DCC_BASE, 1064bf215546Sopenharmony_ci R_028D50_CB_COLOR4_BASE - R_028D48_CB_COLOR3_DCC_BASE + 4, 1065bf215546Sopenharmony_ci }, 1066bf215546Sopenharmony_ci { 1067bf215546Sopenharmony_ci R_028D5C_CB_COLOR4_VIEW, 1068bf215546Sopenharmony_ci R_028D68_CB_COLOR4_FDCC_CONTROL - R_028D5C_CB_COLOR4_VIEW + 4, 1069bf215546Sopenharmony_ci }, 1070bf215546Sopenharmony_ci { 1071bf215546Sopenharmony_ci R_028D84_CB_COLOR4_DCC_BASE, 1072bf215546Sopenharmony_ci R_028D8C_CB_COLOR5_BASE - R_028D84_CB_COLOR4_DCC_BASE + 4, 1073bf215546Sopenharmony_ci }, 1074bf215546Sopenharmony_ci { 1075bf215546Sopenharmony_ci R_028D98_CB_COLOR5_VIEW, 1076bf215546Sopenharmony_ci R_028DA4_CB_COLOR5_FDCC_CONTROL - R_028D98_CB_COLOR5_VIEW + 4, 1077bf215546Sopenharmony_ci }, 1078bf215546Sopenharmony_ci { 1079bf215546Sopenharmony_ci R_028DC0_CB_COLOR5_DCC_BASE, 1080bf215546Sopenharmony_ci R_028DC8_CB_COLOR6_BASE - R_028DC0_CB_COLOR5_DCC_BASE + 4, 1081bf215546Sopenharmony_ci }, 1082bf215546Sopenharmony_ci { 1083bf215546Sopenharmony_ci R_028DD4_CB_COLOR6_VIEW, 1084bf215546Sopenharmony_ci R_028DE0_CB_COLOR6_FDCC_CONTROL - R_028DD4_CB_COLOR6_VIEW + 4, 1085bf215546Sopenharmony_ci }, 1086bf215546Sopenharmony_ci { 1087bf215546Sopenharmony_ci R_028DFC_CB_COLOR6_DCC_BASE, 1088bf215546Sopenharmony_ci R_028E04_CB_COLOR7_BASE - R_028DFC_CB_COLOR6_DCC_BASE + 4, 1089bf215546Sopenharmony_ci }, 1090bf215546Sopenharmony_ci { 1091bf215546Sopenharmony_ci R_028E10_CB_COLOR7_VIEW, 1092bf215546Sopenharmony_ci R_028E1C_CB_COLOR7_FDCC_CONTROL - R_028E10_CB_COLOR7_VIEW + 4, 1093bf215546Sopenharmony_ci }, 1094bf215546Sopenharmony_ci { 1095bf215546Sopenharmony_ci R_028E38_CB_COLOR7_DCC_BASE, 1096bf215546Sopenharmony_ci R_028E5C_CB_COLOR7_BASE_EXT - R_028E38_CB_COLOR7_DCC_BASE + 4, 1097bf215546Sopenharmony_ci }, 1098bf215546Sopenharmony_ci { 1099bf215546Sopenharmony_ci R_028EA0_CB_COLOR0_DCC_BASE_EXT, 1100bf215546Sopenharmony_ci R_028EFC_CB_COLOR7_ATTRIB3 - R_028EA0_CB_COLOR0_DCC_BASE_EXT + 4, 1101bf215546Sopenharmony_ci }, 1102bf215546Sopenharmony_ci}; 1103bf215546Sopenharmony_ci 1104bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx11UserConfigShadowRange[] = 1105bf215546Sopenharmony_ci{ 1106bf215546Sopenharmony_ci { 1107bf215546Sopenharmony_ci R_030908_VGT_PRIMITIVE_TYPE, 1108bf215546Sopenharmony_ci 4, 1109bf215546Sopenharmony_ci }, 1110bf215546Sopenharmony_ci { 1111bf215546Sopenharmony_ci R_030998_VGT_GS_OUT_PRIM_TYPE, 1112bf215546Sopenharmony_ci 4, 1113bf215546Sopenharmony_ci }, 1114bf215546Sopenharmony_ci { 1115bf215546Sopenharmony_ci R_030964_GE_MAX_VTX_INDX, 1116bf215546Sopenharmony_ci 4, 1117bf215546Sopenharmony_ci }, 1118bf215546Sopenharmony_ci { 1119bf215546Sopenharmony_ci R_030924_GE_MIN_VTX_INDX, 1120bf215546Sopenharmony_ci R_03092C_GE_MULTI_PRIM_IB_RESET_EN - R_030924_GE_MIN_VTX_INDX + 4, 1121bf215546Sopenharmony_ci }, 1122bf215546Sopenharmony_ci { 1123bf215546Sopenharmony_ci R_008974_VGT_NUM_INSTANCES, 1124bf215546Sopenharmony_ci R_030940_VGT_TF_MEMORY_BASE - R_008974_VGT_NUM_INSTANCES + 4, 1125bf215546Sopenharmony_ci }, 1126bf215546Sopenharmony_ci { 1127bf215546Sopenharmony_ci R_03097C_GE_STEREO_CNTL, 1128bf215546Sopenharmony_ci R_030984_VGT_TF_MEMORY_BASE_HI - R_03097C_GE_STEREO_CNTL + 4, 1129bf215546Sopenharmony_ci }, 1130bf215546Sopenharmony_ci { 1131bf215546Sopenharmony_ci R_03096C_GE_CNTL, 1132bf215546Sopenharmony_ci 4, 1133bf215546Sopenharmony_ci }, 1134bf215546Sopenharmony_ci { 1135bf215546Sopenharmony_ci R_030968_VGT_INSTANCE_BASE_ID, 1136bf215546Sopenharmony_ci 4, 1137bf215546Sopenharmony_ci }, 1138bf215546Sopenharmony_ci { 1139bf215546Sopenharmony_ci R_030E00_TA_CS_BC_BASE_ADDR, 1140bf215546Sopenharmony_ci R_030E04_TA_CS_BC_BASE_ADDR_HI - R_030E00_TA_CS_BC_BASE_ADDR + 4, 1141bf215546Sopenharmony_ci }, 1142bf215546Sopenharmony_ci { 1143bf215546Sopenharmony_ci R_030988_GE_USER_VGPR_EN, 1144bf215546Sopenharmony_ci R_03098C_GE_VRS_RATE - R_030988_GE_USER_VGPR_EN + 4, 1145bf215546Sopenharmony_ci }, 1146bf215546Sopenharmony_ci { 1147bf215546Sopenharmony_ci R_031110_SPI_GS_THROTTLE_CNTL1, 1148bf215546Sopenharmony_ci R_03111C_SPI_ATTRIBUTE_RING_SIZE - R_031110_SPI_GS_THROTTLE_CNTL1 + 4, 1149bf215546Sopenharmony_ci }, 1150bf215546Sopenharmony_ci}; 1151bf215546Sopenharmony_ci 1152bf215546Sopenharmony_ci/* Defines the set of ranges of registers which cannot be shadowed for various reasons. */ 1153bf215546Sopenharmony_cistatic const struct ac_reg_range Gfx11NonShadowedRanges[] = 1154bf215546Sopenharmony_ci{ 1155bf215546Sopenharmony_ci 1156bf215546Sopenharmony_ci /* VGT_INDEX_TYPE and VGT_DMA_INDEX_TYPE are a special case and neither of these should 1157bf215546Sopenharmony_ci * be shadowed. 1158bf215546Sopenharmony_ci */ 1159bf215546Sopenharmony_ci { 1160bf215546Sopenharmony_ci R_028A7C_VGT_DMA_INDEX_TYPE, 1161bf215546Sopenharmony_ci 4, 1162bf215546Sopenharmony_ci }, 1163bf215546Sopenharmony_ci { 1164bf215546Sopenharmony_ci R_03090C_VGT_INDEX_TYPE, 1165bf215546Sopenharmony_ci 4, 1166bf215546Sopenharmony_ci }, 1167bf215546Sopenharmony_ci { 1168bf215546Sopenharmony_ci R_028A88_VGT_DMA_NUM_INSTANCES, 1169bf215546Sopenharmony_ci 4, 1170bf215546Sopenharmony_ci }, 1171bf215546Sopenharmony_ci { 1172bf215546Sopenharmony_ci R_00B01C_SPI_SHADER_PGM_RSRC3_PS, 1173bf215546Sopenharmony_ci 4, 1174bf215546Sopenharmony_ci }, 1175bf215546Sopenharmony_ci { 1176bf215546Sopenharmony_ci R_00B004_SPI_SHADER_PGM_RSRC4_PS, 1177bf215546Sopenharmony_ci 4, 1178bf215546Sopenharmony_ci }, 1179bf215546Sopenharmony_ci { 1180bf215546Sopenharmony_ci R_00B404_SPI_SHADER_PGM_RSRC4_HS, 1181bf215546Sopenharmony_ci 4, 1182bf215546Sopenharmony_ci }, 1183bf215546Sopenharmony_ci { 1184bf215546Sopenharmony_ci R_00B204_SPI_SHADER_PGM_RSRC4_GS, 1185bf215546Sopenharmony_ci 4, 1186bf215546Sopenharmony_ci }, 1187bf215546Sopenharmony_ci { 1188bf215546Sopenharmony_ci R_00B858_COMPUTE_STATIC_THREAD_MGMT_SE0, 1189bf215546Sopenharmony_ci R_00B85C_COMPUTE_STATIC_THREAD_MGMT_SE1 - R_00B858_COMPUTE_STATIC_THREAD_MGMT_SE0 + 4, 1190bf215546Sopenharmony_ci }, 1191bf215546Sopenharmony_ci { 1192bf215546Sopenharmony_ci R_00B864_COMPUTE_STATIC_THREAD_MGMT_SE2, 1193bf215546Sopenharmony_ci R_00B868_COMPUTE_STATIC_THREAD_MGMT_SE3 - R_00B864_COMPUTE_STATIC_THREAD_MGMT_SE2 + 4, 1194bf215546Sopenharmony_ci }, 1195bf215546Sopenharmony_ci { 1196bf215546Sopenharmony_ci R_030800_GRBM_GFX_INDEX, 1197bf215546Sopenharmony_ci 4, 1198bf215546Sopenharmony_ci }, 1199bf215546Sopenharmony_ci { 1200bf215546Sopenharmony_ci R_030A00_PA_SU_LINE_STIPPLE_VALUE, 1201bf215546Sopenharmony_ci R_030A04_PA_SC_LINE_STIPPLE_STATE - R_030A00_PA_SU_LINE_STIPPLE_VALUE + 4, 1202bf215546Sopenharmony_ci }, 1203bf215546Sopenharmony_ci /* SQ thread trace registers are always not shadowed. */ 1204bf215546Sopenharmony_ci { 1205bf215546Sopenharmony_ci R_0367A0_SQ_THREAD_TRACE_BUF0_BASE, 1206bf215546Sopenharmony_ci R_0367D4_SQ_THREAD_TRACE_STATUS2 - R_0367A0_SQ_THREAD_TRACE_BUF0_BASE + 4, 1207bf215546Sopenharmony_ci }, 1208bf215546Sopenharmony_ci { 1209bf215546Sopenharmony_ci R_030D00_SQ_THREAD_TRACE_USERDATA_0, 1210bf215546Sopenharmony_ci R_030D1C_SQ_THREAD_TRACE_USERDATA_7 - R_030D00_SQ_THREAD_TRACE_USERDATA_0 + 4, 1211bf215546Sopenharmony_ci }, 1212bf215546Sopenharmony_ci /* Perf counter registers are always not shadowed. Most of them are in the perf register 1213bf215546Sopenharmony_ci * space, but some legacy registers are still outside of it. The SPM registers are 1214bf215546Sopenharmony_ci * in the perf range as well. 1215bf215546Sopenharmony_ci */ 1216bf215546Sopenharmony_ci { 1217bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_OFFSET, 1218bf215546Sopenharmony_ci SI_UCONFIG_PERF_REG_SPACE_SIZE, 1219bf215546Sopenharmony_ci }, 1220bf215546Sopenharmony_ci /* These aren't defined in Mesa. */ 1221bf215546Sopenharmony_ci /*{ 1222bf215546Sopenharmony_ci RPB_PERFCOUNTER_LO, 1223bf215546Sopenharmony_ci RPB_PERFCOUNTER_RSLT_CNTL - RPB_PERFCOUNTER_LO + 4, 1224bf215546Sopenharmony_ci },*/ 1225bf215546Sopenharmony_ci { 1226bf215546Sopenharmony_ci R_037890_SDMA0_PERFCOUNTER0_SELECT, 1227bf215546Sopenharmony_ci R_03789C_SDMA0_PERFCOUNTER1_SELECT1 - R_037890_SDMA0_PERFCOUNTER0_SELECT + 4, 1228bf215546Sopenharmony_ci }, 1229bf215546Sopenharmony_ci { 1230bf215546Sopenharmony_ci R_0378C0_SDMA1_PERFCOUNTER0_SELECT, 1231bf215546Sopenharmony_ci R_0378CC_SDMA1_PERFCOUNTER1_SELECT1 - R_0378C0_SDMA1_PERFCOUNTER0_SELECT + 4, 1232bf215546Sopenharmony_ci }, 1233bf215546Sopenharmony_ci { 1234bf215546Sopenharmony_ci R_0359B0_SDMA1_PERFCNT_PERFCOUNTER_LO, 1235bf215546Sopenharmony_ci R_0359C4_SDMA1_PERFCOUNTER1_HI - R_0359B0_SDMA1_PERFCNT_PERFCOUNTER_LO + 4, 1236bf215546Sopenharmony_ci }, 1237bf215546Sopenharmony_ci { 1238bf215546Sopenharmony_ci R_035980_SDMA0_PERFCNT_PERFCOUNTER_LO, 1239bf215546Sopenharmony_ci R_035994_SDMA0_PERFCOUNTER1_HI - R_035980_SDMA0_PERFCNT_PERFCOUNTER_LO + 4, 1240bf215546Sopenharmony_ci }, 1241bf215546Sopenharmony_ci}; 1242bf215546Sopenharmony_ci 1243bf215546Sopenharmony_civoid ac_get_reg_ranges(enum amd_gfx_level gfx_level, enum radeon_family family, 1244bf215546Sopenharmony_ci enum ac_reg_range_type type, unsigned *num_ranges, 1245bf215546Sopenharmony_ci const struct ac_reg_range **ranges) 1246bf215546Sopenharmony_ci{ 1247bf215546Sopenharmony_ci#define RETURN(array) \ 1248bf215546Sopenharmony_ci do { \ 1249bf215546Sopenharmony_ci *ranges = array; \ 1250bf215546Sopenharmony_ci *num_ranges = ARRAY_SIZE(array); \ 1251bf215546Sopenharmony_ci } while (0) 1252bf215546Sopenharmony_ci 1253bf215546Sopenharmony_ci *num_ranges = 0; 1254bf215546Sopenharmony_ci *ranges = NULL; 1255bf215546Sopenharmony_ci 1256bf215546Sopenharmony_ci switch (type) { 1257bf215546Sopenharmony_ci case SI_REG_RANGE_UCONFIG: 1258bf215546Sopenharmony_ci if (gfx_level == GFX11) 1259bf215546Sopenharmony_ci RETURN(Gfx11UserConfigShadowRange); 1260bf215546Sopenharmony_ci else if (gfx_level == GFX10_3) 1261bf215546Sopenharmony_ci RETURN(Gfx103UserConfigShadowRange); 1262bf215546Sopenharmony_ci else if (gfx_level == GFX10) 1263bf215546Sopenharmony_ci RETURN(Nv10UserConfigShadowRange); 1264bf215546Sopenharmony_ci else if (gfx_level == GFX9) 1265bf215546Sopenharmony_ci RETURN(Gfx9UserConfigShadowRange); 1266bf215546Sopenharmony_ci break; 1267bf215546Sopenharmony_ci case SI_REG_RANGE_CONTEXT: 1268bf215546Sopenharmony_ci if (gfx_level == GFX11) 1269bf215546Sopenharmony_ci RETURN(Gfx11ContextShadowRange); 1270bf215546Sopenharmony_ci else if (gfx_level == GFX10_3) 1271bf215546Sopenharmony_ci RETURN(Gfx103ContextShadowRange); 1272bf215546Sopenharmony_ci else if (gfx_level == GFX10) 1273bf215546Sopenharmony_ci RETURN(Nv10ContextShadowRange); 1274bf215546Sopenharmony_ci else if (gfx_level == GFX9) 1275bf215546Sopenharmony_ci RETURN(Gfx9ContextShadowRange); 1276bf215546Sopenharmony_ci break; 1277bf215546Sopenharmony_ci case SI_REG_RANGE_SH: 1278bf215546Sopenharmony_ci if (gfx_level == GFX11) 1279bf215546Sopenharmony_ci RETURN(Gfx11ShShadowRange); 1280bf215546Sopenharmony_ci else if (gfx_level == GFX10_3 || gfx_level == GFX10) 1281bf215546Sopenharmony_ci RETURN(Gfx10ShShadowRange); 1282bf215546Sopenharmony_ci else if (family == CHIP_RAVEN2 || family == CHIP_RENOIR) 1283bf215546Sopenharmony_ci RETURN(Gfx9ShShadowRangeRaven2); 1284bf215546Sopenharmony_ci else if (gfx_level == GFX9) 1285bf215546Sopenharmony_ci RETURN(Gfx9ShShadowRange); 1286bf215546Sopenharmony_ci break; 1287bf215546Sopenharmony_ci case SI_REG_RANGE_CS_SH: 1288bf215546Sopenharmony_ci if (gfx_level == GFX11) 1289bf215546Sopenharmony_ci RETURN(Gfx11CsShShadowRange); 1290bf215546Sopenharmony_ci else if (gfx_level == GFX10_3 || gfx_level == GFX10) 1291bf215546Sopenharmony_ci RETURN(Gfx10CsShShadowRange); 1292bf215546Sopenharmony_ci else if (family == CHIP_RAVEN2 || family == CHIP_RENOIR) 1293bf215546Sopenharmony_ci RETURN(Gfx9CsShShadowRangeRaven2); 1294bf215546Sopenharmony_ci else if (gfx_level == GFX9) 1295bf215546Sopenharmony_ci RETURN(Gfx9CsShShadowRange); 1296bf215546Sopenharmony_ci break; 1297bf215546Sopenharmony_ci case SI_REG_RANGE_NON_SHADOWED: 1298bf215546Sopenharmony_ci if (gfx_level == GFX11) 1299bf215546Sopenharmony_ci RETURN(Gfx11NonShadowedRanges); 1300bf215546Sopenharmony_ci else if (gfx_level == GFX10_3) 1301bf215546Sopenharmony_ci RETURN(Gfx103NonShadowedRanges); 1302bf215546Sopenharmony_ci else if (gfx_level == GFX10) 1303bf215546Sopenharmony_ci RETURN(Navi10NonShadowedRanges); 1304bf215546Sopenharmony_ci else 1305bf215546Sopenharmony_ci assert(0); 1306bf215546Sopenharmony_ci break; 1307bf215546Sopenharmony_ci default: 1308bf215546Sopenharmony_ci break; 1309bf215546Sopenharmony_ci } 1310bf215546Sopenharmony_ci} 1311bf215546Sopenharmony_ci 1312bf215546Sopenharmony_ci/** 1313bf215546Sopenharmony_ci * Emulate CLEAR_STATE. 1314bf215546Sopenharmony_ci */ 1315bf215546Sopenharmony_cistatic void gfx9_emulate_clear_state(struct radeon_cmdbuf *cs, 1316bf215546Sopenharmony_ci set_context_reg_seq_array_fn set_context_reg_seq_array) 1317bf215546Sopenharmony_ci{ 1318bf215546Sopenharmony_ci static const uint32_t DbRenderControlGfx9[] = { 1319bf215546Sopenharmony_ci 0x0, // DB_RENDER_CONTROL 1320bf215546Sopenharmony_ci 0x0, // DB_COUNT_CONTROL 1321bf215546Sopenharmony_ci 0x0, // DB_DEPTH_VIEW 1322bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE 1323bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE2 1324bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE 1325bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE_HI 1326bf215546Sopenharmony_ci 0x0, // DB_DEPTH_SIZE 1327bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MIN 1328bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MAX 1329bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CLEAR 1330bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CLEAR 1331bf215546Sopenharmony_ci 0x0, // PA_SC_SCREEN_SCISSOR_TL 1332bf215546Sopenharmony_ci 0x40004000, // PA_SC_SCREEN_SCISSOR_BR 1333bf215546Sopenharmony_ci 0x0, // DB_Z_INFO 1334bf215546Sopenharmony_ci 0x0, // DB_STENCIL_INFO 1335bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE 1336bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE_HI 1337bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE 1338bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE_HI 1339bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE 1340bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE_HI 1341bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE 1342bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE_HI 1343bf215546Sopenharmony_ci 0x0, // DB_DFSM_CONTROL 1344bf215546Sopenharmony_ci 0x0, // 1345bf215546Sopenharmony_ci 0x0, // DB_Z_INFO2 1346bf215546Sopenharmony_ci 0x0, // DB_STENCIL_INFO2 1347bf215546Sopenharmony_ci 0x0, // 1348bf215546Sopenharmony_ci 0x0, // 1349bf215546Sopenharmony_ci 0x0, // 1350bf215546Sopenharmony_ci 0x0, // 1351bf215546Sopenharmony_ci 0x0, // TA_BC_BASE_ADDR 1352bf215546Sopenharmony_ci 0x0 // TA_BC_BASE_ADDR_HI 1353bf215546Sopenharmony_ci }; 1354bf215546Sopenharmony_ci static const uint32_t CoherDestBaseHi0Gfx9[] = { 1355bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_0 1356bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_1 1357bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_2 1358bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_3 1359bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_2 1360bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_3 1361bf215546Sopenharmony_ci 0x0, // PA_SC_WINDOW_OFFSET 1362bf215546Sopenharmony_ci 0x80000000, // PA_SC_WINDOW_SCISSOR_TL 1363bf215546Sopenharmony_ci 0x40004000, // PA_SC_WINDOW_SCISSOR_BR 1364bf215546Sopenharmony_ci 0xffff, // PA_SC_CLIPRECT_RULE 1365bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_0_TL 1366bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_0_BR 1367bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_1_TL 1368bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_1_BR 1369bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_2_TL 1370bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_2_BR 1371bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_3_TL 1372bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_3_BR 1373bf215546Sopenharmony_ci 0xaa99aaaa, // PA_SC_EDGERULE 1374bf215546Sopenharmony_ci 0x0, // PA_SU_HARDWARE_SCREEN_OFFSET 1375bf215546Sopenharmony_ci 0xffffffff, // CB_TARGET_MASK 1376bf215546Sopenharmony_ci 0xffffffff, // CB_SHADER_MASK 1377bf215546Sopenharmony_ci 0x80000000, // PA_SC_GENERIC_SCISSOR_TL 1378bf215546Sopenharmony_ci 0x40004000, // PA_SC_GENERIC_SCISSOR_BR 1379bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_0 1380bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_1 1381bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_0_TL 1382bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_0_BR 1383bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_1_TL 1384bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_1_BR 1385bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_2_TL 1386bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_2_BR 1387bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_3_TL 1388bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_3_BR 1389bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_4_TL 1390bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_4_BR 1391bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_5_TL 1392bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_5_BR 1393bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_6_TL 1394bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_6_BR 1395bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_7_TL 1396bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_7_BR 1397bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_8_TL 1398bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_8_BR 1399bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_9_TL 1400bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_9_BR 1401bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_10_TL 1402bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_10_BR 1403bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_11_TL 1404bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_11_BR 1405bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_12_TL 1406bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_12_BR 1407bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_13_TL 1408bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_13_BR 1409bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_14_TL 1410bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_14_BR 1411bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_15_TL 1412bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_15_BR 1413bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_0 1414bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_0 1415bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_1 1416bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_1 1417bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_2 1418bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_2 1419bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_3 1420bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_3 1421bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_4 1422bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_4 1423bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_5 1424bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_5 1425bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_6 1426bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_6 1427bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_7 1428bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_7 1429bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_8 1430bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_8 1431bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_9 1432bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_9 1433bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_10 1434bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_10 1435bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_11 1436bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_11 1437bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_12 1438bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_12 1439bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_13 1440bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_13 1441bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_14 1442bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_14 1443bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_15 1444bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_15 1445bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG 1446bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG_1 1447bf215546Sopenharmony_ci 0x0, // 1448bf215546Sopenharmony_ci 0x0 // PA_SC_TILE_STEERING_OVERRIDE 1449bf215546Sopenharmony_ci }; 1450bf215546Sopenharmony_ci static const uint32_t VgtMultiPrimIbResetIndxGfx9[] = { 1451bf215546Sopenharmony_ci 0x0 // VGT_MULTI_PRIM_IB_RESET_INDX 1452bf215546Sopenharmony_ci }; 1453bf215546Sopenharmony_ci static const uint32_t CbBlendRedGfx9[] = { 1454bf215546Sopenharmony_ci 0x0, // CB_BLEND_RED 1455bf215546Sopenharmony_ci 0x0, // CB_BLEND_GREEN 1456bf215546Sopenharmony_ci 0x0, // CB_BLEND_BLUE 1457bf215546Sopenharmony_ci 0x0, // CB_BLEND_ALPHA 1458bf215546Sopenharmony_ci 0x0, // CB_DCC_CONTROL 1459bf215546Sopenharmony_ci 0x0, // 1460bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CONTROL 1461bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK 1462bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK_BF 1463bf215546Sopenharmony_ci 0x0, // 1464bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE 1465bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET 1466bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE 1467bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET 1468bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE 1469bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET 1470bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_1 1471bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_1 1472bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_1 1473bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_1 1474bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_1 1475bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_1 1476bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_2 1477bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_2 1478bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_2 1479bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_2 1480bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_2 1481bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_2 1482bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_3 1483bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_3 1484bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_3 1485bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_3 1486bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_3 1487bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_3 1488bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_4 1489bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_4 1490bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_4 1491bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_4 1492bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_4 1493bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_4 1494bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_5 1495bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_5 1496bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_5 1497bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_5 1498bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_5 1499bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_5 1500bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_6 1501bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_6 1502bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_6 1503bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_6 1504bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_6 1505bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_6 1506bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_7 1507bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_7 1508bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_7 1509bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_7 1510bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_7 1511bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_7 1512bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_8 1513bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_8 1514bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_8 1515bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_8 1516bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_8 1517bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_8 1518bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_9 1519bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_9 1520bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_9 1521bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_9 1522bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_9 1523bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_9 1524bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_10 1525bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_10 1526bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_10 1527bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_10 1528bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_10 1529bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_10 1530bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_11 1531bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_11 1532bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_11 1533bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_11 1534bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_11 1535bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_11 1536bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_12 1537bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_12 1538bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_12 1539bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_12 1540bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_12 1541bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_12 1542bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_13 1543bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_13 1544bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_13 1545bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_13 1546bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_13 1547bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_13 1548bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_14 1549bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_14 1550bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_14 1551bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_14 1552bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_14 1553bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_14 1554bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_15 1555bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_15 1556bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_15 1557bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_15 1558bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_15 1559bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_15 1560bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_X 1561bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Y 1562bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Z 1563bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_W 1564bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_X 1565bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Y 1566bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Z 1567bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_W 1568bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_X 1569bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Y 1570bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Z 1571bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_W 1572bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_X 1573bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Y 1574bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Z 1575bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_W 1576bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_X 1577bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Y 1578bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Z 1579bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_W 1580bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_X 1581bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Y 1582bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Z 1583bf215546Sopenharmony_ci 0x0 // PA_CL_UCP_5_W 1584bf215546Sopenharmony_ci }; 1585bf215546Sopenharmony_ci static const uint32_t SpiPsInputCntl0Gfx9[] = { 1586bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_0 1587bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_1 1588bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_2 1589bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_3 1590bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_4 1591bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_5 1592bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_6 1593bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_7 1594bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_8 1595bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_9 1596bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_10 1597bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_11 1598bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_12 1599bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_13 1600bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_14 1601bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_15 1602bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_16 1603bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_17 1604bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_18 1605bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_19 1606bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_20 1607bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_21 1608bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_22 1609bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_23 1610bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_24 1611bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_25 1612bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_26 1613bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_27 1614bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_28 1615bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_29 1616bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_30 1617bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_31 1618bf215546Sopenharmony_ci 0x0, // SPI_VS_OUT_CONFIG 1619bf215546Sopenharmony_ci 0x0, // 1620bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ENA 1621bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ADDR 1622bf215546Sopenharmony_ci 0x0, // SPI_INTERP_CONTROL_0 1623bf215546Sopenharmony_ci 0x2, // SPI_PS_IN_CONTROL 1624bf215546Sopenharmony_ci 0x0, // 1625bf215546Sopenharmony_ci 0x0, // SPI_BARYC_CNTL 1626bf215546Sopenharmony_ci 0x0, // 1627bf215546Sopenharmony_ci 0x0, // SPI_TMPRING_SIZE 1628bf215546Sopenharmony_ci 0x0, // 1629bf215546Sopenharmony_ci 0x0, // 1630bf215546Sopenharmony_ci 0x0, // 1631bf215546Sopenharmony_ci 0x0, // 1632bf215546Sopenharmony_ci 0x0, // 1633bf215546Sopenharmony_ci 0x0, // 1634bf215546Sopenharmony_ci 0x0, // 1635bf215546Sopenharmony_ci 0x0, // 1636bf215546Sopenharmony_ci 0x0, // SPI_SHADER_POS_FORMAT 1637bf215546Sopenharmony_ci 0x0, // SPI_SHADER_Z_FORMAT 1638bf215546Sopenharmony_ci 0x0 // SPI_SHADER_COL_FORMAT 1639bf215546Sopenharmony_ci }; 1640bf215546Sopenharmony_ci static const uint32_t SxPsDownconvertGfx9[] = { 1641bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT 1642bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_EPSILON 1643bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_CONTROL 1644bf215546Sopenharmony_ci 0x0, // SX_MRT0_BLEND_OPT 1645bf215546Sopenharmony_ci 0x0, // SX_MRT1_BLEND_OPT 1646bf215546Sopenharmony_ci 0x0, // SX_MRT2_BLEND_OPT 1647bf215546Sopenharmony_ci 0x0, // SX_MRT3_BLEND_OPT 1648bf215546Sopenharmony_ci 0x0, // SX_MRT4_BLEND_OPT 1649bf215546Sopenharmony_ci 0x0, // SX_MRT5_BLEND_OPT 1650bf215546Sopenharmony_ci 0x0, // SX_MRT6_BLEND_OPT 1651bf215546Sopenharmony_ci 0x0, // SX_MRT7_BLEND_OPT 1652bf215546Sopenharmony_ci 0x0, // CB_BLEND0_CONTROL 1653bf215546Sopenharmony_ci 0x0, // CB_BLEND1_CONTROL 1654bf215546Sopenharmony_ci 0x0, // CB_BLEND2_CONTROL 1655bf215546Sopenharmony_ci 0x0, // CB_BLEND3_CONTROL 1656bf215546Sopenharmony_ci 0x0, // CB_BLEND4_CONTROL 1657bf215546Sopenharmony_ci 0x0, // CB_BLEND5_CONTROL 1658bf215546Sopenharmony_ci 0x0, // CB_BLEND6_CONTROL 1659bf215546Sopenharmony_ci 0x0, // CB_BLEND7_CONTROL 1660bf215546Sopenharmony_ci 0x0, // CB_MRT0_EPITCH 1661bf215546Sopenharmony_ci 0x0, // CB_MRT1_EPITCH 1662bf215546Sopenharmony_ci 0x0, // CB_MRT2_EPITCH 1663bf215546Sopenharmony_ci 0x0, // CB_MRT3_EPITCH 1664bf215546Sopenharmony_ci 0x0, // CB_MRT4_EPITCH 1665bf215546Sopenharmony_ci 0x0, // CB_MRT5_EPITCH 1666bf215546Sopenharmony_ci 0x0, // CB_MRT6_EPITCH 1667bf215546Sopenharmony_ci 0x0 // CB_MRT7_EPITCH 1668bf215546Sopenharmony_ci }; 1669bf215546Sopenharmony_ci static const uint32_t DbDepthControlGfx9[] = { 1670bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CONTROL 1671bf215546Sopenharmony_ci 0x0, // DB_EQAA 1672bf215546Sopenharmony_ci 0x0, // CB_COLOR_CONTROL 1673bf215546Sopenharmony_ci 0x0, // DB_SHADER_CONTROL 1674bf215546Sopenharmony_ci 0x90000, // PA_CL_CLIP_CNTL 1675bf215546Sopenharmony_ci 0x4, // PA_SU_SC_MODE_CNTL 1676bf215546Sopenharmony_ci 0x0, // PA_CL_VTE_CNTL 1677bf215546Sopenharmony_ci 0x0, // PA_CL_VS_OUT_CNTL 1678bf215546Sopenharmony_ci 0x0, // PA_CL_NANINF_CNTL 1679bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_CNTL 1680bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_SCALE 1681bf215546Sopenharmony_ci 0x0, // PA_SU_PRIM_FILTER_CNTL 1682bf215546Sopenharmony_ci 0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL 1683bf215546Sopenharmony_ci 0x0, // PA_CL_OBJPRIM_ID_CNTL 1684bf215546Sopenharmony_ci 0x0, // PA_CL_NGG_CNTL 1685bf215546Sopenharmony_ci 0x0, // PA_SU_OVER_RASTERIZATION_CNTL 1686bf215546Sopenharmony_ci 0x0 // PA_STEREO_CNTL 1687bf215546Sopenharmony_ci }; 1688bf215546Sopenharmony_ci static const uint32_t PaSuPointSizeGfx9[] = { 1689bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_SIZE 1690bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_MINMAX 1691bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_CNTL 1692bf215546Sopenharmony_ci 0x0 // PA_SC_LINE_STIPPLE 1693bf215546Sopenharmony_ci }; 1694bf215546Sopenharmony_ci static const uint32_t VgtHosMaxTessLevelGfx9[] = { 1695bf215546Sopenharmony_ci 0x0, // VGT_HOS_MAX_TESS_LEVEL 1696bf215546Sopenharmony_ci 0x0 // VGT_HOS_MIN_TESS_LEVEL 1697bf215546Sopenharmony_ci }; 1698bf215546Sopenharmony_ci static const uint32_t VgtGsModeGfx9[] = { 1699bf215546Sopenharmony_ci 0x0, // VGT_GS_MODE 1700bf215546Sopenharmony_ci 0x0, // VGT_GS_ONCHIP_CNTL 1701bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_0 1702bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_1 1703bf215546Sopenharmony_ci 0x0, // VGT_ENHANCE 1704bf215546Sopenharmony_ci 0x100, // VGT_GS_PER_ES 1705bf215546Sopenharmony_ci 0x80, // VGT_ES_PER_GS 1706bf215546Sopenharmony_ci 0x2, // VGT_GS_PER_VS 1707bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_1 1708bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_2 1709bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_3 1710bf215546Sopenharmony_ci 0x0 // VGT_GS_OUT_PRIM_TYPE 1711bf215546Sopenharmony_ci }; 1712bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidEnGfx9[] = { 1713bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_EN 1714bf215546Sopenharmony_ci }; 1715bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidResetGfx9[] = { 1716bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_RESET 1717bf215546Sopenharmony_ci }; 1718bf215546Sopenharmony_ci static const uint32_t VgtGsMaxPrimsPerSubgroupGfx9[] = { 1719bf215546Sopenharmony_ci 0x0, // VGT_GS_MAX_PRIMS_PER_SUBGROUP 1720bf215546Sopenharmony_ci 0x0, // VGT_DRAW_PAYLOAD_CNTL 1721bf215546Sopenharmony_ci 0x0, // 1722bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_0 1723bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_1 1724bf215546Sopenharmony_ci 0x0, // 1725bf215546Sopenharmony_ci 0x0, // VGT_ESGS_RING_ITEMSIZE 1726bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_ITEMSIZE 1727bf215546Sopenharmony_ci 0x0, // VGT_REUSE_OFF 1728bf215546Sopenharmony_ci 0x0, // VGT_VTX_CNT_EN 1729bf215546Sopenharmony_ci 0x0, // DB_HTILE_SURFACE 1730bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE0 1731bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE1 1732bf215546Sopenharmony_ci 0x0, // DB_PRELOAD_CONTROL 1733bf215546Sopenharmony_ci 0x0, // 1734bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_0 1735bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_VTX_STRIDE_0 1736bf215546Sopenharmony_ci }; 1737bf215546Sopenharmony_ci static const uint32_t VgtStrmoutBufferSize1Gfx9[] = { 1738bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_1 1739bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_VTX_STRIDE_1 1740bf215546Sopenharmony_ci }; 1741bf215546Sopenharmony_ci static const uint32_t VgtStrmoutBufferSize2Gfx9[] = { 1742bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_2 1743bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_VTX_STRIDE_2 1744bf215546Sopenharmony_ci }; 1745bf215546Sopenharmony_ci static const uint32_t VgtStrmoutBufferSize3Gfx9[] = { 1746bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_3 1747bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_VTX_STRIDE_3 1748bf215546Sopenharmony_ci }; 1749bf215546Sopenharmony_ci static const uint32_t VgtStrmoutDrawOpaqueOffsetGfx9[] = { 1750bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET 1751bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE 1752bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE 1753bf215546Sopenharmony_ci }; 1754bf215546Sopenharmony_ci static const uint32_t VgtGsMaxVertOutGfx9[] = { 1755bf215546Sopenharmony_ci 0x0, // VGT_GS_MAX_VERT_OUT 1756bf215546Sopenharmony_ci 0x0, // 1757bf215546Sopenharmony_ci 0x0, // 1758bf215546Sopenharmony_ci 0x0, // 1759bf215546Sopenharmony_ci 0x0, // 1760bf215546Sopenharmony_ci 0x0, // 1761bf215546Sopenharmony_ci 0x0, // VGT_TESS_DISTRIBUTION 1762bf215546Sopenharmony_ci 0x0, // VGT_SHADER_STAGES_EN 1763bf215546Sopenharmony_ci 0x0, // VGT_LS_HS_CONFIG 1764bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE 1765bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_1 1766bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_2 1767bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_3 1768bf215546Sopenharmony_ci 0x0, // VGT_TF_PARAM 1769bf215546Sopenharmony_ci 0x0, // DB_ALPHA_TO_MASK 1770bf215546Sopenharmony_ci 0x0, // VGT_DISPATCH_DRAW_INDEX 1771bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL 1772bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_CLAMP 1773bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE 1774bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET 1775bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_SCALE 1776bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET 1777bf215546Sopenharmony_ci 0x0, // VGT_GS_INSTANCE_CNT 1778bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_CONFIG 1779bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_BUFFER_CONFIG 1780bf215546Sopenharmony_ci }; 1781bf215546Sopenharmony_ci static const uint32_t PaScCentroidPriority0Gfx9[] = { 1782bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_0 1783bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_1 1784bf215546Sopenharmony_ci 0x1000, // PA_SC_LINE_CNTL 1785bf215546Sopenharmony_ci 0x0, // PA_SC_AA_CONFIG 1786bf215546Sopenharmony_ci 0x5, // PA_SU_VTX_CNTL 1787bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ 1788bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_DISC_ADJ 1789bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ 1790bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ 1791bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 1792bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 1793bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 1794bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 1795bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 1796bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1 1797bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2 1798bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3 1799bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 1800bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1 1801bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2 1802bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3 1803bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 1804bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1 1805bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2 1806bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3 1807bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0 1808bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1 1809bf215546Sopenharmony_ci 0x0, // PA_SC_SHADER_CONTROL 1810bf215546Sopenharmony_ci 0x3, // PA_SC_BINNER_CNTL_0 1811bf215546Sopenharmony_ci 0x0, // PA_SC_BINNER_CNTL_1 1812bf215546Sopenharmony_ci 0x100000, // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 1813bf215546Sopenharmony_ci 0x0, // PA_SC_NGG_MODE_CNTL 1814bf215546Sopenharmony_ci 0x0, // 1815bf215546Sopenharmony_ci 0x1e, // VGT_VERTEX_REUSE_BLOCK_CNTL 1816bf215546Sopenharmony_ci 0x20, // VGT_OUT_DEALLOC_CNTL 1817bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE 1818bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE_EXT 1819bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB2 1820bf215546Sopenharmony_ci 0x0, // CB_COLOR0_VIEW 1821bf215546Sopenharmony_ci 0x0, // CB_COLOR0_INFO 1822bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB 1823bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_CONTROL 1824bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK 1825bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK_BASE_EXT 1826bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK 1827bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK_BASE_EXT 1828bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD0 1829bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD1 1830bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE 1831bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE_EXT 1832bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE 1833bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE_EXT 1834bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB2 1835bf215546Sopenharmony_ci 0x0, // CB_COLOR1_VIEW 1836bf215546Sopenharmony_ci 0x0, // CB_COLOR1_INFO 1837bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB 1838bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_CONTROL 1839bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK 1840bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK_BASE_EXT 1841bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK 1842bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK_BASE_EXT 1843bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD0 1844bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD1 1845bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE 1846bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE_EXT 1847bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE 1848bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE_EXT 1849bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB2 1850bf215546Sopenharmony_ci 0x0, // CB_COLOR2_VIEW 1851bf215546Sopenharmony_ci 0x0, // CB_COLOR2_INFO 1852bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB 1853bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_CONTROL 1854bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK 1855bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK_BASE_EXT 1856bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK 1857bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK_BASE_EXT 1858bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD0 1859bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD1 1860bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE 1861bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE_EXT 1862bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE 1863bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE_EXT 1864bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB2 1865bf215546Sopenharmony_ci 0x0, // CB_COLOR3_VIEW 1866bf215546Sopenharmony_ci 0x0, // CB_COLOR3_INFO 1867bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB 1868bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_CONTROL 1869bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK 1870bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK_BASE_EXT 1871bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK 1872bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK_BASE_EXT 1873bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD0 1874bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD1 1875bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE 1876bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE_EXT 1877bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE 1878bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE_EXT 1879bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB2 1880bf215546Sopenharmony_ci 0x0, // CB_COLOR4_VIEW 1881bf215546Sopenharmony_ci 0x0, // CB_COLOR4_INFO 1882bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB 1883bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_CONTROL 1884bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK 1885bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK_BASE_EXT 1886bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK 1887bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK_BASE_EXT 1888bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD0 1889bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD1 1890bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE 1891bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE_EXT 1892bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE 1893bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE_EXT 1894bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB2 1895bf215546Sopenharmony_ci 0x0, // CB_COLOR5_VIEW 1896bf215546Sopenharmony_ci 0x0, // CB_COLOR5_INFO 1897bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB 1898bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_CONTROL 1899bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK 1900bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK_BASE_EXT 1901bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK 1902bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK_BASE_EXT 1903bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD0 1904bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD1 1905bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE 1906bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE_EXT 1907bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE 1908bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE_EXT 1909bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB2 1910bf215546Sopenharmony_ci 0x0, // CB_COLOR6_VIEW 1911bf215546Sopenharmony_ci 0x0, // CB_COLOR6_INFO 1912bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB 1913bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_CONTROL 1914bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK 1915bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK_BASE_EXT 1916bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK 1917bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK_BASE_EXT 1918bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD0 1919bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD1 1920bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE 1921bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE_EXT 1922bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE 1923bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE_EXT 1924bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB2 1925bf215546Sopenharmony_ci 0x0, // CB_COLOR7_VIEW 1926bf215546Sopenharmony_ci 0x0, // CB_COLOR7_INFO 1927bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB 1928bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_CONTROL 1929bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK 1930bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK_BASE_EXT 1931bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK 1932bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK_BASE_EXT 1933bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD0 1934bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD1 1935bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE 1936bf215546Sopenharmony_ci 0x0 // CB_COLOR7_DCC_BASE_EXT 1937bf215546Sopenharmony_ci }; 1938bf215546Sopenharmony_ci 1939bf215546Sopenharmony_ci#define SET(array) ARRAY_SIZE(array), array 1940bf215546Sopenharmony_ci 1941bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlGfx9)); 1942bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Gfx9)); 1943bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 1944bf215546Sopenharmony_ci SET(VgtMultiPrimIbResetIndxGfx9)); 1945bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028414_CB_BLEND_RED, SET(CbBlendRedGfx9)); 1946bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Gfx9)); 1947bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028754_SX_PS_DOWNCONVERT, SET(SxPsDownconvertGfx9)); 1948bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028800_DB_DEPTH_CONTROL, SET(DbDepthControlGfx9)); 1949bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeGfx9)); 1950bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelGfx9)); 1951bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeGfx9)); 1952bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnGfx9)); 1953bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetGfx9)); 1954bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A94_VGT_GS_MAX_PRIMS_PER_SUBGROUP, 1955bf215546Sopenharmony_ci SET(VgtGsMaxPrimsPerSubgroupGfx9)); 1956bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028AE0_VGT_STRMOUT_BUFFER_SIZE_1, 1957bf215546Sopenharmony_ci SET(VgtStrmoutBufferSize1Gfx9)); 1958bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028AF0_VGT_STRMOUT_BUFFER_SIZE_2, 1959bf215546Sopenharmony_ci SET(VgtStrmoutBufferSize2Gfx9)); 1960bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B00_VGT_STRMOUT_BUFFER_SIZE_3, 1961bf215546Sopenharmony_ci SET(VgtStrmoutBufferSize3Gfx9)); 1962bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 1963bf215546Sopenharmony_ci SET(VgtStrmoutDrawOpaqueOffsetGfx9)); 1964bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B38_VGT_GS_MAX_VERT_OUT, SET(VgtGsMaxVertOutGfx9)); 1965bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0, 1966bf215546Sopenharmony_ci SET(PaScCentroidPriority0Gfx9)); 1967bf215546Sopenharmony_ci} 1968bf215546Sopenharmony_ci 1969bf215546Sopenharmony_ci/** 1970bf215546Sopenharmony_ci * Emulate CLEAR_STATE. Additionally, initialize num_reg_pairs registers specified 1971bf215546Sopenharmony_ci * via reg_offsets and reg_values. 1972bf215546Sopenharmony_ci */ 1973bf215546Sopenharmony_cistatic void gfx10_emulate_clear_state(struct radeon_cmdbuf *cs, unsigned num_reg_pairs, 1974bf215546Sopenharmony_ci unsigned *reg_offsets, uint32_t *reg_values, 1975bf215546Sopenharmony_ci set_context_reg_seq_array_fn set_context_reg_seq_array) 1976bf215546Sopenharmony_ci{ 1977bf215546Sopenharmony_ci static const uint32_t DbRenderControlNv10[] = { 1978bf215546Sopenharmony_ci 0x0, // DB_RENDER_CONTROL 1979bf215546Sopenharmony_ci 0x0, // DB_COUNT_CONTROL 1980bf215546Sopenharmony_ci 0x0, // DB_DEPTH_VIEW 1981bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE 1982bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE2 1983bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE 1984bf215546Sopenharmony_ci 0x0, // 1985bf215546Sopenharmony_ci 0x0, // DB_DEPTH_SIZE_XY 1986bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MIN 1987bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MAX 1988bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CLEAR 1989bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CLEAR 1990bf215546Sopenharmony_ci 0x0, // PA_SC_SCREEN_SCISSOR_TL 1991bf215546Sopenharmony_ci 0x40004000, // PA_SC_SCREEN_SCISSOR_BR 1992bf215546Sopenharmony_ci 0x0, // DB_DFSM_CONTROL 1993bf215546Sopenharmony_ci 0x0, // DB_RESERVED_REG_2 1994bf215546Sopenharmony_ci 0x0, // DB_Z_INFO 1995bf215546Sopenharmony_ci 0x0, // DB_STENCIL_INFO 1996bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE 1997bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE 1998bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE 1999bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE 2000bf215546Sopenharmony_ci 0x0, // 2001bf215546Sopenharmony_ci 0x0, // 2002bf215546Sopenharmony_ci 0x0, // 2003bf215546Sopenharmony_ci 0x0, // 2004bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE_HI 2005bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE_HI 2006bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE_HI 2007bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE_HI 2008bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE_HI 2009bf215546Sopenharmony_ci 0x0, // DB_RMI_L2_CACHE_CONTROL 2010bf215546Sopenharmony_ci 0x0, // TA_BC_BASE_ADDR 2011bf215546Sopenharmony_ci 0x0 // TA_BC_BASE_ADDR_HI 2012bf215546Sopenharmony_ci }; 2013bf215546Sopenharmony_ci static const uint32_t CoherDestBaseHi0Nv10[] = { 2014bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_0 2015bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_1 2016bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_2 2017bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_3 2018bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_2 2019bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_3 2020bf215546Sopenharmony_ci 0x0, // PA_SC_WINDOW_OFFSET 2021bf215546Sopenharmony_ci 0x80000000, // PA_SC_WINDOW_SCISSOR_TL 2022bf215546Sopenharmony_ci 0x40004000, // PA_SC_WINDOW_SCISSOR_BR 2023bf215546Sopenharmony_ci 0xffff, // PA_SC_CLIPRECT_RULE 2024bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_0_TL 2025bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_0_BR 2026bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_1_TL 2027bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_1_BR 2028bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_2_TL 2029bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_2_BR 2030bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_3_TL 2031bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_3_BR 2032bf215546Sopenharmony_ci 0xaa99aaaa, // PA_SC_EDGERULE 2033bf215546Sopenharmony_ci 0x0, // PA_SU_HARDWARE_SCREEN_OFFSET 2034bf215546Sopenharmony_ci 0xffffffff, // CB_TARGET_MASK 2035bf215546Sopenharmony_ci 0xffffffff, // CB_SHADER_MASK 2036bf215546Sopenharmony_ci 0x80000000, // PA_SC_GENERIC_SCISSOR_TL 2037bf215546Sopenharmony_ci 0x40004000, // PA_SC_GENERIC_SCISSOR_BR 2038bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_0 2039bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_1 2040bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_0_TL 2041bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_0_BR 2042bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_1_TL 2043bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_1_BR 2044bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_2_TL 2045bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_2_BR 2046bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_3_TL 2047bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_3_BR 2048bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_4_TL 2049bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_4_BR 2050bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_5_TL 2051bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_5_BR 2052bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_6_TL 2053bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_6_BR 2054bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_7_TL 2055bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_7_BR 2056bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_8_TL 2057bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_8_BR 2058bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_9_TL 2059bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_9_BR 2060bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_10_TL 2061bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_10_BR 2062bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_11_TL 2063bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_11_BR 2064bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_12_TL 2065bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_12_BR 2066bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_13_TL 2067bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_13_BR 2068bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_14_TL 2069bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_14_BR 2070bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_15_TL 2071bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_15_BR 2072bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_0 2073bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_0 2074bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_1 2075bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_1 2076bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_2 2077bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_2 2078bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_3 2079bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_3 2080bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_4 2081bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_4 2082bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_5 2083bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_5 2084bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_6 2085bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_6 2086bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_7 2087bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_7 2088bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_8 2089bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_8 2090bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_9 2091bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_9 2092bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_10 2093bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_10 2094bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_11 2095bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_11 2096bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_12 2097bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_12 2098bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_13 2099bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_13 2100bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_14 2101bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_14 2102bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_15 2103bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_15 2104bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG 2105bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG_1 2106bf215546Sopenharmony_ci 0x0, // 2107bf215546Sopenharmony_ci 0x0 // PA_SC_TILE_STEERING_OVERRIDE 2108bf215546Sopenharmony_ci }; 2109bf215546Sopenharmony_ci static const uint32_t VgtMultiPrimIbResetIndxNv10[] = { 2110bf215546Sopenharmony_ci 0x0, // VGT_MULTI_PRIM_IB_RESET_INDX 2111bf215546Sopenharmony_ci 0x0, // CB_RMI_GL2_CACHE_CONTROL 2112bf215546Sopenharmony_ci 0x0, // CB_BLEND_RED 2113bf215546Sopenharmony_ci 0x0, // CB_BLEND_GREEN 2114bf215546Sopenharmony_ci 0x0, // CB_BLEND_BLUE 2115bf215546Sopenharmony_ci 0x0, // CB_BLEND_ALPHA 2116bf215546Sopenharmony_ci 0x0, // CB_DCC_CONTROL 2117bf215546Sopenharmony_ci 0x0, // CB_COVERAGE_OUT_CONTROL 2118bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CONTROL 2119bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK 2120bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK_BF 2121bf215546Sopenharmony_ci 0x0, // 2122bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE 2123bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET 2124bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE 2125bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET 2126bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE 2127bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET 2128bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_1 2129bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_1 2130bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_1 2131bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_1 2132bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_1 2133bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_1 2134bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_2 2135bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_2 2136bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_2 2137bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_2 2138bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_2 2139bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_2 2140bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_3 2141bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_3 2142bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_3 2143bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_3 2144bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_3 2145bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_3 2146bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_4 2147bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_4 2148bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_4 2149bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_4 2150bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_4 2151bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_4 2152bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_5 2153bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_5 2154bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_5 2155bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_5 2156bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_5 2157bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_5 2158bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_6 2159bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_6 2160bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_6 2161bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_6 2162bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_6 2163bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_6 2164bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_7 2165bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_7 2166bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_7 2167bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_7 2168bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_7 2169bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_7 2170bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_8 2171bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_8 2172bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_8 2173bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_8 2174bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_8 2175bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_8 2176bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_9 2177bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_9 2178bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_9 2179bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_9 2180bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_9 2181bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_9 2182bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_10 2183bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_10 2184bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_10 2185bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_10 2186bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_10 2187bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_10 2188bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_11 2189bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_11 2190bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_11 2191bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_11 2192bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_11 2193bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_11 2194bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_12 2195bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_12 2196bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_12 2197bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_12 2198bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_12 2199bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_12 2200bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_13 2201bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_13 2202bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_13 2203bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_13 2204bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_13 2205bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_13 2206bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_14 2207bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_14 2208bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_14 2209bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_14 2210bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_14 2211bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_14 2212bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_15 2213bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_15 2214bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_15 2215bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_15 2216bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_15 2217bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_15 2218bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_X 2219bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Y 2220bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Z 2221bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_W 2222bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_X 2223bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Y 2224bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Z 2225bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_W 2226bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_X 2227bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Y 2228bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Z 2229bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_W 2230bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_X 2231bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Y 2232bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Z 2233bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_W 2234bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_X 2235bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Y 2236bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Z 2237bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_W 2238bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_X 2239bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Y 2240bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Z 2241bf215546Sopenharmony_ci 0x0 // PA_CL_UCP_5_W 2242bf215546Sopenharmony_ci }; 2243bf215546Sopenharmony_ci static const uint32_t SpiPsInputCntl0Nv10[] = { 2244bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_0 2245bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_1 2246bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_2 2247bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_3 2248bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_4 2249bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_5 2250bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_6 2251bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_7 2252bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_8 2253bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_9 2254bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_10 2255bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_11 2256bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_12 2257bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_13 2258bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_14 2259bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_15 2260bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_16 2261bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_17 2262bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_18 2263bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_19 2264bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_20 2265bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_21 2266bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_22 2267bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_23 2268bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_24 2269bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_25 2270bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_26 2271bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_27 2272bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_28 2273bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_29 2274bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_30 2275bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_31 2276bf215546Sopenharmony_ci 0x0, // SPI_VS_OUT_CONFIG 2277bf215546Sopenharmony_ci 0x0, // 2278bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ENA 2279bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ADDR 2280bf215546Sopenharmony_ci 0x0, // SPI_INTERP_CONTROL_0 2281bf215546Sopenharmony_ci 0x2, // SPI_PS_IN_CONTROL 2282bf215546Sopenharmony_ci 0x0, // 2283bf215546Sopenharmony_ci 0x0, // SPI_BARYC_CNTL 2284bf215546Sopenharmony_ci 0x0, // 2285bf215546Sopenharmony_ci 0x0, // SPI_TMPRING_SIZE 2286bf215546Sopenharmony_ci 0x0, // 2287bf215546Sopenharmony_ci 0x0, // 2288bf215546Sopenharmony_ci 0x0, // 2289bf215546Sopenharmony_ci 0x0, // 2290bf215546Sopenharmony_ci 0x0, // 2291bf215546Sopenharmony_ci 0x0, // 2292bf215546Sopenharmony_ci 0x0, // 2293bf215546Sopenharmony_ci 0x0, // SPI_SHADER_IDX_FORMAT 2294bf215546Sopenharmony_ci 0x0, // SPI_SHADER_POS_FORMAT 2295bf215546Sopenharmony_ci 0x0, // SPI_SHADER_Z_FORMAT 2296bf215546Sopenharmony_ci 0x0 // SPI_SHADER_COL_FORMAT 2297bf215546Sopenharmony_ci }; 2298bf215546Sopenharmony_ci static const uint32_t SxPsDownconvertNv10[] = { 2299bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT 2300bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_EPSILON 2301bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_CONTROL 2302bf215546Sopenharmony_ci 0x0, // SX_MRT0_BLEND_OPT 2303bf215546Sopenharmony_ci 0x0, // SX_MRT1_BLEND_OPT 2304bf215546Sopenharmony_ci 0x0, // SX_MRT2_BLEND_OPT 2305bf215546Sopenharmony_ci 0x0, // SX_MRT3_BLEND_OPT 2306bf215546Sopenharmony_ci 0x0, // SX_MRT4_BLEND_OPT 2307bf215546Sopenharmony_ci 0x0, // SX_MRT5_BLEND_OPT 2308bf215546Sopenharmony_ci 0x0, // SX_MRT6_BLEND_OPT 2309bf215546Sopenharmony_ci 0x0, // SX_MRT7_BLEND_OPT 2310bf215546Sopenharmony_ci 0x0, // CB_BLEND0_CONTROL 2311bf215546Sopenharmony_ci 0x0, // CB_BLEND1_CONTROL 2312bf215546Sopenharmony_ci 0x0, // CB_BLEND2_CONTROL 2313bf215546Sopenharmony_ci 0x0, // CB_BLEND3_CONTROL 2314bf215546Sopenharmony_ci 0x0, // CB_BLEND4_CONTROL 2315bf215546Sopenharmony_ci 0x0, // CB_BLEND5_CONTROL 2316bf215546Sopenharmony_ci 0x0, // CB_BLEND6_CONTROL 2317bf215546Sopenharmony_ci 0x0 // CB_BLEND7_CONTROL 2318bf215546Sopenharmony_ci }; 2319bf215546Sopenharmony_ci static const uint32_t PaClPointXRadNv10[] = { 2320bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_X_RAD 2321bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_Y_RAD 2322bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_SIZE 2323bf215546Sopenharmony_ci 0x0 // PA_CL_POINT_CULL_RAD 2324bf215546Sopenharmony_ci }; 2325bf215546Sopenharmony_ci static const uint32_t GeMaxOutputPerSubgroupNv10[] = { 2326bf215546Sopenharmony_ci 0x0, // GE_MAX_OUTPUT_PER_SUBGROUP 2327bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CONTROL 2328bf215546Sopenharmony_ci 0x0, // DB_EQAA 2329bf215546Sopenharmony_ci 0x0, // CB_COLOR_CONTROL 2330bf215546Sopenharmony_ci 0x0, // DB_SHADER_CONTROL 2331bf215546Sopenharmony_ci 0x90000, // PA_CL_CLIP_CNTL 2332bf215546Sopenharmony_ci 0x4, // PA_SU_SC_MODE_CNTL 2333bf215546Sopenharmony_ci 0x0, // PA_CL_VTE_CNTL 2334bf215546Sopenharmony_ci 0x0, // PA_CL_VS_OUT_CNTL 2335bf215546Sopenharmony_ci 0x0, // PA_CL_NANINF_CNTL 2336bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_CNTL 2337bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_SCALE 2338bf215546Sopenharmony_ci 0x0, // PA_SU_PRIM_FILTER_CNTL 2339bf215546Sopenharmony_ci 0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL 2340bf215546Sopenharmony_ci 0x0, // PA_CL_OBJPRIM_ID_CNTL 2341bf215546Sopenharmony_ci 0x0, // PA_CL_NGG_CNTL 2342bf215546Sopenharmony_ci 0x0, // PA_SU_OVER_RASTERIZATION_CNTL 2343bf215546Sopenharmony_ci 0x0, // PA_STEREO_CNTL 2344bf215546Sopenharmony_ci 0x0 // PA_STATE_STEREO_X 2345bf215546Sopenharmony_ci }; 2346bf215546Sopenharmony_ci static const uint32_t PaSuPointSizeNv10[] = { 2347bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_SIZE 2348bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_MINMAX 2349bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_CNTL 2350bf215546Sopenharmony_ci 0x0 // PA_SC_LINE_STIPPLE 2351bf215546Sopenharmony_ci }; 2352bf215546Sopenharmony_ci static const uint32_t VgtHosMaxTessLevelNv10[] = { 2353bf215546Sopenharmony_ci 0x0, // VGT_HOS_MAX_TESS_LEVEL 2354bf215546Sopenharmony_ci 0x0 // VGT_HOS_MIN_TESS_LEVEL 2355bf215546Sopenharmony_ci }; 2356bf215546Sopenharmony_ci static const uint32_t VgtGsModeNv10[] = { 2357bf215546Sopenharmony_ci 0x0, // VGT_GS_MODE 2358bf215546Sopenharmony_ci 0x0, // VGT_GS_ONCHIP_CNTL 2359bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_0 2360bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_1 2361bf215546Sopenharmony_ci 0x0, // VGT_ENHANCE 2362bf215546Sopenharmony_ci 0x100, // VGT_GS_PER_ES 2363bf215546Sopenharmony_ci 0x80, // VGT_ES_PER_GS 2364bf215546Sopenharmony_ci 0x2, // VGT_GS_PER_VS 2365bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_1 2366bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_2 2367bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_3 2368bf215546Sopenharmony_ci 0x0 // VGT_GS_OUT_PRIM_TYPE 2369bf215546Sopenharmony_ci }; 2370bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidEnNv10[] = { 2371bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_EN 2372bf215546Sopenharmony_ci }; 2373bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidResetNv10[] = { 2374bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_RESET 2375bf215546Sopenharmony_ci }; 2376bf215546Sopenharmony_ci static const uint32_t VgtDrawPayloadCntlNv10[] = { 2377bf215546Sopenharmony_ci 0x0, // VGT_DRAW_PAYLOAD_CNTL 2378bf215546Sopenharmony_ci 0x0, // 2379bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_0 2380bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_1 2381bf215546Sopenharmony_ci 0x0, // IA_MULTI_VGT_PARAM 2382bf215546Sopenharmony_ci 0x0, // VGT_ESGS_RING_ITEMSIZE 2383bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_ITEMSIZE 2384bf215546Sopenharmony_ci 0x0, // VGT_REUSE_OFF 2385bf215546Sopenharmony_ci 0x0, // VGT_VTX_CNT_EN 2386bf215546Sopenharmony_ci 0x0, // DB_HTILE_SURFACE 2387bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE0 2388bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE1 2389bf215546Sopenharmony_ci 0x0, // DB_PRELOAD_CONTROL 2390bf215546Sopenharmony_ci 0x0, // 2391bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_0 2392bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_0 2393bf215546Sopenharmony_ci 0x0, // 2394bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_0 2395bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_1 2396bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_1 2397bf215546Sopenharmony_ci 0x0, // 2398bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_1 2399bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_2 2400bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_2 2401bf215546Sopenharmony_ci 0x0, // 2402bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_2 2403bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_3 2404bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_3 2405bf215546Sopenharmony_ci 0x0, // 2406bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_3 2407bf215546Sopenharmony_ci 0x0, // 2408bf215546Sopenharmony_ci 0x0, // 2409bf215546Sopenharmony_ci 0x0, // 2410bf215546Sopenharmony_ci 0x0, // 2411bf215546Sopenharmony_ci 0x0, // 2412bf215546Sopenharmony_ci 0x0, // 2413bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET 2414bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE 2415bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE 2416bf215546Sopenharmony_ci 0x0, // 2417bf215546Sopenharmony_ci 0x0, // VGT_GS_MAX_VERT_OUT 2418bf215546Sopenharmony_ci 0x0, // 2419bf215546Sopenharmony_ci 0x0, // 2420bf215546Sopenharmony_ci 0x0, // 2421bf215546Sopenharmony_ci 0x0, // 2422bf215546Sopenharmony_ci 0x0, // GE_NGG_SUBGRP_CNTL 2423bf215546Sopenharmony_ci 0x0, // VGT_TESS_DISTRIBUTION 2424bf215546Sopenharmony_ci 0x0, // VGT_SHADER_STAGES_EN 2425bf215546Sopenharmony_ci 0x0, // VGT_LS_HS_CONFIG 2426bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE 2427bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_1 2428bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_2 2429bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_3 2430bf215546Sopenharmony_ci 0x0, // VGT_TF_PARAM 2431bf215546Sopenharmony_ci 0x0, // DB_ALPHA_TO_MASK 2432bf215546Sopenharmony_ci 0x0, // VGT_DISPATCH_DRAW_INDEX 2433bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL 2434bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_CLAMP 2435bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE 2436bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET 2437bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_SCALE 2438bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET 2439bf215546Sopenharmony_ci 0x0, // VGT_GS_INSTANCE_CNT 2440bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_CONFIG 2441bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_BUFFER_CONFIG 2442bf215546Sopenharmony_ci }; 2443bf215546Sopenharmony_ci static const uint32_t PaScCentroidPriority0Nv10[] = { 2444bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_0 2445bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_1 2446bf215546Sopenharmony_ci 0x1000, // PA_SC_LINE_CNTL 2447bf215546Sopenharmony_ci 0x0, // PA_SC_AA_CONFIG 2448bf215546Sopenharmony_ci 0x5, // PA_SU_VTX_CNTL 2449bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ 2450bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_DISC_ADJ 2451bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ 2452bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ 2453bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 2454bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 2455bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 2456bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 2457bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 2458bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1 2459bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2 2460bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3 2461bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 2462bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1 2463bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2 2464bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3 2465bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 2466bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1 2467bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2 2468bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3 2469bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0 2470bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1 2471bf215546Sopenharmony_ci 0x0, // PA_SC_SHADER_CONTROL 2472bf215546Sopenharmony_ci 0x3, // PA_SC_BINNER_CNTL_0 2473bf215546Sopenharmony_ci 0x0, // PA_SC_BINNER_CNTL_1 2474bf215546Sopenharmony_ci 0x100000, // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 2475bf215546Sopenharmony_ci 0x0, // PA_SC_NGG_MODE_CNTL 2476bf215546Sopenharmony_ci 0x0, // 2477bf215546Sopenharmony_ci 0x1e, // VGT_VERTEX_REUSE_BLOCK_CNTL 2478bf215546Sopenharmony_ci 0x20, // VGT_OUT_DEALLOC_CNTL 2479bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE 2480bf215546Sopenharmony_ci 0x0, // 2481bf215546Sopenharmony_ci 0x0, // 2482bf215546Sopenharmony_ci 0x0, // CB_COLOR0_VIEW 2483bf215546Sopenharmony_ci 0x0, // CB_COLOR0_INFO 2484bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB 2485bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_CONTROL 2486bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK 2487bf215546Sopenharmony_ci 0x0, // 2488bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK 2489bf215546Sopenharmony_ci 0x0, // 2490bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD0 2491bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD1 2492bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE 2493bf215546Sopenharmony_ci 0x0, // 2494bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE 2495bf215546Sopenharmony_ci 0x0, // 2496bf215546Sopenharmony_ci 0x0, // 2497bf215546Sopenharmony_ci 0x0, // CB_COLOR1_VIEW 2498bf215546Sopenharmony_ci 0x0, // CB_COLOR1_INFO 2499bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB 2500bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_CONTROL 2501bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK 2502bf215546Sopenharmony_ci 0x0, // 2503bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK 2504bf215546Sopenharmony_ci 0x0, // 2505bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD0 2506bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD1 2507bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE 2508bf215546Sopenharmony_ci 0x0, // 2509bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE 2510bf215546Sopenharmony_ci 0x0, // 2511bf215546Sopenharmony_ci 0x0, // 2512bf215546Sopenharmony_ci 0x0, // CB_COLOR2_VIEW 2513bf215546Sopenharmony_ci 0x0, // CB_COLOR2_INFO 2514bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB 2515bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_CONTROL 2516bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK 2517bf215546Sopenharmony_ci 0x0, // 2518bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK 2519bf215546Sopenharmony_ci 0x0, // 2520bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD0 2521bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD1 2522bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE 2523bf215546Sopenharmony_ci 0x0, // 2524bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE 2525bf215546Sopenharmony_ci 0x0, // 2526bf215546Sopenharmony_ci 0x0, // 2527bf215546Sopenharmony_ci 0x0, // CB_COLOR3_VIEW 2528bf215546Sopenharmony_ci 0x0, // CB_COLOR3_INFO 2529bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB 2530bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_CONTROL 2531bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK 2532bf215546Sopenharmony_ci 0x0, // 2533bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK 2534bf215546Sopenharmony_ci 0x0, // 2535bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD0 2536bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD1 2537bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE 2538bf215546Sopenharmony_ci 0x0, // 2539bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE 2540bf215546Sopenharmony_ci 0x0, // 2541bf215546Sopenharmony_ci 0x0, // 2542bf215546Sopenharmony_ci 0x0, // CB_COLOR4_VIEW 2543bf215546Sopenharmony_ci 0x0, // CB_COLOR4_INFO 2544bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB 2545bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_CONTROL 2546bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK 2547bf215546Sopenharmony_ci 0x0, // 2548bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK 2549bf215546Sopenharmony_ci 0x0, // 2550bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD0 2551bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD1 2552bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE 2553bf215546Sopenharmony_ci 0x0, // 2554bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE 2555bf215546Sopenharmony_ci 0x0, // 2556bf215546Sopenharmony_ci 0x0, // 2557bf215546Sopenharmony_ci 0x0, // CB_COLOR5_VIEW 2558bf215546Sopenharmony_ci 0x0, // CB_COLOR5_INFO 2559bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB 2560bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_CONTROL 2561bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK 2562bf215546Sopenharmony_ci 0x0, // 2563bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK 2564bf215546Sopenharmony_ci 0x0, // 2565bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD0 2566bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD1 2567bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE 2568bf215546Sopenharmony_ci 0x0, // 2569bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE 2570bf215546Sopenharmony_ci 0x0, // 2571bf215546Sopenharmony_ci 0x0, // 2572bf215546Sopenharmony_ci 0x0, // CB_COLOR6_VIEW 2573bf215546Sopenharmony_ci 0x0, // CB_COLOR6_INFO 2574bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB 2575bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_CONTROL 2576bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK 2577bf215546Sopenharmony_ci 0x0, // 2578bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK 2579bf215546Sopenharmony_ci 0x0, // 2580bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD0 2581bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD1 2582bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE 2583bf215546Sopenharmony_ci 0x0, // 2584bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE 2585bf215546Sopenharmony_ci 0x0, // 2586bf215546Sopenharmony_ci 0x0, // 2587bf215546Sopenharmony_ci 0x0, // CB_COLOR7_VIEW 2588bf215546Sopenharmony_ci 0x0, // CB_COLOR7_INFO 2589bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB 2590bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_CONTROL 2591bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK 2592bf215546Sopenharmony_ci 0x0, // 2593bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK 2594bf215546Sopenharmony_ci 0x0, // 2595bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD0 2596bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD1 2597bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE 2598bf215546Sopenharmony_ci 0x0, // 2599bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE_EXT 2600bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE_EXT 2601bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE_EXT 2602bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE_EXT 2603bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE_EXT 2604bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE_EXT 2605bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE_EXT 2606bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE_EXT 2607bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK_BASE_EXT 2608bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK_BASE_EXT 2609bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK_BASE_EXT 2610bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK_BASE_EXT 2611bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK_BASE_EXT 2612bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK_BASE_EXT 2613bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK_BASE_EXT 2614bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK_BASE_EXT 2615bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK_BASE_EXT 2616bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK_BASE_EXT 2617bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK_BASE_EXT 2618bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK_BASE_EXT 2619bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK_BASE_EXT 2620bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK_BASE_EXT 2621bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK_BASE_EXT 2622bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK_BASE_EXT 2623bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE_EXT 2624bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE_EXT 2625bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE_EXT 2626bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE_EXT 2627bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE_EXT 2628bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE_EXT 2629bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE_EXT 2630bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE_EXT 2631bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB2 2632bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB2 2633bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB2 2634bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB2 2635bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB2 2636bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB2 2637bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB2 2638bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB2 2639bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB3 2640bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB3 2641bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB3 2642bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB3 2643bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB3 2644bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB3 2645bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB3 2646bf215546Sopenharmony_ci 0x0 // CB_COLOR7_ATTRIB3 2647bf215546Sopenharmony_ci }; 2648bf215546Sopenharmony_ci 2649bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlNv10)); 2650bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Nv10)); 2651bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 2652bf215546Sopenharmony_ci SET(VgtMultiPrimIbResetIndxNv10)); 2653bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Nv10)); 2654bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028754_SX_PS_DOWNCONVERT, SET(SxPsDownconvertNv10)); 2655bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287D4_PA_CL_POINT_X_RAD, SET(PaClPointXRadNv10)); 2656bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, 2657bf215546Sopenharmony_ci SET(GeMaxOutputPerSubgroupNv10)); 2658bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeNv10)); 2659bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelNv10)); 2660bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeNv10)); 2661bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnNv10)); 2662bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetNv10)); 2663bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A98_VGT_DRAW_PAYLOAD_CNTL, SET(VgtDrawPayloadCntlNv10)); 2664bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0, 2665bf215546Sopenharmony_ci SET(PaScCentroidPriority0Nv10)); 2666bf215546Sopenharmony_ci 2667bf215546Sopenharmony_ci for (unsigned i = 0; i < num_reg_pairs; i++) 2668bf215546Sopenharmony_ci set_context_reg_seq_array(cs, reg_offsets[i], 1, ®_values[i]); 2669bf215546Sopenharmony_ci} 2670bf215546Sopenharmony_ci 2671bf215546Sopenharmony_ci/** 2672bf215546Sopenharmony_ci * Emulate CLEAR_STATE. Additionally, initialize num_reg_pairs registers specified 2673bf215546Sopenharmony_ci * via reg_offsets and reg_values. 2674bf215546Sopenharmony_ci */ 2675bf215546Sopenharmony_cistatic void gfx103_emulate_clear_state(struct radeon_cmdbuf *cs, unsigned num_reg_pairs, 2676bf215546Sopenharmony_ci unsigned *reg_offsets, uint32_t *reg_values, 2677bf215546Sopenharmony_ci set_context_reg_seq_array_fn set_context_reg_seq_array) 2678bf215546Sopenharmony_ci{ 2679bf215546Sopenharmony_ci static const uint32_t DbRenderControlGfx103[] = { 2680bf215546Sopenharmony_ci 0x0, // DB_RENDER_CONTROL 2681bf215546Sopenharmony_ci 0x0, // DB_COUNT_CONTROL 2682bf215546Sopenharmony_ci 0x0, // DB_DEPTH_VIEW 2683bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE 2684bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE2 2685bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE 2686bf215546Sopenharmony_ci 0x0, // 2687bf215546Sopenharmony_ci 0x0, // DB_DEPTH_SIZE_XY 2688bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MIN 2689bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MAX 2690bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CLEAR 2691bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CLEAR 2692bf215546Sopenharmony_ci 0x0, // PA_SC_SCREEN_SCISSOR_TL 2693bf215546Sopenharmony_ci 0x40004000, // PA_SC_SCREEN_SCISSOR_BR 2694bf215546Sopenharmony_ci 0x0, // DB_DFSM_CONTROL 2695bf215546Sopenharmony_ci 0x0, // DB_RESERVED_REG_2 2696bf215546Sopenharmony_ci 0x0, // DB_Z_INFO 2697bf215546Sopenharmony_ci 0x0, // DB_STENCIL_INFO 2698bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE 2699bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE 2700bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE 2701bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE 2702bf215546Sopenharmony_ci 0x0, // 2703bf215546Sopenharmony_ci 0x0, // 2704bf215546Sopenharmony_ci 0x0, // 2705bf215546Sopenharmony_ci 0x0, // 2706bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE_HI 2707bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE_HI 2708bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE_HI 2709bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE_HI 2710bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE_HI 2711bf215546Sopenharmony_ci 0x0, // DB_RMI_L2_CACHE_CONTROL 2712bf215546Sopenharmony_ci 0x0, // TA_BC_BASE_ADDR 2713bf215546Sopenharmony_ci 0x0 // TA_BC_BASE_ADDR_HI 2714bf215546Sopenharmony_ci }; 2715bf215546Sopenharmony_ci static const uint32_t CoherDestBaseHi0Gfx103[] = { 2716bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_0 2717bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_1 2718bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_2 2719bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_3 2720bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_2 2721bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_3 2722bf215546Sopenharmony_ci 0x0, // PA_SC_WINDOW_OFFSET 2723bf215546Sopenharmony_ci 0x80000000, // PA_SC_WINDOW_SCISSOR_TL 2724bf215546Sopenharmony_ci 0x40004000, // PA_SC_WINDOW_SCISSOR_BR 2725bf215546Sopenharmony_ci 0xffff, // PA_SC_CLIPRECT_RULE 2726bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_0_TL 2727bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_0_BR 2728bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_1_TL 2729bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_1_BR 2730bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_2_TL 2731bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_2_BR 2732bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_3_TL 2733bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_3_BR 2734bf215546Sopenharmony_ci 0xaa99aaaa, // PA_SC_EDGERULE 2735bf215546Sopenharmony_ci 0x0, // PA_SU_HARDWARE_SCREEN_OFFSET 2736bf215546Sopenharmony_ci 0xffffffff, // CB_TARGET_MASK 2737bf215546Sopenharmony_ci 0xffffffff, // CB_SHADER_MASK 2738bf215546Sopenharmony_ci 0x80000000, // PA_SC_GENERIC_SCISSOR_TL 2739bf215546Sopenharmony_ci 0x40004000, // PA_SC_GENERIC_SCISSOR_BR 2740bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_0 2741bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_1 2742bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_0_TL 2743bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_0_BR 2744bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_1_TL 2745bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_1_BR 2746bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_2_TL 2747bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_2_BR 2748bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_3_TL 2749bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_3_BR 2750bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_4_TL 2751bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_4_BR 2752bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_5_TL 2753bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_5_BR 2754bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_6_TL 2755bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_6_BR 2756bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_7_TL 2757bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_7_BR 2758bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_8_TL 2759bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_8_BR 2760bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_9_TL 2761bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_9_BR 2762bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_10_TL 2763bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_10_BR 2764bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_11_TL 2765bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_11_BR 2766bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_12_TL 2767bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_12_BR 2768bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_13_TL 2769bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_13_BR 2770bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_14_TL 2771bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_14_BR 2772bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_15_TL 2773bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_15_BR 2774bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_0 2775bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_0 2776bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_1 2777bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_1 2778bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_2 2779bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_2 2780bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_3 2781bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_3 2782bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_4 2783bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_4 2784bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_5 2785bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_5 2786bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_6 2787bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_6 2788bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_7 2789bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_7 2790bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_8 2791bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_8 2792bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_9 2793bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_9 2794bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_10 2795bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_10 2796bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_11 2797bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_11 2798bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_12 2799bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_12 2800bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_13 2801bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_13 2802bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_14 2803bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_14 2804bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_15 2805bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_15 2806bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG 2807bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG_1 2808bf215546Sopenharmony_ci 0x0, // 2809bf215546Sopenharmony_ci 0x0 // PA_SC_TILE_STEERING_OVERRIDE 2810bf215546Sopenharmony_ci }; 2811bf215546Sopenharmony_ci static const uint32_t VgtMultiPrimIbResetIndxGfx103[] = { 2812bf215546Sopenharmony_ci 0x0, // VGT_MULTI_PRIM_IB_RESET_INDX 2813bf215546Sopenharmony_ci 0x0, // CB_RMI_GL2_CACHE_CONTROL 2814bf215546Sopenharmony_ci 0x0, // CB_BLEND_RED 2815bf215546Sopenharmony_ci 0x0, // CB_BLEND_GREEN 2816bf215546Sopenharmony_ci 0x0, // CB_BLEND_BLUE 2817bf215546Sopenharmony_ci 0x0, // CB_BLEND_ALPHA 2818bf215546Sopenharmony_ci 0x0, // CB_DCC_CONTROL 2819bf215546Sopenharmony_ci 0x0, // CB_COVERAGE_OUT_CONTROL 2820bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CONTROL 2821bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK 2822bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK_BF 2823bf215546Sopenharmony_ci 0x0, // 2824bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE 2825bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET 2826bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE 2827bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET 2828bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE 2829bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET 2830bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_1 2831bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_1 2832bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_1 2833bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_1 2834bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_1 2835bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_1 2836bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_2 2837bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_2 2838bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_2 2839bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_2 2840bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_2 2841bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_2 2842bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_3 2843bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_3 2844bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_3 2845bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_3 2846bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_3 2847bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_3 2848bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_4 2849bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_4 2850bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_4 2851bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_4 2852bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_4 2853bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_4 2854bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_5 2855bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_5 2856bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_5 2857bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_5 2858bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_5 2859bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_5 2860bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_6 2861bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_6 2862bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_6 2863bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_6 2864bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_6 2865bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_6 2866bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_7 2867bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_7 2868bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_7 2869bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_7 2870bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_7 2871bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_7 2872bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_8 2873bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_8 2874bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_8 2875bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_8 2876bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_8 2877bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_8 2878bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_9 2879bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_9 2880bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_9 2881bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_9 2882bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_9 2883bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_9 2884bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_10 2885bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_10 2886bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_10 2887bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_10 2888bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_10 2889bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_10 2890bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_11 2891bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_11 2892bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_11 2893bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_11 2894bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_11 2895bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_11 2896bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_12 2897bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_12 2898bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_12 2899bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_12 2900bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_12 2901bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_12 2902bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_13 2903bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_13 2904bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_13 2905bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_13 2906bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_13 2907bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_13 2908bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_14 2909bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_14 2910bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_14 2911bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_14 2912bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_14 2913bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_14 2914bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_15 2915bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_15 2916bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_15 2917bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_15 2918bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_15 2919bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_15 2920bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_X 2921bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Y 2922bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Z 2923bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_W 2924bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_X 2925bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Y 2926bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Z 2927bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_W 2928bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_X 2929bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Y 2930bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Z 2931bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_W 2932bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_X 2933bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Y 2934bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Z 2935bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_W 2936bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_X 2937bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Y 2938bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Z 2939bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_W 2940bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_X 2941bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Y 2942bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Z 2943bf215546Sopenharmony_ci 0x0 // PA_CL_UCP_5_W 2944bf215546Sopenharmony_ci }; 2945bf215546Sopenharmony_ci static const uint32_t SpiPsInputCntl0Gfx103[] = { 2946bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_0 2947bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_1 2948bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_2 2949bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_3 2950bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_4 2951bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_5 2952bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_6 2953bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_7 2954bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_8 2955bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_9 2956bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_10 2957bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_11 2958bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_12 2959bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_13 2960bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_14 2961bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_15 2962bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_16 2963bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_17 2964bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_18 2965bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_19 2966bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_20 2967bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_21 2968bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_22 2969bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_23 2970bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_24 2971bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_25 2972bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_26 2973bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_27 2974bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_28 2975bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_29 2976bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_30 2977bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_31 2978bf215546Sopenharmony_ci 0x0, // SPI_VS_OUT_CONFIG 2979bf215546Sopenharmony_ci 0x0, // 2980bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ENA 2981bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ADDR 2982bf215546Sopenharmony_ci 0x0, // SPI_INTERP_CONTROL_0 2983bf215546Sopenharmony_ci 0x2, // SPI_PS_IN_CONTROL 2984bf215546Sopenharmony_ci 0x0, // 2985bf215546Sopenharmony_ci 0x0, // SPI_BARYC_CNTL 2986bf215546Sopenharmony_ci 0x0, // 2987bf215546Sopenharmony_ci 0x0, // SPI_TMPRING_SIZE 2988bf215546Sopenharmony_ci 0x0, // 2989bf215546Sopenharmony_ci 0x0, // 2990bf215546Sopenharmony_ci 0x0, // 2991bf215546Sopenharmony_ci 0x0, // 2992bf215546Sopenharmony_ci 0x0, // 2993bf215546Sopenharmony_ci 0x0, // 2994bf215546Sopenharmony_ci 0x0, // 2995bf215546Sopenharmony_ci 0x0, // SPI_SHADER_IDX_FORMAT 2996bf215546Sopenharmony_ci 0x0, // SPI_SHADER_POS_FORMAT 2997bf215546Sopenharmony_ci 0x0, // SPI_SHADER_Z_FORMAT 2998bf215546Sopenharmony_ci 0x0 // SPI_SHADER_COL_FORMAT 2999bf215546Sopenharmony_ci }; 3000bf215546Sopenharmony_ci static const uint32_t SxPsDownconvertControlGfx103[] = { 3001bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT_CONTROL 3002bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT 3003bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_EPSILON 3004bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_CONTROL 3005bf215546Sopenharmony_ci 0x0, // SX_MRT0_BLEND_OPT 3006bf215546Sopenharmony_ci 0x0, // SX_MRT1_BLEND_OPT 3007bf215546Sopenharmony_ci 0x0, // SX_MRT2_BLEND_OPT 3008bf215546Sopenharmony_ci 0x0, // SX_MRT3_BLEND_OPT 3009bf215546Sopenharmony_ci 0x0, // SX_MRT4_BLEND_OPT 3010bf215546Sopenharmony_ci 0x0, // SX_MRT5_BLEND_OPT 3011bf215546Sopenharmony_ci 0x0, // SX_MRT6_BLEND_OPT 3012bf215546Sopenharmony_ci 0x0, // SX_MRT7_BLEND_OPT 3013bf215546Sopenharmony_ci 0x0, // CB_BLEND0_CONTROL 3014bf215546Sopenharmony_ci 0x0, // CB_BLEND1_CONTROL 3015bf215546Sopenharmony_ci 0x0, // CB_BLEND2_CONTROL 3016bf215546Sopenharmony_ci 0x0, // CB_BLEND3_CONTROL 3017bf215546Sopenharmony_ci 0x0, // CB_BLEND4_CONTROL 3018bf215546Sopenharmony_ci 0x0, // CB_BLEND5_CONTROL 3019bf215546Sopenharmony_ci 0x0, // CB_BLEND6_CONTROL 3020bf215546Sopenharmony_ci 0x0 // CB_BLEND7_CONTROL 3021bf215546Sopenharmony_ci }; 3022bf215546Sopenharmony_ci static const uint32_t PaClPointXRadGfx103[] = { 3023bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_X_RAD 3024bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_Y_RAD 3025bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_SIZE 3026bf215546Sopenharmony_ci 0x0 // PA_CL_POINT_CULL_RAD 3027bf215546Sopenharmony_ci }; 3028bf215546Sopenharmony_ci static const uint32_t GeMaxOutputPerSubgroupGfx103[] = { 3029bf215546Sopenharmony_ci 0x0, // GE_MAX_OUTPUT_PER_SUBGROUP 3030bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CONTROL 3031bf215546Sopenharmony_ci 0x0, // DB_EQAA 3032bf215546Sopenharmony_ci 0x0, // CB_COLOR_CONTROL 3033bf215546Sopenharmony_ci 0x0, // DB_SHADER_CONTROL 3034bf215546Sopenharmony_ci 0x90000, // PA_CL_CLIP_CNTL 3035bf215546Sopenharmony_ci 0x4, // PA_SU_SC_MODE_CNTL 3036bf215546Sopenharmony_ci 0x0, // PA_CL_VTE_CNTL 3037bf215546Sopenharmony_ci 0x0, // PA_CL_VS_OUT_CNTL 3038bf215546Sopenharmony_ci 0x0, // PA_CL_NANINF_CNTL 3039bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_CNTL 3040bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_SCALE 3041bf215546Sopenharmony_ci 0x0, // PA_SU_PRIM_FILTER_CNTL 3042bf215546Sopenharmony_ci 0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL 3043bf215546Sopenharmony_ci 0x0, // PA_CL_OBJPRIM_ID_CNTL 3044bf215546Sopenharmony_ci 0x0, // PA_CL_NGG_CNTL 3045bf215546Sopenharmony_ci 0x0, // PA_SU_OVER_RASTERIZATION_CNTL 3046bf215546Sopenharmony_ci 0x0, // PA_STEREO_CNTL 3047bf215546Sopenharmony_ci 0x0, // PA_STATE_STEREO_X 3048bf215546Sopenharmony_ci 0x0 // PA_CL_VRS_CNTL 3049bf215546Sopenharmony_ci }; 3050bf215546Sopenharmony_ci static const uint32_t PaSuPointSizeGfx103[] = { 3051bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_SIZE 3052bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_MINMAX 3053bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_CNTL 3054bf215546Sopenharmony_ci 0x0 // PA_SC_LINE_STIPPLE 3055bf215546Sopenharmony_ci }; 3056bf215546Sopenharmony_ci static const uint32_t VgtHosMaxTessLevelGfx103[] = { 3057bf215546Sopenharmony_ci 0x0, // VGT_HOS_MAX_TESS_LEVEL 3058bf215546Sopenharmony_ci 0x0 // VGT_HOS_MIN_TESS_LEVEL 3059bf215546Sopenharmony_ci }; 3060bf215546Sopenharmony_ci static const uint32_t VgtGsModeGfx103[] = { 3061bf215546Sopenharmony_ci 0x0, // VGT_GS_MODE 3062bf215546Sopenharmony_ci 0x0, // VGT_GS_ONCHIP_CNTL 3063bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_0 3064bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_1 3065bf215546Sopenharmony_ci 0x0, // VGT_ENHANCE 3066bf215546Sopenharmony_ci 0x100, // VGT_GS_PER_ES 3067bf215546Sopenharmony_ci 0x80, // VGT_ES_PER_GS 3068bf215546Sopenharmony_ci 0x2, // VGT_GS_PER_VS 3069bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_1 3070bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_2 3071bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_OFFSET_3 3072bf215546Sopenharmony_ci 0x0 // VGT_GS_OUT_PRIM_TYPE 3073bf215546Sopenharmony_ci }; 3074bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidEnGfx103[] = { 3075bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_EN 3076bf215546Sopenharmony_ci }; 3077bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidResetGfx103[] = { 3078bf215546Sopenharmony_ci 0x0 // VGT_PRIMITIVEID_RESET 3079bf215546Sopenharmony_ci }; 3080bf215546Sopenharmony_ci static const uint32_t VgtDrawPayloadCntlGfx103[] = { 3081bf215546Sopenharmony_ci 0x0, // VGT_DRAW_PAYLOAD_CNTL 3082bf215546Sopenharmony_ci 0x0, // 3083bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_0 3084bf215546Sopenharmony_ci 0x0, // VGT_INSTANCE_STEP_RATE_1 3085bf215546Sopenharmony_ci 0x0, // IA_MULTI_VGT_PARAM 3086bf215546Sopenharmony_ci 0x0, // VGT_ESGS_RING_ITEMSIZE 3087bf215546Sopenharmony_ci 0x0, // VGT_GSVS_RING_ITEMSIZE 3088bf215546Sopenharmony_ci 0x0, // VGT_REUSE_OFF 3089bf215546Sopenharmony_ci 0x0, // VGT_VTX_CNT_EN 3090bf215546Sopenharmony_ci 0x0, // DB_HTILE_SURFACE 3091bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE0 3092bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE1 3093bf215546Sopenharmony_ci 0x0, // DB_PRELOAD_CONTROL 3094bf215546Sopenharmony_ci 0x0, // 3095bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_0 3096bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_0 3097bf215546Sopenharmony_ci 0x0, // 3098bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_0 3099bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_1 3100bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_1 3101bf215546Sopenharmony_ci 0x0, // 3102bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_1 3103bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_2 3104bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_2 3105bf215546Sopenharmony_ci 0x0, // 3106bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_2 3107bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_SIZE_3 3108bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_VTX_STRIDE_3 3109bf215546Sopenharmony_ci 0x0, // 3110bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_BUFFER_OFFSET_3 3111bf215546Sopenharmony_ci 0x0, // 3112bf215546Sopenharmony_ci 0x0, // 3113bf215546Sopenharmony_ci 0x0, // 3114bf215546Sopenharmony_ci 0x0, // 3115bf215546Sopenharmony_ci 0x0, // 3116bf215546Sopenharmony_ci 0x0, // 3117bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET 3118bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE 3119bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE 3120bf215546Sopenharmony_ci 0x0, // 3121bf215546Sopenharmony_ci 0x0, // VGT_GS_MAX_VERT_OUT 3122bf215546Sopenharmony_ci 0x0, // 3123bf215546Sopenharmony_ci 0x0, // 3124bf215546Sopenharmony_ci 0x0, // 3125bf215546Sopenharmony_ci 0x0, // 3126bf215546Sopenharmony_ci 0x0, // GE_NGG_SUBGRP_CNTL 3127bf215546Sopenharmony_ci 0x0, // VGT_TESS_DISTRIBUTION 3128bf215546Sopenharmony_ci 0x0, // VGT_SHADER_STAGES_EN 3129bf215546Sopenharmony_ci 0x0, // VGT_LS_HS_CONFIG 3130bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE 3131bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_1 3132bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_2 3133bf215546Sopenharmony_ci 0x0, // VGT_GS_VERT_ITEMSIZE_3 3134bf215546Sopenharmony_ci 0x0, // VGT_TF_PARAM 3135bf215546Sopenharmony_ci 0x0, // DB_ALPHA_TO_MASK 3136bf215546Sopenharmony_ci 0x0, // 3137bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL 3138bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_CLAMP 3139bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE 3140bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET 3141bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_SCALE 3142bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET 3143bf215546Sopenharmony_ci 0x0, // VGT_GS_INSTANCE_CNT 3144bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_CONFIG 3145bf215546Sopenharmony_ci 0x0 // VGT_STRMOUT_BUFFER_CONFIG 3146bf215546Sopenharmony_ci }; 3147bf215546Sopenharmony_ci static const uint32_t PaScCentroidPriority0Gfx103[] = { 3148bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_0 3149bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_1 3150bf215546Sopenharmony_ci 0x1000, // PA_SC_LINE_CNTL 3151bf215546Sopenharmony_ci 0x0, // PA_SC_AA_CONFIG 3152bf215546Sopenharmony_ci 0x5, // PA_SU_VTX_CNTL 3153bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ 3154bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_DISC_ADJ 3155bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ 3156bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ 3157bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 3158bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 3159bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 3160bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 3161bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 3162bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1 3163bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2 3164bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3 3165bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 3166bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1 3167bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2 3168bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3 3169bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 3170bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1 3171bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2 3172bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3 3173bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0 3174bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1 3175bf215546Sopenharmony_ci 0x0, // PA_SC_SHADER_CONTROL 3176bf215546Sopenharmony_ci 0x3, // PA_SC_BINNER_CNTL_0 3177bf215546Sopenharmony_ci 0x0, // PA_SC_BINNER_CNTL_1 3178bf215546Sopenharmony_ci 0x100000, // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 3179bf215546Sopenharmony_ci 0x0, // PA_SC_NGG_MODE_CNTL 3180bf215546Sopenharmony_ci 0x0, // 3181bf215546Sopenharmony_ci 0x1e, // VGT_VERTEX_REUSE_BLOCK_CNTL 3182bf215546Sopenharmony_ci 0x20, // VGT_OUT_DEALLOC_CNTL 3183bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE 3184bf215546Sopenharmony_ci 0x0, // 3185bf215546Sopenharmony_ci 0x0, // 3186bf215546Sopenharmony_ci 0x0, // CB_COLOR0_VIEW 3187bf215546Sopenharmony_ci 0x0, // CB_COLOR0_INFO 3188bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB 3189bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_CONTROL 3190bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK 3191bf215546Sopenharmony_ci 0x0, // 3192bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK 3193bf215546Sopenharmony_ci 0x0, // 3194bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD0 3195bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CLEAR_WORD1 3196bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE 3197bf215546Sopenharmony_ci 0x0, // 3198bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE 3199bf215546Sopenharmony_ci 0x0, // 3200bf215546Sopenharmony_ci 0x0, // 3201bf215546Sopenharmony_ci 0x0, // CB_COLOR1_VIEW 3202bf215546Sopenharmony_ci 0x0, // CB_COLOR1_INFO 3203bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB 3204bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_CONTROL 3205bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK 3206bf215546Sopenharmony_ci 0x0, // 3207bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK 3208bf215546Sopenharmony_ci 0x0, // 3209bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD0 3210bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CLEAR_WORD1 3211bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE 3212bf215546Sopenharmony_ci 0x0, // 3213bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE 3214bf215546Sopenharmony_ci 0x0, // 3215bf215546Sopenharmony_ci 0x0, // 3216bf215546Sopenharmony_ci 0x0, // CB_COLOR2_VIEW 3217bf215546Sopenharmony_ci 0x0, // CB_COLOR2_INFO 3218bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB 3219bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_CONTROL 3220bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK 3221bf215546Sopenharmony_ci 0x0, // 3222bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK 3223bf215546Sopenharmony_ci 0x0, // 3224bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD0 3225bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CLEAR_WORD1 3226bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE 3227bf215546Sopenharmony_ci 0x0, // 3228bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE 3229bf215546Sopenharmony_ci 0x0, // 3230bf215546Sopenharmony_ci 0x0, // 3231bf215546Sopenharmony_ci 0x0, // CB_COLOR3_VIEW 3232bf215546Sopenharmony_ci 0x0, // CB_COLOR3_INFO 3233bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB 3234bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_CONTROL 3235bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK 3236bf215546Sopenharmony_ci 0x0, // 3237bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK 3238bf215546Sopenharmony_ci 0x0, // 3239bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD0 3240bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CLEAR_WORD1 3241bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE 3242bf215546Sopenharmony_ci 0x0, // 3243bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE 3244bf215546Sopenharmony_ci 0x0, // 3245bf215546Sopenharmony_ci 0x0, // 3246bf215546Sopenharmony_ci 0x0, // CB_COLOR4_VIEW 3247bf215546Sopenharmony_ci 0x0, // CB_COLOR4_INFO 3248bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB 3249bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_CONTROL 3250bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK 3251bf215546Sopenharmony_ci 0x0, // 3252bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK 3253bf215546Sopenharmony_ci 0x0, // 3254bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD0 3255bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CLEAR_WORD1 3256bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE 3257bf215546Sopenharmony_ci 0x0, // 3258bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE 3259bf215546Sopenharmony_ci 0x0, // 3260bf215546Sopenharmony_ci 0x0, // 3261bf215546Sopenharmony_ci 0x0, // CB_COLOR5_VIEW 3262bf215546Sopenharmony_ci 0x0, // CB_COLOR5_INFO 3263bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB 3264bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_CONTROL 3265bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK 3266bf215546Sopenharmony_ci 0x0, // 3267bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK 3268bf215546Sopenharmony_ci 0x0, // 3269bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD0 3270bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CLEAR_WORD1 3271bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE 3272bf215546Sopenharmony_ci 0x0, // 3273bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE 3274bf215546Sopenharmony_ci 0x0, // 3275bf215546Sopenharmony_ci 0x0, // 3276bf215546Sopenharmony_ci 0x0, // CB_COLOR6_VIEW 3277bf215546Sopenharmony_ci 0x0, // CB_COLOR6_INFO 3278bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB 3279bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_CONTROL 3280bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK 3281bf215546Sopenharmony_ci 0x0, // 3282bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK 3283bf215546Sopenharmony_ci 0x0, // 3284bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD0 3285bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CLEAR_WORD1 3286bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE 3287bf215546Sopenharmony_ci 0x0, // 3288bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE 3289bf215546Sopenharmony_ci 0x0, // 3290bf215546Sopenharmony_ci 0x0, // 3291bf215546Sopenharmony_ci 0x0, // CB_COLOR7_VIEW 3292bf215546Sopenharmony_ci 0x0, // CB_COLOR7_INFO 3293bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB 3294bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_CONTROL 3295bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK 3296bf215546Sopenharmony_ci 0x0, // 3297bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK 3298bf215546Sopenharmony_ci 0x0, // 3299bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD0 3300bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CLEAR_WORD1 3301bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE 3302bf215546Sopenharmony_ci 0x0, // 3303bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE_EXT 3304bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE_EXT 3305bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE_EXT 3306bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE_EXT 3307bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE_EXT 3308bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE_EXT 3309bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE_EXT 3310bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE_EXT 3311bf215546Sopenharmony_ci 0x0, // CB_COLOR0_CMASK_BASE_EXT 3312bf215546Sopenharmony_ci 0x0, // CB_COLOR1_CMASK_BASE_EXT 3313bf215546Sopenharmony_ci 0x0, // CB_COLOR2_CMASK_BASE_EXT 3314bf215546Sopenharmony_ci 0x0, // CB_COLOR3_CMASK_BASE_EXT 3315bf215546Sopenharmony_ci 0x0, // CB_COLOR4_CMASK_BASE_EXT 3316bf215546Sopenharmony_ci 0x0, // CB_COLOR5_CMASK_BASE_EXT 3317bf215546Sopenharmony_ci 0x0, // CB_COLOR6_CMASK_BASE_EXT 3318bf215546Sopenharmony_ci 0x0, // CB_COLOR7_CMASK_BASE_EXT 3319bf215546Sopenharmony_ci 0x0, // CB_COLOR0_FMASK_BASE_EXT 3320bf215546Sopenharmony_ci 0x0, // CB_COLOR1_FMASK_BASE_EXT 3321bf215546Sopenharmony_ci 0x0, // CB_COLOR2_FMASK_BASE_EXT 3322bf215546Sopenharmony_ci 0x0, // CB_COLOR3_FMASK_BASE_EXT 3323bf215546Sopenharmony_ci 0x0, // CB_COLOR4_FMASK_BASE_EXT 3324bf215546Sopenharmony_ci 0x0, // CB_COLOR5_FMASK_BASE_EXT 3325bf215546Sopenharmony_ci 0x0, // CB_COLOR6_FMASK_BASE_EXT 3326bf215546Sopenharmony_ci 0x0, // CB_COLOR7_FMASK_BASE_EXT 3327bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE_EXT 3328bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE_EXT 3329bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE_EXT 3330bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE_EXT 3331bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE_EXT 3332bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE_EXT 3333bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE_EXT 3334bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE_EXT 3335bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB2 3336bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB2 3337bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB2 3338bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB2 3339bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB2 3340bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB2 3341bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB2 3342bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB2 3343bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB3 3344bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB3 3345bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB3 3346bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB3 3347bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB3 3348bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB3 3349bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB3 3350bf215546Sopenharmony_ci 0x0 // CB_COLOR7_ATTRIB3 3351bf215546Sopenharmony_ci }; 3352bf215546Sopenharmony_ci 3353bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlGfx103)); 3354bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Gfx103)); 3355bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 3356bf215546Sopenharmony_ci SET(VgtMultiPrimIbResetIndxGfx103)); 3357bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Gfx103)); 3358bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028750_SX_PS_DOWNCONVERT_CONTROL, 3359bf215546Sopenharmony_ci SET(SxPsDownconvertControlGfx103)); 3360bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287D4_PA_CL_POINT_X_RAD, SET(PaClPointXRadGfx103)); 3361bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, 3362bf215546Sopenharmony_ci SET(GeMaxOutputPerSubgroupGfx103)); 3363bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeGfx103)); 3364bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelGfx103)); 3365bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A40_VGT_GS_MODE, SET(VgtGsModeGfx103)); 3366bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnGfx103)); 3367bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetGfx103)); 3368bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A98_VGT_DRAW_PAYLOAD_CNTL, SET(VgtDrawPayloadCntlGfx103)); 3369bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0, 3370bf215546Sopenharmony_ci SET(PaScCentroidPriority0Gfx103)); 3371bf215546Sopenharmony_ci 3372bf215546Sopenharmony_ci for (unsigned i = 0; i < num_reg_pairs; i++) 3373bf215546Sopenharmony_ci set_context_reg_seq_array(cs, reg_offsets[i], 1, ®_values[i]); 3374bf215546Sopenharmony_ci} 3375bf215546Sopenharmony_ci 3376bf215546Sopenharmony_ci/** 3377bf215546Sopenharmony_ci * Emulate CLEAR_STATE. Additionally, initialize num_reg_pairs registers specified 3378bf215546Sopenharmony_ci * via reg_offsets and reg_values. 3379bf215546Sopenharmony_ci */ 3380bf215546Sopenharmony_cistatic void gfx11_emulate_clear_state(struct radeon_cmdbuf *cs, unsigned num_reg_pairs, 3381bf215546Sopenharmony_ci unsigned *reg_offsets, uint32_t *reg_values, 3382bf215546Sopenharmony_ci set_context_reg_seq_array_fn set_context_reg_seq_array) 3383bf215546Sopenharmony_ci{ 3384bf215546Sopenharmony_ci static const uint32_t DbRenderControlGfx11[] = { 3385bf215546Sopenharmony_ci 0x0, // DB_RENDER_CONTROL 3386bf215546Sopenharmony_ci 0x0, // DB_COUNT_CONTROL 3387bf215546Sopenharmony_ci 0x0, // DB_DEPTH_VIEW 3388bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE 3389bf215546Sopenharmony_ci 0x0, // DB_RENDER_OVERRIDE2 3390bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE 3391bf215546Sopenharmony_ci 0x0, // 3392bf215546Sopenharmony_ci 0x0, // DB_DEPTH_SIZE_XY 3393bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MIN 3394bf215546Sopenharmony_ci 0x0, // DB_DEPTH_BOUNDS_MAX 3395bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CLEAR 3396bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CLEAR 3397bf215546Sopenharmony_ci 0x0, // PA_SC_SCREEN_SCISSOR_TL 3398bf215546Sopenharmony_ci 0x40004000, // PA_SC_SCREEN_SCISSOR_BR 3399bf215546Sopenharmony_ci 0x0, // 3400bf215546Sopenharmony_ci 0x0, // DB_RESERVED_REG_2 3401bf215546Sopenharmony_ci 0x0, // DB_Z_INFO 3402bf215546Sopenharmony_ci 0x0, // DB_STENCIL_INFO 3403bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE 3404bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE 3405bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE 3406bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE 3407bf215546Sopenharmony_ci 0x0, // DB_RESERVED_REG_1 3408bf215546Sopenharmony_ci 0x0, // DB_RESERVED_REG_3 3409bf215546Sopenharmony_ci 0x0, // DB_SPI_VRS_CENTER_LOCATION 3410bf215546Sopenharmony_ci 0x0, // 3411bf215546Sopenharmony_ci 0x0, // DB_Z_READ_BASE_HI 3412bf215546Sopenharmony_ci 0x0, // DB_STENCIL_READ_BASE_HI 3413bf215546Sopenharmony_ci 0x0, // DB_Z_WRITE_BASE_HI 3414bf215546Sopenharmony_ci 0x0, // DB_STENCIL_WRITE_BASE_HI 3415bf215546Sopenharmony_ci 0x0, // DB_HTILE_DATA_BASE_HI 3416bf215546Sopenharmony_ci 0x0, // DB_RMI_L2_CACHE_CONTROL 3417bf215546Sopenharmony_ci 0x0, // TA_BC_BASE_ADDR 3418bf215546Sopenharmony_ci 0x0, // TA_BC_BASE_ADDR_HI 3419bf215546Sopenharmony_ci }; 3420bf215546Sopenharmony_ci static const uint32_t CoherDestBaseHi0Gfx11[] = { 3421bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_0 3422bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_1 3423bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_2 3424bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_HI_3 3425bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_2 3426bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_3 3427bf215546Sopenharmony_ci 0x0, // PA_SC_WINDOW_OFFSET 3428bf215546Sopenharmony_ci 0x80000000, // PA_SC_WINDOW_SCISSOR_TL 3429bf215546Sopenharmony_ci 0x40004000, // PA_SC_WINDOW_SCISSOR_BR 3430bf215546Sopenharmony_ci 0xffff, // PA_SC_CLIPRECT_RULE 3431bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_0_TL 3432bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_0_BR 3433bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_1_TL 3434bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_1_BR 3435bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_2_TL 3436bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_2_BR 3437bf215546Sopenharmony_ci 0x0, // PA_SC_CLIPRECT_3_TL 3438bf215546Sopenharmony_ci 0x40004000, // PA_SC_CLIPRECT_3_BR 3439bf215546Sopenharmony_ci 0xaa99aaaa, // PA_SC_EDGERULE 3440bf215546Sopenharmony_ci 0x0, // PA_SU_HARDWARE_SCREEN_OFFSET 3441bf215546Sopenharmony_ci 0xffffffff, // CB_TARGET_MASK 3442bf215546Sopenharmony_ci 0xffffffff, // CB_SHADER_MASK 3443bf215546Sopenharmony_ci 0x80000000, // PA_SC_GENERIC_SCISSOR_TL 3444bf215546Sopenharmony_ci 0x40004000, // PA_SC_GENERIC_SCISSOR_BR 3445bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_0 3446bf215546Sopenharmony_ci 0x0, // COHER_DEST_BASE_1 3447bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_0_TL 3448bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_0_BR 3449bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_1_TL 3450bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_1_BR 3451bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_2_TL 3452bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_2_BR 3453bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_3_TL 3454bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_3_BR 3455bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_4_TL 3456bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_4_BR 3457bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_5_TL 3458bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_5_BR 3459bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_6_TL 3460bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_6_BR 3461bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_7_TL 3462bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_7_BR 3463bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_8_TL 3464bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_8_BR 3465bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_9_TL 3466bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_9_BR 3467bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_10_TL 3468bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_10_BR 3469bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_11_TL 3470bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_11_BR 3471bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_12_TL 3472bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_12_BR 3473bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_13_TL 3474bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_13_BR 3475bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_14_TL 3476bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_14_BR 3477bf215546Sopenharmony_ci 0x80000000, // PA_SC_VPORT_SCISSOR_15_TL 3478bf215546Sopenharmony_ci 0x40004000, // PA_SC_VPORT_SCISSOR_15_BR 3479bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_0 3480bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_0 3481bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_1 3482bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_1 3483bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_2 3484bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_2 3485bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_3 3486bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_3 3487bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_4 3488bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_4 3489bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_5 3490bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_5 3491bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_6 3492bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_6 3493bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_7 3494bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_7 3495bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_8 3496bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_8 3497bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_9 3498bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_9 3499bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_10 3500bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_10 3501bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_11 3502bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_11 3503bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_12 3504bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_12 3505bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_13 3506bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_13 3507bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_14 3508bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_14 3509bf215546Sopenharmony_ci 0x0, // PA_SC_VPORT_ZMIN_15 3510bf215546Sopenharmony_ci 0x3f800000, // PA_SC_VPORT_ZMAX_15 3511bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG 3512bf215546Sopenharmony_ci 0x0, // PA_SC_RASTER_CONFIG_1 3513bf215546Sopenharmony_ci 0x0, // 3514bf215546Sopenharmony_ci 0x0, // PA_SC_TILE_STEERING_OVERRIDE 3515bf215546Sopenharmony_ci }; 3516bf215546Sopenharmony_ci static const uint32_t PaScVrsOverrideCntlGfx11[] = { 3517bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_OVERRIDE_CNTL 3518bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_FEEDBACK_BASE 3519bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_FEEDBACK_BASE_EXT 3520bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_FEEDBACK_SIZE_XY 3521bf215546Sopenharmony_ci 0x0, // 3522bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_CACHE_CNTL 3523bf215546Sopenharmony_ci }; 3524bf215546Sopenharmony_ci static const uint32_t PaScVrsRateBaseGfx11[] = { 3525bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_BASE 3526bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_BASE_EXT 3527bf215546Sopenharmony_ci 0x0, // PA_SC_VRS_RATE_SIZE_XY 3528bf215546Sopenharmony_ci }; 3529bf215546Sopenharmony_ci static const uint32_t VgtMultiPrimIbResetIndxGfx11[] = { 3530bf215546Sopenharmony_ci 0x0, // VGT_MULTI_PRIM_IB_RESET_INDX 3531bf215546Sopenharmony_ci 0x0, // CB_RMI_GL2_CACHE_CONTROL 3532bf215546Sopenharmony_ci 0x0, // CB_BLEND_RED 3533bf215546Sopenharmony_ci 0x0, // CB_BLEND_GREEN 3534bf215546Sopenharmony_ci 0x0, // CB_BLEND_BLUE 3535bf215546Sopenharmony_ci 0x0, // CB_BLEND_ALPHA 3536bf215546Sopenharmony_ci 0x0, // CB_FDCC_CONTROL 3537bf215546Sopenharmony_ci 0x0, // CB_COVERAGE_OUT_CONTROL 3538bf215546Sopenharmony_ci 0x0, // DB_STENCIL_CONTROL 3539bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK 3540bf215546Sopenharmony_ci 0x1000000, // DB_STENCILREFMASK_BF 3541bf215546Sopenharmony_ci 0x0, // 3542bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE 3543bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET 3544bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE 3545bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET 3546bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE 3547bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET 3548bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_1 3549bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_1 3550bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_1 3551bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_1 3552bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_1 3553bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_1 3554bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_2 3555bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_2 3556bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_2 3557bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_2 3558bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_2 3559bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_2 3560bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_3 3561bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_3 3562bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_3 3563bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_3 3564bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_3 3565bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_3 3566bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_4 3567bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_4 3568bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_4 3569bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_4 3570bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_4 3571bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_4 3572bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_5 3573bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_5 3574bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_5 3575bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_5 3576bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_5 3577bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_5 3578bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_6 3579bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_6 3580bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_6 3581bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_6 3582bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_6 3583bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_6 3584bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_7 3585bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_7 3586bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_7 3587bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_7 3588bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_7 3589bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_7 3590bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_8 3591bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_8 3592bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_8 3593bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_8 3594bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_8 3595bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_8 3596bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_9 3597bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_9 3598bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_9 3599bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_9 3600bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_9 3601bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_9 3602bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_10 3603bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_10 3604bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_10 3605bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_10 3606bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_10 3607bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_10 3608bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_11 3609bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_11 3610bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_11 3611bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_11 3612bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_11 3613bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_11 3614bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_12 3615bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_12 3616bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_12 3617bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_12 3618bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_12 3619bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_12 3620bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_13 3621bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_13 3622bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_13 3623bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_13 3624bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_13 3625bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_13 3626bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_14 3627bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_14 3628bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_14 3629bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_14 3630bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_14 3631bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_14 3632bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XSCALE_15 3633bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_XOFFSET_15 3634bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YSCALE_15 3635bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_YOFFSET_15 3636bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZSCALE_15 3637bf215546Sopenharmony_ci 0x0, // PA_CL_VPORT_ZOFFSET_15 3638bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_X 3639bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Y 3640bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_Z 3641bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_0_W 3642bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_X 3643bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Y 3644bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_Z 3645bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_1_W 3646bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_X 3647bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Y 3648bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_Z 3649bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_2_W 3650bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_X 3651bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Y 3652bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_Z 3653bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_3_W 3654bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_X 3655bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Y 3656bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_Z 3657bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_4_W 3658bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_X 3659bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Y 3660bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_Z 3661bf215546Sopenharmony_ci 0x0, // PA_CL_UCP_5_W 3662bf215546Sopenharmony_ci }; 3663bf215546Sopenharmony_ci static const uint32_t SpiPsInputCntl0Gfx11[] = { 3664bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_0 3665bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_1 3666bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_2 3667bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_3 3668bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_4 3669bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_5 3670bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_6 3671bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_7 3672bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_8 3673bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_9 3674bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_10 3675bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_11 3676bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_12 3677bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_13 3678bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_14 3679bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_15 3680bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_16 3681bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_17 3682bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_18 3683bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_19 3684bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_20 3685bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_21 3686bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_22 3687bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_23 3688bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_24 3689bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_25 3690bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_26 3691bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_27 3692bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_28 3693bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_29 3694bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_30 3695bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_CNTL_31 3696bf215546Sopenharmony_ci 0x0, // SPI_VS_OUT_CONFIG 3697bf215546Sopenharmony_ci 0x0, // 3698bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ENA 3699bf215546Sopenharmony_ci 0x0, // SPI_PS_INPUT_ADDR 3700bf215546Sopenharmony_ci 0x0, // SPI_INTERP_CONTROL_0 3701bf215546Sopenharmony_ci 0x2, // SPI_PS_IN_CONTROL 3702bf215546Sopenharmony_ci 0x0, // SPI_BARYC_SSAA_CNTL 3703bf215546Sopenharmony_ci 0x0, // SPI_BARYC_CNTL 3704bf215546Sopenharmony_ci 0x0, // 3705bf215546Sopenharmony_ci 0x0, // SPI_TMPRING_SIZE 3706bf215546Sopenharmony_ci 0x0, // SPI_GFX_SCRATCH_BASE_LO 3707bf215546Sopenharmony_ci 0x0, // SPI_GFX_SCRATCH_BASE_HI 3708bf215546Sopenharmony_ci }; 3709bf215546Sopenharmony_ci static const uint32_t SpiShaderIdxFormatGfx11[] = { 3710bf215546Sopenharmony_ci 0x0, // SPI_SHADER_IDX_FORMAT 3711bf215546Sopenharmony_ci 0x0, // SPI_SHADER_POS_FORMAT 3712bf215546Sopenharmony_ci 0x0, // SPI_SHADER_Z_FORMAT 3713bf215546Sopenharmony_ci 0x0, // SPI_SHADER_COL_FORMAT 3714bf215546Sopenharmony_ci }; 3715bf215546Sopenharmony_ci static const uint32_t SxPsDownconvertControlGfx11[] = { 3716bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT_CONTROL 3717bf215546Sopenharmony_ci 0x0, // SX_PS_DOWNCONVERT 3718bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_EPSILON 3719bf215546Sopenharmony_ci 0x0, // SX_BLEND_OPT_CONTROL 3720bf215546Sopenharmony_ci 0x0, // SX_MRT0_BLEND_OPT 3721bf215546Sopenharmony_ci 0x0, // SX_MRT1_BLEND_OPT 3722bf215546Sopenharmony_ci 0x0, // SX_MRT2_BLEND_OPT 3723bf215546Sopenharmony_ci 0x0, // SX_MRT3_BLEND_OPT 3724bf215546Sopenharmony_ci 0x0, // SX_MRT4_BLEND_OPT 3725bf215546Sopenharmony_ci 0x0, // SX_MRT5_BLEND_OPT 3726bf215546Sopenharmony_ci 0x0, // SX_MRT6_BLEND_OPT 3727bf215546Sopenharmony_ci 0x0, // SX_MRT7_BLEND_OPT 3728bf215546Sopenharmony_ci 0x0, // CB_BLEND0_CONTROL 3729bf215546Sopenharmony_ci 0x0, // CB_BLEND1_CONTROL 3730bf215546Sopenharmony_ci 0x0, // CB_BLEND2_CONTROL 3731bf215546Sopenharmony_ci 0x0, // CB_BLEND3_CONTROL 3732bf215546Sopenharmony_ci 0x0, // CB_BLEND4_CONTROL 3733bf215546Sopenharmony_ci 0x0, // CB_BLEND5_CONTROL 3734bf215546Sopenharmony_ci 0x0, // CB_BLEND6_CONTROL 3735bf215546Sopenharmony_ci 0x0, // CB_BLEND7_CONTROL 3736bf215546Sopenharmony_ci }; 3737bf215546Sopenharmony_ci static const uint32_t PaClPointXRadGfx11[] = { 3738bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_X_RAD 3739bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_Y_RAD 3740bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_SIZE 3741bf215546Sopenharmony_ci 0x0, // PA_CL_POINT_CULL_RAD 3742bf215546Sopenharmony_ci }; 3743bf215546Sopenharmony_ci static const uint32_t GeMaxOutputPerSubgroupGfx11[] = { 3744bf215546Sopenharmony_ci 0x0, // GE_MAX_OUTPUT_PER_SUBGROUP 3745bf215546Sopenharmony_ci 0x0, // DB_DEPTH_CONTROL 3746bf215546Sopenharmony_ci 0x0, // DB_EQAA 3747bf215546Sopenharmony_ci 0x0, // CB_COLOR_CONTROL 3748bf215546Sopenharmony_ci 0x0, // DB_SHADER_CONTROL 3749bf215546Sopenharmony_ci 0x90000, // PA_CL_CLIP_CNTL 3750bf215546Sopenharmony_ci 0x4, // PA_SU_SC_MODE_CNTL 3751bf215546Sopenharmony_ci 0x0, // PA_CL_VTE_CNTL 3752bf215546Sopenharmony_ci 0x0, // PA_CL_VS_OUT_CNTL 3753bf215546Sopenharmony_ci 0x0, // PA_CL_NANINF_CNTL 3754bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_CNTL 3755bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_STIPPLE_SCALE 3756bf215546Sopenharmony_ci 0x0, // PA_SU_PRIM_FILTER_CNTL 3757bf215546Sopenharmony_ci 0x0, // PA_SU_SMALL_PRIM_FILTER_CNTL 3758bf215546Sopenharmony_ci 0x0, // 3759bf215546Sopenharmony_ci 0x0, // PA_CL_NGG_CNTL 3760bf215546Sopenharmony_ci 0x0, // PA_SU_OVER_RASTERIZATION_CNTL 3761bf215546Sopenharmony_ci 0x0, // PA_STEREO_CNTL 3762bf215546Sopenharmony_ci 0x0, // PA_STATE_STEREO_X 3763bf215546Sopenharmony_ci 0x0, // PA_CL_VRS_CNTL 3764bf215546Sopenharmony_ci }; 3765bf215546Sopenharmony_ci static const uint32_t PaSuPointSizeGfx11[] = { 3766bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_SIZE 3767bf215546Sopenharmony_ci 0x0, // PA_SU_POINT_MINMAX 3768bf215546Sopenharmony_ci 0x0, // PA_SU_LINE_CNTL 3769bf215546Sopenharmony_ci 0x0, // PA_SC_LINE_STIPPLE 3770bf215546Sopenharmony_ci }; 3771bf215546Sopenharmony_ci static const uint32_t VgtHosMaxTessLevelGfx11[] = { 3772bf215546Sopenharmony_ci 0x0, // VGT_HOS_MAX_TESS_LEVEL 3773bf215546Sopenharmony_ci 0x0, // VGT_HOS_MIN_TESS_LEVEL 3774bf215546Sopenharmony_ci }; 3775bf215546Sopenharmony_ci static const uint32_t PaScModeCntl0Gfx11[] = { 3776bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_0 3777bf215546Sopenharmony_ci 0x0, // PA_SC_MODE_CNTL_1 3778bf215546Sopenharmony_ci 0x0, // VGT_ENHANCE 3779bf215546Sopenharmony_ci }; 3780bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidEnGfx11[] = { 3781bf215546Sopenharmony_ci 0x0, // VGT_PRIMITIVEID_EN 3782bf215546Sopenharmony_ci }; 3783bf215546Sopenharmony_ci static const uint32_t VgtPrimitiveidResetGfx11[] = { 3784bf215546Sopenharmony_ci 0x0, // VGT_PRIMITIVEID_RESET 3785bf215546Sopenharmony_ci }; 3786bf215546Sopenharmony_ci static const uint32_t VgtDrawPayloadCntlGfx11[] = { 3787bf215546Sopenharmony_ci 0x0, // VGT_DRAW_PAYLOAD_CNTL 3788bf215546Sopenharmony_ci }; 3789bf215546Sopenharmony_ci static const uint32_t VgtEsgsRingItemsizeGfx11[] = { 3790bf215546Sopenharmony_ci 0x0, // VGT_ESGS_RING_ITEMSIZE 3791bf215546Sopenharmony_ci 0x0, // 3792bf215546Sopenharmony_ci 0x0, // VGT_REUSE_OFF 3793bf215546Sopenharmony_ci 0x0, // 3794bf215546Sopenharmony_ci 0x0, // DB_HTILE_SURFACE 3795bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE0 3796bf215546Sopenharmony_ci 0x0, // DB_SRESULTS_COMPARE_STATE1 3797bf215546Sopenharmony_ci }; 3798bf215546Sopenharmony_ci static const uint32_t VgtStrmoutDrawOpaqueOffsetGfx11[] = { 3799bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_OFFSET 3800bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE 3801bf215546Sopenharmony_ci 0x0, // VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE 3802bf215546Sopenharmony_ci 0x0, // 3803bf215546Sopenharmony_ci 0x0, // VGT_GS_MAX_VERT_OUT 3804bf215546Sopenharmony_ci }; 3805bf215546Sopenharmony_ci static const uint32_t GeNggSubgrpCntlGfx11[] = { 3806bf215546Sopenharmony_ci 0x0, // GE_NGG_SUBGRP_CNTL 3807bf215546Sopenharmony_ci 0x0, // VGT_TESS_DISTRIBUTION 3808bf215546Sopenharmony_ci 0x0, // VGT_SHADER_STAGES_EN 3809bf215546Sopenharmony_ci 0x0, // VGT_LS_HS_CONFIG 3810bf215546Sopenharmony_ci }; 3811bf215546Sopenharmony_ci static const uint32_t VgtTfParamGfx11[] = { 3812bf215546Sopenharmony_ci 0x0, // VGT_TF_PARAM 3813bf215546Sopenharmony_ci 0x0, // DB_ALPHA_TO_MASK 3814bf215546Sopenharmony_ci 0x0, // 3815bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_DB_FMT_CNTL 3816bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_CLAMP 3817bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_SCALE 3818bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_FRONT_OFFSET 3819bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_SCALE 3820bf215546Sopenharmony_ci 0x0, // PA_SU_POLY_OFFSET_BACK_OFFSET 3821bf215546Sopenharmony_ci 0x0, // VGT_GS_INSTANCE_CNT 3822bf215546Sopenharmony_ci }; 3823bf215546Sopenharmony_ci static const uint32_t PaScCentroidPriority0Gfx11[] = { 3824bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_0 3825bf215546Sopenharmony_ci 0x0, // PA_SC_CENTROID_PRIORITY_1 3826bf215546Sopenharmony_ci 0x1000, // PA_SC_LINE_CNTL 3827bf215546Sopenharmony_ci 0x0, // PA_SC_AA_CONFIG 3828bf215546Sopenharmony_ci 0x5, // PA_SU_VTX_CNTL 3829bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_CLIP_ADJ 3830bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_VERT_DISC_ADJ 3831bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_CLIP_ADJ 3832bf215546Sopenharmony_ci 0x3f800000, // PA_CL_GB_HORZ_DISC_ADJ 3833bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 3834bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 3835bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 3836bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 3837bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 3838bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1 3839bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2 3840bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3 3841bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 3842bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1 3843bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2 3844bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3 3845bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 3846bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1 3847bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2 3848bf215546Sopenharmony_ci 0x0, // PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3 3849bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y0_X1Y0 3850bf215546Sopenharmony_ci 0xffffffff, // PA_SC_AA_MASK_X0Y1_X1Y1 3851bf215546Sopenharmony_ci 0x0, // PA_SC_SHADER_CONTROL 3852bf215546Sopenharmony_ci 0x3, // PA_SC_BINNER_CNTL_0 3853bf215546Sopenharmony_ci 0x0, // PA_SC_BINNER_CNTL_1 3854bf215546Sopenharmony_ci 0x100000, // PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 3855bf215546Sopenharmony_ci 0x0, // PA_SC_NGG_MODE_CNTL 3856bf215546Sopenharmony_ci 0x0, // PA_SC_BINNER_CNTL_2 3857bf215546Sopenharmony_ci }; 3858bf215546Sopenharmony_ci static const uint32_t CbColor0BaseGfx11[] = { 3859bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE 3860bf215546Sopenharmony_ci }; 3861bf215546Sopenharmony_ci static const uint32_t CbColor0ViewGfx11[] = { 3862bf215546Sopenharmony_ci 0x0, // CB_COLOR0_VIEW 3863bf215546Sopenharmony_ci 0x0, // CB_COLOR0_INFO 3864bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB 3865bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_CONTROL 3866bf215546Sopenharmony_ci }; 3867bf215546Sopenharmony_ci static const uint32_t CbColor0DccBaseGfx11[] = { 3868bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE 3869bf215546Sopenharmony_ci 0x0, // 3870bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE 3871bf215546Sopenharmony_ci }; 3872bf215546Sopenharmony_ci static const uint32_t CbColor1ViewGfx11[] = { 3873bf215546Sopenharmony_ci 0x0, // CB_COLOR1_VIEW 3874bf215546Sopenharmony_ci 0x0, // CB_COLOR1_INFO 3875bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB 3876bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_CONTROL 3877bf215546Sopenharmony_ci }; 3878bf215546Sopenharmony_ci static const uint32_t CbColor1DccBaseGfx11[] = { 3879bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE 3880bf215546Sopenharmony_ci 0x0, // 3881bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE 3882bf215546Sopenharmony_ci }; 3883bf215546Sopenharmony_ci static const uint32_t CbColor2ViewGfx11[] = { 3884bf215546Sopenharmony_ci 0x0, // CB_COLOR2_VIEW 3885bf215546Sopenharmony_ci 0x0, // CB_COLOR2_INFO 3886bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB 3887bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_CONTROL 3888bf215546Sopenharmony_ci }; 3889bf215546Sopenharmony_ci static const uint32_t CbColor2DccBaseGfx11[] = { 3890bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE 3891bf215546Sopenharmony_ci 0x0, // 3892bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE 3893bf215546Sopenharmony_ci }; 3894bf215546Sopenharmony_ci static const uint32_t CbColor3ViewGfx11[] = { 3895bf215546Sopenharmony_ci 0x0, // CB_COLOR3_VIEW 3896bf215546Sopenharmony_ci 0x0, // CB_COLOR3_INFO 3897bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB 3898bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_CONTROL 3899bf215546Sopenharmony_ci }; 3900bf215546Sopenharmony_ci static const uint32_t CbColor3DccBaseGfx11[] = { 3901bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE 3902bf215546Sopenharmony_ci 0x0, // 3903bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE 3904bf215546Sopenharmony_ci }; 3905bf215546Sopenharmony_ci static const uint32_t CbColor4ViewGfx11[] = { 3906bf215546Sopenharmony_ci 0x0, // CB_COLOR4_VIEW 3907bf215546Sopenharmony_ci 0x0, // CB_COLOR4_INFO 3908bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB 3909bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_CONTROL 3910bf215546Sopenharmony_ci }; 3911bf215546Sopenharmony_ci static const uint32_t CbColor4DccBaseGfx11[] = { 3912bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE 3913bf215546Sopenharmony_ci 0x0, // 3914bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE 3915bf215546Sopenharmony_ci }; 3916bf215546Sopenharmony_ci static const uint32_t CbColor5ViewGfx11[] = { 3917bf215546Sopenharmony_ci 0x0, // CB_COLOR5_VIEW 3918bf215546Sopenharmony_ci 0x0, // CB_COLOR5_INFO 3919bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB 3920bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_CONTROL 3921bf215546Sopenharmony_ci }; 3922bf215546Sopenharmony_ci static const uint32_t CbColor5DccBaseGfx11[] = { 3923bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE 3924bf215546Sopenharmony_ci 0x0, // 3925bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE 3926bf215546Sopenharmony_ci }; 3927bf215546Sopenharmony_ci static const uint32_t CbColor6ViewGfx11[] = { 3928bf215546Sopenharmony_ci 0x0, // CB_COLOR6_VIEW 3929bf215546Sopenharmony_ci 0x0, // CB_COLOR6_INFO 3930bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB 3931bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_CONTROL 3932bf215546Sopenharmony_ci }; 3933bf215546Sopenharmony_ci static const uint32_t CbColor6DccBaseGfx11[] = { 3934bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE 3935bf215546Sopenharmony_ci 0x0, // 3936bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE 3937bf215546Sopenharmony_ci }; 3938bf215546Sopenharmony_ci static const uint32_t CbColor7ViewGfx11[] = { 3939bf215546Sopenharmony_ci 0x0, // CB_COLOR7_VIEW 3940bf215546Sopenharmony_ci 0x0, // CB_COLOR7_INFO 3941bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB 3942bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_CONTROL 3943bf215546Sopenharmony_ci }; 3944bf215546Sopenharmony_ci static const uint32_t CbColor7DccBaseGfx11[] = { 3945bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE 3946bf215546Sopenharmony_ci 0x0, // 3947bf215546Sopenharmony_ci 0x0, // CB_COLOR0_BASE_EXT 3948bf215546Sopenharmony_ci 0x0, // CB_COLOR1_BASE_EXT 3949bf215546Sopenharmony_ci 0x0, // CB_COLOR2_BASE_EXT 3950bf215546Sopenharmony_ci 0x0, // CB_COLOR3_BASE_EXT 3951bf215546Sopenharmony_ci 0x0, // CB_COLOR4_BASE_EXT 3952bf215546Sopenharmony_ci 0x0, // CB_COLOR5_BASE_EXT 3953bf215546Sopenharmony_ci 0x0, // CB_COLOR6_BASE_EXT 3954bf215546Sopenharmony_ci 0x0, // CB_COLOR7_BASE_EXT 3955bf215546Sopenharmony_ci }; 3956bf215546Sopenharmony_ci static const uint32_t CbColor0DccBaseExtGfx11[] = { 3957bf215546Sopenharmony_ci 0x0, // CB_COLOR0_DCC_BASE_EXT 3958bf215546Sopenharmony_ci 0x0, // CB_COLOR1_DCC_BASE_EXT 3959bf215546Sopenharmony_ci 0x0, // CB_COLOR2_DCC_BASE_EXT 3960bf215546Sopenharmony_ci 0x0, // CB_COLOR3_DCC_BASE_EXT 3961bf215546Sopenharmony_ci 0x0, // CB_COLOR4_DCC_BASE_EXT 3962bf215546Sopenharmony_ci 0x0, // CB_COLOR5_DCC_BASE_EXT 3963bf215546Sopenharmony_ci 0x0, // CB_COLOR6_DCC_BASE_EXT 3964bf215546Sopenharmony_ci 0x0, // CB_COLOR7_DCC_BASE_EXT 3965bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB2 3966bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB2 3967bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB2 3968bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB2 3969bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB2 3970bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB2 3971bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB2 3972bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB2 3973bf215546Sopenharmony_ci 0x0, // CB_COLOR0_ATTRIB3 3974bf215546Sopenharmony_ci 0x0, // CB_COLOR1_ATTRIB3 3975bf215546Sopenharmony_ci 0x0, // CB_COLOR2_ATTRIB3 3976bf215546Sopenharmony_ci 0x0, // CB_COLOR3_ATTRIB3 3977bf215546Sopenharmony_ci 0x0, // CB_COLOR4_ATTRIB3 3978bf215546Sopenharmony_ci 0x0, // CB_COLOR5_ATTRIB3 3979bf215546Sopenharmony_ci 0x0, // CB_COLOR6_ATTRIB3 3980bf215546Sopenharmony_ci 0x0, // CB_COLOR7_ATTRIB3 3981bf215546Sopenharmony_ci }; 3982bf215546Sopenharmony_ci 3983bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028000_DB_RENDER_CONTROL, SET(DbRenderControlGfx11)); 3984bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0281E8_COHER_DEST_BASE_HI_0, SET(CoherDestBaseHi0Gfx11)); 3985bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0283D0_PA_SC_VRS_OVERRIDE_CNTL, SET(PaScVrsOverrideCntlGfx11)); 3986bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0283F0_PA_SC_VRS_RATE_BASE, SET(PaScVrsRateBaseGfx11)); 3987bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, SET(VgtMultiPrimIbResetIndxGfx11)); 3988bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028644_SPI_PS_INPUT_CNTL_0, SET(SpiPsInputCntl0Gfx11)); 3989bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028708_SPI_SHADER_IDX_FORMAT, SET(SpiShaderIdxFormatGfx11)); 3990bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028750_SX_PS_DOWNCONVERT_CONTROL, SET(SxPsDownconvertControlGfx11)); 3991bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287D4_PA_CL_POINT_X_RAD, SET(PaClPointXRadGfx11)); 3992bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_0287FC_GE_MAX_OUTPUT_PER_SUBGROUP, SET(GeMaxOutputPerSubgroupGfx11)); 3993bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A00_PA_SU_POINT_SIZE, SET(PaSuPointSizeGfx11)); 3994bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A18_VGT_HOS_MAX_TESS_LEVEL, SET(VgtHosMaxTessLevelGfx11)); 3995bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A48_PA_SC_MODE_CNTL_0, SET(PaScModeCntl0Gfx11)); 3996bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A84_VGT_PRIMITIVEID_EN, SET(VgtPrimitiveidEnGfx11)); 3997bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A8C_VGT_PRIMITIVEID_RESET, SET(VgtPrimitiveidResetGfx11)); 3998bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028A98_VGT_DRAW_PAYLOAD_CNTL, SET(VgtDrawPayloadCntlGfx11)); 3999bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028AAC_VGT_ESGS_RING_ITEMSIZE, SET(VgtEsgsRingItemsizeGfx11)); 4000bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, SET(VgtStrmoutDrawOpaqueOffsetGfx11)); 4001bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B4C_GE_NGG_SUBGRP_CNTL, SET(GeNggSubgrpCntlGfx11)); 4002bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028B6C_VGT_TF_PARAM, SET(VgtTfParamGfx11)); 4003bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028BD4_PA_SC_CENTROID_PRIORITY_0, SET(PaScCentroidPriority0Gfx11)); 4004bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028C60_CB_COLOR0_BASE, SET(CbColor0BaseGfx11)); 4005bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028C6C_CB_COLOR0_VIEW, SET(CbColor0ViewGfx11)); 4006bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028C94_CB_COLOR0_DCC_BASE, SET(CbColor0DccBaseGfx11)); 4007bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028CA8_CB_COLOR1_VIEW, SET(CbColor1ViewGfx11)); 4008bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028CD0_CB_COLOR1_DCC_BASE, SET(CbColor1DccBaseGfx11)); 4009bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028CE4_CB_COLOR2_VIEW, SET(CbColor2ViewGfx11)); 4010bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D0C_CB_COLOR2_DCC_BASE, SET(CbColor2DccBaseGfx11)); 4011bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D20_CB_COLOR3_VIEW, SET(CbColor3ViewGfx11)); 4012bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D48_CB_COLOR3_DCC_BASE, SET(CbColor3DccBaseGfx11)); 4013bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D5C_CB_COLOR4_VIEW, SET(CbColor4ViewGfx11)); 4014bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D84_CB_COLOR4_DCC_BASE, SET(CbColor4DccBaseGfx11)); 4015bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028D98_CB_COLOR5_VIEW, SET(CbColor5ViewGfx11)); 4016bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028DC0_CB_COLOR5_DCC_BASE, SET(CbColor5DccBaseGfx11)); 4017bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028DD4_CB_COLOR6_VIEW, SET(CbColor6ViewGfx11)); 4018bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028DFC_CB_COLOR6_DCC_BASE, SET(CbColor6DccBaseGfx11)); 4019bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028E10_CB_COLOR7_VIEW, SET(CbColor7ViewGfx11)); 4020bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028E38_CB_COLOR7_DCC_BASE, SET(CbColor7DccBaseGfx11)); 4021bf215546Sopenharmony_ci set_context_reg_seq_array(cs, R_028C98_CB_COLOR0_DCC_BASE_EXT, SET(CbColor0DccBaseExtGfx11)); 4022bf215546Sopenharmony_ci 4023bf215546Sopenharmony_ci for (unsigned i = 0; i < num_reg_pairs; i++) 4024bf215546Sopenharmony_ci set_context_reg_seq_array(cs, reg_offsets[i], 1, ®_values[i]); 4025bf215546Sopenharmony_ci} 4026bf215546Sopenharmony_ci 4027bf215546Sopenharmony_civoid ac_emulate_clear_state(const struct radeon_info *info, struct radeon_cmdbuf *cs, 4028bf215546Sopenharmony_ci set_context_reg_seq_array_fn set_context_reg_seq_array) 4029bf215546Sopenharmony_ci{ 4030bf215546Sopenharmony_ci /* Set context registers same as CLEAR_STATE to initialize shadow memory. */ 4031bf215546Sopenharmony_ci unsigned reg_offset = R_02835C_PA_SC_TILE_STEERING_OVERRIDE; 4032bf215546Sopenharmony_ci uint32_t reg_value = info->pa_sc_tile_steering_override; 4033bf215546Sopenharmony_ci 4034bf215546Sopenharmony_ci if (info->gfx_level >= GFX11) { 4035bf215546Sopenharmony_ci gfx11_emulate_clear_state(cs, 1, ®_offset, ®_value, set_context_reg_seq_array); 4036bf215546Sopenharmony_ci } else if (info->gfx_level == GFX10_3) { 4037bf215546Sopenharmony_ci gfx103_emulate_clear_state(cs, 1, ®_offset, ®_value, set_context_reg_seq_array); 4038bf215546Sopenharmony_ci } else if (info->gfx_level == GFX10) { 4039bf215546Sopenharmony_ci gfx10_emulate_clear_state(cs, 1, ®_offset, ®_value, set_context_reg_seq_array); 4040bf215546Sopenharmony_ci } else if (info->gfx_level == GFX9) { 4041bf215546Sopenharmony_ci gfx9_emulate_clear_state(cs, set_context_reg_seq_array); 4042bf215546Sopenharmony_ci } else { 4043bf215546Sopenharmony_ci unreachable("unimplemented"); 4044bf215546Sopenharmony_ci } 4045bf215546Sopenharmony_ci} 4046bf215546Sopenharmony_ci 4047bf215546Sopenharmony_ci/* Debug helper to find if any registers are missing in the tables above. 4048bf215546Sopenharmony_ci * Call this in the driver whenever you set a register. 4049bf215546Sopenharmony_ci */ 4050bf215546Sopenharmony_civoid ac_check_shadowed_regs(enum amd_gfx_level gfx_level, enum radeon_family family, 4051bf215546Sopenharmony_ci unsigned reg_offset, unsigned count) 4052bf215546Sopenharmony_ci{ 4053bf215546Sopenharmony_ci bool found = false; 4054bf215546Sopenharmony_ci bool shadowed = false; 4055bf215546Sopenharmony_ci 4056bf215546Sopenharmony_ci for (unsigned type = 0; type < SI_NUM_ALL_REG_RANGES && !found; type++) { 4057bf215546Sopenharmony_ci const struct ac_reg_range *ranges; 4058bf215546Sopenharmony_ci unsigned num_ranges; 4059bf215546Sopenharmony_ci 4060bf215546Sopenharmony_ci ac_get_reg_ranges(gfx_level, family, type, &num_ranges, &ranges); 4061bf215546Sopenharmony_ci 4062bf215546Sopenharmony_ci for (unsigned i = 0; i < num_ranges; i++) { 4063bf215546Sopenharmony_ci unsigned end_reg_offset = reg_offset + count * 4; 4064bf215546Sopenharmony_ci unsigned end_range_offset = ranges[i].offset + ranges[i].size; 4065bf215546Sopenharmony_ci 4066bf215546Sopenharmony_ci /* Test if the ranges interect. */ 4067bf215546Sopenharmony_ci if (MAX2(ranges[i].offset, reg_offset) < MIN2(end_range_offset, end_reg_offset)) { 4068bf215546Sopenharmony_ci /* Assertion: A register can be listed only once. */ 4069bf215546Sopenharmony_ci assert(!found); 4070bf215546Sopenharmony_ci found = true; 4071bf215546Sopenharmony_ci shadowed = type != SI_REG_RANGE_NON_SHADOWED; 4072bf215546Sopenharmony_ci } 4073bf215546Sopenharmony_ci } 4074bf215546Sopenharmony_ci } 4075bf215546Sopenharmony_ci 4076bf215546Sopenharmony_ci if (reg_offset == R_00B858_COMPUTE_DESTINATION_EN_SE0 || 4077bf215546Sopenharmony_ci reg_offset == R_00B864_COMPUTE_DESTINATION_EN_SE2) 4078bf215546Sopenharmony_ci return; 4079bf215546Sopenharmony_ci 4080bf215546Sopenharmony_ci if (!found || !shadowed) { 4081bf215546Sopenharmony_ci printf("register %s: ", !found ? "not found" : "not shadowed"); 4082bf215546Sopenharmony_ci if (count > 1) { 4083bf215546Sopenharmony_ci printf("%s .. %s\n", ac_get_register_name(gfx_level, reg_offset), 4084bf215546Sopenharmony_ci ac_get_register_name(gfx_level, reg_offset + (count - 1) * 4)); 4085bf215546Sopenharmony_ci } else { 4086bf215546Sopenharmony_ci printf("%s\n", ac_get_register_name(gfx_level, reg_offset)); 4087bf215546Sopenharmony_ci } 4088bf215546Sopenharmony_ci } 4089bf215546Sopenharmony_ci} 4090bf215546Sopenharmony_ci 4091bf215546Sopenharmony_ci/* Debug helper to print all shadowed registers and their current values read 4092bf215546Sopenharmony_ci * by umr. This can be used to verify whether register shadowing doesn't affect 4093bf215546Sopenharmony_ci * apps that don't enable it, because the shadowed register tables might contain 4094bf215546Sopenharmony_ci * registers that the driver doesn't set. 4095bf215546Sopenharmony_ci */ 4096bf215546Sopenharmony_civoid ac_print_shadowed_regs(const struct radeon_info *info) 4097bf215546Sopenharmony_ci{ 4098bf215546Sopenharmony_ci if (!debug_get_bool_option("AMD_PRINT_SHADOW_REGS", false)) 4099bf215546Sopenharmony_ci return; 4100bf215546Sopenharmony_ci 4101bf215546Sopenharmony_ci for (unsigned type = 0; type < SI_NUM_SHADOWED_REG_RANGES; type++) { 4102bf215546Sopenharmony_ci const struct ac_reg_range *ranges; 4103bf215546Sopenharmony_ci unsigned num_ranges; 4104bf215546Sopenharmony_ci 4105bf215546Sopenharmony_ci ac_get_reg_ranges(info->gfx_level, info->family, type, &num_ranges, &ranges); 4106bf215546Sopenharmony_ci 4107bf215546Sopenharmony_ci for (unsigned i = 0; i < num_ranges; i++) { 4108bf215546Sopenharmony_ci for (unsigned j = 0; j < ranges[i].size / 4; j++) { 4109bf215546Sopenharmony_ci unsigned offset = ranges[i].offset + j * 4; 4110bf215546Sopenharmony_ci 4111bf215546Sopenharmony_ci const char *name = ac_get_register_name(info->gfx_level, offset); 4112bf215546Sopenharmony_ci unsigned value = -1; 4113bf215546Sopenharmony_ci 4114bf215546Sopenharmony_ci#ifndef _WIN32 4115bf215546Sopenharmony_ci char cmd[1024]; 4116bf215546Sopenharmony_ci snprintf(cmd, sizeof(cmd), "umr -r 0x%x", offset); 4117bf215546Sopenharmony_ci FILE *p = popen(cmd, "r"); 4118bf215546Sopenharmony_ci if (p) { 4119bf215546Sopenharmony_ci ASSERTED int r = fscanf(p, "%x", &value); 4120bf215546Sopenharmony_ci assert(r == 1); 4121bf215546Sopenharmony_ci pclose(p); 4122bf215546Sopenharmony_ci } 4123bf215546Sopenharmony_ci#endif 4124bf215546Sopenharmony_ci 4125bf215546Sopenharmony_ci printf("0x%X %s = 0x%X\n", offset, name, value); 4126bf215546Sopenharmony_ci } 4127bf215546Sopenharmony_ci printf("--------------------------------------------\n"); 4128bf215546Sopenharmony_ci } 4129bf215546Sopenharmony_ci } 4130bf215546Sopenharmony_ci} 4131