Lines Matching refs:vtx
59 list_inithead(&cf->vtx); in r600_bytecode_cf()
77 struct r600_bytecode_vtx *vtx = CALLOC_STRUCT(r600_bytecode_vtx); in r600_bytecode_vtx() local
79 if (!vtx) in r600_bytecode_vtx()
81 list_inithead(&vtx->list); in r600_bytecode_vtx()
82 return vtx; in r600_bytecode_vtx()
1448 …c int r600_bytecode_add_vtx_internal(struct r600_bytecode *bc, const struct r600_bytecode_vtx *vtx, in r600_bytecode_add_vtx_internal() argument
1456 memcpy(nvtx, vtx, sizeof(struct r600_bytecode_vtx)); in r600_bytecode_add_vtx_internal()
1460 if (vtx->buffer_index_mode) in r600_bytecode_add_vtx_internal()
1461 egcm_load_index_reg(bc, vtx->buffer_index_mode - 1, false); in r600_bytecode_add_vtx_internal()
1493 list_addtail(&nvtx->list, &bc->cf_last->vtx); in r600_bytecode_add_vtx_internal()
1500 bc->ngpr = MAX2(bc->ngpr, vtx->src_gpr + 1); in r600_bytecode_add_vtx_internal()
1501 bc->ngpr = MAX2(bc->ngpr, vtx->dst_gpr + 1); in r600_bytecode_add_vtx_internal()
1506 int r600_bytecode_add_vtx(struct r600_bytecode *bc, const struct r600_bytecode_vtx *vtx) in r600_bytecode_add_vtx() argument
1508 return r600_bytecode_add_vtx_internal(bc, vtx, false); in r600_bytecode_add_vtx()
1511 int r600_bytecode_add_vtx_tc(struct r600_bytecode *bc, const struct r600_bytecode_vtx *vtx) in r600_bytecode_add_vtx_tc() argument
1513 return r600_bytecode_add_vtx_internal(bc, vtx, true); in r600_bytecode_add_vtx_tc()
1546 if (!list_is_empty(&bc->cf_last->vtx)) in r600_bytecode_add_tex()
1635 static int r600_bytecode_vtx_build(struct r600_bytecode *bc, struct r600_bytecode_vtx *vtx, unsigne… in r600_bytecode_vtx_build() argument
1637 if (r600_isa_fetch(vtx->op)->flags & FF_MEM) in r600_bytecode_vtx_build()
1638 return r700_bytecode_fetch_mem_build(bc, vtx, id); in r600_bytecode_vtx_build()
1639 bc->bytecode[id] = S_SQ_VTX_WORD0_VTX_INST(r600_isa_fetch_opcode(bc->isa->hw_class, vtx->op)) | in r600_bytecode_vtx_build()
1640 S_SQ_VTX_WORD0_BUFFER_ID(vtx->buffer_id) | in r600_bytecode_vtx_build()
1641 S_SQ_VTX_WORD0_FETCH_TYPE(vtx->fetch_type) | in r600_bytecode_vtx_build()
1642 S_SQ_VTX_WORD0_SRC_GPR(vtx->src_gpr) | in r600_bytecode_vtx_build()
1643 S_SQ_VTX_WORD0_SRC_SEL_X(vtx->src_sel_x); in r600_bytecode_vtx_build()
1645 bc->bytecode[id] |= S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(vtx->mega_fetch_count); in r600_bytecode_vtx_build()
1647 bc->bytecode[id++] = S_SQ_VTX_WORD1_DST_SEL_X(vtx->dst_sel_x) | in r600_bytecode_vtx_build()
1648 S_SQ_VTX_WORD1_DST_SEL_Y(vtx->dst_sel_y) | in r600_bytecode_vtx_build()
1649 S_SQ_VTX_WORD1_DST_SEL_Z(vtx->dst_sel_z) | in r600_bytecode_vtx_build()
1650 S_SQ_VTX_WORD1_DST_SEL_W(vtx->dst_sel_w) | in r600_bytecode_vtx_build()
1651 S_SQ_VTX_WORD1_USE_CONST_FIELDS(vtx->use_const_fields) | in r600_bytecode_vtx_build()
1652 S_SQ_VTX_WORD1_DATA_FORMAT(vtx->data_format) | in r600_bytecode_vtx_build()
1653 S_SQ_VTX_WORD1_NUM_FORMAT_ALL(vtx->num_format_all) | in r600_bytecode_vtx_build()
1654 S_SQ_VTX_WORD1_FORMAT_COMP_ALL(vtx->format_comp_all) | in r600_bytecode_vtx_build()
1655 S_SQ_VTX_WORD1_SRF_MODE_ALL(vtx->srf_mode_all) | in r600_bytecode_vtx_build()
1656 S_SQ_VTX_WORD1_GPR_DST_GPR(vtx->dst_gpr); in r600_bytecode_vtx_build()
1657 bc->bytecode[id] = S_SQ_VTX_WORD2_OFFSET(vtx->offset)| in r600_bytecode_vtx_build()
1658 S_SQ_VTX_WORD2_ENDIAN_SWAP(vtx->endian); in r600_bytecode_vtx_build()
1660 …bc->bytecode[id] |= ((vtx->buffer_index_mode & 0x3) << 21); // S_SQ_VTX_WORD2_BIM(vtx->buffer_inde… in r600_bytecode_vtx_build()
1830 struct r600_bytecode_vtx *vtx; in r600_bytecode_build() local
1909 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1910 r = r600_bytecode_vtx_build(bc, vtx, addr); in r600_bytecode_build()
1924 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1926 r = r600_bytecode_vtx_build(bc, vtx, addr); in r600_bytecode_build()
1952 struct r600_bytecode_tex *vtx = NULL, *next_vtx; in r600_bytecode_clear() local
1967 LIST_FOR_EACH_ENTRY_SAFE(vtx, next_vtx, &cf->vtx, list) { in r600_bytecode_clear()
1968 free(vtx); in r600_bytecode_clear()
1971 list_inithead(&cf->vtx); in r600_bytecode_clear()
2175 struct r600_bytecode_vtx *vtx = NULL; in r600_bytecode_disasm() local
2444 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_disasm()
2450 o += fprintf(stderr, "%s ", r600_isa_fetch(vtx->op)->name); in r600_bytecode_disasm()
2454 o += fprintf(stderr, "R%d.", vtx->dst_gpr); in r600_bytecode_disasm()
2455 o += print_swizzle(vtx->dst_sel_x); in r600_bytecode_disasm()
2456 o += print_swizzle(vtx->dst_sel_y); in r600_bytecode_disasm()
2457 o += print_swizzle(vtx->dst_sel_z); in r600_bytecode_disasm()
2458 o += print_swizzle(vtx->dst_sel_w); in r600_bytecode_disasm()
2460 o += fprintf(stderr, ", R%d.", vtx->src_gpr); in r600_bytecode_disasm()
2461 o += print_swizzle(vtx->src_sel_x); in r600_bytecode_disasm()
2462 if (r600_isa_fetch(vtx->op)->flags & FF_MEM) in r600_bytecode_disasm()
2463 o += print_swizzle(vtx->src_sel_y); in r600_bytecode_disasm()
2465 if (vtx->offset) in r600_bytecode_disasm()
2466 fprintf(stderr, " +%db", vtx->offset); in r600_bytecode_disasm()
2470 fprintf(stderr, ", RID:%d ", vtx->buffer_id); in r600_bytecode_disasm()
2472 fprintf(stderr, "%s ", fetch_type[vtx->fetch_type]); in r600_bytecode_disasm()
2474 if (bc->gfx_level < CAYMAN && vtx->mega_fetch_count) in r600_bytecode_disasm()
2475 fprintf(stderr, "MFC:%d ", vtx->mega_fetch_count); in r600_bytecode_disasm()
2477 if (bc->gfx_level >= EVERGREEN && vtx->buffer_index_mode) in r600_bytecode_disasm()
2478 fprintf(stderr, "SQ_%s ", index_mode[vtx->buffer_index_mode]); in r600_bytecode_disasm()
2480 if (r600_isa_fetch(vtx->op)->flags & FF_MEM) { in r600_bytecode_disasm()
2481 if (vtx->uncached) in r600_bytecode_disasm()
2483 if (vtx->indexed) in r600_bytecode_disasm()
2484 fprintf(stderr, "INDEXED:%d ", vtx->indexed); in r600_bytecode_disasm()
2486 fprintf(stderr, "ELEM_SIZE:%d ", vtx->elem_size); in r600_bytecode_disasm()
2487 if (vtx->burst_count) in r600_bytecode_disasm()
2488 fprintf(stderr, "BURST_COUNT:%d ", vtx->burst_count); in r600_bytecode_disasm()
2489 fprintf(stderr, "ARRAY_BASE:%d ", vtx->array_base); in r600_bytecode_disasm()
2490 fprintf(stderr, "ARRAY_SIZE:%d ", vtx->array_size); in r600_bytecode_disasm()
2493 fprintf(stderr, "UCF:%d ", vtx->use_const_fields); in r600_bytecode_disasm()
2494 fprintf(stderr, "FMT(DTA:%d ", vtx->data_format); in r600_bytecode_disasm()
2495 fprintf(stderr, "NUM:%d ", vtx->num_format_all); in r600_bytecode_disasm()
2496 fprintf(stderr, "COMP:%d ", vtx->format_comp_all); in r600_bytecode_disasm()
2497 fprintf(stderr, "MODE:%d)\n", vtx->srf_mode_all); in r600_bytecode_disasm()
2723 struct r600_bytecode_vtx vtx; in r600_create_vertex_fetch_shader() local
2794 memset(&vtx, 0, sizeof(vtx)); in r600_create_vertex_fetch_shader()
2795 vtx.buffer_id = elements[i].vertex_buffer_index + fetch_resource_start; in r600_create_vertex_fetch_shader()
2796 …vtx.fetch_type = elements[i].instance_divisor ? SQ_VTX_FETCH_INSTANCE_DATA : SQ_VTX_FETCH_VERTEX_D… in r600_create_vertex_fetch_shader()
2797 vtx.src_gpr = elements[i].instance_divisor > 1 ? i + 1 : 0; in r600_create_vertex_fetch_shader()
2798 vtx.src_sel_x = elements[i].instance_divisor ? 3 : 0; in r600_create_vertex_fetch_shader()
2799 vtx.mega_fetch_count = 0x1F; in r600_create_vertex_fetch_shader()
2800 vtx.dst_gpr = i + 1; in r600_create_vertex_fetch_shader()
2801 vtx.dst_sel_x = desc->swizzle[0]; in r600_create_vertex_fetch_shader()
2802 vtx.dst_sel_y = desc->swizzle[1]; in r600_create_vertex_fetch_shader()
2803 vtx.dst_sel_z = desc->swizzle[2]; in r600_create_vertex_fetch_shader()
2804 vtx.dst_sel_w = desc->swizzle[3]; in r600_create_vertex_fetch_shader()
2805 vtx.data_format = format; in r600_create_vertex_fetch_shader()
2806 vtx.num_format_all = num_format; in r600_create_vertex_fetch_shader()
2807 vtx.format_comp_all = format_comp; in r600_create_vertex_fetch_shader()
2808 vtx.offset = elements[i].src_offset; in r600_create_vertex_fetch_shader()
2809 vtx.endian = endian; in r600_create_vertex_fetch_shader()
2811 if ((r = r600_bytecode_add_vtx(&bc, &vtx))) { in r600_create_vertex_fetch_shader()