1 /* 2 * Copyright 2010 Jerome Glisse <glisse@freedesktop.org> 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * on the rights to use, copy, modify, merge, publish, distribute, sub 8 * license, and/or sell copies of the Software, and to permit persons to whom 9 * the Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the next 12 * paragraph) shall be included in all copies or substantial portions of the 13 * Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 21 * USE OR OTHER DEALINGS IN THE SOFTWARE. 22 * 23 * Authors: 24 * Jerome Glisse 25 */ 26 #ifndef R600_SQ_H 27 #define R600_SQ_H 28 29 #define P_SQ_CF_WORD0 30 #define S_SQ_CF_WORD0_ADDR(x) (((unsigned)(x) & 0xFFFFFFFF) << 0) 31 #define G_SQ_CF_WORD0_ADDR(x) (((x) >> 0) & 0xFFFFFFFF) 32 #define C_SQ_CF_WORD0_ADDR 0x00000000 33 #define P_SQ_CF_WORD1 34 #define S_SQ_CF_WORD1_POP_COUNT(x) (((unsigned)(x) & 0x7) << 0) 35 #define G_SQ_CF_WORD1_POP_COUNT(x) (((x) >> 0) & 0x7) 36 #define C_SQ_CF_WORD1_POP_COUNT 0xFFFFFFF8 37 #define S_SQ_CF_WORD1_CF_CONST(x) (((unsigned)(x) & 0x1F) << 3) 38 #define G_SQ_CF_WORD1_CF_CONST(x) (((x) >> 3) & 0x1F) 39 #define C_SQ_CF_WORD1_CF_CONST 0xFFFFFF07 40 #define S_SQ_CF_WORD1_COND(x) (((unsigned)(x) & 0x3) << 8) 41 #define G_SQ_CF_WORD1_COND(x) (((x) >> 8) & 0x3) 42 #define C_SQ_CF_WORD1_COND 0xFFFFFCFF 43 #define S_SQ_CF_WORD1_COUNT(x) (((unsigned)(x) & 0x7) << 10) 44 #define G_SQ_CF_WORD1_COUNT(x) (((x) >> 10) & 0x7) 45 #define C_SQ_CF_WORD1_COUNT 0xFFFFE3FF 46 #define S_SQ_CF_WORD1_CALL_COUNT(x) (((unsigned)(x) & 0x3F) << 13) 47 #define G_SQ_CF_WORD1_CALL_COUNT(x) (((x) >> 13) & 0x3F) 48 #define C_SQ_CF_WORD1_CALL_COUNT 0xFFF81FFF 49 #define S_SQ_CF_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21) 50 #define G_SQ_CF_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1) 51 #define C_SQ_CF_WORD1_END_OF_PROGRAM 0xFFDFFFFF 52 #define S_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22) 53 #define G_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1) 54 #define C_SQ_CF_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF 55 #define S_SQ_CF_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23) 56 #define G_SQ_CF_WORD1_CF_INST(x) (((x) >> 23) & 0x7F) 57 #define C_SQ_CF_WORD1_CF_INST 0xC07FFFFF 58 #define S_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 59 #define G_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 60 #define C_SQ_CF_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 61 #define S_SQ_CF_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 62 #define G_SQ_CF_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 63 #define C_SQ_CF_WORD1_BARRIER 0x7FFFFFFF 64 #define P_SQ_CF_ALU_WORD0 65 #define S_SQ_CF_ALU_WORD0_ADDR(x) (((unsigned)(x) & 0x3FFFFF) << 0) 66 #define G_SQ_CF_ALU_WORD0_ADDR(x) (((x) >> 0) & 0x3FFFFF) 67 #define C_SQ_CF_ALU_WORD0_ADDR 0xFFC00000 68 #define S_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((unsigned)(x) & 0xF) << 22) 69 #define G_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((x) >> 22) & 0xF) 70 #define C_SQ_CF_ALU_WORD0_KCACHE_BANK0 0xFC3FFFFF 71 #define S_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((unsigned)(x) & 0xF) << 26) 72 #define G_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((x) >> 26) & 0xF) 73 #define C_SQ_CF_ALU_WORD0_KCACHE_BANK1 0xC3FFFFFF 74 #define S_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((unsigned)(x) & 0x3) << 30) 75 #define G_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) >> 30) & 0x3) 76 #define C_SQ_CF_ALU_WORD0_KCACHE_MODE0 0x3FFFFFFF 77 #define V_SQ_CF_KCACHE_NOP 0x00000000 78 #define V_SQ_CF_KCACHE_LOCK_1 0x00000001 79 #define V_SQ_CF_KCACHE_LOCK_2 0x00000002 80 #define V_SQ_CF_KCACHE_LOCK_LOOP_INDEX 0x00000003 81 #define P_SQ_CF_ALU_WORD1 82 #define S_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((unsigned)(x) & 0x3) << 0) 83 #define G_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) >> 0) & 0x3) 84 #define C_SQ_CF_ALU_WORD1_KCACHE_MODE1 0xFFFFFFFC 85 #define S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((unsigned)(x) & 0xFF) << 2) 86 #define G_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((x) >> 2) & 0xFF) 87 #define C_SQ_CF_ALU_WORD1_KCACHE_ADDR0 0xFFFFFC03 88 #define S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((unsigned)(x) & 0xFF) << 10) 89 #define G_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((x) >> 10) & 0xFF) 90 #define C_SQ_CF_ALU_WORD1_KCACHE_ADDR1 0xFFFC03FF 91 #define S_SQ_CF_ALU_WORD1_COUNT(x) (((unsigned)(x) & 0x7F) << 18) 92 #define G_SQ_CF_ALU_WORD1_COUNT(x) (((x) >> 18) & 0x7F) 93 #define C_SQ_CF_ALU_WORD1_COUNT 0xFE03FFFF 94 #define S_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((unsigned)(x) & 0x1) << 25) 95 #define G_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((x) >> 25) & 0x1) 96 #define C_SQ_CF_ALU_WORD1_USES_WATERFALL 0xFDFFFFFF 97 #define S_SQ_CF_ALU_WORD1_CF_INST(x) (((unsigned)(x) & 0xF) << 26) 98 #define G_SQ_CF_ALU_WORD1_CF_INST(x) (((x) >> 26) & 0xF) 99 #define C_SQ_CF_ALU_WORD1_CF_INST 0xC3FFFFFF 100 #define S_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 101 #define G_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 102 #define C_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 103 #define S_SQ_CF_ALU_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 104 #define G_SQ_CF_ALU_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 105 #define C_SQ_CF_ALU_WORD1_BARRIER 0x7FFFFFFF 106 #define P_SQ_CF_ALLOC_EXPORT_WORD0 107 #define S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((unsigned)(x) & 0x1FFF) << 0) 108 #define G_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((x) >> 0) & 0x1FFF) 109 #define C_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE 0xFFFFE000 110 #define S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((unsigned)(x) & 0x3) << 13) 111 #define G_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((x) >> 13) & 0x3) 112 #define C_SQ_CF_ALLOC_EXPORT_WORD0_TYPE 0xFFFF9FFF 113 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL 0x00000000 114 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS 0x00000001 115 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM 0x00000002 116 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_SX 0x00000003 117 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE 0x00000000 118 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE_IND 0x00000001 119 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_READ 0x00000002 120 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_READ_IND 0x00000003 121 122 /* R700+-only */ 123 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE_ACK_EG 0x00000002 124 #define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE_IND_ACK_EG 0x00000003 125 126 #define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((unsigned)(x) & 0x7F) << 15) 127 #define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((x) >> 15) & 0x7F) 128 #define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR 0xFFC07FFF 129 #define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((unsigned)(x) & 0x1) << 22) 130 #define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((x) >> 22) & 0x1) 131 #define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL 0xFFBFFFFF 132 #define S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((unsigned)(x) & 0x7F) << 23) 133 #define G_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((x) >> 23) & 0x7F) 134 #define C_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR 0xC07FFFFF 135 #define S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((unsigned)(x) & 0x3) << 30) 136 #define G_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((x) >> 30) & 0x3) 137 #define C_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE 0x3FFFFFFF 138 #define P_SQ_CF_ALLOC_EXPORT_WORD1 139 #define S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((unsigned)(x) & 0xF) << 17) 140 #define G_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((x) >> 17) & 0xF) 141 #define C_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT 0xFFE1FFFF 142 #define S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21) 143 #define G_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1) 144 #define C_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM 0xFFDFFFFF 145 #define S_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22) 146 #define G_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1) 147 #define C_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF 148 #define S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23) 149 #define G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((x) >> 23) & 0x7F) 150 #define C_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST 0xC07FFFFF 151 152 #define S_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 153 #define G_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 154 #define C_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 155 #define S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 156 #define G_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 157 #define C_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER 0x7FFFFFFF 158 #define P_SQ_CF_ALLOC_EXPORT_WORD1_BUF 159 #define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((unsigned)(x) & 0xFFF) << 0) 160 #define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((x) >> 0) & 0xFFF) 161 #define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE 0xFFFFF000 162 #define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((unsigned)(x) & 0xF) << 12) 163 #define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((x) >> 12) & 0xF) 164 #define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK 0xFFFF0FFF 165 #define P_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ 166 #define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((unsigned)(x) & 0x7) << 0) 167 #define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((x) >> 0) & 0x7) 168 #define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X 0xFFFFFFF8 169 #define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((unsigned)(x) & 0x7) << 3) 170 #define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((x) >> 3) & 0x7) 171 #define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y 0xFFFFFFC7 172 #define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((unsigned)(x) & 0x7) << 6) 173 #define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((x) >> 6) & 0x7) 174 #define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z 0xFFFFFE3F 175 #define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((unsigned)(x) & 0x7) << 9) 176 #define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((x) >> 9) & 0x7) 177 #define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W 0xFFFFF1FF 178 #define P_SQ_ALU_WORD0 179 #define S_SQ_ALU_WORD0_SRC0_SEL(x) (((unsigned)(x) & 0x1FF) << 0) 180 #define G_SQ_ALU_WORD0_SRC0_SEL(x) (((x) >> 0) & 0x1FF) 181 #define C_SQ_ALU_WORD0_SRC0_SEL 0xFFFFFE00 182 /* 183 * 244 ALU_SRC_1_DBL_L: special constant 1.0 double-float, LSW. (RV670+) 184 * 245 ALU_SRC_1_DBL_M: special constant 1.0 double-float, MSW. (RV670+) 185 * 246 ALU_SRC_0_5_DBL_L: special constant 0.5 double-float, LSW. (RV670+) 186 * 247 ALU_SRC_0_5_DBL_M: special constant 0.5 double-float, MSW. (RV670+) 187 * 248 SQ_ALU_SRC_0: special constant 0.0. 188 * 249 SQ_ALU_SRC_1: special constant 1.0 float. 189 * 250 SQ_ALU_SRC_1_INT: special constant 1 integer. 190 * 251 SQ_ALU_SRC_M_1_INT: special constant -1 integer. 191 * 252 SQ_ALU_SRC_0_5: special constant 0.5 float. 192 * 253 SQ_ALU_SRC_LITERAL: literal constant. 193 * 254 SQ_ALU_SRC_PV: previous vector result. 194 * 255 SQ_ALU_SRC_PS: previous scalar result. 195 * 448 EG - INTERP SRC BASE 196 */ 197 /* LDS are Evergreen/Cayman only */ 198 #define EG_V_SQ_ALU_SRC_LDS_OQ_A 0x000000DB 199 #define EG_V_SQ_ALU_SRC_LDS_OQ_B 0x000000DC 200 #define EG_V_SQ_ALU_SRC_LDS_OQ_A_POP 0x000000DD 201 #define EG_V_SQ_ALU_SRC_LDS_OQ_B_POP 0x000000DE 202 #define EG_V_SQ_ALU_SRC_LDS_DIRECT_A 0x000000DF 203 #define EG_V_SQ_ALU_SRC_LDS_DIRECT_B 0x000000E0 204 #define EG_V_SQ_ALU_SRC_TIME_HI 0x000000E3 205 #define EG_V_SQ_ALU_SRC_TIME_LO 0x000000E4 206 #define EG_V_SQ_ALU_SRC_MASK_HI 0x000000E5 207 #define EG_V_SQ_ALU_SRC_MASK_LO 0x000000E6 208 #define EG_V_SQ_ALU_SRC_HW_WAVE_ID 0x000000E7 209 #define EG_V_SQ_ALU_SRC_SIMD_ID 0x000000E8 210 #define EG_V_SQ_ALU_SRC_SE_ID 0x000000E9 211 212 #define V_SQ_ALU_SRC_0 0x000000F8 213 #define V_SQ_ALU_SRC_1 0x000000F9 214 #define V_SQ_ALU_SRC_1_INT 0x000000FA 215 #define V_SQ_ALU_SRC_M_1_INT 0x000000FB 216 #define V_SQ_ALU_SRC_0_5 0x000000FC 217 #define V_SQ_ALU_SRC_LITERAL 0x000000FD 218 #define V_SQ_ALU_SRC_PV 0x000000FE 219 #define V_SQ_ALU_SRC_PS 0x000000FF 220 #define V_SQ_ALU_SRC_PARAM_BASE 0x000001C0 221 #define S_SQ_ALU_WORD0_SRC0_REL(x) (((unsigned)(x) & 0x1) << 9) 222 #define G_SQ_ALU_WORD0_SRC0_REL(x) (((x) >> 9) & 0x1) 223 #define C_SQ_ALU_WORD0_SRC0_REL 0xFFFFFDFF 224 #define S_SQ_ALU_WORD0_SRC0_CHAN(x) (((unsigned)(x) & 0x3) << 10) 225 #define G_SQ_ALU_WORD0_SRC0_CHAN(x) (((x) >> 10) & 0x3) 226 #define C_SQ_ALU_WORD0_SRC0_CHAN 0xFFFFF3FF 227 #define S_SQ_ALU_WORD0_SRC0_NEG(x) (((unsigned)(x) & 0x1) << 12) 228 #define G_SQ_ALU_WORD0_SRC0_NEG(x) (((x) >> 12) & 0x1) 229 #define C_SQ_ALU_WORD0_SRC0_NEG 0xFFFFEFFF 230 #define S_SQ_ALU_WORD0_SRC1_SEL(x) (((unsigned)(x) & 0x1FF) << 13) 231 #define G_SQ_ALU_WORD0_SRC1_SEL(x) (((x) >> 13) & 0x1FF) 232 #define C_SQ_ALU_WORD0_SRC1_SEL 0xFFC01FFF 233 #define S_SQ_ALU_WORD0_SRC1_REL(x) (((unsigned)(x) & 0x1) << 22) 234 #define G_SQ_ALU_WORD0_SRC1_REL(x) (((x) >> 22) & 0x1) 235 #define C_SQ_ALU_WORD0_SRC1_REL 0xFFBFFFFF 236 #define S_SQ_ALU_WORD0_SRC1_CHAN(x) (((unsigned)(x) & 0x3) << 23) 237 #define G_SQ_ALU_WORD0_SRC1_CHAN(x) (((x) >> 23) & 0x3) 238 #define C_SQ_ALU_WORD0_SRC1_CHAN 0xFE7FFFFF 239 #define S_SQ_ALU_WORD0_SRC1_NEG(x) (((unsigned)(x) & 0x1) << 25) 240 #define G_SQ_ALU_WORD0_SRC1_NEG(x) (((x) >> 25) & 0x1) 241 #define C_SQ_ALU_WORD0_SRC1_NEG 0xFDFFFFFF 242 #define S_SQ_ALU_WORD0_INDEX_MODE(x) (((unsigned)(x) & 0x7) << 26) 243 #define G_SQ_ALU_WORD0_INDEX_MODE(x) (((x) >> 26) & 0x7) 244 #define C_SQ_ALU_WORD0_INDEX_MODE 0xE3FFFFFF 245 #define S_SQ_ALU_WORD0_PRED_SEL(x) (((unsigned)(x) & 0x3) << 29) 246 #define G_SQ_ALU_WORD0_PRED_SEL(x) (((x) >> 29) & 0x3) 247 #define C_SQ_ALU_WORD0_PRED_SEL 0x9FFFFFFF 248 #define S_SQ_ALU_WORD0_LAST(x) (((unsigned)(x) & 0x1) << 31) 249 #define G_SQ_ALU_WORD0_LAST(x) (((x) >> 31) & 0x1) 250 #define C_SQ_ALU_WORD0_LAST 0x7FFFFFFF 251 #define P_SQ_ALU_WORD1 252 #define S_SQ_ALU_WORD1_ENCODING(x) (((unsigned)(x) & 0x7) << 15) 253 #define G_SQ_ALU_WORD1_ENCODING(x) (((x) >> 15) & 0x7) 254 #define C_SQ_ALU_WORD1_ENCODING 0xFFFC7FFF 255 #define S_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((unsigned)(x) & 0x7) << 18) 256 #define G_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((x) >> 18) & 0x7) 257 #define C_SQ_ALU_WORD1_BANK_SWIZZLE 0xFFE3FFFF 258 #define S_SQ_ALU_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 21) 259 #define G_SQ_ALU_WORD1_DST_GPR(x) (((x) >> 21) & 0x7F) 260 #define C_SQ_ALU_WORD1_DST_GPR 0xF01FFFFF 261 #define S_SQ_ALU_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 28) 262 #define G_SQ_ALU_WORD1_DST_REL(x) (((x) >> 28) & 0x1) 263 #define C_SQ_ALU_WORD1_DST_REL 0xEFFFFFFF 264 #define S_SQ_ALU_WORD1_DST_CHAN(x) (((unsigned)(x) & 0x3) << 29) 265 #define G_SQ_ALU_WORD1_DST_CHAN(x) (((x) >> 29) & 0x3) 266 #define C_SQ_ALU_WORD1_DST_CHAN 0x9FFFFFFF 267 #define S_SQ_ALU_WORD1_CLAMP(x) (((unsigned)(x) & 0x1) << 31) 268 #define G_SQ_ALU_WORD1_CLAMP(x) (((x) >> 31) & 0x1) 269 #define C_SQ_ALU_WORD1_CLAMP 0x7FFFFFFF 270 #define P_SQ_ALU_WORD1_OP2 271 #define S_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((unsigned)(x) & 0x1) << 0) 272 #define G_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((x) >> 0) & 0x1) 273 #define C_SQ_ALU_WORD1_OP2_SRC0_ABS 0xFFFFFFFE 274 #define S_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((unsigned)(x) & 0x1) << 1) 275 #define G_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((x) >> 1) & 0x1) 276 #define C_SQ_ALU_WORD1_OP2_SRC1_ABS 0xFFFFFFFD 277 #define S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((unsigned)(x) & 0x1) << 2) 278 #define G_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((x) >> 2) & 0x1) 279 #define C_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK 0xFFFFFFFB 280 #define S_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((unsigned)(x) & 0x1) << 3) 281 #define G_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((x) >> 3) & 0x1) 282 #define C_SQ_ALU_WORD1_OP2_UPDATE_PRED 0xFFFFFFF7 283 #define S_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((unsigned)(x) & 0x1) << 4) 284 #define G_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((x) >> 4) & 0x1) 285 #define C_SQ_ALU_WORD1_OP2_WRITE_MASK 0xFFFFFFEF 286 #define S_SQ_ALU_WORD1_OP2_FOG_MERGE(x) (((unsigned)(x) & 0x1) << 5) 287 #define G_SQ_ALU_WORD1_OP2_FOG_MERGE(x) (((x) >> 5) & 0x1) 288 #define C_SQ_ALU_WORD1_OP2_FOG_MERGE 0xFFFFFFDF 289 #define S_SQ_ALU_WORD1_OP2_OMOD(x) (((unsigned)(x) & 0x3) << 6) 290 #define G_SQ_ALU_WORD1_OP2_OMOD(x) (((x) >> 6) & 0x3) 291 #define C_SQ_ALU_WORD1_OP2_OMOD 0xFFFFFF3F 292 #define S_SQ_ALU_WORD1_OP2_ALU_INST(x) (((unsigned)(x) & 0x3FF) << 8) 293 #define G_SQ_ALU_WORD1_OP2_ALU_INST(x) (((x) >> 8) & 0x3FF) 294 #define C_SQ_ALU_WORD1_OP2_ALU_INST 0xFFFC00FF 295 #define P_SQ_ALU_WORD1_OP3 296 #define S_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((unsigned)(x) & 0x1FF) << 0) 297 #define G_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((x) >> 0) & 0x1FF) 298 #define C_SQ_ALU_WORD1_OP3_SRC2_SEL 0xFFFFFE00 299 #define S_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((unsigned)(x) & 0x1) << 9) 300 #define G_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((x) >> 9) & 0x1) 301 #define C_SQ_ALU_WORD1_OP3_SRC2_REL 0xFFFFFDFF 302 #define S_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((unsigned)(x) & 0x3) << 10) 303 #define G_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((x) >> 10) & 0x3) 304 #define C_SQ_ALU_WORD1_OP3_SRC2_CHAN 0xFFFFF3FF 305 #define S_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((unsigned)(x) & 0x1) << 12) 306 #define G_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((x) >> 12) & 0x1) 307 #define C_SQ_ALU_WORD1_OP3_SRC2_NEG 0xFFFFEFFF 308 #define S_SQ_ALU_WORD1_OP3_ALU_INST(x) (((unsigned)(x) & 0x1F) << 13) 309 #define G_SQ_ALU_WORD1_OP3_ALU_INST(x) (((x) >> 13) & 0x1F) 310 #define C_SQ_ALU_WORD1_OP3_ALU_INST 0xFFFC1FFF 311 #define P_SQ_VTX_WORD0 312 #define S_SQ_VTX_WORD0_VTX_INST(x) (((unsigned)(x) & 0x1F) << 0) 313 #define G_SQ_VTX_WORD0_VTX_INST(x) (((x) >> 0) & 0x1F) 314 #define C_SQ_VTX_WORD0_VTX_INST 0xFFFFFFE0 315 #define S_SQ_VTX_WORD0_FETCH_TYPE(x) (((unsigned)(x) & 0x3) << 5) 316 #define G_SQ_VTX_WORD0_FETCH_TYPE(x) (((x) >> 5) & 0x3) 317 #define C_SQ_VTX_WORD0_FETCH_TYPE 0xFFFFFF9F 318 #define S_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7) 319 #define G_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1) 320 #define C_SQ_VTX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F 321 #define S_SQ_VTX_WORD0_BUFFER_ID(x) (((unsigned)(x) & 0xFF) << 8) 322 #define G_SQ_VTX_WORD0_BUFFER_ID(x) (((x) >> 8) & 0xFF) 323 #define C_SQ_VTX_WORD0_BUFFER_ID 0xFFFF00FF 324 #define S_SQ_VTX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16) 325 #define G_SQ_VTX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F) 326 #define C_SQ_VTX_WORD0_SRC_GPR 0xFF80FFFF 327 #define S_SQ_VTX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23) 328 #define G_SQ_VTX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1) 329 #define C_SQ_VTX_WORD0_SRC_REL 0xFF7FFFFF 330 #define S_SQ_VTX_WORD0_SRC_SEL_X(x) (((unsigned)(x) & 0x3) << 24) 331 #define G_SQ_VTX_WORD0_SRC_SEL_X(x) (((x) >> 24) & 0x3) 332 #define C_SQ_VTX_WORD0_SRC_SEL_X 0xFCFFFFFF 333 #define S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((unsigned)(x) & 0x3F) << 26) 334 #define G_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((x) >> 26) & 0x3F) 335 #define C_SQ_VTX_WORD0_MEGA_FETCH_COUNT 0x03FFFFFF 336 #define P_SQ_VTX_WORD1 337 #define S_SQ_VTX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9) 338 #define G_SQ_VTX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7) 339 #define C_SQ_VTX_WORD1_DST_SEL_X 0xFFFFF1FF 340 #define S_SQ_VTX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12) 341 #define G_SQ_VTX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7) 342 #define C_SQ_VTX_WORD1_DST_SEL_Y 0xFFFF8FFF 343 #define S_SQ_VTX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15) 344 #define G_SQ_VTX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7) 345 #define C_SQ_VTX_WORD1_DST_SEL_Z 0xFFFC7FFF 346 #define S_SQ_VTX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18) 347 #define G_SQ_VTX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7) 348 #define C_SQ_VTX_WORD1_DST_SEL_W 0xFFE3FFFF 349 #define S_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((unsigned)(x) & 0x1) << 21) 350 #define G_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((x) >> 21) & 0x1) 351 #define C_SQ_VTX_WORD1_USE_CONST_FIELDS 0xFFDFFFFF 352 #define S_SQ_VTX_WORD1_DATA_FORMAT(x) (((unsigned)(x) & 0x3F) << 22) 353 #define G_SQ_VTX_WORD1_DATA_FORMAT(x) (((x) >> 22) & 0x3F) 354 #define C_SQ_VTX_WORD1_DATA_FORMAT 0xF03FFFFF 355 #define S_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((unsigned)(x) & 0x3) << 28) 356 #define G_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((x) >> 28) & 0x3) 357 #define C_SQ_VTX_WORD1_NUM_FORMAT_ALL 0xCFFFFFFF 358 #define S_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((unsigned)(x) & 0x1) << 30) 359 #define G_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((x) >> 30) & 0x1) 360 #define C_SQ_VTX_WORD1_FORMAT_COMP_ALL 0xBFFFFFFF 361 #define S_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((unsigned)(x) & 0x1) << 31) 362 #define G_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((x) >> 31) & 0x1) 363 #define C_SQ_VTX_WORD1_SRF_MODE_ALL 0x7FFFFFFF 364 #define P_SQ_VTX_WORD1_GPR 365 #define S_SQ_VTX_WORD1_GPR_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0) 366 #define G_SQ_VTX_WORD1_GPR_DST_GPR(x) (((x) >> 0) & 0x7F) 367 #define C_SQ_VTX_WORD1_GPR_DST_GPR 0xFFFFFF80 368 #define S_SQ_VTX_WORD1_GPR_DST_REL(x) (((unsigned)(x) & 0x1) << 7) 369 #define G_SQ_VTX_WORD1_GPR_DST_REL(x) (((x) >> 7) & 0x1) 370 #define C_SQ_VTX_WORD1_GPR_DST_REL 0xFFFFFF7F 371 #define P_SQ_VTX_WORD1_SEM 372 #define S_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((unsigned)(x) & 0xFF) << 0) 373 #define G_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((x) >> 0) & 0xFF) 374 #define C_SQ_VTX_WORD1_SEM_SEMANTIC_ID 0xFFFFFF00 375 #define P_SQ_VTX_WORD2 376 #define S_SQ_VTX_WORD2_OFFSET(x) (((unsigned)(x) & 0xFFFF) << 0) 377 #define G_SQ_VTX_WORD2_OFFSET(x) (((x) >> 0) & 0xFFFF) 378 #define C_SQ_VTX_WORD2_OFFSET 0xFFFF0000 379 #define S_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((unsigned)(x) & 0x3) << 16) 380 #define G_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((x) >> 16) & 0x3) 381 #define C_SQ_VTX_WORD2_ENDIAN_SWAP 0xFFFCFFFF 382 #define S_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((unsigned)(x) & 0x1) << 18) 383 #define G_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((x) >> 18) & 0x1) 384 #define C_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE 0xFFFBFFFF 385 #define S_SQ_VTX_WORD2_MEGA_FETCH(x) (((unsigned)(x) & 0x1) << 19) 386 #define G_SQ_VTX_WORD2_MEGA_FETCH(x) (((x) >> 19) & 0x1) 387 #define C_SQ_VTX_WORD2_MEGA_FETCH 0xFFF7FFFF 388 #define S_SQ_VTX_WORD2_ALT_CONST(x) (((unsigned)(x) & 0x1) << 20) 389 #define G_SQ_VTX_WORD2_ALT_CONST(x) (((x) >> 20) & 0x1) 390 #define C_SQ_VTX_WORD2_ALT_CONST 0xFFEFFFFF 391 #define P_SQ_TEX_WORD0 392 #define S_SQ_TEX_WORD0_TEX_INST(x) (((unsigned)(x) & 0x1F) << 0) 393 #define G_SQ_TEX_WORD0_TEX_INST(x) (((x) >> 0) & 0x1F) 394 #define C_SQ_TEX_WORD0_TEX_INST 0xFFFFFFE0 395 #define S_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((unsigned)(x) & 0x1) << 5) 396 #define G_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((x) >> 5) & 0x1) 397 #define C_SQ_TEX_WORD0_BC_FRAC_MODE 0xFFFFFFDF 398 #define EG_S_SQ_TEX_WORD0_INST_MOD(x) (((unsigned)(x) & 0x3) << 5) 399 #define EG_G_SQ_TEX_WORD0_INST_MOD(x) (((x) >> 5) & 0x3) 400 #define EG_C_SQ_TEX_WORD0_INST_MOD 0xFFFFFF9F 401 #define S_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7) 402 #define G_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1) 403 #define C_SQ_TEX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F 404 #define S_SQ_TEX_WORD0_RESOURCE_ID(x) (((unsigned)(x) & 0xFF) << 8) 405 #define G_SQ_TEX_WORD0_RESOURCE_ID(x) (((x) >> 8) & 0xFF) 406 #define C_SQ_TEX_WORD0_RESOURCE_ID 0xFFFF00FF 407 #define S_SQ_TEX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16) 408 #define G_SQ_TEX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F) 409 #define C_SQ_TEX_WORD0_SRC_GPR 0xFF80FFFF 410 #define S_SQ_TEX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23) 411 #define G_SQ_TEX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1) 412 #define C_SQ_TEX_WORD0_SRC_REL 0xFF7FFFFF 413 #define S_SQ_TEX_WORD0_ALT_CONST(x) (((unsigned)(x) & 0x1) << 24) 414 #define G_SQ_TEX_WORD0_ALT_CONST(x) (((x) >> 24) & 0x1) 415 #define C_SQ_TEX_WORD0_ALT_CONST 0xFEFFFFFF 416 #define P_SQ_TEX_WORD1 417 #define S_SQ_TEX_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0) 418 #define G_SQ_TEX_WORD1_DST_GPR(x) (((x) >> 0) & 0x7F) 419 #define C_SQ_TEX_WORD1_DST_GPR 0xFFFFFF80 420 #define S_SQ_TEX_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 7) 421 #define G_SQ_TEX_WORD1_DST_REL(x) (((x) >> 7) & 0x1) 422 #define C_SQ_TEX_WORD1_DST_REL 0xFFFFFF7F 423 #define S_SQ_TEX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9) 424 #define G_SQ_TEX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7) 425 #define C_SQ_TEX_WORD1_DST_SEL_X 0xFFFFF1FF 426 #define S_SQ_TEX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12) 427 #define G_SQ_TEX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7) 428 #define C_SQ_TEX_WORD1_DST_SEL_Y 0xFFFF8FFF 429 #define S_SQ_TEX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15) 430 #define G_SQ_TEX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7) 431 #define C_SQ_TEX_WORD1_DST_SEL_Z 0xFFFC7FFF 432 #define S_SQ_TEX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18) 433 #define G_SQ_TEX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7) 434 #define C_SQ_TEX_WORD1_DST_SEL_W 0xFFE3FFFF 435 #define S_SQ_TEX_WORD1_LOD_BIAS(x) (((unsigned)(x) & 0x7F) << 21) 436 #define G_SQ_TEX_WORD1_LOD_BIAS(x) (((x) >> 21) & 0x7F) 437 #define C_SQ_TEX_WORD1_LOD_BIAS 0xF01FFFFF 438 #define S_SQ_TEX_WORD1_COORD_TYPE_X(x) (((unsigned)(x) & 0x1) << 28) 439 #define G_SQ_TEX_WORD1_COORD_TYPE_X(x) (((x) >> 28) & 0x1) 440 #define C_SQ_TEX_WORD1_COORD_TYPE_X 0xEFFFFFFF 441 #define V_SQ_TEX_WORD1_COORD_UNNORMALIZED 0x00000000 442 #define V_SQ_TEX_WORD1_COORD_NORMALIZED 0x00000001 443 #define S_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((unsigned)(x) & 0x1) << 29) 444 #define G_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((x) >> 29) & 0x1) 445 #define C_SQ_TEX_WORD1_COORD_TYPE_Y 0xDFFFFFFF 446 #define S_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((unsigned)(x) & 0x1) << 30) 447 #define G_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((x) >> 30) & 0x1) 448 #define C_SQ_TEX_WORD1_COORD_TYPE_Z 0xBFFFFFFF 449 #define S_SQ_TEX_WORD1_COORD_TYPE_W(x) (((unsigned)(x) & 0x1) << 31) 450 #define G_SQ_TEX_WORD1_COORD_TYPE_W(x) (((x) >> 31) & 0x1) 451 #define C_SQ_TEX_WORD1_COORD_TYPE_W 0x7FFFFFFF 452 #define P_SQ_TEX_WORD2 453 #define S_SQ_TEX_WORD2_OFFSET_X(x) (((unsigned)(x) & 0x1F) << 0) 454 #define G_SQ_TEX_WORD2_OFFSET_X(x) (((x) >> 0) & 0x1F) 455 #define C_SQ_TEX_WORD2_OFFSET_X 0xFFFFFFE0 456 #define S_SQ_TEX_WORD2_OFFSET_Y(x) (((unsigned)(x) & 0x1F) << 5) 457 #define G_SQ_TEX_WORD2_OFFSET_Y(x) (((x) >> 5) & 0x1F) 458 #define C_SQ_TEX_WORD2_OFFSET_Y 0xFFFFFC1F 459 #define S_SQ_TEX_WORD2_OFFSET_Z(x) (((unsigned)(x) & 0x1F) << 10) 460 #define G_SQ_TEX_WORD2_OFFSET_Z(x) (((x) >> 10) & 0x1F) 461 #define C_SQ_TEX_WORD2_OFFSET_Z 0xFFFF83FF 462 #define S_SQ_TEX_WORD2_SAMPLER_ID(x) (((unsigned)(x) & 0x1F) << 15) 463 #define G_SQ_TEX_WORD2_SAMPLER_ID(x) (((x) >> 15) & 0x1F) 464 #define C_SQ_TEX_WORD2_SAMPLER_ID 0xFFF07FFF 465 #define S_SQ_TEX_WORD2_SRC_SEL_X(x) (((unsigned)(x) & 0x7) << 20) 466 #define G_SQ_TEX_WORD2_SRC_SEL_X(x) (((x) >> 20) & 0x7) 467 #define C_SQ_TEX_WORD2_SRC_SEL_X 0xFF8FFFFF 468 #define S_SQ_TEX_WORD2_SRC_SEL_Y(x) (((unsigned)(x) & 0x7) << 23) 469 #define G_SQ_TEX_WORD2_SRC_SEL_Y(x) (((x) >> 23) & 0x7) 470 #define C_SQ_TEX_WORD2_SRC_SEL_Y 0xFC7FFFFF 471 #define S_SQ_TEX_WORD2_SRC_SEL_Z(x) (((unsigned)(x) & 0x7) << 26) 472 #define G_SQ_TEX_WORD2_SRC_SEL_Z(x) (((x) >> 26) & 0x7) 473 #define C_SQ_TEX_WORD2_SRC_SEL_Z 0xE3FFFFFF 474 #define S_SQ_TEX_WORD2_SRC_SEL_W(x) (((unsigned)(x) & 0x7) << 29) 475 #define G_SQ_TEX_WORD2_SRC_SEL_W(x) (((x) >> 29) & 0x7) 476 #define C_SQ_TEX_WORD2_SRC_SEL_W 0x1FFFFFFF 477 478 #define V_SQ_CF_COND_ACTIVE 0x00 479 #define V_SQ_CF_COND_FALSE 0x01 480 #define V_SQ_CF_COND_BOOL 0x02 481 #define V_SQ_CF_COND_NOT_BOOL 0x03 482 483 #define V_SQ_REL_ABSOLUTE 0 484 #define V_SQ_REL_RELATIVE 1 485 486 #define SQ_ALU_VEC_012 0x00 487 #define SQ_ALU_VEC_021 0x01 488 #define SQ_ALU_VEC_120 0x02 489 #define SQ_ALU_VEC_102 0x03 490 #define SQ_ALU_VEC_201 0x04 491 #define SQ_ALU_VEC_210 0x05 492 493 #define SQ_ALU_SCL_210 0x00000000 494 #define SQ_ALU_SCL_122 0x00000001 495 #define SQ_ALU_SCL_212 0x00000002 496 #define SQ_ALU_SCL_221 0x00000003 497 498 #define INDEX_MODE_AR_X 0 499 #define INDEX_MODE_AR_Y 1 500 #define INDEX_MODE_AR_Z 2 501 #define INDEX_MODE_AR_W 3 502 #define INDEX_MODE_LOOP 4 503 504 #define SQ_VTX_FETCH_VERTEX_DATA 0 505 #define SQ_VTX_FETCH_INSTANCE_DATA 1 506 #define SQ_VTX_FETCH_NO_INDEX_OFFSET 2 507 508 /* EG RAT functions */ 509 #define V_RAT_INST_NOP 0 510 #define V_RAT_INST_STORE_TYPED 1 511 #define V_RAT_INST_CMPXCHG_INT 4 512 #define V_RAT_INST_ADD 7 513 #define V_RAT_INST_SUB 8 514 #define V_RAT_INST_RSUB 9 515 #define V_RAT_INST_MIN_INT 10 516 #define V_RAT_INST_MIN_UINT 11 517 #define V_RAT_INST_MAX_INT 12 518 #define V_RAT_INST_MAX_UINT 13 519 #define V_RAT_INST_AND 14 520 #define V_RAT_INST_OR 15 521 #define V_RAT_INST_XOR 16 522 #define V_RAT_INST_INC_UINT 18 523 #define V_RAT_INST_DEC_UINT 19 524 #define V_RAT_INST_STORE_DWORD 20 525 #define V_RAT_INST_STORE_SHORT 21 526 #define V_RAT_INST_STORE_BYTE 22 527 #define V_RAT_INST_NOP_RTN 32 528 #define V_RAT_INST_XCHG_RTN 34 529 #define V_RAT_INST_CMPXCHG_INT_RTN 36 530 #define V_RAT_INST_ADD_RTN 39 531 #define V_RAT_INST_SUB_RTN 40 532 #define V_RAT_INST_RSUB_RTN 41 533 #define V_RAT_INST_MIN_INT_RTN 42 534 #define V_RAT_INST_MIN_UINT_RTN 43 535 #define V_RAT_INST_MAX_INT_RTN 44 536 #define V_RAT_INST_MAX_UINT_RTN 45 537 #define V_RAT_INST_AND_RTN 46 538 #define V_RAT_INST_OR_RTN 47 539 #define V_RAT_INST_XOR_RTN 48 540 #define V_RAT_INST_INC_UINT_RTN 50 541 #define V_RAT_INST_DEC_UINT_RTN 51 542 543 #endif 544