Lines Matching refs:bc

31 int bc_decoder::decode_cf(unsigned &i, bc_cf& bc) {
38 return decode_cf_alu(i, bc);
45 bc.set_op(r600_isa_cf_by_opcode(ctx.isa, opcode, 0));
47 if (bc.op_ptr->flags & CF_EXP) {
48 return decode_cf_exp(i, bc);
49 } else if (bc.op_ptr->flags & CF_MEM) {
50 return decode_cf_mem(i, bc);
55 bc.addr = w0.get_ADDR();
56 bc.jumptable_sel = w0.get_JUMPTABLE_SEL();
61 bc.barrier = w1.get_BARRIER();
62 bc.cf_const = w1.get_CF_CONST();
63 bc.cond = w1.get_COND();
64 bc.count = w1.get_COUNT();
65 bc.end_of_program = w1.get_END_OF_PROGRAM();
66 bc.pop_count = w1.get_POP_COUNT();
67 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
68 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
73 bc.barrier = w1.get_BARRIER();
74 bc.cf_const = w1.get_CF_CONST();
75 bc.cond = w1.get_COND();
76 bc.count = w1.get_COUNT();
77 bc.pop_count = w1.get_POP_COUNT();
78 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
84 bc.addr = w0.get_ADDR();
87 bc.barrier = w1.get_BARRIER();
88 bc.cf_const = w1.get_CF_CONST();
89 bc.cond = w1.get_COND();
92 bc.count = w1.get_COUNT();
94 bc.count = w1.get_COUNT() + (w1.get_COUNT_3() << 3);
96 bc.end_of_program = w1.get_END_OF_PROGRAM();
97 bc.pop_count = w1.get_POP_COUNT();
98 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
99 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
100 bc.call_count = w1.get_CALL_COUNT();
109 int bc_decoder::decode_cf_alu(unsigned & i, bc_cf& bc) {
118 bc.kc[0].bank = w0.get_KCACHE_BANK0();
119 bc.kc[1].bank = w0.get_KCACHE_BANK1();
120 bc.kc[0].mode = w0.get_KCACHE_MODE0();
122 bc.addr = w0.get_ADDR();
127 bc.set_op(r600_isa_cf_by_opcode(ctx.isa, w1.get_CF_INST(), 1));
129 bc.kc[0].addr = w1.get_KCACHE_ADDR0();
130 bc.kc[1].mode = w1.get_KCACHE_MODE1();
131 bc.kc[1].addr = w1.get_KCACHE_ADDR1();
133 bc.barrier = w1.get_BARRIER();
134 bc.count = w1.get_COUNT();
135 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
137 bc.uses_waterfall = w1.get_USES_WATERFALL();
141 bc.set_op(r600_isa_cf_by_opcode(ctx.isa, w1.get_CF_INST(), 1));
143 if (bc.op == CF_OP_ALU_EXT) {
147 bc.kc[0].index_mode = w0.get_KCACHE_BANK_INDEX_MODE0();
148 bc.kc[1].index_mode = w0.get_KCACHE_BANK_INDEX_MODE1();
149 bc.kc[2].index_mode = w0.get_KCACHE_BANK_INDEX_MODE2();
150 bc.kc[3].index_mode = w0.get_KCACHE_BANK_INDEX_MODE3();
151 bc.kc[2].bank = w0.get_KCACHE_BANK2();
152 bc.kc[3].bank = w0.get_KCACHE_BANK3();
153 bc.kc[2].mode = w0.get_KCACHE_MODE2();
154 bc.kc[3].mode = w1.get_KCACHE_MODE3();
155 bc.kc[2].addr = w1.get_KCACHE_ADDR2();
156 bc.kc[3].addr = w1.get_KCACHE_ADDR3();
158 r = decode_cf_alu(i, bc);
162 bc.kc[0].addr = w1.get_KCACHE_ADDR0();
163 bc.kc[1].mode = w1.get_KCACHE_MODE1();
164 bc.kc[1].addr = w1.get_KCACHE_ADDR1();
165 bc.barrier = w1.get_BARRIER();
166 bc.count = w1.get_COUNT();
167 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
169 bc.alt_const = w1.get_ALT_CONST();
175 int bc_decoder::decode_cf_exp(unsigned & i, bc_cf& bc) {
182 bc.array_base = w0.get_ARRAY_BASE();
183 bc.elem_size = w0.get_ELEM_SIZE();
184 bc.index_gpr = w0.get_INDEX_GPR();
185 bc.rw_gpr = w0.get_RW_GPR();
186 bc.rw_rel = w0.get_RW_REL();
187 bc.type = w0.get_TYPE();
191 bc.barrier = w1.get_BARRIER();
192 bc.burst_count = w1.get_BURST_COUNT();
193 bc.end_of_program = w1.get_END_OF_PROGRAM();
194 bc.sel[0] = w1.get_SEL_X();
195 bc.sel[1] = w1.get_SEL_Y();
196 bc.sel[2] = w1.get_SEL_Z();
197 bc.sel[3] = w1.get_SEL_W();
198 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
199 bc.mark = w1.get_MARK();
203 bc.barrier = w1.get_BARRIER();
204 bc.burst_count = w1.get_BURST_COUNT();
205 bc.mark = w1.get_MARK();
206 bc.sel[0] = w1.get_SEL_X();
207 bc.sel[1] = w1.get_SEL_Y();
208 bc.sel[2] = w1.get_SEL_Z();
209 bc.sel[3] = w1.get_SEL_W();
210 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
214 bc.barrier = w1.get_BARRIER();
215 bc.burst_count = w1.get_BURST_COUNT();
216 bc.end_of_program = w1.get_END_OF_PROGRAM();
217 bc.sel[0] = w1.get_SEL_X();
218 bc.sel[1] = w1.get_SEL_Y();
219 bc.sel[2] = w1.get_SEL_Z();
220 bc.sel[3] = w1.get_SEL_W();
221 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
222 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
229 int bc_decoder::decode_cf_mem(unsigned & i, bc_cf& bc) {
235 if (!(bc.op_ptr->flags & CF_RAT)) {
237 bc.array_base = w0.get_ARRAY_BASE();
238 bc.elem_size = w0.get_ELEM_SIZE();
239 bc.index_gpr = w0.get_INDEX_GPR();
240 bc.rw_gpr = w0.get_RW_GPR();
241 bc.rw_rel = w0.get_RW_REL();
242 bc.type = w0.get_TYPE();
246 bc.elem_size = w0.get_ELEM_SIZE();
247 bc.index_gpr = w0.get_INDEX_GPR();
248 bc.rw_gpr = w0.get_RW_GPR();
249 bc.rw_rel = w0.get_RW_REL();
250 bc.type = w0.get_TYPE();
251 bc.rat_id = w0.get_RAT_ID();
252 bc.rat_inst = w0.get_RAT_INST();
253 bc.rat_index_mode = w0.get_RAT_INDEX_MODE();
258 bc.barrier = w1.get_BARRIER();
259 bc.burst_count = w1.get_BURST_COUNT();
260 bc.end_of_program = w1.get_END_OF_PROGRAM();
261 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
262 bc.mark = w1.get_MARK();
263 bc.array_size = w1.get_ARR_SIZE();
264 bc.comp_mask = w1.get_COMP_MASK();
268 bc.barrier = w1.get_BARRIER();
269 bc.burst_count = w1.get_BURST_COUNT();
270 bc.mark = w1.get_MARK();
271 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
272 bc.array_size = w1.get_ARR_SIZE();
273 bc.comp_mask = w1.get_COMP_MASK();
277 bc.barrier = w1.get_BARRIER();
278 bc.burst_count = w1.get_BURST_COUNT();
279 bc.end_of_program = w1.get_END_OF_PROGRAM();
280 bc.valid_pixel_mode = w1.get_VALID_PIXEL_MODE();
281 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
282 bc.array_size = w1.get_ARR_SIZE();
283 bc.comp_mask = w1.get_COMP_MASK();
284 bc.whole_quad_mode = w1.get_WHOLE_QUAD_MODE();
290 int bc_decoder::decode_alu(unsigned & i, bc_alu& bc) {
297 bc.index_mode = w0.get_INDEX_MODE();
298 bc.last = w0.get_LAST();
299 bc.pred_sel = w0.get_PRED_SEL();
300 bc.src[0].chan = w0.get_SRC0_CHAN();
301 bc.src[0].sel = w0.get_SRC0_SEL();
302 bc.src[0].neg = w0.get_SRC0_NEG();
303 bc.src[0].rel = w0.get_SRC0_REL();
304 bc.src[1].chan = w0.get_SRC1_CHAN();
305 bc.src[1].sel = w0.get_SRC1_SEL();
306 bc.src[1].neg = w0.get_SRC1_NEG();
307 bc.src[1].rel = w0.get_SRC1_REL();
311 bc.set_op(r600_isa_alu_by_opcode(ctx.isa, w1.get_ALU_INST(), 1));
313 if (bc.op == ALU_OP3_LDS_IDX_OP) {
316 bc.index_mode = iw0.get_INDEX_MODE();
317 bc.last = iw0.get_LAST();
318 bc.pred_sel = iw0.get_PRED_SEL();
319 bc.src[0].chan = iw0.get_SRC0_CHAN();
320 bc.src[0].sel = iw0.get_SRC0_SEL();
321 bc.src[0].rel = iw0.get_SRC0_REL();
323 bc.src[1].chan = iw0.get_SRC1_CHAN();
324 bc.src[1].sel = iw0.get_SRC1_SEL();
325 bc.src[1].rel = iw0.get_SRC1_REL();
327 bc.bank_swizzle = iw1.get_BANK_SWIZZLE();
328 bc.src[2].chan = iw1.get_SRC2_CHAN();
329 bc.src[2].sel = iw1.get_SRC2_SEL();
330 bc.src[2].rel = iw1.get_SRC2_REL();
331 bc.dst_chan = iw1.get_DST_CHAN();
335 bc.op_ptr = &r600_alu_op_table[k];
336 bc.op = k;
340 bc.lds_idx_offset =
349 bc.bank_swizzle = w1.get_BANK_SWIZZLE();
350 bc.clamp = w1.get_CLAMP();
351 bc.dst_chan = w1.get_DST_CHAN();
352 bc.dst_gpr = w1.get_DST_GPR();
353 bc.dst_rel = w1.get_DST_REL();
355 bc.src[2].chan = w1.get_SRC2_CHAN();
356 bc.src[2].sel = w1.get_SRC2_SEL();
357 bc.src[2].neg = w1.get_SRC2_NEG();
358 bc.src[2].rel = w1.get_SRC2_REL();
364 bc.set_op(r600_isa_alu_by_opcode(ctx.isa, w1.get_ALU_INST(), 0));
366 bc.bank_swizzle = w1.get_BANK_SWIZZLE();
367 bc.clamp = w1.get_CLAMP();
368 bc.dst_chan = w1.get_DST_CHAN();
369 bc.dst_gpr = w1.get_DST_GPR();
370 bc.dst_rel = w1.get_DST_REL();
372 bc.omod = w1.get_OMOD();
373 bc.src[0].abs = w1.get_SRC0_ABS();
374 bc.src[1].abs = w1.get_SRC1_ABS();
375 bc.write_mask = w1.get_WRITE_MASK();
376 bc.update_exec_mask = w1.get_UPDATE_EXEC_MASK();
377 bc.update_pred = w1.get_UPDATE_PRED();
379 bc.fog_merge = w1.get_FOG_MERGE();
383 bc.set_op(r600_isa_alu_by_opcode(ctx.isa, w1.get_ALU_INST(), 0));
385 bc.bank_swizzle = w1.get_BANK_SWIZZLE();
386 bc.clamp = w1.get_CLAMP();
387 bc.dst_chan = w1.get_DST_CHAN();
388 bc.dst_gpr = w1.get_DST_GPR();
389 bc.dst_rel = w1.get_DST_REL();
391 bc.omod = w1.get_OMOD();
392 bc.src[0].abs = w1.get_SRC0_ABS();
393 bc.src[1].abs = w1.get_SRC1_ABS();
394 bc.write_mask = w1.get_WRITE_MASK();
395 bc.update_exec_mask = w1.get_UPDATE_EXEC_MASK();
396 bc.update_pred = w1.get_UPDATE_PRED();
400 bc.slot_flags = (alu_op_flags)bc.op_ptr->slots[ctx.isa->hw_class];
404 int bc_decoder::decode_fetch(unsigned & i, bc_fetch& bc) {
421 bc.set_op(fetch_opcode);
423 bc.set_op(r600_isa_fetch_by_opcode(ctx.isa, fetch_opcode));
425 if (bc.op_ptr->flags & FF_GDS)
426 return decode_fetch_gds(i, bc);
428 if (bc.op_ptr->flags & FF_VTX)
429 return decode_fetch_vtx(i, bc);
436 bc.bc_frac_mode = w0.get_BC_FRAC_MODE();
437 bc.fetch_whole_quad = w0.get_FETCH_WHOLE_QUAD();
438 bc.resource_id = w0.get_RESOURCE_ID();
439 bc.src_gpr = w0.get_SRC_GPR();
440 bc.src_rel = w0.get_SRC_REL();
445 bc.bc_frac_mode = w0.get_BC_FRAC_MODE();
446 bc.fetch_whole_quad = w0.get_FETCH_WHOLE_QUAD();
447 bc.resource_id = w0.get_RESOURCE_ID();
448 bc.src_gpr = w0.get_SRC_GPR();
449 bc.src_rel = w0.get_SRC_REL();
450 bc.alt_const = w0.get_ALT_CONST();
455 bc.fetch_whole_quad = w0.get_FETCH_WHOLE_QUAD();
456 bc.resource_id = w0.get_RESOURCE_ID();
457 bc.src_gpr = w0.get_SRC_GPR();
458 bc.src_rel = w0.get_SRC_REL();
459 bc.alt_const = w0.get_ALT_CONST();
460 bc.inst_mod = w0.get_INST_MOD();
461 bc.resource_index_mode = w0.get_RESOURCE_INDEX_MODE();
462 bc.sampler_index_mode = w0.get_SAMPLER_INDEX_MODE();
466 bc.coord_type[0] = w1.get_COORD_TYPE_X();
467 bc.coord_type[1] = w1.get_COORD_TYPE_Y();
468 bc.coord_type[2] = w1.get_COORD_TYPE_Z();
469 bc.coord_type[3] = w1.get_COORD_TYPE_W();
470 bc.dst_gpr = w1.get_DST_GPR();
471 bc.dst_rel = w1.get_DST_REL();
472 bc.dst_sel[0] = w1.get_DST_SEL_X();
473 bc.dst_sel[1] = w1.get_DST_SEL_Y();
474 bc.dst_sel[2] = w1.get_DST_SEL_Z();
475 bc.dst_sel[3] = w1.get_DST_SEL_W();
476 bc.lod_bias = w1.get_LOD_BIAS();
479 bc.offset[0] = w2.get_OFFSET_X();
480 bc.offset[1] = w2.get_OFFSET_Y();
481 bc.offset[2] = w2.get_OFFSET_Z();
482 bc.sampler_id = w2.get_SAMPLER_ID();
483 bc.src_sel[0] = w2.get_SRC_SEL_X();
484 bc.src_sel[1] = w2.get_SRC_SEL_Y();
485 bc.src_sel[2] = w2.get_SRC_SEL_Z();
486 bc.src_sel[3] = w2.get_SRC_SEL_W();
492 int bc_decoder::decode_fetch_gds(unsigned & i, bc_fetch& bc) {
503 bc.src_gpr = w0.get_SRC_GPR();
505 bc.src_rel_global = (tmp == 2);
506 bc.src_sel[0] = w0.get_SRC_SEL_X();
507 bc.src_sel[1] = w0.get_SRC_SEL_Y();
508 bc.src_sel[2] = w0.get_SRC_SEL_Z();
511 bc.dst_gpr = w1.get_DST_GPR();
513 bc.dst_rel_global = (tmp == 2);
514 bc.src2_gpr = w1.get_SRC_GPR();
517 bc.dst_sel[0] = w2.get_DST_SEL_X();
518 bc.dst_sel[1] = w2.get_DST_SEL_Y();
519 bc.dst_sel[2] = w2.get_DST_SEL_Z();
520 bc.dst_sel[3] = w2.get_DST_SEL_W();
524 int bc_decoder::decode_fetch_vtx(unsigned & i, bc_fetch& bc) {
534 bc.resource_id = w0.get_BUFFER_ID();
535 bc.fetch_type = w0.get_FETCH_TYPE();
536 bc.fetch_whole_quad = w0.get_FETCH_WHOLE_QUAD();
537 bc.src_gpr = w0.get_SRC_GPR();
538 bc.src_rel = w0.get_SRC_REL();
539 bc.src_sel[0] = w0.get_SRC_SEL_X();
540 bc.coalesced_read = w0.get_COALESCED_READ();
541 bc.lds_req = w0.get_LDS_REQ();
542 bc.structured_read = w0.get_STRUCTURED_READ();
546 bc.resource_id = w0.get_BUFFER_ID();
547 bc.fetch_type = w0.get_FETCH_TYPE();
548 bc.fetch_whole_quad = w0.get_FETCH_WHOLE_QUAD();
549 bc.mega_fetch_count = w0.get_MEGA_FETCH_COUNT();
550 bc.src_gpr = w0.get_SRC_GPR();
551 bc.src_rel = w0.get_SRC_REL();
552 bc.src_sel[0] = w0.get_SRC_SEL_X();
555 if (bc.op == FETCH_OP_SEMFETCH) {
557 bc.data_format = w1.get_DATA_FORMAT();
558 bc.dst_sel[0] = w1.get_DST_SEL_X();
559 bc.dst_sel[1] = w1.get_DST_SEL_Y();
560 bc.dst_sel[2] = w1.get_DST_SEL_Z();
561 bc.dst_sel[3] = w1.get_DST_SEL_W();
562 bc.format_comp_all = w1.get_FORMAT_COMP_ALL();
563 bc.num_format_all = w1.get_NUM_FORMAT_ALL();
564 bc.srf_mode_all = w1.get_SRF_MODE_ALL();
565 bc.use_const_fields = w1.get_USE_CONST_FIELDS();
567 bc.semantic_id = w1.get_SEMANTIC_ID();
571 bc.data_format = w1.get_DATA_FORMAT();
572 bc.dst_sel[0] = w1.get_DST_SEL_X();
573 bc.dst_sel[1] = w1.get_DST_SEL_Y();
574 bc.dst_sel[2] = w1.get_DST_SEL_Z();
575 bc.dst_sel[3] = w1.get_DST_SEL_W();
576 bc.format_comp_all = w1.get_FORMAT_COMP_ALL();
577 bc.num_format_all = w1.get_NUM_FORMAT_ALL();
578 bc.srf_mode_all = w1.get_SRF_MODE_ALL();
579 bc.use_const_fields = w1.get_USE_CONST_FIELDS();
581 bc.dst_gpr = w1.get_DST_GPR();
582 bc.dst_rel = w1.get_DST_REL();
589 bc.const_buf_no_stride = w2.get_CONST_BUF_NO_STRIDE();
590 bc.endian_swap = w2.get_ENDIAN_SWAP();
591 bc.mega_fetch = w2.get_MEGA_FETCH();
592 bc.offset[0] = w2.get_OFFSET();
598 bc.const_buf_no_stride = w2.get_CONST_BUF_NO_STRIDE();
599 bc.endian_swap = w2.get_ENDIAN_SWAP();
600 bc.mega_fetch = w2.get_MEGA_FETCH();
601 bc.offset[0] = w2.get_OFFSET();
602 bc.alt_const = w2.get_ALT_CONST();
608 bc.const_buf_no_stride = w2.get_CONST_BUF_NO_STRIDE();
609 bc.endian_swap = w2.get_ENDIAN_SWAP();
610 bc.mega_fetch = w2.get_MEGA_FETCH();
611 bc.offset[0] = w2.get_OFFSET();
612 bc.alt_const = w2.get_ALT_CONST();
613 bc.resource_index_mode = w2.get_BUFFER_INDEX_MODE();
619 bc.const_buf_no_stride = w2.get_CONST_BUF_NO_STRIDE();
620 bc.endian_swap = w2.get_ENDIAN_SWAP();
621 bc.offset[0] = w2.get_OFFSET();
622 bc.alt_const = w2.get_ALT_CONST();
623 bc.resource_index_mode = w2.get_BUFFER_INDEX_MODE();