1 /**************************************************************************
3 * Copyright 2009 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #include "pipe/p_context.h"
30 #include "util/u_memory.h"
31 #include "util/u_inlines.h"
33 #include "id_context.h"
34 #include "id_objects.h"
38 identity_destroy(struct pipe_context
*_pipe
)
40 struct identity_context
*id_pipe
= identity_context(_pipe
);
41 struct pipe_context
*pipe
= id_pipe
->pipe
;
49 identity_draw_vbo(struct pipe_context
*_pipe
,
50 const struct pipe_draw_info
*info
)
52 struct identity_context
*id_pipe
= identity_context(_pipe
);
53 struct pipe_context
*pipe
= id_pipe
->pipe
;
55 pipe
->draw_vbo(pipe
, info
);
58 static struct pipe_query
*
59 identity_create_query(struct pipe_context
*_pipe
,
62 struct identity_context
*id_pipe
= identity_context(_pipe
);
63 struct pipe_context
*pipe
= id_pipe
->pipe
;
65 return pipe
->create_query(pipe
,
70 identity_destroy_query(struct pipe_context
*_pipe
,
71 struct pipe_query
*query
)
73 struct identity_context
*id_pipe
= identity_context(_pipe
);
74 struct pipe_context
*pipe
= id_pipe
->pipe
;
76 pipe
->destroy_query(pipe
,
81 identity_begin_query(struct pipe_context
*_pipe
,
82 struct pipe_query
*query
)
84 struct identity_context
*id_pipe
= identity_context(_pipe
);
85 struct pipe_context
*pipe
= id_pipe
->pipe
;
87 pipe
->begin_query(pipe
,
92 identity_end_query(struct pipe_context
*_pipe
,
93 struct pipe_query
*query
)
95 struct identity_context
*id_pipe
= identity_context(_pipe
);
96 struct pipe_context
*pipe
= id_pipe
->pipe
;
103 identity_get_query_result(struct pipe_context
*_pipe
,
104 struct pipe_query
*query
,
106 union pipe_query_result
*result
)
108 struct identity_context
*id_pipe
= identity_context(_pipe
);
109 struct pipe_context
*pipe
= id_pipe
->pipe
;
111 return pipe
->get_query_result(pipe
,
118 identity_create_blend_state(struct pipe_context
*_pipe
,
119 const struct pipe_blend_state
*blend
)
121 struct identity_context
*id_pipe
= identity_context(_pipe
);
122 struct pipe_context
*pipe
= id_pipe
->pipe
;
124 return pipe
->create_blend_state(pipe
,
129 identity_bind_blend_state(struct pipe_context
*_pipe
,
132 struct identity_context
*id_pipe
= identity_context(_pipe
);
133 struct pipe_context
*pipe
= id_pipe
->pipe
;
135 pipe
->bind_blend_state(pipe
,
140 identity_delete_blend_state(struct pipe_context
*_pipe
,
143 struct identity_context
*id_pipe
= identity_context(_pipe
);
144 struct pipe_context
*pipe
= id_pipe
->pipe
;
146 pipe
->delete_blend_state(pipe
,
151 identity_create_sampler_state(struct pipe_context
*_pipe
,
152 const struct pipe_sampler_state
*sampler
)
154 struct identity_context
*id_pipe
= identity_context(_pipe
);
155 struct pipe_context
*pipe
= id_pipe
->pipe
;
157 return pipe
->create_sampler_state(pipe
,
162 identity_bind_sampler_states(struct pipe_context
*_pipe
,
165 unsigned num_samplers
,
168 struct identity_context
*id_pipe
= identity_context(_pipe
);
169 struct pipe_context
*pipe
= id_pipe
->pipe
;
171 pipe
->bind_sampler_states(pipe
, shader
, start
, num_samplers
, samplers
);
175 identity_delete_sampler_state(struct pipe_context
*_pipe
,
178 struct identity_context
*id_pipe
= identity_context(_pipe
);
179 struct pipe_context
*pipe
= id_pipe
->pipe
;
181 pipe
->delete_sampler_state(pipe
,
186 identity_create_rasterizer_state(struct pipe_context
*_pipe
,
187 const struct pipe_rasterizer_state
*rasterizer
)
189 struct identity_context
*id_pipe
= identity_context(_pipe
);
190 struct pipe_context
*pipe
= id_pipe
->pipe
;
192 return pipe
->create_rasterizer_state(pipe
,
197 identity_bind_rasterizer_state(struct pipe_context
*_pipe
,
200 struct identity_context
*id_pipe
= identity_context(_pipe
);
201 struct pipe_context
*pipe
= id_pipe
->pipe
;
203 pipe
->bind_rasterizer_state(pipe
,
208 identity_delete_rasterizer_state(struct pipe_context
*_pipe
,
211 struct identity_context
*id_pipe
= identity_context(_pipe
);
212 struct pipe_context
*pipe
= id_pipe
->pipe
;
214 pipe
->delete_rasterizer_state(pipe
,
219 identity_create_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
220 const struct pipe_depth_stencil_alpha_state
*depth_stencil_alpha
)
222 struct identity_context
*id_pipe
= identity_context(_pipe
);
223 struct pipe_context
*pipe
= id_pipe
->pipe
;
225 return pipe
->create_depth_stencil_alpha_state(pipe
,
226 depth_stencil_alpha
);
230 identity_bind_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
231 void *depth_stencil_alpha
)
233 struct identity_context
*id_pipe
= identity_context(_pipe
);
234 struct pipe_context
*pipe
= id_pipe
->pipe
;
236 pipe
->bind_depth_stencil_alpha_state(pipe
,
237 depth_stencil_alpha
);
241 identity_delete_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
242 void *depth_stencil_alpha
)
244 struct identity_context
*id_pipe
= identity_context(_pipe
);
245 struct pipe_context
*pipe
= id_pipe
->pipe
;
247 pipe
->delete_depth_stencil_alpha_state(pipe
,
248 depth_stencil_alpha
);
252 identity_create_fs_state(struct pipe_context
*_pipe
,
253 const struct pipe_shader_state
*fs
)
255 struct identity_context
*id_pipe
= identity_context(_pipe
);
256 struct pipe_context
*pipe
= id_pipe
->pipe
;
258 return pipe
->create_fs_state(pipe
,
263 identity_bind_fs_state(struct pipe_context
*_pipe
,
266 struct identity_context
*id_pipe
= identity_context(_pipe
);
267 struct pipe_context
*pipe
= id_pipe
->pipe
;
269 pipe
->bind_fs_state(pipe
,
274 identity_delete_fs_state(struct pipe_context
*_pipe
,
277 struct identity_context
*id_pipe
= identity_context(_pipe
);
278 struct pipe_context
*pipe
= id_pipe
->pipe
;
280 pipe
->delete_fs_state(pipe
,
285 identity_create_vs_state(struct pipe_context
*_pipe
,
286 const struct pipe_shader_state
*vs
)
288 struct identity_context
*id_pipe
= identity_context(_pipe
);
289 struct pipe_context
*pipe
= id_pipe
->pipe
;
291 return pipe
->create_vs_state(pipe
,
296 identity_bind_vs_state(struct pipe_context
*_pipe
,
299 struct identity_context
*id_pipe
= identity_context(_pipe
);
300 struct pipe_context
*pipe
= id_pipe
->pipe
;
302 pipe
->bind_vs_state(pipe
,
307 identity_delete_vs_state(struct pipe_context
*_pipe
,
310 struct identity_context
*id_pipe
= identity_context(_pipe
);
311 struct pipe_context
*pipe
= id_pipe
->pipe
;
313 pipe
->delete_vs_state(pipe
,
319 identity_create_vertex_elements_state(struct pipe_context
*_pipe
,
320 unsigned num_elements
,
321 const struct pipe_vertex_element
*vertex_elements
)
323 struct identity_context
*id_pipe
= identity_context(_pipe
);
324 struct pipe_context
*pipe
= id_pipe
->pipe
;
326 return pipe
->create_vertex_elements_state(pipe
,
332 identity_bind_vertex_elements_state(struct pipe_context
*_pipe
,
335 struct identity_context
*id_pipe
= identity_context(_pipe
);
336 struct pipe_context
*pipe
= id_pipe
->pipe
;
338 pipe
->bind_vertex_elements_state(pipe
,
343 identity_delete_vertex_elements_state(struct pipe_context
*_pipe
,
346 struct identity_context
*id_pipe
= identity_context(_pipe
);
347 struct pipe_context
*pipe
= id_pipe
->pipe
;
349 pipe
->delete_vertex_elements_state(pipe
,
354 identity_set_blend_color(struct pipe_context
*_pipe
,
355 const struct pipe_blend_color
*blend_color
)
357 struct identity_context
*id_pipe
= identity_context(_pipe
);
358 struct pipe_context
*pipe
= id_pipe
->pipe
;
360 pipe
->set_blend_color(pipe
,
365 identity_set_stencil_ref(struct pipe_context
*_pipe
,
366 const struct pipe_stencil_ref
*stencil_ref
)
368 struct identity_context
*id_pipe
= identity_context(_pipe
);
369 struct pipe_context
*pipe
= id_pipe
->pipe
;
371 pipe
->set_stencil_ref(pipe
,
376 identity_set_clip_state(struct pipe_context
*_pipe
,
377 const struct pipe_clip_state
*clip
)
379 struct identity_context
*id_pipe
= identity_context(_pipe
);
380 struct pipe_context
*pipe
= id_pipe
->pipe
;
382 pipe
->set_clip_state(pipe
,
387 identity_set_sample_mask(struct pipe_context
*_pipe
,
388 unsigned sample_mask
)
390 struct identity_context
*id_pipe
= identity_context(_pipe
);
391 struct pipe_context
*pipe
= id_pipe
->pipe
;
393 pipe
->set_sample_mask(pipe
,
398 identity_set_constant_buffer(struct pipe_context
*_pipe
,
401 struct pipe_constant_buffer
*_cb
)
403 struct identity_context
*id_pipe
= identity_context(_pipe
);
404 struct pipe_context
*pipe
= id_pipe
->pipe
;
405 struct pipe_constant_buffer cb
;
407 /* XXX hmm? unwrap the input state */
410 cb
.buffer
= identity_resource_unwrap(_cb
->buffer
);
413 pipe
->set_constant_buffer(pipe
,
420 identity_set_framebuffer_state(struct pipe_context
*_pipe
,
421 const struct pipe_framebuffer_state
*_state
)
423 struct identity_context
*id_pipe
= identity_context(_pipe
);
424 struct pipe_context
*pipe
= id_pipe
->pipe
;
425 struct pipe_framebuffer_state unwrapped_state
;
426 struct pipe_framebuffer_state
*state
= NULL
;
429 /* unwrap the input state */
431 memcpy(&unwrapped_state
, _state
, sizeof(unwrapped_state
));
432 for(i
= 0; i
< _state
->nr_cbufs
; i
++)
433 unwrapped_state
.cbufs
[i
] = identity_surface_unwrap(_state
->cbufs
[i
]);
434 for (; i
< PIPE_MAX_COLOR_BUFS
; i
++)
435 unwrapped_state
.cbufs
[i
] = NULL
;
436 unwrapped_state
.zsbuf
= identity_surface_unwrap(_state
->zsbuf
);
437 state
= &unwrapped_state
;
440 pipe
->set_framebuffer_state(pipe
,
445 identity_set_polygon_stipple(struct pipe_context
*_pipe
,
446 const struct pipe_poly_stipple
*poly_stipple
)
448 struct identity_context
*id_pipe
= identity_context(_pipe
);
449 struct pipe_context
*pipe
= id_pipe
->pipe
;
451 pipe
->set_polygon_stipple(pipe
,
456 identity_set_scissor_states(struct pipe_context
*_pipe
,
458 unsigned num_scissors
,
459 const struct pipe_scissor_state
*scissor
)
461 struct identity_context
*id_pipe
= identity_context(_pipe
);
462 struct pipe_context
*pipe
= id_pipe
->pipe
;
464 pipe
->set_scissor_states(pipe
, start_slot
, num_scissors
, scissor
);
468 identity_set_viewport_states(struct pipe_context
*_pipe
,
470 unsigned num_viewports
,
471 const struct pipe_viewport_state
*viewport
)
473 struct identity_context
*id_pipe
= identity_context(_pipe
);
474 struct pipe_context
*pipe
= id_pipe
->pipe
;
476 pipe
->set_viewport_states(pipe
, start_slot
, num_viewports
, viewport
);
480 identity_set_sampler_views(struct pipe_context
*_pipe
,
484 struct pipe_sampler_view
**_views
)
486 struct identity_context
*id_pipe
= identity_context(_pipe
);
487 struct pipe_context
*pipe
= id_pipe
->pipe
;
488 struct pipe_sampler_view
*unwrapped_views
[PIPE_MAX_SAMPLERS
];
489 struct pipe_sampler_view
**views
= NULL
;
492 /* remove this when we have pipe->set_sampler_views(..., start, ...) */
496 for (i
= 0; i
< num
; i
++)
497 unwrapped_views
[i
] = identity_sampler_view_unwrap(_views
[i
]);
498 for (; i
< PIPE_MAX_SAMPLERS
; i
++)
499 unwrapped_views
[i
] = NULL
;
501 views
= unwrapped_views
;
505 case PIPE_SHADER_VERTEX
:
506 pipe
->set_vertex_sampler_views(pipe
, num
, views
);
508 case PIPE_SHADER_GEOMETRY
:
509 pipe
->set_geometry_sampler_views(pipe
, num
, views
);
511 case PIPE_SHADER_FRAGMENT
:
512 pipe
->set_fragment_sampler_views(pipe
, num
, views
);
515 debug_error("Unexpected shader in identity_set_sampler_views()");
520 identity_set_fragment_sampler_views(struct pipe_context
*_pipe
,
522 struct pipe_sampler_view
**_views
)
524 identity_set_sampler_views(_pipe
, PIPE_SHADER_FRAGMENT
, 0, num
, _views
);
528 identity_set_vertex_sampler_views(struct pipe_context
*_pipe
,
530 struct pipe_sampler_view
**_views
)
532 identity_set_sampler_views(_pipe
, PIPE_SHADER_VERTEX
, 0, num
, _views
);
536 identity_set_vertex_buffers(struct pipe_context
*_pipe
,
537 unsigned start_slot
, unsigned num_buffers
,
538 const struct pipe_vertex_buffer
*_buffers
)
540 struct identity_context
*id_pipe
= identity_context(_pipe
);
541 struct pipe_context
*pipe
= id_pipe
->pipe
;
542 struct pipe_vertex_buffer unwrapped_buffers
[PIPE_MAX_SHADER_INPUTS
];
543 struct pipe_vertex_buffer
*buffers
= NULL
;
547 memcpy(unwrapped_buffers
, _buffers
, num_buffers
* sizeof(*_buffers
));
548 for (i
= 0; i
< num_buffers
; i
++)
549 unwrapped_buffers
[i
].buffer
= identity_resource_unwrap(_buffers
[i
].buffer
);
550 buffers
= unwrapped_buffers
;
553 pipe
->set_vertex_buffers(pipe
,
554 start_slot
, num_buffers
,
559 identity_set_index_buffer(struct pipe_context
*_pipe
,
560 const struct pipe_index_buffer
*_ib
)
562 struct identity_context
*id_pipe
= identity_context(_pipe
);
563 struct pipe_context
*pipe
= id_pipe
->pipe
;
564 struct pipe_index_buffer unwrapped_ib
, *ib
= NULL
;
568 unwrapped_ib
.buffer
= identity_resource_unwrap(_ib
->buffer
);
572 pipe
->set_index_buffer(pipe
, ib
);
576 identity_resource_copy_region(struct pipe_context
*_pipe
,
577 struct pipe_resource
*_dst
,
582 struct pipe_resource
*_src
,
584 const struct pipe_box
*src_box
)
586 struct identity_context
*id_pipe
= identity_context(_pipe
);
587 struct identity_resource
*id_resource_dst
= identity_resource(_dst
);
588 struct identity_resource
*id_resource_src
= identity_resource(_src
);
589 struct pipe_context
*pipe
= id_pipe
->pipe
;
590 struct pipe_resource
*dst
= id_resource_dst
->resource
;
591 struct pipe_resource
*src
= id_resource_src
->resource
;
593 pipe
->resource_copy_region(pipe
,
605 identity_blit(struct pipe_context
*_pipe
,
606 const struct pipe_blit_info
*info
)
608 struct identity_context
*id_pipe
= identity_context(_pipe
);
609 struct pipe_context
*pipe
= id_pipe
->pipe
;
610 struct pipe_blit_info blit
= *info
;
612 blit
.src
.resource
= identity_resource(blit
.src
.resource
)->resource
;
613 blit
.dst
.resource
= identity_resource(blit
.dst
.resource
)->resource
;
615 pipe
->blit(pipe
, &blit
);
619 identity_flush_resource(struct pipe_context
*_pipe
,
620 struct pipe_resource
*resource
)
622 struct identity_context
*id_pipe
= identity_context(_pipe
);
623 struct pipe_context
*pipe
= id_pipe
->pipe
;
625 pipe
->flush_resource(pipe
, resource
);
629 identity_clear(struct pipe_context
*_pipe
,
631 const union pipe_color_union
*color
,
635 struct identity_context
*id_pipe
= identity_context(_pipe
);
636 struct pipe_context
*pipe
= id_pipe
->pipe
;
646 identity_clear_render_target(struct pipe_context
*_pipe
,
647 struct pipe_surface
*_dst
,
648 const union pipe_color_union
*color
,
649 unsigned dstx
, unsigned dsty
,
650 unsigned width
, unsigned height
)
652 struct identity_context
*id_pipe
= identity_context(_pipe
);
653 struct identity_surface
*id_surface_dst
= identity_surface(_dst
);
654 struct pipe_context
*pipe
= id_pipe
->pipe
;
655 struct pipe_surface
*dst
= id_surface_dst
->surface
;
657 pipe
->clear_render_target(pipe
,
666 identity_clear_depth_stencil(struct pipe_context
*_pipe
,
667 struct pipe_surface
*_dst
,
668 unsigned clear_flags
,
671 unsigned dstx
, unsigned dsty
,
672 unsigned width
, unsigned height
)
674 struct identity_context
*id_pipe
= identity_context(_pipe
);
675 struct identity_surface
*id_surface_dst
= identity_surface(_dst
);
676 struct pipe_context
*pipe
= id_pipe
->pipe
;
677 struct pipe_surface
*dst
= id_surface_dst
->surface
;
679 pipe
->clear_depth_stencil(pipe
,
692 identity_flush(struct pipe_context
*_pipe
,
693 struct pipe_fence_handle
**fence
,
696 struct identity_context
*id_pipe
= identity_context(_pipe
);
697 struct pipe_context
*pipe
= id_pipe
->pipe
;
699 pipe
->flush(pipe
, fence
, flags
);
702 static struct pipe_sampler_view
*
703 identity_context_create_sampler_view(struct pipe_context
*_pipe
,
704 struct pipe_resource
*_resource
,
705 const struct pipe_sampler_view
*templ
)
707 struct identity_context
*id_context
= identity_context(_pipe
);
708 struct identity_resource
*id_resource
= identity_resource(_resource
);
709 struct pipe_context
*pipe
= id_context
->pipe
;
710 struct pipe_resource
*resource
= id_resource
->resource
;
711 struct pipe_sampler_view
*result
;
713 result
= pipe
->create_sampler_view(pipe
,
718 return identity_sampler_view_create(id_context
, id_resource
, result
);
723 identity_context_sampler_view_destroy(struct pipe_context
*_pipe
,
724 struct pipe_sampler_view
*_view
)
726 identity_sampler_view_destroy(identity_context(_pipe
),
727 identity_sampler_view(_view
));
730 static struct pipe_surface
*
731 identity_context_create_surface(struct pipe_context
*_pipe
,
732 struct pipe_resource
*_resource
,
733 const struct pipe_surface
*templ
)
735 struct identity_context
*id_context
= identity_context(_pipe
);
736 struct identity_resource
*id_resource
= identity_resource(_resource
);
737 struct pipe_context
*pipe
= id_context
->pipe
;
738 struct pipe_resource
*resource
= id_resource
->resource
;
739 struct pipe_surface
*result
;
741 result
= pipe
->create_surface(pipe
,
746 return identity_surface_create(id_context
, id_resource
, result
);
751 identity_context_surface_destroy(struct pipe_context
*_pipe
,
752 struct pipe_surface
*_surf
)
754 identity_surface_destroy(identity_context(_pipe
),
755 identity_surface(_surf
));
759 identity_context_transfer_map(struct pipe_context
*_context
,
760 struct pipe_resource
*_resource
,
763 const struct pipe_box
*box
,
764 struct pipe_transfer
**transfer
)
766 struct identity_context
*id_context
= identity_context(_context
);
767 struct identity_resource
*id_resource
= identity_resource(_resource
);
768 struct pipe_context
*context
= id_context
->pipe
;
769 struct pipe_resource
*resource
= id_resource
->resource
;
770 struct pipe_transfer
*result
;
773 map
= context
->transfer_map(context
,
782 *transfer
= identity_transfer_map(id_context
, id_resource
, result
);
783 return *transfer
? map
: NULL
;
787 identity_context_transfer_flush_region(struct pipe_context
*_context
,
788 struct pipe_transfer
*_transfer
,
789 const struct pipe_box
*box
)
791 struct identity_context
*id_context
= identity_context(_context
);
792 struct identity_transfer
*id_transfer
= identity_transfer(_transfer
);
793 struct pipe_context
*context
= id_context
->pipe
;
794 struct pipe_transfer
*transfer
= id_transfer
->transfer
;
796 context
->transfer_flush_region(context
,
803 identity_context_transfer_unmap(struct pipe_context
*_context
,
804 struct pipe_transfer
*_transfer
)
806 struct identity_context
*id_context
= identity_context(_context
);
807 struct identity_transfer
*id_transfer
= identity_transfer(_transfer
);
808 struct pipe_context
*context
= id_context
->pipe
;
809 struct pipe_transfer
*transfer
= id_transfer
->transfer
;
811 context
->transfer_unmap(context
,
814 identity_transfer_destroy(identity_context(_context
),
815 identity_transfer(_transfer
));
820 identity_context_transfer_inline_write(struct pipe_context
*_context
,
821 struct pipe_resource
*_resource
,
824 const struct pipe_box
*box
,
827 unsigned layer_stride
)
829 struct identity_context
*id_context
= identity_context(_context
);
830 struct identity_resource
*id_resource
= identity_resource(_resource
);
831 struct pipe_context
*context
= id_context
->pipe
;
832 struct pipe_resource
*resource
= id_resource
->resource
;
834 context
->transfer_inline_write(context
,
845 struct pipe_context
*
846 identity_context_create(struct pipe_screen
*_screen
, struct pipe_context
*pipe
)
848 struct identity_context
*id_pipe
;
849 (void)identity_screen(_screen
);
851 id_pipe
= CALLOC_STRUCT(identity_context
);
856 id_pipe
->base
.screen
= _screen
;
857 id_pipe
->base
.priv
= pipe
->priv
; /* expose wrapped data */
858 id_pipe
->base
.draw
= NULL
;
860 id_pipe
->base
.destroy
= identity_destroy
;
861 id_pipe
->base
.draw_vbo
= identity_draw_vbo
;
862 id_pipe
->base
.create_query
= identity_create_query
;
863 id_pipe
->base
.destroy_query
= identity_destroy_query
;
864 id_pipe
->base
.begin_query
= identity_begin_query
;
865 id_pipe
->base
.end_query
= identity_end_query
;
866 id_pipe
->base
.get_query_result
= identity_get_query_result
;
867 id_pipe
->base
.create_blend_state
= identity_create_blend_state
;
868 id_pipe
->base
.bind_blend_state
= identity_bind_blend_state
;
869 id_pipe
->base
.delete_blend_state
= identity_delete_blend_state
;
870 id_pipe
->base
.create_sampler_state
= identity_create_sampler_state
;
871 id_pipe
->base
.bind_sampler_states
= identity_bind_sampler_states
;
872 id_pipe
->base
.delete_sampler_state
= identity_delete_sampler_state
;
873 id_pipe
->base
.create_rasterizer_state
= identity_create_rasterizer_state
;
874 id_pipe
->base
.bind_rasterizer_state
= identity_bind_rasterizer_state
;
875 id_pipe
->base
.delete_rasterizer_state
= identity_delete_rasterizer_state
;
876 id_pipe
->base
.create_depth_stencil_alpha_state
= identity_create_depth_stencil_alpha_state
;
877 id_pipe
->base
.bind_depth_stencil_alpha_state
= identity_bind_depth_stencil_alpha_state
;
878 id_pipe
->base
.delete_depth_stencil_alpha_state
= identity_delete_depth_stencil_alpha_state
;
879 id_pipe
->base
.create_fs_state
= identity_create_fs_state
;
880 id_pipe
->base
.bind_fs_state
= identity_bind_fs_state
;
881 id_pipe
->base
.delete_fs_state
= identity_delete_fs_state
;
882 id_pipe
->base
.create_vs_state
= identity_create_vs_state
;
883 id_pipe
->base
.bind_vs_state
= identity_bind_vs_state
;
884 id_pipe
->base
.delete_vs_state
= identity_delete_vs_state
;
885 id_pipe
->base
.create_vertex_elements_state
= identity_create_vertex_elements_state
;
886 id_pipe
->base
.bind_vertex_elements_state
= identity_bind_vertex_elements_state
;
887 id_pipe
->base
.delete_vertex_elements_state
= identity_delete_vertex_elements_state
;
888 id_pipe
->base
.set_blend_color
= identity_set_blend_color
;
889 id_pipe
->base
.set_stencil_ref
= identity_set_stencil_ref
;
890 id_pipe
->base
.set_clip_state
= identity_set_clip_state
;
891 id_pipe
->base
.set_sample_mask
= identity_set_sample_mask
;
892 id_pipe
->base
.set_constant_buffer
= identity_set_constant_buffer
;
893 id_pipe
->base
.set_framebuffer_state
= identity_set_framebuffer_state
;
894 id_pipe
->base
.set_polygon_stipple
= identity_set_polygon_stipple
;
895 id_pipe
->base
.set_scissor_states
= identity_set_scissor_states
;
896 id_pipe
->base
.set_viewport_states
= identity_set_viewport_states
;
897 id_pipe
->base
.set_fragment_sampler_views
= identity_set_fragment_sampler_views
;
898 id_pipe
->base
.set_vertex_sampler_views
= identity_set_vertex_sampler_views
;
899 id_pipe
->base
.set_vertex_buffers
= identity_set_vertex_buffers
;
900 id_pipe
->base
.set_index_buffer
= identity_set_index_buffer
;
901 id_pipe
->base
.resource_copy_region
= identity_resource_copy_region
;
902 id_pipe
->base
.clear
= identity_clear
;
903 id_pipe
->base
.clear_render_target
= identity_clear_render_target
;
904 id_pipe
->base
.clear_depth_stencil
= identity_clear_depth_stencil
;
905 id_pipe
->base
.flush
= identity_flush
;
906 id_pipe
->base
.create_surface
= identity_context_create_surface
;
907 id_pipe
->base
.surface_destroy
= identity_context_surface_destroy
;
908 id_pipe
->base
.create_sampler_view
= identity_context_create_sampler_view
;
909 id_pipe
->base
.sampler_view_destroy
= identity_context_sampler_view_destroy
;
910 id_pipe
->base
.transfer_map
= identity_context_transfer_map
;
911 id_pipe
->base
.transfer_unmap
= identity_context_transfer_unmap
;
912 id_pipe
->base
.transfer_flush_region
= identity_context_transfer_flush_region
;
913 id_pipe
->base
.transfer_inline_write
= identity_context_transfer_inline_write
;
914 id_pipe
->base
.blit
= identity_blit
;
915 id_pipe
->base
.flush_resource
= identity_flush_resource
;
917 id_pipe
->pipe
= pipe
;
919 return &id_pipe
->base
;