• Home
  • Raw
  • Download

Lines Matching refs:cf

57 	struct r600_bytecode_cf *cf = CALLOC_STRUCT(r600_bytecode_cf);  in r600_bytecode_cf()  local
59 if (!cf) in r600_bytecode_cf()
61 LIST_INITHEAD(&cf->list); in r600_bytecode_cf()
62 LIST_INITHEAD(&cf->alu); in r600_bytecode_cf()
63 LIST_INITHEAD(&cf->vtx); in r600_bytecode_cf()
64 LIST_INITHEAD(&cf->tex); in r600_bytecode_cf()
65 LIST_INITHEAD(&cf->gds); in r600_bytecode_cf()
66 return cf; in r600_bytecode_cf()
161 LIST_INITHEAD(&bc->cf); in r600_bytecode_init()
170 struct r600_bytecode_cf *cf = r600_bytecode_cf(); in r600_bytecode_add_cf() local
172 if (!cf) in r600_bytecode_add_cf()
174 LIST_ADDTAIL(&cf->list, &bc->cf); in r600_bytecode_add_cf()
176 cf->id = bc->cf_last->id + 2; in r600_bytecode_add_cf()
179 cf->id += 2; in r600_bytecode_add_cf()
183 bc->cf_last = cf; in r600_bytecode_add_cf()
1605 static void r600_bytecode_cf_vtx_build(uint32_t *bytecode, const struct r600_bytecode_cf *cf) in r600_bytecode_cf_vtx_build() argument
1607 *bytecode++ = S_SQ_CF_WORD0_ADDR(cf->addr >> 1); in r600_bytecode_cf_vtx_build()
1608 *bytecode++ = S_SQ_CF_WORD1_CF_INST(r600_isa_cf_opcode(ISA_CC_R600, cf->op)) | in r600_bytecode_cf_vtx_build()
1610 S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1); in r600_bytecode_cf_vtx_build()
1614 static int r600_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf) in r600_bytecode_cf_build() argument
1616 unsigned id = cf->id; in r600_bytecode_cf_build()
1617 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_cf_build()
1618 unsigned opcode = r600_isa_cf_opcode(bc->isa->hw_class, cf->op); in r600_bytecode_cf_build()
1621 if (cf->op == CF_NATIVE) { in r600_bytecode_cf_build()
1622 bc->bytecode[id++] = cf->isa[0]; in r600_bytecode_cf_build()
1623 bc->bytecode[id++] = cf->isa[1]; in r600_bytecode_cf_build()
1625 bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) | in r600_bytecode_cf_build()
1626 S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache[0].mode) | in r600_bytecode_cf_build()
1627 S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache[0].bank) | in r600_bytecode_cf_build()
1628 S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache[1].bank); in r600_bytecode_cf_build()
1631 S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache[1].mode) | in r600_bytecode_cf_build()
1632 S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache[0].addr) | in r600_bytecode_cf_build()
1633 S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache[1].addr) | in r600_bytecode_cf_build()
1635 S_SQ_CF_ALU_WORD1_USES_WATERFALL(bc->chip_class == R600 ? cf->r6xx_uses_waterfall : 0) | in r600_bytecode_cf_build()
1636 S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1); in r600_bytecode_cf_build()
1639 r700_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1641 r600_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1643 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1644 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1645 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1646 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type) | in r600_bytecode_cf_build()
1647 S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(cf->output.index_gpr); in r600_bytecode_cf_build()
1648 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1649 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) | in r600_bytecode_cf_build()
1650 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(cf->output.swizzle_y) | in r600_bytecode_cf_build()
1651 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) | in r600_bytecode_cf_build()
1652 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) | in r600_bytecode_cf_build()
1653 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) | in r600_bytecode_cf_build()
1655 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program); in r600_bytecode_cf_build()
1657 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1658 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1659 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1660 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type) | in r600_bytecode_cf_build()
1661 S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(cf->output.index_gpr); in r600_bytecode_cf_build()
1662 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1663 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) | in r600_bytecode_cf_build()
1665 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program) | in r600_bytecode_cf_build()
1666 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(cf->output.array_size) | in r600_bytecode_cf_build()
1667 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(cf->output.comp_mask); in r600_bytecode_cf_build()
1669 bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->cf_addr >> 1); in r600_bytecode_cf_build()
1672 S_SQ_CF_WORD1_COND(cf->cond) | in r600_bytecode_cf_build()
1673 S_SQ_CF_WORD1_POP_COUNT(cf->pop_count) | in r600_bytecode_cf_build()
1674 S_SQ_CF_WORD1_END_OF_PROGRAM(cf->end_of_program); in r600_bytecode_cf_build()
1681 struct r600_bytecode_cf *cf; in r600_bytecode_build() local
1701 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
1702 if (r600_isa_cf(cf->op)->flags & CF_FETCH) { in r600_bytecode_build()
1706 cf->addr = addr; in r600_bytecode_build()
1707 addr += cf->ndw; in r600_bytecode_build()
1708 bc->ndw = cf->addr + cf->ndw; in r600_bytecode_build()
1714 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
1715 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_build()
1716 addr = cf->addr; in r600_bytecode_build()
1718 r = eg_bytecode_cf_build(bc, cf); in r600_bytecode_build()
1720 r = r600_bytecode_cf_build(bc, cf); in r600_bytecode_build()
1726 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_build()
1731 r600_bytecode_assign_kcache_banks(bc, alu, cf->kcache); in r600_bytecode_build()
1759 } else if (cf->op == CF_OP_VTX) { in r600_bytecode_build()
1760 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1766 } else if (cf->op == CF_OP_GDS) { in r600_bytecode_build()
1768 LIST_FOR_EACH_ENTRY(gds, &cf->gds, list) { in r600_bytecode_build()
1774 } else if (cf->op == CF_OP_TEX) { in r600_bytecode_build()
1775 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1782 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_build()
1795 struct r600_bytecode_cf *cf = NULL, *next_cf; in r600_bytecode_clear() local
1800 LIST_FOR_EACH_ENTRY_SAFE(cf, next_cf, &bc->cf, list) { in r600_bytecode_clear()
1806 LIST_FOR_EACH_ENTRY_SAFE(alu, next_alu, &cf->alu, list) { in r600_bytecode_clear()
1810 LIST_INITHEAD(&cf->alu); in r600_bytecode_clear()
1812 LIST_FOR_EACH_ENTRY_SAFE(tex, next_tex, &cf->tex, list) { in r600_bytecode_clear()
1816 LIST_INITHEAD(&cf->tex); in r600_bytecode_clear()
1818 LIST_FOR_EACH_ENTRY_SAFE(vtx, next_vtx, &cf->vtx, list) { in r600_bytecode_clear()
1822 LIST_INITHEAD(&cf->vtx); in r600_bytecode_clear()
1824 LIST_FOR_EACH_ENTRY_SAFE(gds, next_gds, &cf->gds, list) { in r600_bytecode_clear()
1828 LIST_INITHEAD(&cf->gds); in r600_bytecode_clear()
1830 free(cf); in r600_bytecode_clear()
1833 LIST_INITHEAD(&cf->list); in r600_bytecode_clear()
2009 struct r600_bytecode_cf *cf = NULL; in r600_bytecode_disasm() local
2039 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_disasm()
2040 id = cf->id; in r600_bytecode_disasm()
2041 if (cf->op == CF_NATIVE) { in r600_bytecode_disasm()
2045 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_disasm()
2047 if (cf->eg_alu_extended) { in r600_bytecode_disasm()
2054 fprintf(stderr, "%d @%d ", cf->ndw / 2, cf->addr); in r600_bytecode_disasm()
2056 if (cf->kcache[i].mode) { in r600_bytecode_disasm()
2057 int c_start = (cf->kcache[i].addr << 4); in r600_bytecode_disasm()
2058 int c_end = c_start + (cf->kcache[i].mode << 4); in r600_bytecode_disasm()
2060 i, cf->kcache[i].bank, c_start, c_end, in r600_bytecode_disasm()
2061 cf->kcache[i].index_mode ? " " : "", in r600_bytecode_disasm()
2062 cf->kcache[i].index_mode ? index_mode[cf->kcache[i].index_mode] : ""); in r600_bytecode_disasm()
2069 fprintf(stderr, "%d @%d ", cf->ndw / 4, cf->addr); in r600_bytecode_disasm()
2077 o += fprintf(stderr, "%s ", exp_type[cf->output.type]); in r600_bytecode_disasm()
2078 if (cf->output.burst_count > 1) { in r600_bytecode_disasm()
2079 o += fprintf(stderr, "%d-%d ", cf->output.array_base, in r600_bytecode_disasm()
2080 cf->output.array_base + cf->output.burst_count - 1); in r600_bytecode_disasm()
2083 o += fprintf(stderr, "R%d-%d.", cf->output.gpr, in r600_bytecode_disasm()
2084 cf->output.gpr + cf->output.burst_count - 1); in r600_bytecode_disasm()
2086 o += fprintf(stderr, "%d ", cf->output.array_base); in r600_bytecode_disasm()
2088 o += fprintf(stderr, "R%d.", cf->output.gpr); in r600_bytecode_disasm()
2091 o += print_swizzle(cf->output.swizzle_x); in r600_bytecode_disasm()
2092 o += print_swizzle(cf->output.swizzle_y); in r600_bytecode_disasm()
2093 o += print_swizzle(cf->output.swizzle_z); in r600_bytecode_disasm()
2094 o += print_swizzle(cf->output.swizzle_w); in r600_bytecode_disasm()
2098 fprintf(stderr, " ES:%X ", cf->output.elem_size); in r600_bytecode_disasm()
2099 if (!cf->barrier) in r600_bytecode_disasm()
2101 if (cf->end_of_program) in r600_bytecode_disasm()
2104 } else if (r600_isa_cf(cf->op)->flags & CF_MEM) { in r600_bytecode_disasm()
2111 o += fprintf(stderr, "%s ", exp_type[cf->output.type]); in r600_bytecode_disasm()
2112 if (cf->output.burst_count > 1) { in r600_bytecode_disasm()
2113 o += fprintf(stderr, "%d-%d ", cf->output.array_base, in r600_bytecode_disasm()
2114 cf->output.array_base + cf->output.burst_count - 1); in r600_bytecode_disasm()
2116 o += fprintf(stderr, "R%d-%d.", cf->output.gpr, in r600_bytecode_disasm()
2117 cf->output.gpr + cf->output.burst_count - 1); in r600_bytecode_disasm()
2119 o += fprintf(stderr, "%d ", cf->output.array_base); in r600_bytecode_disasm()
2121 o += fprintf(stderr, "R%d.", cf->output.gpr); in r600_bytecode_disasm()
2124 if (cf->output.comp_mask & (1 << i)) in r600_bytecode_disasm()
2130 if (cf->output.type == V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE_IND) in r600_bytecode_disasm()
2131 o += fprintf(stderr, " R%d", cf->output.index_gpr); in r600_bytecode_disasm()
2135 fprintf(stderr, " ES:%i ", cf->output.elem_size); in r600_bytecode_disasm()
2136 if (cf->output.array_size != 0xFFF) in r600_bytecode_disasm()
2137 fprintf(stderr, "AS:%i ", cf->output.array_size); in r600_bytecode_disasm()
2138 if (!cf->barrier) in r600_bytecode_disasm()
2140 if (cf->end_of_program) in r600_bytecode_disasm()
2146 fprintf(stderr, "@%d ", cf->cf_addr); in r600_bytecode_disasm()
2147 if (cf->cond) in r600_bytecode_disasm()
2148 fprintf(stderr, "CND:%X ", cf->cond); in r600_bytecode_disasm()
2149 if (cf->pop_count) in r600_bytecode_disasm()
2150 fprintf(stderr, "POP:%X ", cf->pop_count); in r600_bytecode_disasm()
2151 if (cf->count && (cfop->flags & CF_EMIT)) in r600_bytecode_disasm()
2152 fprintf(stderr, "STREAM%d ", cf->count); in r600_bytecode_disasm()
2153 if (cf->end_of_program) in r600_bytecode_disasm()
2159 id = cf->addr; in r600_bytecode_disasm()
2162 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_disasm()
2208 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_disasm()
2255 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_disasm()
2298 LIST_FOR_EACH_ENTRY(gds, &cf->gds, list) { in r600_bytecode_disasm()