Lines Matching refs:cf

216 	struct r600_bytecode_cf *cf = CALLOC_STRUCT(r600_bytecode_cf);  in r600_bytecode_cf()  local
218 if (cf == NULL) in r600_bytecode_cf()
220 LIST_INITHEAD(&cf->list); in r600_bytecode_cf()
221 LIST_INITHEAD(&cf->alu); in r600_bytecode_cf()
222 LIST_INITHEAD(&cf->vtx); in r600_bytecode_cf()
223 LIST_INITHEAD(&cf->tex); in r600_bytecode_cf()
224 return cf; in r600_bytecode_cf()
268 LIST_INITHEAD(&bc->cf); in r600_bytecode_init()
274 struct r600_bytecode_cf *cf = r600_bytecode_cf(); in r600_bytecode_add_cf() local
276 if (cf == NULL) in r600_bytecode_add_cf()
278 LIST_ADDTAIL(&cf->list, &bc->cf); in r600_bytecode_add_cf()
280 cf->id = bc->cf_last->id + 2; in r600_bytecode_add_cf()
283 cf->id += 2; in r600_bytecode_add_cf()
287 bc->cf_last = cf; in r600_bytecode_add_cf()
1808 static void r600_bytecode_cf_vtx_build(uint32_t *bytecode, const struct r600_bytecode_cf *cf) in r600_bytecode_cf_vtx_build() argument
1810 *bytecode++ = S_SQ_CF_WORD0_ADDR(cf->addr >> 1); in r600_bytecode_cf_vtx_build()
1811 *bytecode++ = cf->inst | in r600_bytecode_cf_vtx_build()
1813 S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1); in r600_bytecode_cf_vtx_build()
1817 static int r600_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf) in r600_bytecode_cf_build() argument
1819 unsigned id = cf->id; in r600_bytecode_cf_build()
1821 switch (cf->inst) { in r600_bytecode_cf_build()
1826 bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) | in r600_bytecode_cf_build()
1827 S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache[0].mode) | in r600_bytecode_cf_build()
1828 S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache[0].bank) | in r600_bytecode_cf_build()
1829 S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache[1].bank); in r600_bytecode_cf_build()
1831 bc->bytecode[id++] = cf->inst | in r600_bytecode_cf_build()
1832 S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache[1].mode) | in r600_bytecode_cf_build()
1833 S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache[0].addr) | in r600_bytecode_cf_build()
1834 S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache[1].addr) | in r600_bytecode_cf_build()
1836 S_SQ_CF_ALU_WORD1_USES_WATERFALL(bc->chip_class == R600 ? cf->r6xx_uses_waterfall : 0) | in r600_bytecode_cf_build()
1837 S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1); in r600_bytecode_cf_build()
1843 r700_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1845 r600_bytecode_cf_vtx_build(&bc->bytecode[id], cf); in r600_bytecode_cf_build()
1849 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1850 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1851 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1852 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type); in r600_bytecode_cf_build()
1853 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1854 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) | in r600_bytecode_cf_build()
1855 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(cf->output.swizzle_y) | in r600_bytecode_cf_build()
1856 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) | in r600_bytecode_cf_build()
1857 S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) | in r600_bytecode_cf_build()
1858 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->output.barrier) | in r600_bytecode_cf_build()
1859 cf->output.inst | in r600_bytecode_cf_build()
1860 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->output.end_of_program); in r600_bytecode_cf_build()
1866 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) | in r600_bytecode_cf_build()
1867 S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) | in r600_bytecode_cf_build()
1868 S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) | in r600_bytecode_cf_build()
1869 S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type); in r600_bytecode_cf_build()
1870 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) | in r600_bytecode_cf_build()
1871 S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(cf->output.barrier) | in r600_bytecode_cf_build()
1872 cf->output.inst | in r600_bytecode_cf_build()
1873 S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->output.end_of_program) | in r600_bytecode_cf_build()
1874 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(cf->output.array_size) | in r600_bytecode_cf_build()
1875 S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(cf->output.comp_mask); in r600_bytecode_cf_build()
1887 bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->cf_addr >> 1); in r600_bytecode_cf_build()
1888 bc->bytecode[id++] = cf->inst | in r600_bytecode_cf_build()
1890 S_SQ_CF_WORD1_COND(cf->cond) | in r600_bytecode_cf_build()
1891 S_SQ_CF_WORD1_POP_COUNT(cf->pop_count); in r600_bytecode_cf_build()
1895 R600_ERR("unsupported CF instruction (0x%X)\n", cf->inst); in r600_bytecode_cf_build()
1903 struct r600_bytecode_cf *cf; in r600_bytecode_build() local
1921 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
1923 switch (cf->inst) { in r600_bytecode_build()
1966 R600_ERR("unsupported CF instruction (0x%X)\n", cf->inst); in r600_bytecode_build()
1970 switch (cf->inst) { in r600_bytecode_build()
1999 R600_ERR("unsupported CF instruction (0x%X)\n", cf->inst); in r600_bytecode_build()
2003 cf->addr = addr; in r600_bytecode_build()
2004 addr += cf->ndw; in r600_bytecode_build()
2005 bc->ndw = cf->addr + cf->ndw; in r600_bytecode_build()
2011 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_build()
2012 addr = cf->addr; in r600_bytecode_build()
2014 r = eg_bytecode_cf_build(bc, cf); in r600_bytecode_build()
2018 switch (cf->inst) { in r600_bytecode_build()
2025 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_build()
2030 r600_bytecode_assign_kcache_banks(bc, alu, cf->kcache); in r600_bytecode_build()
2054 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
2062 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
2069 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_build()
2109 R600_ERR("unsupported CF instruction (0x%X)\n", cf->inst); in r600_bytecode_build()
2113 r = r600_bytecode_cf_build(bc, cf); in r600_bytecode_build()
2117 switch (cf->inst) { in r600_bytecode_build()
2124 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_build()
2129 r600_bytecode_assign_kcache_banks(bc, alu, cf->kcache); in r600_bytecode_build()
2156 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_build()
2164 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_build()
2189 R600_ERR("unsupported CF instruction (0x%X)\n", cf->inst); in r600_bytecode_build()
2199 struct r600_bytecode_cf *cf = NULL, *next_cf; in r600_bytecode_clear() local
2204 LIST_FOR_EACH_ENTRY_SAFE(cf, next_cf, &bc->cf, list) { in r600_bytecode_clear()
2209 LIST_FOR_EACH_ENTRY_SAFE(alu, next_alu, &cf->alu, list) { in r600_bytecode_clear()
2213 LIST_INITHEAD(&cf->alu); in r600_bytecode_clear()
2215 LIST_FOR_EACH_ENTRY_SAFE(tex, next_tex, &cf->tex, list) { in r600_bytecode_clear()
2219 LIST_INITHEAD(&cf->tex); in r600_bytecode_clear()
2221 LIST_FOR_EACH_ENTRY_SAFE(vtx, next_vtx, &cf->vtx, list) { in r600_bytecode_clear()
2225 LIST_INITHEAD(&cf->vtx); in r600_bytecode_clear()
2227 free(cf); in r600_bytecode_clear()
2230 LIST_INITHEAD(&cf->list); in r600_bytecode_clear()
2235 struct r600_bytecode_cf *cf = NULL; in r600_bytecode_dump() local
2263 LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) { in r600_bytecode_dump()
2264 id = cf->id; in r600_bytecode_dump()
2267 switch (cf->inst) { in r600_bytecode_dump()
2272 if (cf->eg_alu_extended) { in r600_bytecode_dump()
2274 fprintf(stderr, "KCACHE_BANK2:%X ", cf->kcache[2].bank); in r600_bytecode_dump()
2275 fprintf(stderr, "KCACHE_BANK3:%X ", cf->kcache[3].bank); in r600_bytecode_dump()
2276 fprintf(stderr, "KCACHE_MODE2:%X\n", cf->kcache[2].mode); in r600_bytecode_dump()
2279 fprintf(stderr, "KCACHE_MODE3:%X ", cf->kcache[3].mode); in r600_bytecode_dump()
2280 fprintf(stderr, "KCACHE_ADDR2:%X ", cf->kcache[2].addr); in r600_bytecode_dump()
2281 fprintf(stderr, "KCACHE_ADDR3:%X\n", cf->kcache[3].addr); in r600_bytecode_dump()
2286 fprintf(stderr, "ADDR:%d ", cf->addr); in r600_bytecode_dump()
2287 fprintf(stderr, "KCACHE_MODE0:%X ", cf->kcache[0].mode); in r600_bytecode_dump()
2288 fprintf(stderr, "KCACHE_BANK0:%X ", cf->kcache[0].bank); in r600_bytecode_dump()
2289 fprintf(stderr, "KCACHE_BANK1:%X\n", cf->kcache[1].bank); in r600_bytecode_dump()
2292 fprintf(stderr, "INST:0x%x ", EG_G_SQ_CF_ALU_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2293 fprintf(stderr, "KCACHE_MODE1:%X ", cf->kcache[1].mode); in r600_bytecode_dump()
2294 fprintf(stderr, "KCACHE_ADDR0:%X ", cf->kcache[0].addr); in r600_bytecode_dump()
2295 fprintf(stderr, "KCACHE_ADDR1:%X ", cf->kcache[1].addr); in r600_bytecode_dump()
2296 fprintf(stderr, "COUNT:%d\n", cf->ndw / 2); in r600_bytecode_dump()
2301 fprintf(stderr, "ADDR:%d\n", cf->addr); in r600_bytecode_dump()
2304 fprintf(stderr, "INST:0x%x ", EG_G_SQ_CF_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2305 fprintf(stderr, "COUNT:%d\n", cf->ndw / 4); in r600_bytecode_dump()
2310 fprintf(stderr, "GPR:%X ", cf->output.gpr); in r600_bytecode_dump()
2311 fprintf(stderr, "ELEM_SIZE:%X ", cf->output.elem_size); in r600_bytecode_dump()
2312 fprintf(stderr, "ARRAY_BASE:%X ", cf->output.array_base); in r600_bytecode_dump()
2313 fprintf(stderr, "TYPE:%X\n", cf->output.type); in r600_bytecode_dump()
2316 fprintf(stderr, "SWIZ_X:%X ", cf->output.swizzle_x); in r600_bytecode_dump()
2317 fprintf(stderr, "SWIZ_Y:%X ", cf->output.swizzle_y); in r600_bytecode_dump()
2318 fprintf(stderr, "SWIZ_Z:%X ", cf->output.swizzle_z); in r600_bytecode_dump()
2319 fprintf(stderr, "SWIZ_W:%X ", cf->output.swizzle_w); in r600_bytecode_dump()
2320 fprintf(stderr, "BARRIER:%X ", cf->output.barrier); in r600_bytecode_dump()
2321 fprintf(stderr, "INST:0x%x ", EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->output.inst)); in r600_bytecode_dump()
2322 fprintf(stderr, "BURST_COUNT:%d ", cf->output.burst_count); in r600_bytecode_dump()
2323 fprintf(stderr, "EOP:%X\n", cf->output.end_of_program); in r600_bytecode_dump()
2342 (EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2344 (EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2346 fprintf(stderr, "GPR:%X ", cf->output.gpr); in r600_bytecode_dump()
2347 fprintf(stderr, "ELEM_SIZE:%i ", cf->output.elem_size); in r600_bytecode_dump()
2348 fprintf(stderr, "ARRAY_BASE:%i ", cf->output.array_base); in r600_bytecode_dump()
2349 fprintf(stderr, "TYPE:%X\n", cf->output.type); in r600_bytecode_dump()
2352 (EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2354 (EG_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2356 fprintf(stderr, "ARRAY_SIZE:%i ", cf->output.array_size); in r600_bytecode_dump()
2357 fprintf(stderr, "COMP_MASK:%X ", cf->output.comp_mask); in r600_bytecode_dump()
2358 fprintf(stderr, "BARRIER:%X ", cf->output.barrier); in r600_bytecode_dump()
2359 fprintf(stderr, "INST:%d ", cf->output.inst); in r600_bytecode_dump()
2360 fprintf(stderr, "BURST_COUNT:%d ", cf->output.burst_count); in r600_bytecode_dump()
2361 fprintf(stderr, "EOP:%X\n", cf->output.end_of_program); in r600_bytecode_dump()
2375 fprintf(stderr, "ADDR:%d\n", cf->cf_addr); in r600_bytecode_dump()
2378 fprintf(stderr, "INST:0x%x ", EG_G_SQ_CF_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2379 fprintf(stderr, "COND:%X ", cf->cond); in r600_bytecode_dump()
2380 fprintf(stderr, "POP_COUNT:%X\n", cf->pop_count); in r600_bytecode_dump()
2387 R600_ERR("Unknown instruction %0x\n", cf->inst); in r600_bytecode_dump()
2390 switch (cf->inst) { in r600_bytecode_dump()
2396 fprintf(stderr, "ADDR:%d ", cf->addr); in r600_bytecode_dump()
2397 fprintf(stderr, "KCACHE_MODE0:%X ", cf->kcache[0].mode); in r600_bytecode_dump()
2398 fprintf(stderr, "KCACHE_BANK0:%X ", cf->kcache[0].bank); in r600_bytecode_dump()
2399 fprintf(stderr, "KCACHE_BANK1:%X\n", cf->kcache[1].bank); in r600_bytecode_dump()
2402 fprintf(stderr, "INST:0x%x ", R600_G_SQ_CF_ALU_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2403 fprintf(stderr, "KCACHE_MODE1:%X ", cf->kcache[1].mode); in r600_bytecode_dump()
2404 fprintf(stderr, "KCACHE_ADDR0:%X ", cf->kcache[0].addr); in r600_bytecode_dump()
2405 fprintf(stderr, "KCACHE_ADDR1:%X ", cf->kcache[1].addr); in r600_bytecode_dump()
2406 fprintf(stderr, "COUNT:%d\n", cf->ndw / 2); in r600_bytecode_dump()
2412 fprintf(stderr, "ADDR:%d\n", cf->addr); in r600_bytecode_dump()
2415 fprintf(stderr, "INST:0x%x ", R600_G_SQ_CF_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2416 fprintf(stderr, "COUNT:%d\n", cf->ndw / 4); in r600_bytecode_dump()
2421 fprintf(stderr, "GPR:%X ", cf->output.gpr); in r600_bytecode_dump()
2422 fprintf(stderr, "ELEM_SIZE:%X ", cf->output.elem_size); in r600_bytecode_dump()
2423 fprintf(stderr, "ARRAY_BASE:%X ", cf->output.array_base); in r600_bytecode_dump()
2424 fprintf(stderr, "TYPE:%X\n", cf->output.type); in r600_bytecode_dump()
2427 fprintf(stderr, "SWIZ_X:%X ", cf->output.swizzle_x); in r600_bytecode_dump()
2428 fprintf(stderr, "SWIZ_Y:%X ", cf->output.swizzle_y); in r600_bytecode_dump()
2429 fprintf(stderr, "SWIZ_Z:%X ", cf->output.swizzle_z); in r600_bytecode_dump()
2430 fprintf(stderr, "SWIZ_W:%X ", cf->output.swizzle_w); in r600_bytecode_dump()
2431 fprintf(stderr, "BARRIER:%X ", cf->output.barrier); in r600_bytecode_dump()
2432 fprintf(stderr, "INST:0x%x ", R600_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->output.inst)); in r600_bytecode_dump()
2433 fprintf(stderr, "BURST_COUNT:%d ", cf->output.burst_count); in r600_bytecode_dump()
2434 fprintf(stderr, "EOP:%X\n", cf->output.end_of_program); in r600_bytecode_dump()
2441 R600_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2443 fprintf(stderr, "GPR:%X ", cf->output.gpr); in r600_bytecode_dump()
2444 fprintf(stderr, "ELEM_SIZE:%i ", cf->output.elem_size); in r600_bytecode_dump()
2445 fprintf(stderr, "ARRAY_BASE:%i ", cf->output.array_base); in r600_bytecode_dump()
2446 fprintf(stderr, "TYPE:%X\n", cf->output.type); in r600_bytecode_dump()
2449 R600_G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(cf->inst) - in r600_bytecode_dump()
2451 fprintf(stderr, "ARRAY_SIZE:%i ", cf->output.array_size); in r600_bytecode_dump()
2452 fprintf(stderr, "COMP_MASK:%X ", cf->output.comp_mask); in r600_bytecode_dump()
2453 fprintf(stderr, "BARRIER:%X ", cf->output.barrier); in r600_bytecode_dump()
2454 fprintf(stderr, "INST:%d ", cf->output.inst); in r600_bytecode_dump()
2455 fprintf(stderr, "BURST_COUNT:%d ", cf->output.burst_count); in r600_bytecode_dump()
2456 fprintf(stderr, "EOP:%X\n", cf->output.end_of_program); in r600_bytecode_dump()
2469 fprintf(stderr, "ADDR:%d\n", cf->cf_addr); in r600_bytecode_dump()
2472 fprintf(stderr, "INST:0x%x ", R600_G_SQ_CF_WORD1_CF_INST(cf->inst)); in r600_bytecode_dump()
2473 fprintf(stderr, "COND:%X ", cf->cond); in r600_bytecode_dump()
2474 fprintf(stderr, "POP_COUNT:%X\n", cf->pop_count); in r600_bytecode_dump()
2477 R600_ERR("Unknown instruction %0x\n", cf->inst); in r600_bytecode_dump()
2481 id = cf->addr; in r600_bytecode_dump()
2483 LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) { in r600_bytecode_dump()
2532 LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) { in r600_bytecode_dump()
2566 LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) { in r600_bytecode_dump()