Lines Matching refs:rctx
56 static struct r600_fence *r600_create_fence(struct r600_context *rctx)
58 struct r600_screen *rscreen = rctx->screen;
72 rscreen->fences.data = rctx->ws->buffer_map(rscreen->fences.bo->cs_buf,
73 rctx->cs,
120 si_context_emit_fence(rctx, rscreen->fences.bo, fence->index, 1);
123 fence->sleep_bo = si_resource_create_custom(&rctx->screen->screen, PIPE_USAGE_STAGING, 1);
126 r600_context_bo_reloc(rctx, fence->sleep_bo, RADEON_USAGE_READWRITE);
137 struct r600_context *rctx = (struct r600_context *)ctx;
143 *rfence = r600_create_fence(rctx);
146 if (rctx->current_render_cond) {
147 render_cond = rctx->current_render_cond;
148 render_cond_mode = rctx->current_render_cond_mode;
152 si_context_flush(rctx, flags);
173 struct r600_context *rctx = (struct r600_context *)context;
175 if (rctx->dummy_pixel_shader) {
176 rctx->context.delete_fs_state(&rctx->context, rctx->dummy_pixel_shader);
178 rctx->context.delete_depth_stencil_alpha_state(&rctx->context, rctx->custom_dsa_flush);
179 util_unreference_framebuffer_state(&rctx->framebuffer);
181 util_blitter_destroy(rctx->blitter);
183 if (rctx->uploader) {
184 u_upload_destroy(rctx->uploader);
186 util_slab_destroy(&rctx->pool_transfers);
187 FREE(rctx);
192 struct r600_context *rctx = CALLOC_STRUCT(r600_context);
195 if (rctx == NULL)
198 rctx->context.screen = screen;
199 rctx->context.priv = priv;
200 rctx->context.destroy = r600_destroy_context;
201 rctx->context.flush = r600_flush_from_st;
204 rctx->screen = rscreen;
205 rctx->ws = rscreen->ws;
206 rctx->family = rscreen->family;
207 rctx->chip_class = rscreen->chip_class;
209 si_init_blit_functions(rctx);
210 r600_init_query_functions(rctx);
211 r600_init_context_resource_functions(rctx);
212 si_init_surface_functions(rctx);
214 rctx->context.create_video_decoder = vl_create_decoder;
215 rctx->context.create_video_buffer = vl_video_buffer_create;
217 switch (rctx->chip_class) {
219 si_init_state_functions(rctx);
220 if (si_context_init(rctx)) {
221 r600_destroy_context(&rctx->context);
224 si_init_config(rctx);
227 R600_ERR("Unsupported chip class %d.\n", rctx->chip_class);
228 r600_destroy_context(&rctx->context);
232 rctx->ws->cs_set_flush_callback(rctx->cs, r600_flush_from_winsys, rctx);
234 util_slab_create(&rctx->pool_transfers,
238 rctx->uploader = u_upload_create(&rctx->context, 1024 * 1024, 256,
241 if (!rctx->uploader) {
242 r600_destroy_context(&rctx->context);
246 rctx->blitter = util_blitter_create(&rctx->context);
247 if (rctx->blitter == NULL) {
248 r600_destroy_context(&rctx->context);
252 si_get_backend_mask(rctx); /* this emits commands and must be last */
254 rctx->dummy_pixel_shader =
255 util_make_fragment_cloneinput_shader(&rctx->context, 0,
258 rctx->context.bind_fs_state(&rctx->context, rctx->dummy_pixel_shader);
260 return &rctx->context;