Lines Matching refs:dctx
112 struct dd_context *dctx = dd_context(_pipe); in dd_context_begin_query() local
113 struct pipe_context *pipe = dctx->pipe; in dd_context_begin_query()
121 struct dd_context *dctx = dd_context(_pipe); in dd_context_end_query() local
122 struct pipe_context *pipe = dctx->pipe; in dd_context_end_query()
150 struct dd_context *dctx = dd_context(_pipe); in dd_context_render_condition() local
151 struct pipe_context *pipe = dctx->pipe; in dd_context_render_condition()
152 struct dd_draw_state *dstate = &dctx->draw_state; in dd_context_render_condition()
184 struct dd_context *dctx = dd_context(_pipe); \
185 struct pipe_context *pipe = dctx->pipe; \
188 dctx->draw_state.shortname = hstate; \
196 struct dd_context *dctx = dd_context(_pipe); \
197 struct pipe_context *pipe = dctx->pipe; \
221 struct dd_context *dctx = dd_context(_pipe); in DD_CSO_WHOLE() local
222 struct pipe_context *pipe = dctx->pipe; in DD_CSO_WHOLE()
224 memcpy(&dctx->draw_state.sampler_states[shader][start], states, in DD_CSO_WHOLE()
270 struct dd_context *dctx = dd_context(_pipe); \ in DD_CSO_BIND()
271 struct pipe_context *pipe = dctx->pipe; \ in DD_CSO_BIND()
274 dctx->draw_state.shaders[PIPE_SHADER_##NAME] = hstate; \ in DD_CSO_BIND()
281 struct dd_context *dctx = dd_context(_pipe); \
282 struct pipe_context *pipe = dctx->pipe; \
345 struct dd_context *dctx = dd_context(_pipe); \ in DD_SHADER_NOCREATE()
346 struct pipe_context *pipe = dctx->pipe; \ in DD_SHADER_NOCREATE()
348 dctx->draw_state.name = deref; \ in DD_SHADER_NOCREATE()
365 struct dd_context *dctx = dd_context(_pipe); local
366 struct pipe_context *pipe = dctx->pipe;
368 safe_memcpy(&dctx->draw_state.constant_buffers[shader][index],
378 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_scissor_states() local
379 struct pipe_context *pipe = dctx->pipe; in dd_context_set_scissor_states()
381 safe_memcpy(&dctx->draw_state.scissors[start_slot], states, in dd_context_set_scissor_states()
391 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_viewport_states() local
392 struct pipe_context *pipe = dctx->pipe; in dd_context_set_viewport_states()
394 safe_memcpy(&dctx->draw_state.viewports[start_slot], states, in dd_context_set_viewport_states()
403 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_tess_state() local
404 struct pipe_context *pipe = dctx->pipe; in dd_context_set_tess_state()
406 memcpy(dctx->draw_state.tess_default_levels, default_outer_level, in dd_context_set_tess_state()
408 memcpy(dctx->draw_state.tess_default_levels+4, default_inner_level, in dd_context_set_tess_state()
503 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_sampler_views() local
504 struct pipe_context *pipe = dctx->pipe; in dd_context_set_sampler_views()
506 safe_memcpy(&dctx->draw_state.sampler_views[shader][start], views, in dd_context_set_sampler_views()
517 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_shader_images() local
518 struct pipe_context *pipe = dctx->pipe; in dd_context_set_shader_images()
520 safe_memcpy(&dctx->draw_state.shader_images[shader][start], views, in dd_context_set_shader_images()
530 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_shader_buffers() local
531 struct pipe_context *pipe = dctx->pipe; in dd_context_set_shader_buffers()
533 safe_memcpy(&dctx->draw_state.shader_buffers[shader][start], buffers, in dd_context_set_shader_buffers()
543 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_vertex_buffers() local
544 struct pipe_context *pipe = dctx->pipe; in dd_context_set_vertex_buffers()
546 safe_memcpy(&dctx->draw_state.vertex_buffers[start], buffers, in dd_context_set_vertex_buffers()
557 struct dd_context *dctx = dd_context(_pipe); in dd_context_set_stream_output_targets() local
558 struct pipe_context *pipe = dctx->pipe; in dd_context_set_stream_output_targets()
559 struct dd_draw_state *dstate = &dctx->draw_state; in dd_context_set_stream_output_targets()
568 dd_thread_join(struct dd_context *dctx) in dd_thread_join() argument
570 mtx_lock(&dctx->mutex); in dd_thread_join()
571 dctx->kill_thread = true; in dd_thread_join()
572 cnd_signal(&dctx->cond); in dd_thread_join()
573 mtx_unlock(&dctx->mutex); in dd_thread_join()
574 thrd_join(dctx->thread, NULL); in dd_thread_join()
580 struct dd_context *dctx = dd_context(_pipe); in dd_context_destroy() local
581 struct pipe_context *pipe = dctx->pipe; in dd_context_destroy()
583 dd_thread_join(dctx); in dd_context_destroy()
584 mtx_destroy(&dctx->mutex); in dd_context_destroy()
585 cnd_destroy(&dctx->cond); in dd_context_destroy()
587 assert(list_empty(&dctx->records)); in dd_context_destroy()
588 assert(!dctx->record_pending); in dd_context_destroy()
593 if (dd_screen(dctx->base.screen)->dump_mode == DD_DUMP_ALL_CALLS) { in dd_context_destroy()
594 FILE *f = dd_get_file_stream(dd_screen(dctx->base.screen), 0); in dd_context_destroy()
599 u_log_new_page_print(&dctx->log, f); in dd_context_destroy()
603 u_log_context_destroy(&dctx->log); in dd_context_destroy()
606 FREE(dctx); in dd_context_destroy()
681 struct dd_context *dctx = dd_context(_pipe); in dd_context_emit_string_marker() local
682 struct pipe_context *pipe = dctx->pipe; in dd_context_emit_string_marker()
685 dd_parse_apitrace_marker(string, len, &dctx->draw_state.apitrace_call_number); in dd_context_emit_string_marker()
754 struct dd_context *dctx; in dd_context_create() local
759 dctx = CALLOC_STRUCT(dd_context); in dd_context_create()
760 if (!dctx) in dd_context_create()
763 dctx->pipe = pipe; in dd_context_create()
764 dctx->base.priv = pipe->priv; /* expose wrapped priv data */ in dd_context_create()
765 dctx->base.screen = &dscreen->base; in dd_context_create()
766 dctx->base.stream_uploader = pipe->stream_uploader; in dd_context_create()
767 dctx->base.const_uploader = pipe->const_uploader; in dd_context_create()
769 dctx->base.destroy = dd_context_destroy; in dd_context_create()
854 dd_init_draw_functions(dctx); in dd_context_create()
856 u_log_context_init(&dctx->log); in dd_context_create()
858 pipe->set_log_context(pipe, &dctx->log); in dd_context_create()
860 dctx->draw_state.sample_mask = ~0; in dd_context_create()
862 list_inithead(&dctx->records); in dd_context_create()
863 (void) mtx_init(&dctx->mutex, mtx_plain); in dd_context_create()
864 (void) cnd_init(&dctx->cond); in dd_context_create()
865 dctx->thread = u_thread_create(dd_thread_main, dctx); in dd_context_create()
866 if (!dctx->thread) { in dd_context_create()
867 mtx_destroy(&dctx->mutex); in dd_context_create()
871 return &dctx->base; in dd_context_create()
874 FREE(dctx); in dd_context_create()