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
,
63 struct identity_context
*id_pipe
= identity_context(_pipe
);
64 struct pipe_context
*pipe
= id_pipe
->pipe
;
66 return pipe
->create_query(pipe
,
72 identity_destroy_query(struct pipe_context
*_pipe
,
73 struct pipe_query
*query
)
75 struct identity_context
*id_pipe
= identity_context(_pipe
);
76 struct pipe_context
*pipe
= id_pipe
->pipe
;
78 pipe
->destroy_query(pipe
,
83 identity_begin_query(struct pipe_context
*_pipe
,
84 struct pipe_query
*query
)
86 struct identity_context
*id_pipe
= identity_context(_pipe
);
87 struct pipe_context
*pipe
= id_pipe
->pipe
;
89 pipe
->begin_query(pipe
,
94 identity_end_query(struct pipe_context
*_pipe
,
95 struct pipe_query
*query
)
97 struct identity_context
*id_pipe
= identity_context(_pipe
);
98 struct pipe_context
*pipe
= id_pipe
->pipe
;
100 pipe
->end_query(pipe
,
105 identity_get_query_result(struct pipe_context
*_pipe
,
106 struct pipe_query
*query
,
108 union pipe_query_result
*result
)
110 struct identity_context
*id_pipe
= identity_context(_pipe
);
111 struct pipe_context
*pipe
= id_pipe
->pipe
;
113 return pipe
->get_query_result(pipe
,
120 identity_create_blend_state(struct pipe_context
*_pipe
,
121 const struct pipe_blend_state
*blend
)
123 struct identity_context
*id_pipe
= identity_context(_pipe
);
124 struct pipe_context
*pipe
= id_pipe
->pipe
;
126 return pipe
->create_blend_state(pipe
,
131 identity_bind_blend_state(struct pipe_context
*_pipe
,
134 struct identity_context
*id_pipe
= identity_context(_pipe
);
135 struct pipe_context
*pipe
= id_pipe
->pipe
;
137 pipe
->bind_blend_state(pipe
,
142 identity_delete_blend_state(struct pipe_context
*_pipe
,
145 struct identity_context
*id_pipe
= identity_context(_pipe
);
146 struct pipe_context
*pipe
= id_pipe
->pipe
;
148 pipe
->delete_blend_state(pipe
,
153 identity_create_sampler_state(struct pipe_context
*_pipe
,
154 const struct pipe_sampler_state
*sampler
)
156 struct identity_context
*id_pipe
= identity_context(_pipe
);
157 struct pipe_context
*pipe
= id_pipe
->pipe
;
159 return pipe
->create_sampler_state(pipe
,
164 identity_bind_sampler_states(struct pipe_context
*_pipe
,
167 unsigned num_samplers
,
170 struct identity_context
*id_pipe
= identity_context(_pipe
);
171 struct pipe_context
*pipe
= id_pipe
->pipe
;
173 pipe
->bind_sampler_states(pipe
, shader
, start
, num_samplers
, samplers
);
177 identity_delete_sampler_state(struct pipe_context
*_pipe
,
180 struct identity_context
*id_pipe
= identity_context(_pipe
);
181 struct pipe_context
*pipe
= id_pipe
->pipe
;
183 pipe
->delete_sampler_state(pipe
,
188 identity_create_rasterizer_state(struct pipe_context
*_pipe
,
189 const struct pipe_rasterizer_state
*rasterizer
)
191 struct identity_context
*id_pipe
= identity_context(_pipe
);
192 struct pipe_context
*pipe
= id_pipe
->pipe
;
194 return pipe
->create_rasterizer_state(pipe
,
199 identity_bind_rasterizer_state(struct pipe_context
*_pipe
,
202 struct identity_context
*id_pipe
= identity_context(_pipe
);
203 struct pipe_context
*pipe
= id_pipe
->pipe
;
205 pipe
->bind_rasterizer_state(pipe
,
210 identity_delete_rasterizer_state(struct pipe_context
*_pipe
,
213 struct identity_context
*id_pipe
= identity_context(_pipe
);
214 struct pipe_context
*pipe
= id_pipe
->pipe
;
216 pipe
->delete_rasterizer_state(pipe
,
221 identity_create_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
222 const struct pipe_depth_stencil_alpha_state
*depth_stencil_alpha
)
224 struct identity_context
*id_pipe
= identity_context(_pipe
);
225 struct pipe_context
*pipe
= id_pipe
->pipe
;
227 return pipe
->create_depth_stencil_alpha_state(pipe
,
228 depth_stencil_alpha
);
232 identity_bind_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
233 void *depth_stencil_alpha
)
235 struct identity_context
*id_pipe
= identity_context(_pipe
);
236 struct pipe_context
*pipe
= id_pipe
->pipe
;
238 pipe
->bind_depth_stencil_alpha_state(pipe
,
239 depth_stencil_alpha
);
243 identity_delete_depth_stencil_alpha_state(struct pipe_context
*_pipe
,
244 void *depth_stencil_alpha
)
246 struct identity_context
*id_pipe
= identity_context(_pipe
);
247 struct pipe_context
*pipe
= id_pipe
->pipe
;
249 pipe
->delete_depth_stencil_alpha_state(pipe
,
250 depth_stencil_alpha
);
254 identity_create_fs_state(struct pipe_context
*_pipe
,
255 const struct pipe_shader_state
*fs
)
257 struct identity_context
*id_pipe
= identity_context(_pipe
);
258 struct pipe_context
*pipe
= id_pipe
->pipe
;
260 return pipe
->create_fs_state(pipe
,
265 identity_bind_fs_state(struct pipe_context
*_pipe
,
268 struct identity_context
*id_pipe
= identity_context(_pipe
);
269 struct pipe_context
*pipe
= id_pipe
->pipe
;
271 pipe
->bind_fs_state(pipe
,
276 identity_delete_fs_state(struct pipe_context
*_pipe
,
279 struct identity_context
*id_pipe
= identity_context(_pipe
);
280 struct pipe_context
*pipe
= id_pipe
->pipe
;
282 pipe
->delete_fs_state(pipe
,
287 identity_create_vs_state(struct pipe_context
*_pipe
,
288 const struct pipe_shader_state
*vs
)
290 struct identity_context
*id_pipe
= identity_context(_pipe
);
291 struct pipe_context
*pipe
= id_pipe
->pipe
;
293 return pipe
->create_vs_state(pipe
,
298 identity_bind_vs_state(struct pipe_context
*_pipe
,
301 struct identity_context
*id_pipe
= identity_context(_pipe
);
302 struct pipe_context
*pipe
= id_pipe
->pipe
;
304 pipe
->bind_vs_state(pipe
,
309 identity_delete_vs_state(struct pipe_context
*_pipe
,
312 struct identity_context
*id_pipe
= identity_context(_pipe
);
313 struct pipe_context
*pipe
= id_pipe
->pipe
;
315 pipe
->delete_vs_state(pipe
,
321 identity_create_vertex_elements_state(struct pipe_context
*_pipe
,
322 unsigned num_elements
,
323 const struct pipe_vertex_element
*vertex_elements
)
325 struct identity_context
*id_pipe
= identity_context(_pipe
);
326 struct pipe_context
*pipe
= id_pipe
->pipe
;
328 return pipe
->create_vertex_elements_state(pipe
,
334 identity_bind_vertex_elements_state(struct pipe_context
*_pipe
,
337 struct identity_context
*id_pipe
= identity_context(_pipe
);
338 struct pipe_context
*pipe
= id_pipe
->pipe
;
340 pipe
->bind_vertex_elements_state(pipe
,
345 identity_delete_vertex_elements_state(struct pipe_context
*_pipe
,
348 struct identity_context
*id_pipe
= identity_context(_pipe
);
349 struct pipe_context
*pipe
= id_pipe
->pipe
;
351 pipe
->delete_vertex_elements_state(pipe
,
356 identity_set_blend_color(struct pipe_context
*_pipe
,
357 const struct pipe_blend_color
*blend_color
)
359 struct identity_context
*id_pipe
= identity_context(_pipe
);
360 struct pipe_context
*pipe
= id_pipe
->pipe
;
362 pipe
->set_blend_color(pipe
,
367 identity_set_stencil_ref(struct pipe_context
*_pipe
,
368 const struct pipe_stencil_ref
*stencil_ref
)
370 struct identity_context
*id_pipe
= identity_context(_pipe
);
371 struct pipe_context
*pipe
= id_pipe
->pipe
;
373 pipe
->set_stencil_ref(pipe
,
378 identity_set_clip_state(struct pipe_context
*_pipe
,
379 const struct pipe_clip_state
*clip
)
381 struct identity_context
*id_pipe
= identity_context(_pipe
);
382 struct pipe_context
*pipe
= id_pipe
->pipe
;
384 pipe
->set_clip_state(pipe
,
389 identity_set_sample_mask(struct pipe_context
*_pipe
,
390 unsigned sample_mask
)
392 struct identity_context
*id_pipe
= identity_context(_pipe
);
393 struct pipe_context
*pipe
= id_pipe
->pipe
;
395 pipe
->set_sample_mask(pipe
,
400 identity_set_constant_buffer(struct pipe_context
*_pipe
,
403 struct pipe_constant_buffer
*_cb
)
405 struct identity_context
*id_pipe
= identity_context(_pipe
);
406 struct pipe_context
*pipe
= id_pipe
->pipe
;
407 struct pipe_constant_buffer cb
;
409 /* XXX hmm? unwrap the input state */
412 cb
.buffer
= identity_resource_unwrap(_cb
->buffer
);
415 pipe
->set_constant_buffer(pipe
,
422 identity_set_framebuffer_state(struct pipe_context
*_pipe
,
423 const struct pipe_framebuffer_state
*_state
)
425 struct identity_context
*id_pipe
= identity_context(_pipe
);
426 struct pipe_context
*pipe
= id_pipe
->pipe
;
427 struct pipe_framebuffer_state unwrapped_state
;
428 struct pipe_framebuffer_state
*state
= NULL
;
431 /* unwrap the input state */
433 memcpy(&unwrapped_state
, _state
, sizeof(unwrapped_state
));
434 for(i
= 0; i
< _state
->nr_cbufs
; i
++)
435 unwrapped_state
.cbufs
[i
] = identity_surface_unwrap(_state
->cbufs
[i
]);
436 for (; i
< PIPE_MAX_COLOR_BUFS
; i
++)
437 unwrapped_state
.cbufs
[i
] = NULL
;
438 unwrapped_state
.zsbuf
= identity_surface_unwrap(_state
->zsbuf
);
439 state
= &unwrapped_state
;
442 pipe
->set_framebuffer_state(pipe
,
447 identity_set_polygon_stipple(struct pipe_context
*_pipe
,
448 const struct pipe_poly_stipple
*poly_stipple
)
450 struct identity_context
*id_pipe
= identity_context(_pipe
);
451 struct pipe_context
*pipe
= id_pipe
->pipe
;
453 pipe
->set_polygon_stipple(pipe
,
458 identity_set_scissor_states(struct pipe_context
*_pipe
,
460 unsigned num_scissors
,
461 const struct pipe_scissor_state
*scissor
)
463 struct identity_context
*id_pipe
= identity_context(_pipe
);
464 struct pipe_context
*pipe
= id_pipe
->pipe
;
466 pipe
->set_scissor_states(pipe
, start_slot
, num_scissors
, scissor
);
470 identity_set_viewport_states(struct pipe_context
*_pipe
,
472 unsigned num_viewports
,
473 const struct pipe_viewport_state
*viewport
)
475 struct identity_context
*id_pipe
= identity_context(_pipe
);
476 struct pipe_context
*pipe
= id_pipe
->pipe
;
478 pipe
->set_viewport_states(pipe
, start_slot
, num_viewports
, viewport
);
482 identity_set_sampler_views(struct pipe_context
*_pipe
,
486 struct pipe_sampler_view
**_views
)
488 struct identity_context
*id_pipe
= identity_context(_pipe
);
489 struct pipe_context
*pipe
= id_pipe
->pipe
;
490 struct pipe_sampler_view
*unwrapped_views
[PIPE_MAX_SHADER_SAMPLER_VIEWS
];
493 for (i
= 0; i
< num
; i
++)
494 unwrapped_views
[i
] = identity_sampler_view_unwrap(_views
[i
]);
496 pipe
->set_sampler_views(pipe
, shader
, start
, num
, unwrapped_views
);
500 identity_set_vertex_buffers(struct pipe_context
*_pipe
,
501 unsigned start_slot
, unsigned num_buffers
,
502 const struct pipe_vertex_buffer
*_buffers
)
504 struct identity_context
*id_pipe
= identity_context(_pipe
);
505 struct pipe_context
*pipe
= id_pipe
->pipe
;
506 struct pipe_vertex_buffer unwrapped_buffers
[PIPE_MAX_SHADER_INPUTS
];
507 struct pipe_vertex_buffer
*buffers
= NULL
;
511 memcpy(unwrapped_buffers
, _buffers
, num_buffers
* sizeof(*_buffers
));
512 for (i
= 0; i
< num_buffers
; i
++)
513 unwrapped_buffers
[i
].buffer
= identity_resource_unwrap(_buffers
[i
].buffer
);
514 buffers
= unwrapped_buffers
;
517 pipe
->set_vertex_buffers(pipe
,
518 start_slot
, num_buffers
,
523 identity_set_index_buffer(struct pipe_context
*_pipe
,
524 const struct pipe_index_buffer
*_ib
)
526 struct identity_context
*id_pipe
= identity_context(_pipe
);
527 struct pipe_context
*pipe
= id_pipe
->pipe
;
528 struct pipe_index_buffer unwrapped_ib
, *ib
= NULL
;
532 unwrapped_ib
.buffer
= identity_resource_unwrap(_ib
->buffer
);
536 pipe
->set_index_buffer(pipe
, ib
);
540 identity_resource_copy_region(struct pipe_context
*_pipe
,
541 struct pipe_resource
*_dst
,
546 struct pipe_resource
*_src
,
548 const struct pipe_box
*src_box
)
550 struct identity_context
*id_pipe
= identity_context(_pipe
);
551 struct identity_resource
*id_resource_dst
= identity_resource(_dst
);
552 struct identity_resource
*id_resource_src
= identity_resource(_src
);
553 struct pipe_context
*pipe
= id_pipe
->pipe
;
554 struct pipe_resource
*dst
= id_resource_dst
->resource
;
555 struct pipe_resource
*src
= id_resource_src
->resource
;
557 pipe
->resource_copy_region(pipe
,
569 identity_blit(struct pipe_context
*_pipe
,
570 const struct pipe_blit_info
*info
)
572 struct identity_context
*id_pipe
= identity_context(_pipe
);
573 struct pipe_context
*pipe
= id_pipe
->pipe
;
574 struct pipe_blit_info blit
= *info
;
576 blit
.src
.resource
= identity_resource(blit
.src
.resource
)->resource
;
577 blit
.dst
.resource
= identity_resource(blit
.dst
.resource
)->resource
;
579 pipe
->blit(pipe
, &blit
);
583 identity_flush_resource(struct pipe_context
*_pipe
,
584 struct pipe_resource
*resource
)
586 struct identity_context
*id_pipe
= identity_context(_pipe
);
587 struct pipe_context
*pipe
= id_pipe
->pipe
;
589 pipe
->flush_resource(pipe
, resource
);
593 identity_clear(struct pipe_context
*_pipe
,
595 const union pipe_color_union
*color
,
599 struct identity_context
*id_pipe
= identity_context(_pipe
);
600 struct pipe_context
*pipe
= id_pipe
->pipe
;
610 identity_clear_render_target(struct pipe_context
*_pipe
,
611 struct pipe_surface
*_dst
,
612 const union pipe_color_union
*color
,
613 unsigned dstx
, unsigned dsty
,
614 unsigned width
, unsigned height
)
616 struct identity_context
*id_pipe
= identity_context(_pipe
);
617 struct identity_surface
*id_surface_dst
= identity_surface(_dst
);
618 struct pipe_context
*pipe
= id_pipe
->pipe
;
619 struct pipe_surface
*dst
= id_surface_dst
->surface
;
621 pipe
->clear_render_target(pipe
,
630 identity_clear_depth_stencil(struct pipe_context
*_pipe
,
631 struct pipe_surface
*_dst
,
632 unsigned clear_flags
,
635 unsigned dstx
, unsigned dsty
,
636 unsigned width
, unsigned height
)
638 struct identity_context
*id_pipe
= identity_context(_pipe
);
639 struct identity_surface
*id_surface_dst
= identity_surface(_dst
);
640 struct pipe_context
*pipe
= id_pipe
->pipe
;
641 struct pipe_surface
*dst
= id_surface_dst
->surface
;
643 pipe
->clear_depth_stencil(pipe
,
656 identity_flush(struct pipe_context
*_pipe
,
657 struct pipe_fence_handle
**fence
,
660 struct identity_context
*id_pipe
= identity_context(_pipe
);
661 struct pipe_context
*pipe
= id_pipe
->pipe
;
663 pipe
->flush(pipe
, fence
, flags
);
666 static struct pipe_sampler_view
*
667 identity_context_create_sampler_view(struct pipe_context
*_pipe
,
668 struct pipe_resource
*_resource
,
669 const struct pipe_sampler_view
*templ
)
671 struct identity_context
*id_context
= identity_context(_pipe
);
672 struct identity_resource
*id_resource
= identity_resource(_resource
);
673 struct pipe_context
*pipe
= id_context
->pipe
;
674 struct pipe_resource
*resource
= id_resource
->resource
;
675 struct pipe_sampler_view
*result
;
677 result
= pipe
->create_sampler_view(pipe
,
682 return identity_sampler_view_create(id_context
, id_resource
, result
);
687 identity_context_sampler_view_destroy(struct pipe_context
*_pipe
,
688 struct pipe_sampler_view
*_view
)
690 identity_sampler_view_destroy(identity_context(_pipe
),
691 identity_sampler_view(_view
));
694 static struct pipe_surface
*
695 identity_context_create_surface(struct pipe_context
*_pipe
,
696 struct pipe_resource
*_resource
,
697 const struct pipe_surface
*templ
)
699 struct identity_context
*id_context
= identity_context(_pipe
);
700 struct identity_resource
*id_resource
= identity_resource(_resource
);
701 struct pipe_context
*pipe
= id_context
->pipe
;
702 struct pipe_resource
*resource
= id_resource
->resource
;
703 struct pipe_surface
*result
;
705 result
= pipe
->create_surface(pipe
,
710 return identity_surface_create(id_context
, id_resource
, result
);
715 identity_context_surface_destroy(struct pipe_context
*_pipe
,
716 struct pipe_surface
*_surf
)
718 identity_surface_destroy(identity_context(_pipe
),
719 identity_surface(_surf
));
723 identity_context_transfer_map(struct pipe_context
*_context
,
724 struct pipe_resource
*_resource
,
727 const struct pipe_box
*box
,
728 struct pipe_transfer
**transfer
)
730 struct identity_context
*id_context
= identity_context(_context
);
731 struct identity_resource
*id_resource
= identity_resource(_resource
);
732 struct pipe_context
*context
= id_context
->pipe
;
733 struct pipe_resource
*resource
= id_resource
->resource
;
734 struct pipe_transfer
*result
;
737 map
= context
->transfer_map(context
,
746 *transfer
= identity_transfer_map(id_context
, id_resource
, result
);
747 return *transfer
? map
: NULL
;
751 identity_context_transfer_flush_region(struct pipe_context
*_context
,
752 struct pipe_transfer
*_transfer
,
753 const struct pipe_box
*box
)
755 struct identity_context
*id_context
= identity_context(_context
);
756 struct identity_transfer
*id_transfer
= identity_transfer(_transfer
);
757 struct pipe_context
*context
= id_context
->pipe
;
758 struct pipe_transfer
*transfer
= id_transfer
->transfer
;
760 context
->transfer_flush_region(context
,
767 identity_context_transfer_unmap(struct pipe_context
*_context
,
768 struct pipe_transfer
*_transfer
)
770 struct identity_context
*id_context
= identity_context(_context
);
771 struct identity_transfer
*id_transfer
= identity_transfer(_transfer
);
772 struct pipe_context
*context
= id_context
->pipe
;
773 struct pipe_transfer
*transfer
= id_transfer
->transfer
;
775 context
->transfer_unmap(context
,
778 identity_transfer_destroy(identity_context(_context
),
779 identity_transfer(_transfer
));
784 identity_context_transfer_inline_write(struct pipe_context
*_context
,
785 struct pipe_resource
*_resource
,
788 const struct pipe_box
*box
,
791 unsigned layer_stride
)
793 struct identity_context
*id_context
= identity_context(_context
);
794 struct identity_resource
*id_resource
= identity_resource(_resource
);
795 struct pipe_context
*context
= id_context
->pipe
;
796 struct pipe_resource
*resource
= id_resource
->resource
;
798 context
->transfer_inline_write(context
,
809 struct pipe_context
*
810 identity_context_create(struct pipe_screen
*_screen
, struct pipe_context
*pipe
)
812 struct identity_context
*id_pipe
;
813 (void)identity_screen(_screen
);
815 id_pipe
= CALLOC_STRUCT(identity_context
);
820 id_pipe
->base
.screen
= _screen
;
821 id_pipe
->base
.priv
= pipe
->priv
; /* expose wrapped data */
822 id_pipe
->base
.draw
= NULL
;
824 id_pipe
->base
.destroy
= identity_destroy
;
825 id_pipe
->base
.draw_vbo
= identity_draw_vbo
;
826 id_pipe
->base
.create_query
= identity_create_query
;
827 id_pipe
->base
.destroy_query
= identity_destroy_query
;
828 id_pipe
->base
.begin_query
= identity_begin_query
;
829 id_pipe
->base
.end_query
= identity_end_query
;
830 id_pipe
->base
.get_query_result
= identity_get_query_result
;
831 id_pipe
->base
.create_blend_state
= identity_create_blend_state
;
832 id_pipe
->base
.bind_blend_state
= identity_bind_blend_state
;
833 id_pipe
->base
.delete_blend_state
= identity_delete_blend_state
;
834 id_pipe
->base
.create_sampler_state
= identity_create_sampler_state
;
835 id_pipe
->base
.bind_sampler_states
= identity_bind_sampler_states
;
836 id_pipe
->base
.delete_sampler_state
= identity_delete_sampler_state
;
837 id_pipe
->base
.create_rasterizer_state
= identity_create_rasterizer_state
;
838 id_pipe
->base
.bind_rasterizer_state
= identity_bind_rasterizer_state
;
839 id_pipe
->base
.delete_rasterizer_state
= identity_delete_rasterizer_state
;
840 id_pipe
->base
.create_depth_stencil_alpha_state
= identity_create_depth_stencil_alpha_state
;
841 id_pipe
->base
.bind_depth_stencil_alpha_state
= identity_bind_depth_stencil_alpha_state
;
842 id_pipe
->base
.delete_depth_stencil_alpha_state
= identity_delete_depth_stencil_alpha_state
;
843 id_pipe
->base
.create_fs_state
= identity_create_fs_state
;
844 id_pipe
->base
.bind_fs_state
= identity_bind_fs_state
;
845 id_pipe
->base
.delete_fs_state
= identity_delete_fs_state
;
846 id_pipe
->base
.create_vs_state
= identity_create_vs_state
;
847 id_pipe
->base
.bind_vs_state
= identity_bind_vs_state
;
848 id_pipe
->base
.delete_vs_state
= identity_delete_vs_state
;
849 id_pipe
->base
.create_vertex_elements_state
= identity_create_vertex_elements_state
;
850 id_pipe
->base
.bind_vertex_elements_state
= identity_bind_vertex_elements_state
;
851 id_pipe
->base
.delete_vertex_elements_state
= identity_delete_vertex_elements_state
;
852 id_pipe
->base
.set_blend_color
= identity_set_blend_color
;
853 id_pipe
->base
.set_stencil_ref
= identity_set_stencil_ref
;
854 id_pipe
->base
.set_clip_state
= identity_set_clip_state
;
855 id_pipe
->base
.set_sample_mask
= identity_set_sample_mask
;
856 id_pipe
->base
.set_constant_buffer
= identity_set_constant_buffer
;
857 id_pipe
->base
.set_framebuffer_state
= identity_set_framebuffer_state
;
858 id_pipe
->base
.set_polygon_stipple
= identity_set_polygon_stipple
;
859 id_pipe
->base
.set_scissor_states
= identity_set_scissor_states
;
860 id_pipe
->base
.set_viewport_states
= identity_set_viewport_states
;
861 id_pipe
->base
.set_sampler_views
= identity_set_sampler_views
;
862 id_pipe
->base
.set_vertex_buffers
= identity_set_vertex_buffers
;
863 id_pipe
->base
.set_index_buffer
= identity_set_index_buffer
;
864 id_pipe
->base
.resource_copy_region
= identity_resource_copy_region
;
865 id_pipe
->base
.clear
= identity_clear
;
866 id_pipe
->base
.clear_render_target
= identity_clear_render_target
;
867 id_pipe
->base
.clear_depth_stencil
= identity_clear_depth_stencil
;
868 id_pipe
->base
.flush
= identity_flush
;
869 id_pipe
->base
.create_surface
= identity_context_create_surface
;
870 id_pipe
->base
.surface_destroy
= identity_context_surface_destroy
;
871 id_pipe
->base
.create_sampler_view
= identity_context_create_sampler_view
;
872 id_pipe
->base
.sampler_view_destroy
= identity_context_sampler_view_destroy
;
873 id_pipe
->base
.transfer_map
= identity_context_transfer_map
;
874 id_pipe
->base
.transfer_unmap
= identity_context_transfer_unmap
;
875 id_pipe
->base
.transfer_flush_region
= identity_context_transfer_flush_region
;
876 id_pipe
->base
.transfer_inline_write
= identity_context_transfer_inline_write
;
877 id_pipe
->base
.blit
= identity_blit
;
878 id_pipe
->base
.flush_resource
= identity_flush_resource
;
880 id_pipe
->pipe
= pipe
;
882 return &id_pipe
->base
;