1 /**************************************************************************
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
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 TUNGSTEN GRAPHICS 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 **************************************************************************/
28 /* Authors: Keith Whitwell <keith@tungstengraphics.com>
31 #include "util/u_inlines.h"
32 #include "util/u_memory.h"
34 #include "fo_context.h"
37 /* This looks like a lot of work at the moment - we're keeping a
38 * duplicate copy of the state up-to-date.
40 * This can change in two ways:
41 * - With constant state objects we would only need to save a pointer,
42 * not the whole object.
43 * - By adding a callback in the state tracker to re-emit state. The
44 * state tracker knows the current state already and can re-emit it
45 * without additional complexity.
47 * This works as a proof-of-concept, but a final version will have
54 failover_create_blend_state( struct pipe_context
*pipe
,
55 const struct pipe_blend_state
*blend
)
57 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
58 struct failover_context
*failover
= failover_context(pipe
);
60 state
->sw_state
= failover
->sw
->create_blend_state(failover
->sw
, blend
);
61 state
->hw_state
= failover
->hw
->create_blend_state(failover
->hw
, blend
);
67 failover_bind_blend_state( struct pipe_context
*pipe
,
70 struct failover_context
*failover
= failover_context(pipe
);
71 struct fo_state
*state
= (struct fo_state
*)blend
;
72 failover
->blend
= state
;
73 failover
->dirty
|= FO_NEW_BLEND
;
74 failover
->sw
->bind_blend_state( failover
->sw
, state
->sw_state
);
75 failover
->hw
->bind_blend_state( failover
->hw
, state
->hw_state
);
79 failover_delete_blend_state( struct pipe_context
*pipe
,
82 struct fo_state
*state
= (struct fo_state
*)blend
;
83 struct failover_context
*failover
= failover_context(pipe
);
85 failover
->sw
->delete_blend_state(failover
->sw
, state
->sw_state
);
86 failover
->hw
->delete_blend_state(failover
->hw
, state
->hw_state
);
93 failover_set_blend_color( struct pipe_context
*pipe
,
94 const struct pipe_blend_color
*blend_color
)
96 struct failover_context
*failover
= failover_context(pipe
);
98 failover
->blend_color
= *blend_color
;
99 failover
->dirty
|= FO_NEW_BLEND_COLOR
;
100 failover
->sw
->set_blend_color( failover
->sw
, blend_color
);
101 failover
->hw
->set_blend_color( failover
->hw
, blend_color
);
105 failover_set_stencil_ref( struct pipe_context
*pipe
,
106 const struct pipe_stencil_ref
*stencil_ref
)
108 struct failover_context
*failover
= failover_context(pipe
);
110 failover
->stencil_ref
= *stencil_ref
;
111 failover
->dirty
|= FO_NEW_STENCIL_REF
;
112 failover
->sw
->set_stencil_ref( failover
->sw
, stencil_ref
);
113 failover
->hw
->set_stencil_ref( failover
->hw
, stencil_ref
);
117 failover_set_clip_state( struct pipe_context
*pipe
,
118 const struct pipe_clip_state
*clip
)
120 struct failover_context
*failover
= failover_context(pipe
);
122 failover
->clip
= *clip
;
123 failover
->dirty
|= FO_NEW_CLIP
;
124 failover
->sw
->set_clip_state( failover
->sw
, clip
);
125 failover
->hw
->set_clip_state( failover
->hw
, clip
);
129 failover_set_sample_mask(struct pipe_context
*pipe
,
130 unsigned sample_mask
)
132 struct failover_context
*failover
= failover_context(pipe
);
134 failover
->sample_mask
= sample_mask
;
135 failover
->dirty
|= FO_NEW_SAMPLE_MASK
;
136 failover
->sw
->set_sample_mask( failover
->sw
, sample_mask
);
137 failover
->hw
->set_sample_mask( failover
->hw
, sample_mask
);
143 failover_create_depth_stencil_state(struct pipe_context
*pipe
,
144 const struct pipe_depth_stencil_alpha_state
*templ
)
146 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
147 struct failover_context
*failover
= failover_context(pipe
);
149 state
->sw_state
= failover
->sw
->create_depth_stencil_alpha_state(failover
->sw
, templ
);
150 state
->hw_state
= failover
->hw
->create_depth_stencil_alpha_state(failover
->hw
, templ
);
156 failover_bind_depth_stencil_state(struct pipe_context
*pipe
,
159 struct failover_context
*failover
= failover_context(pipe
);
160 struct fo_state
*state
= (struct fo_state
*)depth_stencil
;
161 failover
->depth_stencil
= state
;
162 failover
->dirty
|= FO_NEW_DEPTH_STENCIL
;
163 failover
->sw
->bind_depth_stencil_alpha_state(failover
->sw
, state
->sw_state
);
164 failover
->hw
->bind_depth_stencil_alpha_state(failover
->hw
, state
->hw_state
);
168 failover_delete_depth_stencil_state(struct pipe_context
*pipe
,
171 struct fo_state
*state
= (struct fo_state
*)ds
;
172 struct failover_context
*failover
= failover_context(pipe
);
174 failover
->sw
->delete_depth_stencil_alpha_state(failover
->sw
, state
->sw_state
);
175 failover
->hw
->delete_depth_stencil_alpha_state(failover
->hw
, state
->hw_state
);
182 failover_set_framebuffer_state(struct pipe_context
*pipe
,
183 const struct pipe_framebuffer_state
*framebuffer
)
185 struct failover_context
*failover
= failover_context(pipe
);
187 failover
->framebuffer
= *framebuffer
;
188 failover
->dirty
|= FO_NEW_FRAMEBUFFER
;
189 failover
->sw
->set_framebuffer_state( failover
->sw
, framebuffer
);
190 failover
->hw
->set_framebuffer_state( failover
->hw
, framebuffer
);
195 failover_create_fs_state(struct pipe_context
*pipe
,
196 const struct pipe_shader_state
*templ
)
198 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
199 struct failover_context
*failover
= failover_context(pipe
);
201 state
->sw_state
= failover
->sw
->create_fs_state(failover
->sw
, templ
);
202 state
->hw_state
= failover
->hw
->create_fs_state(failover
->hw
, templ
);
208 failover_bind_fs_state(struct pipe_context
*pipe
, void *fs
)
210 struct failover_context
*failover
= failover_context(pipe
);
211 struct fo_state
*state
= (struct fo_state
*)fs
;
212 failover
->fragment_shader
= state
;
213 failover
->dirty
|= FO_NEW_FRAGMENT_SHADER
;
214 failover
->sw
->bind_fs_state(failover
->sw
, state
->sw_state
);
215 failover
->hw
->bind_fs_state(failover
->hw
, state
->hw_state
);
219 failover_delete_fs_state(struct pipe_context
*pipe
,
222 struct fo_state
*state
= (struct fo_state
*)fs
;
223 struct failover_context
*failover
= failover_context(pipe
);
225 failover
->sw
->delete_fs_state(failover
->sw
, state
->sw_state
);
226 failover
->hw
->delete_fs_state(failover
->hw
, state
->hw_state
);
233 failover_create_vs_state(struct pipe_context
*pipe
,
234 const struct pipe_shader_state
*templ
)
236 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
237 struct failover_context
*failover
= failover_context(pipe
);
239 state
->sw_state
= failover
->sw
->create_vs_state(failover
->sw
, templ
);
240 state
->hw_state
= failover
->hw
->create_vs_state(failover
->hw
, templ
);
246 failover_bind_vs_state(struct pipe_context
*pipe
,
249 struct failover_context
*failover
= failover_context(pipe
);
251 struct fo_state
*state
= (struct fo_state
*)vs
;
252 failover
->vertex_shader
= state
;
253 failover
->dirty
|= FO_NEW_VERTEX_SHADER
;
254 failover
->sw
->bind_vs_state(failover
->sw
, state
->sw_state
);
255 failover
->hw
->bind_vs_state(failover
->hw
, state
->hw_state
);
259 failover_delete_vs_state(struct pipe_context
*pipe
,
262 struct fo_state
*state
= (struct fo_state
*)vs
;
263 struct failover_context
*failover
= failover_context(pipe
);
265 failover
->sw
->delete_vs_state(failover
->sw
, state
->sw_state
);
266 failover
->hw
->delete_vs_state(failover
->hw
, state
->hw_state
);
275 failover_create_vertex_elements_state( struct pipe_context
*pipe
,
277 const struct pipe_vertex_element
*velems
)
279 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
280 struct failover_context
*failover
= failover_context(pipe
);
282 state
->sw_state
= failover
->sw
->create_vertex_elements_state(failover
->sw
, count
, velems
);
283 state
->hw_state
= failover
->hw
->create_vertex_elements_state(failover
->hw
, count
, velems
);
289 failover_bind_vertex_elements_state(struct pipe_context
*pipe
,
292 struct failover_context
*failover
= failover_context(pipe
);
293 struct fo_state
*state
= (struct fo_state
*)velems
;
295 failover
->vertex_elements
= state
;
296 failover
->dirty
|= FO_NEW_VERTEX_ELEMENT
;
297 failover
->sw
->bind_vertex_elements_state( failover
->sw
, velems
);
298 failover
->hw
->bind_vertex_elements_state( failover
->hw
, velems
);
302 failover_delete_vertex_elements_state( struct pipe_context
*pipe
,
305 struct fo_state
*state
= (struct fo_state
*)velems
;
306 struct failover_context
*failover
= failover_context(pipe
);
308 failover
->sw
->delete_vertex_elements_state(failover
->sw
, state
->sw_state
);
309 failover
->hw
->delete_vertex_elements_state(failover
->hw
, state
->hw_state
);
316 failover_set_polygon_stipple( struct pipe_context
*pipe
,
317 const struct pipe_poly_stipple
*stipple
)
319 struct failover_context
*failover
= failover_context(pipe
);
321 failover
->poly_stipple
= *stipple
;
322 failover
->dirty
|= FO_NEW_STIPPLE
;
323 failover
->sw
->set_polygon_stipple( failover
->sw
, stipple
);
324 failover
->hw
->set_polygon_stipple( failover
->hw
, stipple
);
329 failover_create_rasterizer_state(struct pipe_context
*pipe
,
330 const struct pipe_rasterizer_state
*templ
)
332 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
333 struct failover_context
*failover
= failover_context(pipe
);
335 state
->sw_state
= failover
->sw
->create_rasterizer_state(failover
->sw
, templ
);
336 state
->hw_state
= failover
->hw
->create_rasterizer_state(failover
->hw
, templ
);
342 failover_bind_rasterizer_state(struct pipe_context
*pipe
,
345 struct failover_context
*failover
= failover_context(pipe
);
347 struct fo_state
*state
= (struct fo_state
*)raster
;
348 failover
->rasterizer
= state
;
349 failover
->dirty
|= FO_NEW_RASTERIZER
;
350 failover
->sw
->bind_rasterizer_state(failover
->sw
, state
->sw_state
);
351 failover
->hw
->bind_rasterizer_state(failover
->hw
, state
->hw_state
);
355 failover_delete_rasterizer_state(struct pipe_context
*pipe
,
358 struct fo_state
*state
= (struct fo_state
*)raster
;
359 struct failover_context
*failover
= failover_context(pipe
);
361 failover
->sw
->delete_rasterizer_state(failover
->sw
, state
->sw_state
);
362 failover
->hw
->delete_rasterizer_state(failover
->hw
, state
->hw_state
);
370 failover_set_scissor_state( struct pipe_context
*pipe
,
371 const struct pipe_scissor_state
*scissor
)
373 struct failover_context
*failover
= failover_context(pipe
);
375 failover
->scissor
= *scissor
;
376 failover
->dirty
|= FO_NEW_SCISSOR
;
377 failover
->sw
->set_scissor_state( failover
->sw
, scissor
);
378 failover
->hw
->set_scissor_state( failover
->hw
, scissor
);
383 failover_create_sampler_state(struct pipe_context
*pipe
,
384 const struct pipe_sampler_state
*templ
)
386 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
387 struct failover_context
*failover
= failover_context(pipe
);
389 state
->sw_state
= failover
->sw
->create_sampler_state(failover
->sw
, templ
);
390 state
->hw_state
= failover
->hw
->create_sampler_state(failover
->hw
, templ
);
396 failover_bind_fragment_sampler_states(struct pipe_context
*pipe
,
400 struct failover_context
*failover
= failover_context(pipe
);
401 struct fo_state
*state
= (struct fo_state
*)sampler
;
403 assert(num
<= PIPE_MAX_SAMPLERS
);
404 /* Check for no-op */
405 if (num
== failover
->num_samplers
&&
406 !memcmp(failover
->sampler
, sampler
, num
* sizeof(void *)))
408 for (i
= 0; i
< PIPE_MAX_SAMPLERS
; i
++) {
409 failover
->sw_sampler_state
[i
] = i
< num
? state
[i
].sw_state
: NULL
;
410 failover
->hw_sampler_state
[i
] = i
< num
? state
[i
].hw_state
: NULL
;
412 failover
->dirty
|= FO_NEW_SAMPLER
;
413 failover
->num_samplers
= num
;
414 failover
->sw
->bind_fragment_sampler_states(failover
->sw
, num
,
415 failover
->sw_sampler_state
);
416 failover
->hw
->bind_fragment_sampler_states(failover
->hw
, num
,
417 failover
->hw_sampler_state
);
421 failover_bind_vertex_sampler_states(struct pipe_context
*pipe
,
422 unsigned num_samplers
,
425 struct failover_context
*failover
= failover_context(pipe
);
426 struct fo_state
*state
= (struct fo_state
*)samplers
;
429 assert(num_samplers
<= PIPE_MAX_VERTEX_SAMPLERS
);
431 /* Check for no-op */
432 if (num_samplers
== failover
->num_vertex_samplers
&&
433 !memcmp(failover
->vertex_samplers
, samplers
, num_samplers
* sizeof(void *))) {
436 for (i
= 0; i
< PIPE_MAX_VERTEX_SAMPLERS
; i
++) {
437 failover
->sw_vertex_sampler_state
[i
] = i
< num_samplers
? state
[i
].sw_state
: NULL
;
438 failover
->hw_vertex_sampler_state
[i
] = i
< num_samplers
? state
[i
].hw_state
: NULL
;
440 failover
->dirty
|= FO_NEW_SAMPLER
;
441 failover
->num_vertex_samplers
= num_samplers
;
442 failover
->sw
->bind_vertex_sampler_states(failover
->sw
,
444 failover
->sw_vertex_sampler_state
);
445 failover
->hw
->bind_vertex_sampler_states(failover
->hw
,
447 failover
->hw_vertex_sampler_state
);
451 failover_delete_sampler_state(struct pipe_context
*pipe
, void *sampler
)
453 struct fo_state
*state
= (struct fo_state
*)sampler
;
454 struct failover_context
*failover
= failover_context(pipe
);
456 failover
->sw
->delete_sampler_state(failover
->sw
, state
->sw_state
);
457 failover
->hw
->delete_sampler_state(failover
->hw
, state
->hw_state
);
464 static struct pipe_sampler_view
*
465 failover_create_sampler_view(struct pipe_context
*pipe
,
466 struct pipe_resource
*texture
,
467 const struct pipe_sampler_view
*templ
)
469 struct fo_sampler_view
*view
= MALLOC(sizeof(struct fo_sampler_view
));
470 struct failover_context
*failover
= failover_context(pipe
);
472 view
->sw
= failover
->sw
->create_sampler_view(failover
->sw
, texture
, templ
);
473 view
->hw
= failover
->hw
->create_sampler_view(failover
->hw
, texture
, templ
);
476 view
->base
.reference
.count
= 1;
477 view
->base
.texture
= NULL
;
478 pipe_resource_reference(&view
->base
.texture
, texture
);
479 view
->base
.context
= pipe
;
485 failover_sampler_view_destroy(struct pipe_context
*pipe
,
486 struct pipe_sampler_view
*view
)
488 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)view
;
489 struct failover_context
*failover
= failover_context(pipe
);
491 failover
->sw
->sampler_view_destroy(failover
->sw
, fo_view
->sw
);
492 failover
->hw
->sampler_view_destroy(failover
->hw
, fo_view
->hw
);
494 pipe_resource_reference(&fo_view
->base
.texture
, NULL
);
499 failover_set_fragment_sampler_views(struct pipe_context
*pipe
,
501 struct pipe_sampler_view
**views
)
503 struct failover_context
*failover
= failover_context(pipe
);
504 struct pipe_sampler_view
*hw_views
[PIPE_MAX_SAMPLERS
];
507 assert(num
<= PIPE_MAX_SAMPLERS
);
509 /* Check for no-op */
510 if (num
== failover
->num_fragment_sampler_views
&&
511 !memcmp(failover
->fragment_sampler_views
, views
, num
* sizeof(struct pipe_sampler_view
*)))
513 for (i
= 0; i
< num
; i
++) {
514 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)views
[i
];
516 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->fragment_sampler_views
[i
], views
[i
]);
517 hw_views
[i
] = fo_view
->hw
;
519 for (i
= num
; i
< failover
->num_fragment_sampler_views
; i
++)
520 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->fragment_sampler_views
[i
], NULL
);
521 failover
->dirty
|= FO_NEW_SAMPLER_VIEW
;
522 failover
->num_fragment_sampler_views
= num
;
523 failover
->hw
->set_fragment_sampler_views(failover
->hw
, num
, hw_views
);
528 failover_set_vertex_sampler_views(struct pipe_context
*pipe
,
530 struct pipe_sampler_view
**views
)
532 struct failover_context
*failover
= failover_context(pipe
);
533 struct pipe_sampler_view
*hw_views
[PIPE_MAX_VERTEX_SAMPLERS
];
536 assert(num
<= PIPE_MAX_VERTEX_SAMPLERS
);
538 /* Check for no-op */
539 if (num
== failover
->num_vertex_sampler_views
&&
540 !memcmp(failover
->vertex_sampler_views
, views
, num
* sizeof(struct pipe_sampler_view
*))) {
543 for (i
= 0; i
< num
; i
++) {
544 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)views
[i
];
546 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->vertex_sampler_views
[i
], views
[i
]);
547 hw_views
[i
] = fo_view
->hw
;
549 for (i
= num
; i
< failover
->num_vertex_sampler_views
; i
++)
550 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->vertex_sampler_views
[i
], NULL
);
551 failover
->dirty
|= FO_NEW_SAMPLER_VIEW
;
552 failover
->num_vertex_sampler_views
= num
;
553 failover
->hw
->set_vertex_sampler_views(failover
->hw
, num
, hw_views
);
558 failover_set_viewport_state( struct pipe_context
*pipe
,
559 const struct pipe_viewport_state
*viewport
)
561 struct failover_context
*failover
= failover_context(pipe
);
563 failover
->viewport
= *viewport
;
564 failover
->dirty
|= FO_NEW_VIEWPORT
;
565 failover
->sw
->set_viewport_state( failover
->sw
, viewport
);
566 failover
->hw
->set_viewport_state( failover
->hw
, viewport
);
571 failover_set_vertex_buffers(struct pipe_context
*pipe
,
573 const struct pipe_vertex_buffer
*vertex_buffers
)
575 struct failover_context
*failover
= failover_context(pipe
);
577 util_copy_vertex_buffers(failover
->vertex_buffers
,
578 &failover
->num_vertex_buffers
,
579 vertex_buffers
, count
);
580 failover
->dirty
|= FO_NEW_VERTEX_BUFFER
;
581 failover
->sw
->set_vertex_buffers( failover
->sw
, count
, vertex_buffers
);
582 failover
->hw
->set_vertex_buffers( failover
->hw
, count
, vertex_buffers
);
587 failover_set_index_buffer(struct pipe_context
*pipe
,
588 const struct pipe_index_buffer
*ib
)
590 struct failover_context
*failover
= failover_context(pipe
);
593 memcpy(&failover
->index_buffer
, ib
, sizeof(failover
->index_buffer
));
595 memset(&failover
->index_buffer
, 0, sizeof(failover
->index_buffer
));
597 failover
->dirty
|= FO_NEW_INDEX_BUFFER
;
598 failover
->sw
->set_index_buffer( failover
->sw
, ib
);
599 failover
->hw
->set_index_buffer( failover
->hw
, ib
);
604 failover_set_constant_buffer(struct pipe_context
*pipe
,
605 uint shader
, uint index
,
606 struct pipe_resource
*res
)
608 struct failover_context
*failover
= failover_context(pipe
);
610 assert(shader
< PIPE_SHADER_TYPES
);
613 failover
->sw
->set_constant_buffer(failover
->sw
, shader
, index
, res
);
614 failover
->hw
->set_constant_buffer(failover
->hw
, shader
, index
, res
);
619 failover_init_state_functions( struct failover_context
*failover
)
621 failover
->pipe
.create_blend_state
= failover_create_blend_state
;
622 failover
->pipe
.bind_blend_state
= failover_bind_blend_state
;
623 failover
->pipe
.delete_blend_state
= failover_delete_blend_state
;
624 failover
->pipe
.create_sampler_state
= failover_create_sampler_state
;
625 failover
->pipe
.bind_fragment_sampler_states
= failover_bind_fragment_sampler_states
;
626 failover
->pipe
.bind_vertex_sampler_states
= failover_bind_vertex_sampler_states
;
627 failover
->pipe
.delete_sampler_state
= failover_delete_sampler_state
;
628 failover
->pipe
.create_depth_stencil_alpha_state
= failover_create_depth_stencil_state
;
629 failover
->pipe
.bind_depth_stencil_alpha_state
= failover_bind_depth_stencil_state
;
630 failover
->pipe
.delete_depth_stencil_alpha_state
= failover_delete_depth_stencil_state
;
631 failover
->pipe
.create_rasterizer_state
= failover_create_rasterizer_state
;
632 failover
->pipe
.bind_rasterizer_state
= failover_bind_rasterizer_state
;
633 failover
->pipe
.delete_rasterizer_state
= failover_delete_rasterizer_state
;
634 failover
->pipe
.create_fs_state
= failover_create_fs_state
;
635 failover
->pipe
.bind_fs_state
= failover_bind_fs_state
;
636 failover
->pipe
.delete_fs_state
= failover_delete_fs_state
;
637 failover
->pipe
.create_vs_state
= failover_create_vs_state
;
638 failover
->pipe
.bind_vs_state
= failover_bind_vs_state
;
639 failover
->pipe
.delete_vs_state
= failover_delete_vs_state
;
640 failover
->pipe
.create_vertex_elements_state
= failover_create_vertex_elements_state
;
641 failover
->pipe
.bind_vertex_elements_state
= failover_bind_vertex_elements_state
;
642 failover
->pipe
.delete_vertex_elements_state
= failover_delete_vertex_elements_state
;
644 failover
->pipe
.set_blend_color
= failover_set_blend_color
;
645 failover
->pipe
.set_stencil_ref
= failover_set_stencil_ref
;
646 failover
->pipe
.set_clip_state
= failover_set_clip_state
;
647 failover
->pipe
.set_sample_mask
= failover_set_sample_mask
;
648 failover
->pipe
.set_framebuffer_state
= failover_set_framebuffer_state
;
649 failover
->pipe
.set_polygon_stipple
= failover_set_polygon_stipple
;
650 failover
->pipe
.set_scissor_state
= failover_set_scissor_state
;
651 failover
->pipe
.set_fragment_sampler_views
= failover_set_fragment_sampler_views
;
652 failover
->pipe
.set_vertex_sampler_views
= failover_set_vertex_sampler_views
;
653 failover
->pipe
.set_viewport_state
= failover_set_viewport_state
;
654 failover
->pipe
.set_vertex_buffers
= failover_set_vertex_buffers
;
655 failover
->pipe
.set_index_buffer
= failover_set_index_buffer
;
656 failover
->pipe
.set_constant_buffer
= failover_set_constant_buffer
;
657 failover
->pipe
.create_sampler_view
= failover_create_sampler_view
;
658 failover
->pipe
.sampler_view_destroy
= failover_sampler_view_destroy
;