Lines Matching full:track

1315 	struct r100_cs_track *track;  in r100_packet3_load_vbpntr()  local
1321 track = (struct r100_cs_track *)p->track; in r100_packet3_load_vbpntr()
1329 track->num_arrays = c; in r100_packet3_load_vbpntr()
1341 track->arrays[i + 0].esize = idx_value >> 8; in r100_packet3_load_vbpntr()
1342 track->arrays[i + 0].robj = reloc->robj; in r100_packet3_load_vbpntr()
1343 track->arrays[i + 0].esize &= 0x7F; in r100_packet3_load_vbpntr()
1352 track->arrays[i + 1].robj = reloc->robj; in r100_packet3_load_vbpntr()
1353 track->arrays[i + 1].esize = idx_value >> 24; in r100_packet3_load_vbpntr()
1354 track->arrays[i + 1].esize &= 0x7F; in r100_packet3_load_vbpntr()
1366 track->arrays[i + 0].robj = reloc->robj; in r100_packet3_load_vbpntr()
1367 track->arrays[i + 0].esize = idx_value >> 8; in r100_packet3_load_vbpntr()
1368 track->arrays[i + 0].esize &= 0x7F; in r100_packet3_load_vbpntr()
1564 struct r100_cs_track *track; in r100_packet0_check() local
1573 track = (struct r100_cs_track *)p->track; in r100_packet0_check()
1603 track->zb.robj = reloc->robj; in r100_packet0_check()
1604 track->zb.offset = idx_value; in r100_packet0_check()
1605 track->zb_dirty = true; in r100_packet0_check()
1616 track->cb[0].robj = reloc->robj; in r100_packet0_check()
1617 track->cb[0].offset = idx_value; in r100_packet0_check()
1618 track->cb_dirty = true; in r100_packet0_check()
1643 track->textures[i].robj = reloc->robj; in r100_packet0_check()
1644 track->tex_dirty = true; in r100_packet0_check()
1659 track->textures[0].cube_info[i].offset = idx_value; in r100_packet0_check()
1661 track->textures[0].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1662 track->tex_dirty = true; in r100_packet0_check()
1677 track->textures[1].cube_info[i].offset = idx_value; in r100_packet0_check()
1679 track->textures[1].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1680 track->tex_dirty = true; in r100_packet0_check()
1695 track->textures[2].cube_info[i].offset = idx_value; in r100_packet0_check()
1697 track->textures[2].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1698 track->tex_dirty = true; in r100_packet0_check()
1701 track->maxy = ((idx_value >> 16) & 0x7FF); in r100_packet0_check()
1702 track->cb_dirty = true; in r100_packet0_check()
1703 track->zb_dirty = true; in r100_packet0_check()
1725 track->cb[0].pitch = idx_value & RADEON_COLORPITCH_MASK; in r100_packet0_check()
1726 track->cb_dirty = true; in r100_packet0_check()
1729 track->zb.pitch = idx_value & RADEON_DEPTHPITCH_MASK; in r100_packet0_check()
1730 track->zb_dirty = true; in r100_packet0_check()
1739 track->cb[0].cpp = 1; in r100_packet0_check()
1744 track->cb[0].cpp = 2; in r100_packet0_check()
1747 track->cb[0].cpp = 4; in r100_packet0_check()
1754 track->z_enabled = !!(idx_value & RADEON_Z_ENABLE); in r100_packet0_check()
1755 track->cb_dirty = true; in r100_packet0_check()
1756 track->zb_dirty = true; in r100_packet0_check()
1761 track->zb.cpp = 2; in r100_packet0_check()
1769 track->zb.cpp = 4; in r100_packet0_check()
1774 track->zb_dirty = true; in r100_packet0_check()
1789 for (i = 0; i < track->num_texture; i++) in r100_packet0_check()
1790 track->textures[i].enabled = !!(temp & (1 << i)); in r100_packet0_check()
1791 track->tex_dirty = true; in r100_packet0_check()
1795 track->vap_vf_cntl = idx_value; in r100_packet0_check()
1798 track->vtx_size = r100_get_vtx_size(idx_value); in r100_packet0_check()
1804 track->textures[i].width = (idx_value & RADEON_TEX_USIZE_MASK) + 1; in r100_packet0_check()
1805 track->textures[i].height = ((idx_value & RADEON_TEX_VSIZE_MASK) >> RADEON_TEX_VSIZE_SHIFT) + 1; in r100_packet0_check()
1806 track->tex_dirty = true; in r100_packet0_check()
1812 track->textures[i].pitch = idx_value + 32; in r100_packet0_check()
1813 track->tex_dirty = true; in r100_packet0_check()
1819 track->textures[i].num_levels = ((idx_value & RADEON_MAX_MIP_LEVEL_MASK) in r100_packet0_check()
1823 track->textures[i].roundup_w = false; in r100_packet0_check()
1826 track->textures[i].roundup_h = false; in r100_packet0_check()
1827 track->tex_dirty = true; in r100_packet0_check()
1834 track->textures[i].use_pitch = true; in r100_packet0_check()
1836 track->textures[i].use_pitch = false; in r100_packet0_check()
1837track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH… in r100_packet0_check()
1838track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEI… in r100_packet0_check()
1841 track->textures[i].tex_coord_type = 2; in r100_packet0_check()
1846 track->textures[i].cpp = 1; in r100_packet0_check()
1847 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1858 track->textures[i].cpp = 2; in r100_packet0_check()
1859 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1865 track->textures[i].cpp = 4; in r100_packet0_check()
1866 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1869 track->textures[i].cpp = 1; in r100_packet0_check()
1870 track->textures[i].compress_format = R100_TRACK_COMP_DXT1; in r100_packet0_check()
1874 track->textures[i].cpp = 1; in r100_packet0_check()
1875 track->textures[i].compress_format = R100_TRACK_COMP_DXT35; in r100_packet0_check()
1878 track->textures[i].cube_info[4].width = 1 << ((idx_value >> 16) & 0xf); in r100_packet0_check()
1879 track->textures[i].cube_info[4].height = 1 << ((idx_value >> 20) & 0xf); in r100_packet0_check()
1880 track->tex_dirty = true; in r100_packet0_check()
1888 track->textures[i].cube_info[face].width = 1 << ((tmp >> (face * 8)) & 0xf); in r100_packet0_check()
1889 track->textures[i].cube_info[face].height = 1 << ((tmp >> ((face * 8) + 4)) & 0xf); in r100_packet0_check()
1891 track->tex_dirty = true; in r100_packet0_check()
1922 struct r100_cs_track *track; in r100_packet3_check() local
1929 track = (struct r100_cs_track *)p->track; in r100_packet3_check()
1958 track->num_arrays = 1; in r100_packet3_check()
1959 track->vtx_size = r100_get_vtx_size(radeon_get_ib_value(p, idx + 2)); in r100_packet3_check()
1961 track->arrays[0].robj = reloc->robj; in r100_packet3_check()
1962 track->arrays[0].esize = track->vtx_size; in r100_packet3_check()
1964 track->max_indx = radeon_get_ib_value(p, idx+1); in r100_packet3_check()
1966 track->vap_vf_cntl = radeon_get_ib_value(p, idx+3); in r100_packet3_check()
1967 track->immd_dwords = pkt->count - 1; in r100_packet3_check()
1968 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
1977 track->vtx_size = r100_get_vtx_size(radeon_get_ib_value(p, idx + 0)); in r100_packet3_check()
1978 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
1979 track->immd_dwords = pkt->count - 1; in r100_packet3_check()
1980 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
1990 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
1991 track->immd_dwords = pkt->count; in r100_packet3_check()
1992 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
1998 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
1999 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2005 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
2006 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2012 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
2013 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2019 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
2020 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2042 struct r100_cs_track *track; in r100_cs_parse() local
2045 track = kzalloc(sizeof(*track), GFP_KERNEL); in r100_cs_parse()
2046 if (!track) in r100_cs_parse()
2048 r100_cs_track_clear(p->rdev, track); in r100_cs_parse()
2049 p->track = track; in r100_cs_parse()
2133 struct r100_cs_track *track, unsigned idx) in r100_cs_track_cube() argument
2138 unsigned compress_format = track->textures[idx].compress_format; in r100_cs_track_cube()
2141 cube_robj = track->textures[idx].cube_info[face].robj; in r100_cs_track_cube()
2142 w = track->textures[idx].cube_info[face].width; in r100_cs_track_cube()
2143 h = track->textures[idx].cube_info[face].height; in r100_cs_track_cube()
2149 size *= track->textures[idx].cpp; in r100_cs_track_cube()
2151 size += track->textures[idx].cube_info[face].offset; in r100_cs_track_cube()
2156 r100_cs_track_texture_print(&track->textures[idx]); in r100_cs_track_cube()
2164 struct r100_cs_track *track) in r100_cs_track_texture_check() argument
2171 for (u = 0; u < track->num_texture; u++) { in r100_cs_track_texture_check()
2172 if (!track->textures[u].enabled) in r100_cs_track_texture_check()
2174 if (track->textures[u].lookup_disable) in r100_cs_track_texture_check()
2176 robj = track->textures[u].robj; in r100_cs_track_texture_check()
2182 for (i = 0; i <= track->textures[u].num_levels; i++) { in r100_cs_track_texture_check()
2183 if (track->textures[u].use_pitch) { in r100_cs_track_texture_check()
2185 w = (track->textures[u].pitch / track->textures[u].cpp) / (1 << i); in r100_cs_track_texture_check()
2187 w = track->textures[u].pitch / (1 << i); in r100_cs_track_texture_check()
2189 w = track->textures[u].width; in r100_cs_track_texture_check()
2191 w |= track->textures[u].width_11; in r100_cs_track_texture_check()
2193 if (track->textures[u].roundup_w) in r100_cs_track_texture_check()
2196 h = track->textures[u].height; in r100_cs_track_texture_check()
2198 h |= track->textures[u].height_11; in r100_cs_track_texture_check()
2200 if (track->textures[u].roundup_h) in r100_cs_track_texture_check()
2202 if (track->textures[u].tex_coord_type == 1) { in r100_cs_track_texture_check()
2203 d = (1 << track->textures[u].txdepth) / (1 << i); in r100_cs_track_texture_check()
2209 if (track->textures[u].compress_format) { in r100_cs_track_texture_check()
2211 size += r100_track_compress_size(track->textures[u].compress_format, w, h) * d; in r100_cs_track_texture_check()
2216 size *= track->textures[u].cpp; in r100_cs_track_texture_check()
2218 switch (track->textures[u].tex_coord_type) { in r100_cs_track_texture_check()
2223 if (track->separate_cube) { in r100_cs_track_texture_check()
2224 ret = r100_cs_track_cube(rdev, track, u); in r100_cs_track_texture_check()
2232 "%u\n", track->textures[u].tex_coord_type, u); in r100_cs_track_texture_check()
2238 r100_cs_track_texture_print(&track->textures[u]); in r100_cs_track_texture_check()
2245 int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track) in r100_cs_track_check() argument
2251 unsigned num_cb = track->cb_dirty ? track->num_cb : 0; in r100_cs_track_check()
2253 if (num_cb && !track->zb_cb_clear && !track->color_channel_mask && in r100_cs_track_check()
2254 !track->blend_read_enable) in r100_cs_track_check()
2258 if (track->cb[i].robj == NULL) { in r100_cs_track_check()
2262 size = track->cb[i].pitch * track->cb[i].cpp * track->maxy; in r100_cs_track_check()
2263 size += track->cb[i].offset; in r100_cs_track_check()
2264 if (size > radeon_bo_size(track->cb[i].robj)) { in r100_cs_track_check()
2267 radeon_bo_size(track->cb[i].robj)); in r100_cs_track_check()
2269 i, track->cb[i].pitch, track->cb[i].cpp, in r100_cs_track_check()
2270 track->cb[i].offset, track->maxy); in r100_cs_track_check()
2274 track->cb_dirty = false; in r100_cs_track_check()
2276 if (track->zb_dirty && track->z_enabled) { in r100_cs_track_check()
2277 if (track->zb.robj == NULL) { in r100_cs_track_check()
2281 size = track->zb.pitch * track->zb.cpp * track->maxy; in r100_cs_track_check()
2282 size += track->zb.offset; in r100_cs_track_check()
2283 if (size > radeon_bo_size(track->zb.robj)) { in r100_cs_track_check()
2286 radeon_bo_size(track->zb.robj)); in r100_cs_track_check()
2288 track->zb.pitch, track->zb.cpp, in r100_cs_track_check()
2289 track->zb.offset, track->maxy); in r100_cs_track_check()
2293 track->zb_dirty = false; in r100_cs_track_check()
2295 if (track->aa_dirty && track->aaresolve) { in r100_cs_track_check()
2296 if (track->aa.robj == NULL) { in r100_cs_track_check()
2301 size = track->aa.pitch * track->cb[0].cpp * track->maxy; in r100_cs_track_check()
2302 size += track->aa.offset; in r100_cs_track_check()
2303 if (size > radeon_bo_size(track->aa.robj)) { in r100_cs_track_check()
2306 radeon_bo_size(track->aa.robj)); in r100_cs_track_check()
2308 i, track->aa.pitch, track->cb[0].cpp, in r100_cs_track_check()
2309 track->aa.offset, track->maxy); in r100_cs_track_check()
2313 track->aa_dirty = false; in r100_cs_track_check()
2315 prim_walk = (track->vap_vf_cntl >> 4) & 0x3; in r100_cs_track_check()
2316 if (track->vap_vf_cntl & (1 << 14)) { in r100_cs_track_check()
2317 nverts = track->vap_alt_nverts; in r100_cs_track_check()
2319 nverts = (track->vap_vf_cntl >> 16) & 0xFFFF; in r100_cs_track_check()
2323 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_check()
2324 size = track->arrays[i].esize * track->max_indx * 4; in r100_cs_track_check()
2325 if (track->arrays[i].robj == NULL) { in r100_cs_track_check()
2330 if (size > radeon_bo_size(track->arrays[i].robj)) { in r100_cs_track_check()
2334 radeon_bo_size(track->arrays[i].robj) in r100_cs_track_check()
2336 DRM_ERROR("Max indices %u\n", track->max_indx); in r100_cs_track_check()
2342 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_check()
2343 size = track->arrays[i].esize * (nverts - 1) * 4; in r100_cs_track_check()
2344 if (track->arrays[i].robj == NULL) { in r100_cs_track_check()
2349 if (size > radeon_bo_size(track->arrays[i].robj)) { in r100_cs_track_check()
2353 radeon_bo_size(track->arrays[i].robj) in r100_cs_track_check()
2360 size = track->vtx_size * nverts; in r100_cs_track_check()
2361 if (size != track->immd_dwords) { in r100_cs_track_check()
2363 track->immd_dwords, size); in r100_cs_track_check()
2365 nverts, track->vtx_size); in r100_cs_track_check()
2375 if (track->tex_dirty) { in r100_cs_track_check()
2376 track->tex_dirty = false; in r100_cs_track_check()
2377 return r100_cs_track_texture_check(rdev, track); in r100_cs_track_check()
2382 void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track) in r100_cs_track_clear() argument
2386 track->cb_dirty = true; in r100_cs_track_clear()
2387 track->zb_dirty = true; in r100_cs_track_clear()
2388 track->tex_dirty = true; in r100_cs_track_clear()
2389 track->aa_dirty = true; in r100_cs_track_clear()
2392 track->num_cb = 1; in r100_cs_track_clear()
2394 track->num_texture = 3; in r100_cs_track_clear()
2396 track->num_texture = 6; in r100_cs_track_clear()
2397 track->maxy = 2048; in r100_cs_track_clear()
2398 track->separate_cube = true; in r100_cs_track_clear()
2400 track->num_cb = 4; in r100_cs_track_clear()
2401 track->num_texture = 16; in r100_cs_track_clear()
2402 track->maxy = 4096; in r100_cs_track_clear()
2403 track->separate_cube = false; in r100_cs_track_clear()
2404 track->aaresolve = false; in r100_cs_track_clear()
2405 track->aa.robj = NULL; in r100_cs_track_clear()
2408 for (i = 0; i < track->num_cb; i++) { in r100_cs_track_clear()
2409 track->cb[i].robj = NULL; in r100_cs_track_clear()
2410 track->cb[i].pitch = 8192; in r100_cs_track_clear()
2411 track->cb[i].cpp = 16; in r100_cs_track_clear()
2412 track->cb[i].offset = 0; in r100_cs_track_clear()
2414 track->z_enabled = true; in r100_cs_track_clear()
2415 track->zb.robj = NULL; in r100_cs_track_clear()
2416 track->zb.pitch = 8192; in r100_cs_track_clear()
2417 track->zb.cpp = 4; in r100_cs_track_clear()
2418 track->zb.offset = 0; in r100_cs_track_clear()
2419 track->vtx_size = 0x7F; in r100_cs_track_clear()
2420 track->immd_dwords = 0xFFFFFFFFUL; in r100_cs_track_clear()
2421 track->num_arrays = 11; in r100_cs_track_clear()
2422 track->max_indx = 0x00FFFFFFUL; in r100_cs_track_clear()
2423 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_clear()
2424 track->arrays[i].robj = NULL; in r100_cs_track_clear()
2425 track->arrays[i].esize = 0x7F; in r100_cs_track_clear()
2427 for (i = 0; i < track->num_texture; i++) { in r100_cs_track_clear()
2428 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_cs_track_clear()
2429 track->textures[i].pitch = 16536; in r100_cs_track_clear()
2430 track->textures[i].width = 16536; in r100_cs_track_clear()
2431 track->textures[i].height = 16536; in r100_cs_track_clear()
2432 track->textures[i].width_11 = 1 << 11; in r100_cs_track_clear()
2433 track->textures[i].height_11 = 1 << 11; in r100_cs_track_clear()
2434 track->textures[i].num_levels = 12; in r100_cs_track_clear()
2436 track->textures[i].tex_coord_type = 0; in r100_cs_track_clear()
2437 track->textures[i].txdepth = 0; in r100_cs_track_clear()
2439 track->textures[i].txdepth = 16; in r100_cs_track_clear()
2440 track->textures[i].tex_coord_type = 1; in r100_cs_track_clear()
2442 track->textures[i].cpp = 64; in r100_cs_track_clear()
2443 track->textures[i].robj = NULL; in r100_cs_track_clear()
2445 track->textures[i].enabled = false; in r100_cs_track_clear()
2446 track->textures[i].lookup_disable = false; in r100_cs_track_clear()
2447 track->textures[i].roundup_w = true; in r100_cs_track_clear()
2448 track->textures[i].roundup_h = true; in r100_cs_track_clear()
2449 if (track->separate_cube) in r100_cs_track_clear()
2451 track->textures[i].cube_info[face].robj = NULL; in r100_cs_track_clear()
2452 track->textures[i].cube_info[face].width = 16536; in r100_cs_track_clear()
2453 track->textures[i].cube_info[face].height = 16536; in r100_cs_track_clear()
2454 track->textures[i].cube_info[face].offset = 0; in r100_cs_track_clear()