1 /**************************************************************************
3 * Copyright 2015 Advanced Micro Devices, Inc.
4 * Copyright 2008 VMware, Inc.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * on the rights to use, copy, modify, merge, publish, distribute, sub
11 * license, and/or sell copies of the Software, and to permit persons to whom
12 * the Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
22 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24 * USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #include "tgsi/tgsi_parse.h"
30 #include "util/u_memory.h"
34 safe_memcpy(void *dst
, const void *src
, size_t size
)
37 memcpy(dst
, src
, size
);
43 /********************************************************************
47 static struct dd_query
*
48 dd_query(struct pipe_query
*query
)
50 return (struct dd_query
*)query
;
53 static struct pipe_query
*
54 dd_query_unwrap(struct pipe_query
*query
)
57 return dd_query(query
)->query
;
63 static struct pipe_query
*
64 dd_context_create_query(struct pipe_context
*_pipe
, unsigned query_type
,
67 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
68 struct pipe_query
*query
;
70 query
= pipe
->create_query(pipe
, query_type
, index
);
72 /* Wrap query object. */
74 struct dd_query
*dd_query
= CALLOC_STRUCT(dd_query
);
76 dd_query
->type
= query_type
;
77 dd_query
->query
= query
;
78 query
= (struct pipe_query
*)dd_query
;
80 pipe
->destroy_query(pipe
, query
);
89 dd_context_destroy_query(struct pipe_context
*_pipe
,
90 struct pipe_query
*query
)
92 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
94 pipe
->destroy_query(pipe
, dd_query_unwrap(query
));
99 dd_context_begin_query(struct pipe_context
*_pipe
, struct pipe_query
*query
)
101 struct dd_context
*dctx
= dd_context(_pipe
);
102 struct pipe_context
*pipe
= dctx
->pipe
;
104 return pipe
->begin_query(pipe
, dd_query_unwrap(query
));
108 dd_context_end_query(struct pipe_context
*_pipe
, struct pipe_query
*query
)
110 struct dd_context
*dctx
= dd_context(_pipe
);
111 struct pipe_context
*pipe
= dctx
->pipe
;
113 pipe
->end_query(pipe
, dd_query_unwrap(query
));
117 dd_context_get_query_result(struct pipe_context
*_pipe
,
118 struct pipe_query
*query
, boolean wait
,
119 union pipe_query_result
*result
)
121 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
123 return pipe
->get_query_result(pipe
, dd_query_unwrap(query
), wait
, result
);
127 dd_context_render_condition(struct pipe_context
*_pipe
,
128 struct pipe_query
*query
, boolean condition
,
131 struct dd_context
*dctx
= dd_context(_pipe
);
132 struct pipe_context
*pipe
= dctx
->pipe
;
134 pipe
->render_condition(pipe
, dd_query_unwrap(query
), condition
, mode
);
135 dctx
->render_cond
.query
= dd_query(query
);
136 dctx
->render_cond
.condition
= condition
;
137 dctx
->render_cond
.mode
= mode
;
141 /********************************************************************
142 * constant (immutable) non-shader states
145 #define DD_CSO_CREATE(name, shortname) \
147 dd_context_create_##name##_state(struct pipe_context *_pipe, \
148 const struct pipe_##name##_state *state) \
150 struct pipe_context *pipe = dd_context(_pipe)->pipe; \
151 struct dd_state *hstate = CALLOC_STRUCT(dd_state); \
155 hstate->cso = pipe->create_##name##_state(pipe, state); \
156 hstate->state.shortname = *state; \
160 #define DD_CSO_BIND(name, shortname) \
162 dd_context_bind_##name##_state(struct pipe_context *_pipe, void *state) \
164 struct dd_context *dctx = dd_context(_pipe); \
165 struct pipe_context *pipe = dctx->pipe; \
166 struct dd_state *hstate = state; \
168 dctx->shortname = hstate; \
169 pipe->bind_##name##_state(pipe, hstate ? hstate->cso : NULL); \
172 #define DD_CSO_DELETE(name) \
174 dd_context_delete_##name##_state(struct pipe_context *_pipe, void *state) \
176 struct dd_context *dctx = dd_context(_pipe); \
177 struct pipe_context *pipe = dctx->pipe; \
178 struct dd_state *hstate = state; \
180 pipe->delete_##name##_state(pipe, hstate->cso); \
184 #define DD_CSO_WHOLE(name, shortname) \
185 DD_CSO_CREATE(name, shortname) \
186 DD_CSO_BIND(name, shortname) \
189 DD_CSO_WHOLE(blend
, blend
)
190 DD_CSO_WHOLE(rasterizer
, rs
)
191 DD_CSO_WHOLE(depth_stencil_alpha
, dsa
)
193 DD_CSO_CREATE(sampler
, sampler
)
194 DD_CSO_DELETE(sampler
)
197 dd_context_bind_sampler_states(struct pipe_context
*_pipe
, unsigned shader
,
198 unsigned start
, unsigned count
, void **states
)
200 struct dd_context
*dctx
= dd_context(_pipe
);
201 struct pipe_context
*pipe
= dctx
->pipe
;
203 memcpy(&dctx
->sampler_states
[shader
][start
], states
,
204 sizeof(void*) * count
);
207 void *samp
[PIPE_MAX_SAMPLERS
];
210 for (i
= 0; i
< count
; i
++) {
211 struct dd_state
*s
= states
[i
];
212 samp
[i
] = s
? s
->cso
: NULL
;
215 pipe
->bind_sampler_states(pipe
, shader
, start
, count
, samp
);
218 pipe
->bind_sampler_states(pipe
, shader
, start
, count
, NULL
);
222 dd_context_create_vertex_elements_state(struct pipe_context
*_pipe
,
224 const struct pipe_vertex_element
*elems
)
226 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
227 struct dd_state
*hstate
= CALLOC_STRUCT(dd_state
);
231 hstate
->cso
= pipe
->create_vertex_elements_state(pipe
, num_elems
, elems
);
232 memcpy(hstate
->state
.velems
.velems
, elems
, sizeof(elems
[0]) * num_elems
);
233 hstate
->state
.velems
.count
= num_elems
;
237 DD_CSO_BIND(vertex_elements
, velems
)
238 DD_CSO_DELETE(vertex_elements
)
241 /********************************************************************
245 #define DD_SHADER(NAME, name) \
247 dd_context_create_##name##_state(struct pipe_context *_pipe, \
248 const struct pipe_shader_state *state) \
250 struct pipe_context *pipe = dd_context(_pipe)->pipe; \
251 struct dd_state *hstate = CALLOC_STRUCT(dd_state); \
255 hstate->cso = pipe->create_##name##_state(pipe, state); \
256 hstate->state.shader = *state; \
257 hstate->state.shader.tokens = tgsi_dup_tokens(state->tokens); \
262 dd_context_bind_##name##_state(struct pipe_context *_pipe, void *state) \
264 struct dd_context *dctx = dd_context(_pipe); \
265 struct pipe_context *pipe = dctx->pipe; \
266 struct dd_state *hstate = state; \
268 dctx->shaders[PIPE_SHADER_##NAME] = hstate; \
269 pipe->bind_##name##_state(pipe, hstate ? hstate->cso : NULL); \
273 dd_context_delete_##name##_state(struct pipe_context *_pipe, void *state) \
275 struct dd_context *dctx = dd_context(_pipe); \
276 struct pipe_context *pipe = dctx->pipe; \
277 struct dd_state *hstate = state; \
279 pipe->delete_##name##_state(pipe, hstate->cso); \
280 tgsi_free_tokens(hstate->state.shader.tokens); \
284 DD_SHADER(FRAGMENT
, fs
)
285 DD_SHADER(VERTEX
, vs
)
286 DD_SHADER(GEOMETRY
, gs
)
287 DD_SHADER(TESS_CTRL
, tcs
)
288 DD_SHADER(TESS_EVAL
, tes
)
291 /********************************************************************
295 #define DD_IMM_STATE(name, type, deref, ref) \
297 dd_context_set_##name(struct pipe_context *_pipe, type deref) \
299 struct dd_context *dctx = dd_context(_pipe); \
300 struct pipe_context *pipe = dctx->pipe; \
302 dctx->name = deref; \
303 pipe->set_##name(pipe, ref); \
306 DD_IMM_STATE(blend_color
, const struct pipe_blend_color
, *state
, state
)
307 DD_IMM_STATE(stencil_ref
, const struct pipe_stencil_ref
, *state
, state
)
308 DD_IMM_STATE(clip_state
, const struct pipe_clip_state
, *state
, state
)
309 DD_IMM_STATE(sample_mask
, unsigned, sample_mask
, sample_mask
)
310 DD_IMM_STATE(min_samples
, unsigned, min_samples
, min_samples
)
311 DD_IMM_STATE(framebuffer_state
, const struct pipe_framebuffer_state
, *state
, state
)
312 DD_IMM_STATE(polygon_stipple
, const struct pipe_poly_stipple
, *state
, state
)
315 dd_context_set_constant_buffer(struct pipe_context
*_pipe
,
316 uint shader
, uint index
,
317 struct pipe_constant_buffer
*constant_buffer
)
319 struct dd_context
*dctx
= dd_context(_pipe
);
320 struct pipe_context
*pipe
= dctx
->pipe
;
322 safe_memcpy(&dctx
->constant_buffers
[shader
][index
], constant_buffer
,
323 sizeof(*constant_buffer
));
324 pipe
->set_constant_buffer(pipe
, shader
, index
, constant_buffer
);
328 dd_context_set_scissor_states(struct pipe_context
*_pipe
,
329 unsigned start_slot
, unsigned num_scissors
,
330 const struct pipe_scissor_state
*states
)
332 struct dd_context
*dctx
= dd_context(_pipe
);
333 struct pipe_context
*pipe
= dctx
->pipe
;
335 safe_memcpy(&dctx
->scissors
[start_slot
], states
,
336 sizeof(*states
) * num_scissors
);
337 pipe
->set_scissor_states(pipe
, start_slot
, num_scissors
, states
);
341 dd_context_set_viewport_states(struct pipe_context
*_pipe
,
342 unsigned start_slot
, unsigned num_viewports
,
343 const struct pipe_viewport_state
*states
)
345 struct dd_context
*dctx
= dd_context(_pipe
);
346 struct pipe_context
*pipe
= dctx
->pipe
;
348 safe_memcpy(&dctx
->viewports
[start_slot
], states
,
349 sizeof(*states
) * num_viewports
);
350 pipe
->set_viewport_states(pipe
, start_slot
, num_viewports
, states
);
353 static void dd_context_set_tess_state(struct pipe_context
*_pipe
,
354 const float default_outer_level
[4],
355 const float default_inner_level
[2])
357 struct dd_context
*dctx
= dd_context(_pipe
);
358 struct pipe_context
*pipe
= dctx
->pipe
;
360 memcpy(dctx
->tess_default_levels
, default_outer_level
, sizeof(float) * 4);
361 memcpy(dctx
->tess_default_levels
+4, default_inner_level
, sizeof(float) * 2);
362 pipe
->set_tess_state(pipe
, default_outer_level
, default_inner_level
);
366 /********************************************************************
370 static struct pipe_surface
*
371 dd_context_create_surface(struct pipe_context
*_pipe
,
372 struct pipe_resource
*resource
,
373 const struct pipe_surface
*surf_tmpl
)
375 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
376 struct pipe_surface
*view
=
377 pipe
->create_surface(pipe
, resource
, surf_tmpl
);
381 view
->context
= _pipe
;
386 dd_context_surface_destroy(struct pipe_context
*_pipe
,
387 struct pipe_surface
*surf
)
389 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
391 pipe
->surface_destroy(pipe
, surf
);
394 static struct pipe_sampler_view
*
395 dd_context_create_sampler_view(struct pipe_context
*_pipe
,
396 struct pipe_resource
*resource
,
397 const struct pipe_sampler_view
*templ
)
399 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
400 struct pipe_sampler_view
*view
=
401 pipe
->create_sampler_view(pipe
, resource
, templ
);
405 view
->context
= _pipe
;
410 dd_context_sampler_view_destroy(struct pipe_context
*_pipe
,
411 struct pipe_sampler_view
*view
)
413 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
415 pipe
->sampler_view_destroy(pipe
, view
);
418 static struct pipe_image_view
*
419 dd_context_create_image_view(struct pipe_context
*_pipe
,
420 struct pipe_resource
*resource
,
421 const struct pipe_image_view
*templ
)
423 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
424 struct pipe_image_view
*view
=
425 pipe
->create_image_view(pipe
, resource
, templ
);
429 view
->context
= _pipe
;
434 dd_context_image_view_destroy(struct pipe_context
*_pipe
,
435 struct pipe_image_view
*view
)
437 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
439 pipe
->image_view_destroy(pipe
, view
);
442 static struct pipe_stream_output_target
*
443 dd_context_create_stream_output_target(struct pipe_context
*_pipe
,
444 struct pipe_resource
*res
,
445 unsigned buffer_offset
,
446 unsigned buffer_size
)
448 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
449 struct pipe_stream_output_target
*view
=
450 pipe
->create_stream_output_target(pipe
, res
, buffer_offset
,
455 view
->context
= _pipe
;
460 dd_context_stream_output_target_destroy(struct pipe_context
*_pipe
,
461 struct pipe_stream_output_target
*target
)
463 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
465 pipe
->stream_output_target_destroy(pipe
, target
);
469 /********************************************************************
474 dd_context_set_sampler_views(struct pipe_context
*_pipe
, unsigned shader
,
475 unsigned start
, unsigned num
,
476 struct pipe_sampler_view
**views
)
478 struct dd_context
*dctx
= dd_context(_pipe
);
479 struct pipe_context
*pipe
= dctx
->pipe
;
481 safe_memcpy(&dctx
->sampler_views
[shader
][start
], views
,
482 sizeof(views
[0]) * num
);
483 pipe
->set_sampler_views(pipe
, shader
, start
, num
, views
);
487 dd_context_set_shader_images(struct pipe_context
*_pipe
, unsigned shader
,
488 unsigned start
, unsigned num
,
489 struct pipe_image_view
**views
)
491 struct dd_context
*dctx
= dd_context(_pipe
);
492 struct pipe_context
*pipe
= dctx
->pipe
;
494 safe_memcpy(&dctx
->shader_images
[shader
][start
], views
,
495 sizeof(views
[0]) * num
);
496 pipe
->set_shader_images(pipe
, shader
, start
, num
, views
);
500 dd_context_set_shader_buffers(struct pipe_context
*_pipe
, unsigned shader
,
501 unsigned start
, unsigned num_buffers
,
502 struct pipe_shader_buffer
*buffers
)
504 struct dd_context
*dctx
= dd_context(_pipe
);
505 struct pipe_context
*pipe
= dctx
->pipe
;
507 safe_memcpy(&dctx
->shader_buffers
[shader
][start
], buffers
,
508 sizeof(buffers
[0]) * num_buffers
);
509 pipe
->set_shader_buffers(pipe
, shader
, start
, num_buffers
, buffers
);
513 dd_context_set_vertex_buffers(struct pipe_context
*_pipe
,
514 unsigned start
, unsigned num_buffers
,
515 const struct pipe_vertex_buffer
*buffers
)
517 struct dd_context
*dctx
= dd_context(_pipe
);
518 struct pipe_context
*pipe
= dctx
->pipe
;
520 safe_memcpy(&dctx
->vertex_buffers
[start
], buffers
,
521 sizeof(buffers
[0]) * num_buffers
);
522 pipe
->set_vertex_buffers(pipe
, start
, num_buffers
, buffers
);
526 dd_context_set_index_buffer(struct pipe_context
*_pipe
,
527 const struct pipe_index_buffer
*ib
)
529 struct dd_context
*dctx
= dd_context(_pipe
);
530 struct pipe_context
*pipe
= dctx
->pipe
;
532 safe_memcpy(&dctx
->index_buffer
, ib
, sizeof(*ib
));
533 pipe
->set_index_buffer(pipe
, ib
);
537 dd_context_set_stream_output_targets(struct pipe_context
*_pipe
,
538 unsigned num_targets
,
539 struct pipe_stream_output_target
**tgs
,
540 const unsigned *offsets
)
542 struct dd_context
*dctx
= dd_context(_pipe
);
543 struct pipe_context
*pipe
= dctx
->pipe
;
545 dctx
->num_so_targets
= num_targets
;
546 safe_memcpy(dctx
->so_targets
, tgs
, sizeof(*tgs
) * num_targets
);
547 safe_memcpy(dctx
->so_offsets
, offsets
, sizeof(*offsets
) * num_targets
);
548 pipe
->set_stream_output_targets(pipe
, num_targets
, tgs
, offsets
);
552 dd_context_destroy(struct pipe_context
*_pipe
)
554 struct dd_context
*dctx
= dd_context(_pipe
);
555 struct pipe_context
*pipe
= dctx
->pipe
;
562 /********************************************************************
567 dd_context_transfer_map(struct pipe_context
*_pipe
,
568 struct pipe_resource
*resource
, unsigned level
,
569 unsigned usage
, const struct pipe_box
*box
,
570 struct pipe_transfer
**transfer
)
572 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
574 return pipe
->transfer_map(pipe
, resource
, level
, usage
, box
, transfer
);
578 dd_context_transfer_flush_region(struct pipe_context
*_pipe
,
579 struct pipe_transfer
*transfer
,
580 const struct pipe_box
*box
)
582 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
584 pipe
->transfer_flush_region(pipe
, transfer
, box
);
588 dd_context_transfer_unmap(struct pipe_context
*_pipe
,
589 struct pipe_transfer
*transfer
)
591 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
593 pipe
->transfer_unmap(pipe
, transfer
);
597 dd_context_transfer_inline_write(struct pipe_context
*_pipe
,
598 struct pipe_resource
*resource
,
599 unsigned level
, unsigned usage
,
600 const struct pipe_box
*box
,
601 const void *data
, unsigned stride
,
602 unsigned layer_stride
)
604 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
606 pipe
->transfer_inline_write(pipe
, resource
, level
, usage
, box
, data
,
607 stride
, layer_stride
);
611 /********************************************************************
616 dd_context_texture_barrier(struct pipe_context
*_pipe
)
618 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
620 pipe
->texture_barrier(pipe
);
624 dd_context_memory_barrier(struct pipe_context
*_pipe
, unsigned flags
)
626 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
628 pipe
->memory_barrier(pipe
, flags
);
632 dd_context_get_sample_position(struct pipe_context
*_pipe
,
633 unsigned sample_count
, unsigned sample_index
,
636 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
638 return pipe
->get_sample_position(pipe
, sample_count
, sample_index
,
643 dd_context_invalidate_resource(struct pipe_context
*_pipe
,
644 struct pipe_resource
*resource
)
646 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
648 pipe
->invalidate_resource(pipe
, resource
);
651 static enum pipe_reset_status
652 dd_context_get_device_reset_status(struct pipe_context
*_pipe
)
654 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
656 return pipe
->get_device_reset_status(pipe
);
660 dd_context_dump_debug_state(struct pipe_context
*_pipe
, FILE *stream
,
663 struct pipe_context
*pipe
= dd_context(_pipe
)->pipe
;
665 return pipe
->dump_debug_state(pipe
, stream
, flags
);
668 struct pipe_context
*
669 dd_context_create(struct dd_screen
*dscreen
, struct pipe_context
*pipe
)
671 struct dd_context
*dctx
;
676 dctx
= CALLOC_STRUCT(dd_context
);
683 dctx
->base
.priv
= pipe
->priv
; /* expose wrapped priv data */
684 dctx
->base
.screen
= &dscreen
->base
;
686 dctx
->base
.destroy
= dd_context_destroy
;
688 CTX_INIT(render_condition
);
689 CTX_INIT(create_query
);
690 CTX_INIT(destroy_query
);
691 CTX_INIT(begin_query
);
693 CTX_INIT(get_query_result
);
694 CTX_INIT(create_blend_state
);
695 CTX_INIT(bind_blend_state
);
696 CTX_INIT(delete_blend_state
);
697 CTX_INIT(create_sampler_state
);
698 CTX_INIT(bind_sampler_states
);
699 CTX_INIT(delete_sampler_state
);
700 CTX_INIT(create_rasterizer_state
);
701 CTX_INIT(bind_rasterizer_state
);
702 CTX_INIT(delete_rasterizer_state
);
703 CTX_INIT(create_depth_stencil_alpha_state
);
704 CTX_INIT(bind_depth_stencil_alpha_state
);
705 CTX_INIT(delete_depth_stencil_alpha_state
);
706 CTX_INIT(create_fs_state
);
707 CTX_INIT(bind_fs_state
);
708 CTX_INIT(delete_fs_state
);
709 CTX_INIT(create_vs_state
);
710 CTX_INIT(bind_vs_state
);
711 CTX_INIT(delete_vs_state
);
712 CTX_INIT(create_gs_state
);
713 CTX_INIT(bind_gs_state
);
714 CTX_INIT(delete_gs_state
);
715 CTX_INIT(create_tcs_state
);
716 CTX_INIT(bind_tcs_state
);
717 CTX_INIT(delete_tcs_state
);
718 CTX_INIT(create_tes_state
);
719 CTX_INIT(bind_tes_state
);
720 CTX_INIT(delete_tes_state
);
721 CTX_INIT(create_vertex_elements_state
);
722 CTX_INIT(bind_vertex_elements_state
);
723 CTX_INIT(delete_vertex_elements_state
);
724 CTX_INIT(set_blend_color
);
725 CTX_INIT(set_stencil_ref
);
726 CTX_INIT(set_sample_mask
);
727 CTX_INIT(set_min_samples
);
728 CTX_INIT(set_clip_state
);
729 CTX_INIT(set_constant_buffer
);
730 CTX_INIT(set_framebuffer_state
);
731 CTX_INIT(set_polygon_stipple
);
732 CTX_INIT(set_scissor_states
);
733 CTX_INIT(set_viewport_states
);
734 CTX_INIT(set_sampler_views
);
735 CTX_INIT(set_tess_state
);
736 CTX_INIT(set_shader_buffers
);
737 CTX_INIT(set_shader_images
);
738 CTX_INIT(set_vertex_buffers
);
739 CTX_INIT(set_index_buffer
);
740 CTX_INIT(create_stream_output_target
);
741 CTX_INIT(stream_output_target_destroy
);
742 CTX_INIT(set_stream_output_targets
);
743 CTX_INIT(create_sampler_view
);
744 CTX_INIT(sampler_view_destroy
);
745 CTX_INIT(create_surface
);
746 CTX_INIT(surface_destroy
);
747 CTX_INIT(create_image_view
);
748 CTX_INIT(image_view_destroy
);
749 CTX_INIT(transfer_map
);
750 CTX_INIT(transfer_flush_region
);
751 CTX_INIT(transfer_unmap
);
752 CTX_INIT(transfer_inline_write
);
753 CTX_INIT(texture_barrier
);
754 CTX_INIT(memory_barrier
);
755 /* create_video_codec */
756 /* create_video_buffer */
757 /* create_compute_state */
758 /* bind_compute_state */
759 /* delete_compute_state */
760 /* set_compute_resources */
761 /* set_global_binding */
762 CTX_INIT(get_sample_position
);
763 CTX_INIT(invalidate_resource
);
764 CTX_INIT(get_device_reset_status
);
765 CTX_INIT(dump_debug_state
);
767 dd_init_draw_functions(dctx
);
769 dctx
->sample_mask
= ~0;