1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright 2014 Advanced Micro Devices, Inc. 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 7bf215546Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8bf215546Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 9bf215546Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 10bf215546Sopenharmony_ci * 11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next 12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 13bf215546Sopenharmony_ci * Software. 14bf215546Sopenharmony_ci * 15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18bf215546Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19bf215546Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20bf215546Sopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21bf215546Sopenharmony_ci * SOFTWARE. 22bf215546Sopenharmony_ci * 23bf215546Sopenharmony_ci * Authors: Marek Olšák <maraeo@gmail.com> 24bf215546Sopenharmony_ci * 25bf215546Sopenharmony_ci */ 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci#include "r600_cs.h" 28bf215546Sopenharmony_ci#include "evergreend.h" 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci/* 2xMSAA 31bf215546Sopenharmony_ci * There are two locations (4, 4), (-4, -4). */ 32bf215546Sopenharmony_ciconst uint32_t eg_sample_locs_2x[4] = { 33bf215546Sopenharmony_ci FILL_SREG(4, 4, -4, -4, 4, 4, -4, -4), 34bf215546Sopenharmony_ci FILL_SREG(4, 4, -4, -4, 4, 4, -4, -4), 35bf215546Sopenharmony_ci FILL_SREG(4, 4, -4, -4, 4, 4, -4, -4), 36bf215546Sopenharmony_ci FILL_SREG(4, 4, -4, -4, 4, 4, -4, -4), 37bf215546Sopenharmony_ci}; 38bf215546Sopenharmony_ciconst unsigned eg_max_dist_2x = 4; 39bf215546Sopenharmony_ci/* 4xMSAA 40bf215546Sopenharmony_ci * There are 4 locations: (-2, 6), (6, -2), (-6, 2), (2, 6). */ 41bf215546Sopenharmony_ciconst uint32_t eg_sample_locs_4x[4] = { 42bf215546Sopenharmony_ci FILL_SREG(-2, -6, 6, -2, -6, 2, 2, 6), 43bf215546Sopenharmony_ci FILL_SREG(-2, -6, 6, -2, -6, 2, 2, 6), 44bf215546Sopenharmony_ci FILL_SREG(-2, -6, 6, -2, -6, 2, 2, 6), 45bf215546Sopenharmony_ci FILL_SREG(-2, -6, 6, -2, -6, 2, 2, 6), 46bf215546Sopenharmony_ci}; 47bf215546Sopenharmony_ciconst unsigned eg_max_dist_4x = 6; 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ci/* Cayman 8xMSAA */ 50bf215546Sopenharmony_cistatic const uint32_t cm_sample_locs_8x[] = { 51bf215546Sopenharmony_ci FILL_SREG( 1, -3, -1, 3, 5, 1, -3, -5), 52bf215546Sopenharmony_ci FILL_SREG( 1, -3, -1, 3, 5, 1, -3, -5), 53bf215546Sopenharmony_ci FILL_SREG( 1, -3, -1, 3, 5, 1, -3, -5), 54bf215546Sopenharmony_ci FILL_SREG( 1, -3, -1, 3, 5, 1, -3, -5), 55bf215546Sopenharmony_ci FILL_SREG(-5, 5, -7, -1, 3, 7, 7, -7), 56bf215546Sopenharmony_ci FILL_SREG(-5, 5, -7, -1, 3, 7, 7, -7), 57bf215546Sopenharmony_ci FILL_SREG(-5, 5, -7, -1, 3, 7, 7, -7), 58bf215546Sopenharmony_ci FILL_SREG(-5, 5, -7, -1, 3, 7, 7, -7), 59bf215546Sopenharmony_ci}; 60bf215546Sopenharmony_cistatic const unsigned cm_max_dist_8x = 8; 61bf215546Sopenharmony_ci/* Cayman 16xMSAA */ 62bf215546Sopenharmony_cistatic const uint32_t cm_sample_locs_16x[] = { 63bf215546Sopenharmony_ci FILL_SREG( 1, 1, -1, -3, -3, 2, 4, -1), 64bf215546Sopenharmony_ci FILL_SREG( 1, 1, -1, -3, -3, 2, 4, -1), 65bf215546Sopenharmony_ci FILL_SREG( 1, 1, -1, -3, -3, 2, 4, -1), 66bf215546Sopenharmony_ci FILL_SREG( 1, 1, -1, -3, -3, 2, 4, -1), 67bf215546Sopenharmony_ci FILL_SREG(-5, -2, 2, 5, 5, 3, 3, -5), 68bf215546Sopenharmony_ci FILL_SREG(-5, -2, 2, 5, 5, 3, 3, -5), 69bf215546Sopenharmony_ci FILL_SREG(-5, -2, 2, 5, 5, 3, 3, -5), 70bf215546Sopenharmony_ci FILL_SREG(-5, -2, 2, 5, 5, 3, 3, -5), 71bf215546Sopenharmony_ci FILL_SREG(-2, 6, 0, -7, -4, -6, -6, 4), 72bf215546Sopenharmony_ci FILL_SREG(-2, 6, 0, -7, -4, -6, -6, 4), 73bf215546Sopenharmony_ci FILL_SREG(-2, 6, 0, -7, -4, -6, -6, 4), 74bf215546Sopenharmony_ci FILL_SREG(-2, 6, 0, -7, -4, -6, -6, 4), 75bf215546Sopenharmony_ci FILL_SREG(-8, 0, 7, -4, 6, 7, -7, -8), 76bf215546Sopenharmony_ci FILL_SREG(-8, 0, 7, -4, 6, 7, -7, -8), 77bf215546Sopenharmony_ci FILL_SREG(-8, 0, 7, -4, 6, 7, -7, -8), 78bf215546Sopenharmony_ci FILL_SREG(-8, 0, 7, -4, 6, 7, -7, -8), 79bf215546Sopenharmony_ci}; 80bf215546Sopenharmony_cistatic const unsigned cm_max_dist_16x = 8; 81bf215546Sopenharmony_ci 82bf215546Sopenharmony_civoid cayman_get_sample_position(struct pipe_context *ctx, unsigned sample_count, 83bf215546Sopenharmony_ci unsigned sample_index, float *out_value) 84bf215546Sopenharmony_ci{ 85bf215546Sopenharmony_ci int offset, index; 86bf215546Sopenharmony_ci struct { 87bf215546Sopenharmony_ci int idx:4; 88bf215546Sopenharmony_ci } val; 89bf215546Sopenharmony_ci switch (sample_count) { 90bf215546Sopenharmony_ci case 1: 91bf215546Sopenharmony_ci default: 92bf215546Sopenharmony_ci out_value[0] = out_value[1] = 0.5; 93bf215546Sopenharmony_ci break; 94bf215546Sopenharmony_ci case 2: 95bf215546Sopenharmony_ci offset = 4 * (sample_index * 2); 96bf215546Sopenharmony_ci val.idx = (eg_sample_locs_2x[0] >> offset) & 0xf; 97bf215546Sopenharmony_ci out_value[0] = (float)(val.idx + 8) / 16.0f; 98bf215546Sopenharmony_ci val.idx = (eg_sample_locs_2x[0] >> (offset + 4)) & 0xf; 99bf215546Sopenharmony_ci out_value[1] = (float)(val.idx + 8) / 16.0f; 100bf215546Sopenharmony_ci break; 101bf215546Sopenharmony_ci case 4: 102bf215546Sopenharmony_ci offset = 4 * (sample_index * 2); 103bf215546Sopenharmony_ci val.idx = (eg_sample_locs_4x[0] >> offset) & 0xf; 104bf215546Sopenharmony_ci out_value[0] = (float)(val.idx + 8) / 16.0f; 105bf215546Sopenharmony_ci val.idx = (eg_sample_locs_4x[0] >> (offset + 4)) & 0xf; 106bf215546Sopenharmony_ci out_value[1] = (float)(val.idx + 8) / 16.0f; 107bf215546Sopenharmony_ci break; 108bf215546Sopenharmony_ci case 8: 109bf215546Sopenharmony_ci offset = 4 * (sample_index % 4 * 2); 110bf215546Sopenharmony_ci index = (sample_index / 4) * 4; 111bf215546Sopenharmony_ci val.idx = (cm_sample_locs_8x[index] >> offset) & 0xf; 112bf215546Sopenharmony_ci out_value[0] = (float)(val.idx + 8) / 16.0f; 113bf215546Sopenharmony_ci val.idx = (cm_sample_locs_8x[index] >> (offset + 4)) & 0xf; 114bf215546Sopenharmony_ci out_value[1] = (float)(val.idx + 8) / 16.0f; 115bf215546Sopenharmony_ci break; 116bf215546Sopenharmony_ci case 16: 117bf215546Sopenharmony_ci offset = 4 * (sample_index % 4 * 2); 118bf215546Sopenharmony_ci index = (sample_index / 4) * 4; 119bf215546Sopenharmony_ci val.idx = (cm_sample_locs_16x[index] >> offset) & 0xf; 120bf215546Sopenharmony_ci out_value[0] = (float)(val.idx + 8) / 16.0f; 121bf215546Sopenharmony_ci val.idx = (cm_sample_locs_16x[index] >> (offset + 4)) & 0xf; 122bf215546Sopenharmony_ci out_value[1] = (float)(val.idx + 8) / 16.0f; 123bf215546Sopenharmony_ci break; 124bf215546Sopenharmony_ci } 125bf215546Sopenharmony_ci} 126bf215546Sopenharmony_ci 127bf215546Sopenharmony_civoid cayman_init_msaa(struct pipe_context *ctx) 128bf215546Sopenharmony_ci{ 129bf215546Sopenharmony_ci struct r600_common_context *rctx = (struct r600_common_context*)ctx; 130bf215546Sopenharmony_ci int i; 131bf215546Sopenharmony_ci 132bf215546Sopenharmony_ci cayman_get_sample_position(ctx, 1, 0, rctx->sample_locations_1x[0]); 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ci for (i = 0; i < 2; i++) 135bf215546Sopenharmony_ci cayman_get_sample_position(ctx, 2, i, rctx->sample_locations_2x[i]); 136bf215546Sopenharmony_ci for (i = 0; i < 4; i++) 137bf215546Sopenharmony_ci cayman_get_sample_position(ctx, 4, i, rctx->sample_locations_4x[i]); 138bf215546Sopenharmony_ci for (i = 0; i < 8; i++) 139bf215546Sopenharmony_ci cayman_get_sample_position(ctx, 8, i, rctx->sample_locations_8x[i]); 140bf215546Sopenharmony_ci for (i = 0; i < 16; i++) 141bf215546Sopenharmony_ci cayman_get_sample_position(ctx, 16, i, rctx->sample_locations_16x[i]); 142bf215546Sopenharmony_ci} 143bf215546Sopenharmony_ci 144bf215546Sopenharmony_cistatic void cayman_emit_msaa_sample_locs(struct radeon_cmdbuf *cs, int nr_samples) 145bf215546Sopenharmony_ci{ 146bf215546Sopenharmony_ci switch (nr_samples) { 147bf215546Sopenharmony_ci default: 148bf215546Sopenharmony_ci case 1: 149bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, 0); 150bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, 0); 151bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, 0); 152bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, 0); 153bf215546Sopenharmony_ci break; 154bf215546Sopenharmony_ci case 2: 155bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, eg_sample_locs_2x[0]); 156bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, eg_sample_locs_2x[1]); 157bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, eg_sample_locs_2x[2]); 158bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, eg_sample_locs_2x[3]); 159bf215546Sopenharmony_ci break; 160bf215546Sopenharmony_ci case 4: 161bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, eg_sample_locs_4x[0]); 162bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C08_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0, eg_sample_locs_4x[1]); 163bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C18_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0, eg_sample_locs_4x[2]); 164bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028C28_PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0, eg_sample_locs_4x[3]); 165bf215546Sopenharmony_ci break; 166bf215546Sopenharmony_ci case 8: 167bf215546Sopenharmony_ci radeon_set_context_reg_seq(cs, CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, 14); 168bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[0]); 169bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[4]); 170bf215546Sopenharmony_ci radeon_emit(cs, 0); 171bf215546Sopenharmony_ci radeon_emit(cs, 0); 172bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[1]); 173bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[5]); 174bf215546Sopenharmony_ci radeon_emit(cs, 0); 175bf215546Sopenharmony_ci radeon_emit(cs, 0); 176bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[2]); 177bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[6]); 178bf215546Sopenharmony_ci radeon_emit(cs, 0); 179bf215546Sopenharmony_ci radeon_emit(cs, 0); 180bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[3]); 181bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_8x[7]); 182bf215546Sopenharmony_ci break; 183bf215546Sopenharmony_ci case 16: 184bf215546Sopenharmony_ci radeon_set_context_reg_seq(cs, CM_R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, 16); 185bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[0]); 186bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[4]); 187bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[8]); 188bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[12]); 189bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[1]); 190bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[5]); 191bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[9]); 192bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[13]); 193bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[2]); 194bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[6]); 195bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[10]); 196bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[14]); 197bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[3]); 198bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[7]); 199bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[11]); 200bf215546Sopenharmony_ci radeon_emit(cs, cm_sample_locs_16x[15]); 201bf215546Sopenharmony_ci break; 202bf215546Sopenharmony_ci } 203bf215546Sopenharmony_ci} 204bf215546Sopenharmony_ci 205bf215546Sopenharmony_civoid cayman_emit_msaa_state(struct radeon_cmdbuf *cs, int nr_samples, 206bf215546Sopenharmony_ci int ps_iter_samples, int overrast_samples) 207bf215546Sopenharmony_ci{ 208bf215546Sopenharmony_ci int setup_samples = nr_samples > 1 ? nr_samples : 209bf215546Sopenharmony_ci overrast_samples > 1 ? overrast_samples : 0; 210bf215546Sopenharmony_ci /* Required by OpenGL line rasterization. 211bf215546Sopenharmony_ci * 212bf215546Sopenharmony_ci * TODO: We should also enable perpendicular endcaps for AA lines, 213bf215546Sopenharmony_ci * but that requires implementing line stippling in the pixel 214bf215546Sopenharmony_ci * shader. SC can only do line stippling with axis-aligned 215bf215546Sopenharmony_ci * endcaps. 216bf215546Sopenharmony_ci */ 217bf215546Sopenharmony_ci unsigned sc_line_cntl = S_028BDC_DX10_DIAMOND_TEST_ENA(1); 218bf215546Sopenharmony_ci unsigned sc_mode_cntl_1 = 219bf215546Sopenharmony_ci EG_S_028A4C_FORCE_EOV_CNTDWN_ENABLE(1) | 220bf215546Sopenharmony_ci EG_S_028A4C_FORCE_EOV_REZ_ENABLE(1); 221bf215546Sopenharmony_ci 222bf215546Sopenharmony_ci if (nr_samples > 1) { 223bf215546Sopenharmony_ci cayman_emit_msaa_sample_locs(cs, nr_samples); 224bf215546Sopenharmony_ci } 225bf215546Sopenharmony_ci 226bf215546Sopenharmony_ci if (setup_samples > 1) { 227bf215546Sopenharmony_ci /* indexed by log2(nr_samples) */ 228bf215546Sopenharmony_ci const unsigned max_dist[] = { 229bf215546Sopenharmony_ci 0, 230bf215546Sopenharmony_ci eg_max_dist_2x, 231bf215546Sopenharmony_ci eg_max_dist_4x, 232bf215546Sopenharmony_ci cm_max_dist_8x, 233bf215546Sopenharmony_ci cm_max_dist_16x 234bf215546Sopenharmony_ci }; 235bf215546Sopenharmony_ci unsigned log_samples = util_logbase2(setup_samples); 236bf215546Sopenharmony_ci unsigned log_ps_iter_samples = 237bf215546Sopenharmony_ci util_logbase2(util_next_power_of_two(ps_iter_samples)); 238bf215546Sopenharmony_ci 239bf215546Sopenharmony_ci radeon_set_context_reg_seq(cs, CM_R_028BDC_PA_SC_LINE_CNTL, 2); 240bf215546Sopenharmony_ci radeon_emit(cs, sc_line_cntl | 241bf215546Sopenharmony_ci S_028BDC_EXPAND_LINE_WIDTH(1)); /* CM_R_028BDC_PA_SC_LINE_CNTL */ 242bf215546Sopenharmony_ci radeon_emit(cs, S_028BE0_MSAA_NUM_SAMPLES(log_samples) | 243bf215546Sopenharmony_ci S_028BE0_MAX_SAMPLE_DIST(max_dist[log_samples]) | 244bf215546Sopenharmony_ci S_028BE0_MSAA_EXPOSED_SAMPLES(log_samples)); /* CM_R_028BE0_PA_SC_AA_CONFIG */ 245bf215546Sopenharmony_ci 246bf215546Sopenharmony_ci if (nr_samples > 1) { 247bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028804_DB_EQAA, 248bf215546Sopenharmony_ci S_028804_MAX_ANCHOR_SAMPLES(log_samples) | 249bf215546Sopenharmony_ci S_028804_PS_ITER_SAMPLES(log_ps_iter_samples) | 250bf215546Sopenharmony_ci S_028804_MASK_EXPORT_NUM_SAMPLES(log_samples) | 251bf215546Sopenharmony_ci S_028804_ALPHA_TO_MASK_NUM_SAMPLES(log_samples) | 252bf215546Sopenharmony_ci S_028804_HIGH_QUALITY_INTERSECTIONS(1) | 253bf215546Sopenharmony_ci S_028804_STATIC_ANCHOR_ASSOCIATIONS(1)); 254bf215546Sopenharmony_ci radeon_set_context_reg(cs, EG_R_028A4C_PA_SC_MODE_CNTL_1, 255bf215546Sopenharmony_ci EG_S_028A4C_PS_ITER_SAMPLE(ps_iter_samples > 1) | 256bf215546Sopenharmony_ci sc_mode_cntl_1); 257bf215546Sopenharmony_ci } else if (overrast_samples > 1) { 258bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028804_DB_EQAA, 259bf215546Sopenharmony_ci S_028804_HIGH_QUALITY_INTERSECTIONS(1) | 260bf215546Sopenharmony_ci S_028804_STATIC_ANCHOR_ASSOCIATIONS(1) | 261bf215546Sopenharmony_ci S_028804_OVERRASTERIZATION_AMOUNT(log_samples)); 262bf215546Sopenharmony_ci radeon_set_context_reg(cs, EG_R_028A4C_PA_SC_MODE_CNTL_1, 263bf215546Sopenharmony_ci sc_mode_cntl_1); 264bf215546Sopenharmony_ci } 265bf215546Sopenharmony_ci } else { 266bf215546Sopenharmony_ci radeon_set_context_reg_seq(cs, CM_R_028BDC_PA_SC_LINE_CNTL, 2); 267bf215546Sopenharmony_ci radeon_emit(cs, sc_line_cntl); /* CM_R_028BDC_PA_SC_LINE_CNTL */ 268bf215546Sopenharmony_ci radeon_emit(cs, 0); /* CM_R_028BE0_PA_SC_AA_CONFIG */ 269bf215546Sopenharmony_ci 270bf215546Sopenharmony_ci radeon_set_context_reg(cs, CM_R_028804_DB_EQAA, 271bf215546Sopenharmony_ci S_028804_HIGH_QUALITY_INTERSECTIONS(1) | 272bf215546Sopenharmony_ci S_028804_STATIC_ANCHOR_ASSOCIATIONS(1)); 273bf215546Sopenharmony_ci radeon_set_context_reg(cs, EG_R_028A4C_PA_SC_MODE_CNTL_1, 274bf215546Sopenharmony_ci sc_mode_cntl_1); 275bf215546Sopenharmony_ci } 276bf215546Sopenharmony_ci} 277