Lines Matching refs:rctx
46 bool r600_prepare_for_dma_blit(struct r600_common_context *rctx, in r600_prepare_for_dma_blit() argument
54 if (!rctx->dma.cs) in r600_prepare_for_dma_blit()
85 r600_texture_discard_cmask(rctx->screen, rdst); in r600_prepare_for_dma_blit()
90 rctx->b.flush_resource(&rctx->b, &rsrc->resource.b.b); in r600_prepare_for_dma_blit()
135 struct r600_common_context *rctx = (struct r600_common_context*)ctx; in r600_copy_to_staging_texture() local
146 rctx->dma_copy(ctx, dst, 0, 0, 0, 0, src, transfer->level, in r600_copy_to_staging_texture()
153 struct r600_common_context *rctx = (struct r600_common_context*)ctx; in r600_copy_from_staging_texture() local
168 rctx->dma_copy(ctx, dst, transfer->level, in r600_copy_from_staging_texture()
317 static void r600_eliminate_fast_color_clear(struct r600_common_context *rctx, in r600_eliminate_fast_color_clear() argument
320 struct r600_common_screen *rscreen = rctx->screen; in r600_eliminate_fast_color_clear()
321 struct pipe_context *ctx = &rctx->b; in r600_eliminate_fast_color_clear()
356 static void r600_reallocate_texture_inplace(struct r600_common_context *rctx, in r600_reallocate_texture_inplace() argument
361 struct pipe_screen *screen = rctx->b.screen; in r600_reallocate_texture_inplace()
369 if (rctx->chip_class < SI) in r600_reallocate_texture_inplace()
380 if (r600_choose_tiling(rctx->screen, &templ) != in r600_reallocate_texture_inplace()
398 rctx->dma_copy(&rctx->b, &new_tex->resource.b.b, i, 0, 0, 0, in r600_reallocate_texture_inplace()
404 r600_texture_discard_cmask(rctx->screen, rtex); in r600_reallocate_texture_inplace()
442 p_atomic_inc(&rctx->screen->dirty_tex_counter); in r600_reallocate_texture_inplace()
452 struct r600_common_context *rctx; in r600_texture_get_handle() local
460 rctx = (struct r600_common_context*)(ctx ? ctx : rscreen->aux_context); in r600_texture_get_handle()
473 r600_reallocate_texture_inplace(rctx, rtex, in r600_texture_get_handle()
475 rctx->b.flush(&rctx->b, NULL, 0); in r600_texture_get_handle()
484 r600_eliminate_fast_color_clear(rctx, rtex); in r600_texture_get_handle()
524 rctx->b.resource_copy_region(&rctx->b, newb, 0, 0, 0, 0, in r600_texture_get_handle()
527 r600_replace_buffer_storage(&rctx->b, &res->b.b, newb); in r600_texture_get_handle()
1256 static void r600_texture_invalidate_storage(struct r600_common_context *rctx, in r600_texture_invalidate_storage() argument
1259 struct r600_common_screen *rscreen = rctx->screen; in r600_texture_invalidate_storage()
1274 rctx->num_alloc_tex_transfer_bytes += rtex->size; in r600_texture_invalidate_storage()
1284 struct r600_common_context *rctx = (struct r600_common_context*)ctx; in r600_texture_transfer_map() local
1301 if (!rctx->screen->info.has_dedicated_vram && in r600_texture_transfer_map()
1306 r600_can_invalidate_texture(rctx->screen, rtex, in r600_texture_transfer_map()
1309 r600_reallocate_texture_inplace(rctx, rtex, in r600_texture_transfer_map()
1330 else if (r600_rings_is_buffer_referenced(rctx, rtex->resource.buf, in r600_texture_transfer_map()
1332 !rctx->ws->buffer_wait(rtex->resource.buf, 0, in r600_texture_transfer_map()
1335 if (r600_can_invalidate_texture(rctx->screen, rtex, in r600_texture_transfer_map()
1337 r600_texture_invalidate_storage(rctx, rtex); in r600_texture_transfer_map()
1384 rctx->blit_decompress_depth(ctx, (struct r600_texture*)temp, staging_depth, in r600_texture_transfer_map()
1390 r600_texture_get_offset(rctx->screen, staging_depth, level, NULL, in r600_texture_transfer_map()
1402 rctx->blit_decompress_depth(ctx, rtex, staging_depth, in r600_texture_transfer_map()
1407 offset = r600_texture_get_offset(rctx->screen, staging_depth, in r600_texture_transfer_map()
1434 r600_texture_get_offset(rctx->screen, staging, 0, NULL, in r600_texture_transfer_map()
1446 offset = r600_texture_get_offset(rctx->screen, rtex, level, box, in r600_texture_transfer_map()
1452 if (!(map = r600_buffer_map_sync_with_rings(rctx, buf, usage))) { in r600_texture_transfer_map()
1465 struct r600_common_context *rctx = (struct r600_common_context*)ctx; in r600_texture_transfer_unmap() local
1482 rctx->num_alloc_tex_transfer_bytes += rtransfer->staging->buf->size; in r600_texture_transfer_unmap()
1499 if (rctx->num_alloc_tex_transfer_bytes > rctx->screen->info.gart_size / 4) { in r600_texture_transfer_unmap()
1500 rctx->gfx.flush(rctx, PIPE_FLUSH_ASYNC, NULL); in r600_texture_transfer_unmap()
1501 rctx->num_alloc_tex_transfer_bytes = 0; in r600_texture_transfer_unmap()
1748 void evergreen_do_fast_color_clear(struct r600_common_context *rctx, in evergreen_do_fast_color_clear() argument
1761 if (rctx->render_cond) in evergreen_do_fast_color_clear()
1808 r600_texture_alloc_cmask_separate(rctx->screen, tex); in evergreen_do_fast_color_clear()
1814 rctx->clear_buffer(&rctx->b, &tex->cmask_buffer->b.b, in evergreen_do_fast_color_clear()
1823 p_atomic_inc(&rctx->screen->compressed_colortex_counter); in evergreen_do_fast_color_clear()
1830 rctx->set_atom_dirty(rctx, fb_state, true); in evergreen_do_fast_color_clear()
1956 void r600_init_context_texture_functions(struct r600_common_context *rctx) in r600_init_context_texture_functions() argument
1958 rctx->b.create_surface = r600_create_surface; in r600_init_context_texture_functions()
1959 rctx->b.surface_destroy = r600_surface_destroy; in r600_init_context_texture_functions()
1960 rctx->b.clear_texture = r600_clear_texture; in r600_init_context_texture_functions()