• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching refs:cf

53 	struct r600_bytecode_cf *cf = CALLOC_STRUCT(r600_bytecode_cf);  in r600_bytecode_cf()  local
55 if (!cf) in r600_bytecode_cf()
57 list_inithead(&cf->list); in r600_bytecode_cf()
58 list_inithead(&cf->alu); in r600_bytecode_cf()
59 list_inithead(&cf->vtx); in r600_bytecode_cf()
60 list_inithead(&cf->tex); in r600_bytecode_cf()
61 list_inithead(&cf->gds); in r600_bytecode_cf()
62 return cf; in r600_bytecode_cf()
157 list_inithead(&bc->cf); in r600_bytecode_init()
166 struct r600_bytecode_cf *cf = r600_bytecode_cf(); in r600_bytecode_add_cf() local
168 if (!cf) in r600_bytecode_add_cf()
170 list_addtail(&cf->list, &bc->cf); in r600_bytecode_add_cf()
172 cf->id = bc->cf_last->id + 2; in r600_bytecode_add_cf()
175 cf->id += 2; in r600_bytecode_add_cf()
179 bc->cf_last = cf; in r600_bytecode_add_cf()
1664 static void r600_bytecode_cf_vtx_build(uint32_t *bytecode, const struct r600_bytecode_cf *cf) in r600_bytecode_cf_vtx_build() argument
1666 *bytecode++ = S_SQ_CF_WORD0_ADDR(cf->addr >> 1); in r600_bytecode_cf_vtx_build()
1667 *bytecode++ = S_SQ_CF_WORD1_CF_INST(r600_isa_cf_opcode(ISA_CC_R600, cf->op)) | in r600_bytecode_cf_vtx_build()
1669 S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1)| in r600_bytecode_cf_vtx_build()
1670 S_SQ_CF_WORD1_END_OF_PROGRAM(cf->end_of_program); in r600_bytecode_cf_vtx_build()
1674 static int r600_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf) in r600_bytecode_cf_build() argument
1676 unsigned id = cf->id; in r600_bytecode_cf_build()
1677 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_cf_build()
1678 unsigned opcode = r600_isa_cf_opcode(bc->isa->hw_class, cf->op); in r600_bytecode_cf_build()
1681 if (cf->op == CF_NATIVE) { in r600_bytecode_cf_build()
1682 bc->bytecode[id++] = cf->isa[0]; in r600_bytecode_cf_build()
1683 bc->bytecode[id++] = cf->isa[1]; in r600_bytecode_cf_build()
1685 bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) | in r600_bytecode_cf_build()
1686 S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache[0].mode) | in r600_bytecode_cf_build()
1687 S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache[0].bank) | in r600_bytecode_cf_build()
1688 S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache[1].bank); in r600_bytecode_cf_build()
1691 S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache[1].mode) | in r600_bytecode_cf_build()
1692 S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache[0].addr) | in r600_bytecode_cf_build()
1693 S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache[1].addr) | in r600_bytecode_cf_build()
1695 S_SQ_CF_ALU_WORD1_USES_WATERFALL(bc->chip_class == R600 ? cf->r6xx_uses_waterfall : 0) | in r600_bytecode_cf_build()
1696 S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1); in r600_bytecode_cf_build()
1699 r700_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1701 r600_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1703 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1704 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1705 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1706 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type) | in r600_bytecode_cf_build()
1707 S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(cf->output.index_gpr); in r600_bytecode_cf_build()
1708 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1709 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) | in r600_bytecode_cf_build()
1710 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(cf->output.swizzle_y) | in r600_bytecode_cf_build()
1711 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) | in r600_bytecode_cf_build()
1712 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) | in r600_bytecode_cf_build()
1713 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) | in r600_bytecode_cf_build()
1715 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program); in r600_bytecode_cf_build()
1717 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1718 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1719 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1720 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type) | in r600_bytecode_cf_build()
1721 S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(cf->output.index_gpr); in r600_bytecode_cf_build()
1722 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1723 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->barrier) | in r600_bytecode_cf_build()
1725 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program) | in r600_bytecode_cf_build()
1726 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(cf->output.array_size) | in r600_bytecode_cf_build()
1727 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(cf->output.comp_mask); in r600_bytecode_cf_build()
1729 bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->cf_addr >> 1); in r600_bytecode_cf_build()
1732 S_SQ_CF_WORD1_COND(cf->cond) | in r600_bytecode_cf_build()
1733 S_SQ_CF_WORD1_POP_COUNT(cf->pop_count) | in r600_bytecode_cf_build()
1734 S_SQ_CF_WORD1_END_OF_PROGRAM(cf->end_of_program); in r600_bytecode_cf_build()
1741 struct r600_bytecode_cf *cf; in r600_bytecode_build() local
1763 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
1764 if (r600_isa_cf(cf->op)->flags & CF_FETCH) { in r600_bytecode_build()
1768 cf->addr = addr; in r600_bytecode_build()
1769 addr += cf->ndw; in r600_bytecode_build()
1770 bc->ndw = cf->addr + cf->ndw; in r600_bytecode_build()
1776 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
1777 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_build()
1778 addr = cf->addr; in r600_bytecode_build()
1780 r = eg_bytecode_cf_build(bc, cf); in r600_bytecode_build()
1782 r = r600_bytecode_cf_build(bc, cf); in r600_bytecode_build()
1788 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_build()
1793 r600_bytecode_assign_kcache_banks(alu, cf->kcache); in r600_bytecode_build()
1821 } else if (cf->op == CF_OP_VTX) { in r600_bytecode_build()
1822 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1828 } else if (cf->op == CF_OP_GDS) { in r600_bytecode_build()
1830 LIST_FOR_EACH_ENTRY(gds, &cf->gds, list) { in r600_bytecode_build()
1836 } else if (cf->op == CF_OP_TEX) { in r600_bytecode_build()
1837 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
1844 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_build()
1857 struct r600_bytecode_cf *cf = NULL, *next_cf; in r600_bytecode_clear() local
1862 LIST_FOR_EACH_ENTRY_SAFE(cf, next_cf, &bc->cf, list) { in r600_bytecode_clear()
1868 LIST_FOR_EACH_ENTRY_SAFE(alu, next_alu, &cf->alu, list) { in r600_bytecode_clear()
1872 list_inithead(&cf->alu); in r600_bytecode_clear()
1874 LIST_FOR_EACH_ENTRY_SAFE(tex, next_tex, &cf->tex, list) { in r600_bytecode_clear()
1878 list_inithead(&cf->tex); in r600_bytecode_clear()
1880 LIST_FOR_EACH_ENTRY_SAFE(vtx, next_vtx, &cf->vtx, list) { in r600_bytecode_clear()
1884 list_inithead(&cf->vtx); in r600_bytecode_clear()
1886 LIST_FOR_EACH_ENTRY_SAFE(gds, next_gds, &cf->gds, list) { in r600_bytecode_clear()
1890 list_inithead(&cf->gds); in r600_bytecode_clear()
1892 free(cf); in r600_bytecode_clear()
1895 list_inithead(&cf->list); in r600_bytecode_clear()
2086 struct r600_bytecode_cf *cf = NULL; in r600_bytecode_disasm() local
2116 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_disasm()
2117 id = cf->id; in r600_bytecode_disasm()
2118 if (cf->op == CF_NATIVE) { in r600_bytecode_disasm()
2122 const struct cf_op_info *cfop = r600_isa_cf(cf->op); in r600_bytecode_disasm()
2124 if (cf->eg_alu_extended) { in r600_bytecode_disasm()
2131 fprintf(stderr, "%d @%d ", cf->ndw / 2, cf->addr); in r600_bytecode_disasm()
2133 if (cf->kcache[i].mode) { in r600_bytecode_disasm()
2134 int c_start = (cf->kcache[i].addr << 4); in r600_bytecode_disasm()
2135 int c_end = c_start + (cf->kcache[i].mode << 4); in r600_bytecode_disasm()
2137 i, cf->kcache[i].bank, c_start, c_end, in r600_bytecode_disasm()
2138 cf->kcache[i].index_mode ? " " : "", in r600_bytecode_disasm()
2139 cf->kcache[i].index_mode ? index_mode[cf->kcache[i].index_mode] : ""); in r600_bytecode_disasm()
2146 fprintf(stderr, "%d @%d ", cf->ndw / 4, cf->addr); in r600_bytecode_disasm()
2147 if (cf->vpm) in r600_bytecode_disasm()
2149 if (cf->end_of_program) in r600_bytecode_disasm()
2159 o += fprintf(stderr, "%s ", exp_type[cf->output.type]); in r600_bytecode_disasm()
2160 if (cf->output.burst_count > 1) { in r600_bytecode_disasm()
2161 o += fprintf(stderr, "%d-%d ", cf->output.array_base, in r600_bytecode_disasm()
2162 cf->output.array_base + cf->output.burst_count - 1); in r600_bytecode_disasm()
2165 o += fprintf(stderr, "R%d-%d.", cf->output.gpr, in r600_bytecode_disasm()
2166 cf->output.gpr + cf->output.burst_count - 1); in r600_bytecode_disasm()
2168 o += fprintf(stderr, "%d ", cf->output.array_base); in r600_bytecode_disasm()
2170 o += fprintf(stderr, "R%d.", cf->output.gpr); in r600_bytecode_disasm()
2173 o += print_swizzle(cf->output.swizzle_x); in r600_bytecode_disasm()
2174 o += print_swizzle(cf->output.swizzle_y); in r600_bytecode_disasm()
2175 o += print_swizzle(cf->output.swizzle_z); in r600_bytecode_disasm()
2176 o += print_swizzle(cf->output.swizzle_w); in r600_bytecode_disasm()
2180 fprintf(stderr, " ES:%X ", cf->output.elem_size); in r600_bytecode_disasm()
2181 if (cf->mark) in r600_bytecode_disasm()
2183 if (!cf->barrier) in r600_bytecode_disasm()
2185 if (cf->end_of_program) in r600_bytecode_disasm()
2188 } else if (r600_isa_cf(cf->op)->flags & CF_MEM) { in r600_bytecode_disasm()
2195 o += fprintf(stderr, "%s ", exp_type[cf->output.type]); in r600_bytecode_disasm()
2197 if (r600_isa_cf(cf->op)->flags & CF_RAT) { in r600_bytecode_disasm()
2198 o += fprintf(stderr, "RAT%d", cf->rat.id); in r600_bytecode_disasm()
2199 if (cf->rat.index_mode) { in r600_bytecode_disasm()
2200 o += fprintf(stderr, "[IDX%d]", cf->rat.index_mode - 1); in r600_bytecode_disasm()
2202 o += fprintf(stderr, " INST: %d ", cf->rat.inst); in r600_bytecode_disasm()
2205 if (cf->output.burst_count > 1) { in r600_bytecode_disasm()
2206 o += fprintf(stderr, "%d-%d ", cf->output.array_base, in r600_bytecode_disasm()
2207 cf->output.array_base + cf->output.burst_count - 1); in r600_bytecode_disasm()
2209 o += fprintf(stderr, "R%d-%d.", cf->output.gpr, in r600_bytecode_disasm()
2210 cf->output.gpr + cf->output.burst_count - 1); in r600_bytecode_disasm()
2212 o += fprintf(stderr, "%d ", cf->output.array_base); in r600_bytecode_disasm()
2214 o += fprintf(stderr, "R%d.", cf->output.gpr); in r600_bytecode_disasm()
2217 if (cf->output.comp_mask & (1 << i)) in r600_bytecode_disasm()
2223 if (cf->output.type == V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE_IND || in r600_bytecode_disasm()
2224 cf->output.type == V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_READ_IND) in r600_bytecode_disasm()
2225 o += fprintf(stderr, " R%d", cf->output.index_gpr); in r600_bytecode_disasm()
2229 fprintf(stderr, " ES:%i ", cf->output.elem_size); in r600_bytecode_disasm()
2230 if (cf->output.array_size != 0xFFF) in r600_bytecode_disasm()
2231 fprintf(stderr, "AS:%i ", cf->output.array_size); in r600_bytecode_disasm()
2232 if (cf->mark) in r600_bytecode_disasm()
2234 if (!cf->barrier) in r600_bytecode_disasm()
2236 if (cf->end_of_program) in r600_bytecode_disasm()
2239 if (cf->output.mark) in r600_bytecode_disasm()
2246 fprintf(stderr, "@%d ", cf->cf_addr); in r600_bytecode_disasm()
2247 if (cf->cond) in r600_bytecode_disasm()
2248 fprintf(stderr, "CND:%X ", cf->cond); in r600_bytecode_disasm()
2249 if (cf->pop_count) in r600_bytecode_disasm()
2250 fprintf(stderr, "POP:%X ", cf->pop_count); in r600_bytecode_disasm()
2251 if (cf->count && (cfop->flags & CF_EMIT)) in r600_bytecode_disasm()
2252 fprintf(stderr, "STREAM%d ", cf->count); in r600_bytecode_disasm()
2253 if (cf->vpm) in r600_bytecode_disasm()
2255 if (cf->end_of_program) in r600_bytecode_disasm()
2261 id = cf->addr; in r600_bytecode_disasm()
2264 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_disasm()
2310 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_disasm()
2357 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_disasm()
2415 LIST_FOR_EACH_ENTRY(gds, &cf->gds, list) { in r600_bytecode_disasm()