r300g: when printing shader linker errors to stderr, report it's not a bug
[mesa.git] / src / gallium / drivers / failover / fo_state.c
1 /**************************************************************************
2 *
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * All Rights Reserved.
5 *
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:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
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.
25 *
26 **************************************************************************/
27
28 /* Authors: Keith Whitwell <keith@tungstengraphics.com>
29 */
30
31 #include "util/u_inlines.h"
32 #include "util/u_memory.h"
33
34 #include "fo_context.h"
35
36
37 /* This looks like a lot of work at the moment - we're keeping a
38 * duplicate copy of the state up-to-date.
39 *
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.
46 *
47 * This works as a proof-of-concept, but a final version will have
48 * lower overheads.
49 */
50
51
52
53 static void *
54 failover_create_blend_state( struct pipe_context *pipe,
55 const struct pipe_blend_state *blend )
56 {
57 struct fo_state *state = MALLOC(sizeof(struct fo_state));
58 struct failover_context *failover = failover_context(pipe);
59
60 state->sw_state = failover->sw->create_blend_state(failover->sw, blend);
61 state->hw_state = failover->hw->create_blend_state(failover->hw, blend);
62
63 return state;
64 }
65
66 static void
67 failover_bind_blend_state( struct pipe_context *pipe,
68 void *blend )
69 {
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 );
76 }
77
78 static void
79 failover_delete_blend_state( struct pipe_context *pipe,
80 void *blend )
81 {
82 struct fo_state *state = (struct fo_state*)blend;
83 struct failover_context *failover = failover_context(pipe);
84
85 failover->sw->delete_blend_state(failover->sw, state->sw_state);
86 failover->hw->delete_blend_state(failover->hw, state->hw_state);
87 state->sw_state = 0;
88 state->hw_state = 0;
89 FREE(state);
90 }
91
92 static void
93 failover_set_blend_color( struct pipe_context *pipe,
94 const struct pipe_blend_color *blend_color )
95 {
96 struct failover_context *failover = failover_context(pipe);
97
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 );
102 }
103
104 static void
105 failover_set_stencil_ref( struct pipe_context *pipe,
106 const struct pipe_stencil_ref *stencil_ref )
107 {
108 struct failover_context *failover = failover_context(pipe);
109
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 );
114 }
115
116 static void
117 failover_set_clip_state( struct pipe_context *pipe,
118 const struct pipe_clip_state *clip )
119 {
120 struct failover_context *failover = failover_context(pipe);
121
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 );
126 }
127
128 static void
129 failover_set_sample_mask(struct pipe_context *pipe,
130 unsigned sample_mask)
131 {
132 struct failover_context *failover = failover_context(pipe);
133
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 );
138
139 }
140
141
142 static void *
143 failover_create_depth_stencil_state(struct pipe_context *pipe,
144 const struct pipe_depth_stencil_alpha_state *templ)
145 {
146 struct fo_state *state = MALLOC(sizeof(struct fo_state));
147 struct failover_context *failover = failover_context(pipe);
148
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);
151
152 return state;
153 }
154
155 static void
156 failover_bind_depth_stencil_state(struct pipe_context *pipe,
157 void *depth_stencil)
158 {
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);
165 }
166
167 static void
168 failover_delete_depth_stencil_state(struct pipe_context *pipe,
169 void *ds)
170 {
171 struct fo_state *state = (struct fo_state*)ds;
172 struct failover_context *failover = failover_context(pipe);
173
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);
176 state->sw_state = 0;
177 state->hw_state = 0;
178 FREE(state);
179 }
180
181 static void
182 failover_set_framebuffer_state(struct pipe_context *pipe,
183 const struct pipe_framebuffer_state *framebuffer)
184 {
185 struct failover_context *failover = failover_context(pipe);
186
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 );
191 }
192
193
194 static void *
195 failover_create_fs_state(struct pipe_context *pipe,
196 const struct pipe_shader_state *templ)
197 {
198 struct fo_state *state = MALLOC(sizeof(struct fo_state));
199 struct failover_context *failover = failover_context(pipe);
200
201 state->sw_state = failover->sw->create_fs_state(failover->sw, templ);
202 state->hw_state = failover->hw->create_fs_state(failover->hw, templ);
203
204 return state;
205 }
206
207 static void
208 failover_bind_fs_state(struct pipe_context *pipe, void *fs)
209 {
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);
216 }
217
218 static void
219 failover_delete_fs_state(struct pipe_context *pipe,
220 void *fs)
221 {
222 struct fo_state *state = (struct fo_state*)fs;
223 struct failover_context *failover = failover_context(pipe);
224
225 failover->sw->delete_fs_state(failover->sw, state->sw_state);
226 failover->hw->delete_fs_state(failover->hw, state->hw_state);
227 state->sw_state = 0;
228 state->hw_state = 0;
229 FREE(state);
230 }
231
232 static void *
233 failover_create_vs_state(struct pipe_context *pipe,
234 const struct pipe_shader_state *templ)
235 {
236 struct fo_state *state = MALLOC(sizeof(struct fo_state));
237 struct failover_context *failover = failover_context(pipe);
238
239 state->sw_state = failover->sw->create_vs_state(failover->sw, templ);
240 state->hw_state = failover->hw->create_vs_state(failover->hw, templ);
241
242 return state;
243 }
244
245 static void
246 failover_bind_vs_state(struct pipe_context *pipe,
247 void *vs)
248 {
249 struct failover_context *failover = failover_context(pipe);
250
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);
256 }
257
258 static void
259 failover_delete_vs_state(struct pipe_context *pipe,
260 void *vs)
261 {
262 struct fo_state *state = (struct fo_state*)vs;
263 struct failover_context *failover = failover_context(pipe);
264
265 failover->sw->delete_vs_state(failover->sw, state->sw_state);
266 failover->hw->delete_vs_state(failover->hw, state->hw_state);
267 state->sw_state = 0;
268 state->hw_state = 0;
269 FREE(state);
270 }
271
272
273
274 static void *
275 failover_create_vertex_elements_state( struct pipe_context *pipe,
276 unsigned count,
277 const struct pipe_vertex_element *velems )
278 {
279 struct fo_state *state = MALLOC(sizeof(struct fo_state));
280 struct failover_context *failover = failover_context(pipe);
281
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);
284
285 return state;
286 }
287
288 static void
289 failover_bind_vertex_elements_state(struct pipe_context *pipe,
290 void *velems )
291 {
292 struct failover_context *failover = failover_context(pipe);
293 struct fo_state *state = (struct fo_state*)velems;
294
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 );
299 }
300
301 static void
302 failover_delete_vertex_elements_state( struct pipe_context *pipe,
303 void *velems )
304 {
305 struct fo_state *state = (struct fo_state*)velems;
306 struct failover_context *failover = failover_context(pipe);
307
308 failover->sw->delete_vertex_elements_state(failover->sw, state->sw_state);
309 failover->hw->delete_vertex_elements_state(failover->hw, state->hw_state);
310 state->sw_state = 0;
311 state->hw_state = 0;
312 FREE(state);
313 }
314
315 static void
316 failover_set_polygon_stipple( struct pipe_context *pipe,
317 const struct pipe_poly_stipple *stipple )
318 {
319 struct failover_context *failover = failover_context(pipe);
320
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 );
325 }
326
327
328 static void *
329 failover_create_rasterizer_state(struct pipe_context *pipe,
330 const struct pipe_rasterizer_state *templ)
331 {
332 struct fo_state *state = MALLOC(sizeof(struct fo_state));
333 struct failover_context *failover = failover_context(pipe);
334
335 state->sw_state = failover->sw->create_rasterizer_state(failover->sw, templ);
336 state->hw_state = failover->hw->create_rasterizer_state(failover->hw, templ);
337
338 return state;
339 }
340
341 static void
342 failover_bind_rasterizer_state(struct pipe_context *pipe,
343 void *raster)
344 {
345 struct failover_context *failover = failover_context(pipe);
346
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);
352 }
353
354 static void
355 failover_delete_rasterizer_state(struct pipe_context *pipe,
356 void *raster)
357 {
358 struct fo_state *state = (struct fo_state*)raster;
359 struct failover_context *failover = failover_context(pipe);
360
361 failover->sw->delete_rasterizer_state(failover->sw, state->sw_state);
362 failover->hw->delete_rasterizer_state(failover->hw, state->hw_state);
363 state->sw_state = 0;
364 state->hw_state = 0;
365 FREE(state);
366 }
367
368
369 static void
370 failover_set_scissor_state( struct pipe_context *pipe,
371 const struct pipe_scissor_state *scissor )
372 {
373 struct failover_context *failover = failover_context(pipe);
374
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 );
379 }
380
381
382 static void *
383 failover_create_sampler_state(struct pipe_context *pipe,
384 const struct pipe_sampler_state *templ)
385 {
386 struct fo_state *state = MALLOC(sizeof(struct fo_state));
387 struct failover_context *failover = failover_context(pipe);
388
389 state->sw_state = failover->sw->create_sampler_state(failover->sw, templ);
390 state->hw_state = failover->hw->create_sampler_state(failover->hw, templ);
391
392 return state;
393 }
394
395 static void
396 failover_bind_fragment_sampler_states(struct pipe_context *pipe,
397 unsigned num,
398 void **sampler)
399 {
400 struct failover_context *failover = failover_context(pipe);
401 struct fo_state *state = (struct fo_state*)sampler;
402 uint i;
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 *)))
407 return;
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;
411 }
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);
418 }
419
420 static void
421 failover_bind_vertex_sampler_states(struct pipe_context *pipe,
422 unsigned num_samplers,
423 void **samplers)
424 {
425 struct failover_context *failover = failover_context(pipe);
426 struct fo_state *state = (struct fo_state*)samplers;
427 uint i;
428
429 assert(num_samplers <= PIPE_MAX_VERTEX_SAMPLERS);
430
431 /* Check for no-op */
432 if (num_samplers == failover->num_vertex_samplers &&
433 !memcmp(failover->vertex_samplers, samplers, num_samplers * sizeof(void *))) {
434 return;
435 }
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;
439 }
440 failover->dirty |= FO_NEW_SAMPLER;
441 failover->num_vertex_samplers = num_samplers;
442 failover->sw->bind_vertex_sampler_states(failover->sw,
443 num_samplers,
444 failover->sw_vertex_sampler_state);
445 failover->hw->bind_vertex_sampler_states(failover->hw,
446 num_samplers,
447 failover->hw_vertex_sampler_state);
448 }
449
450 static void
451 failover_delete_sampler_state(struct pipe_context *pipe, void *sampler)
452 {
453 struct fo_state *state = (struct fo_state*)sampler;
454 struct failover_context *failover = failover_context(pipe);
455
456 failover->sw->delete_sampler_state(failover->sw, state->sw_state);
457 failover->hw->delete_sampler_state(failover->hw, state->hw_state);
458 state->sw_state = 0;
459 state->hw_state = 0;
460 FREE(state);
461 }
462
463
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)
468 {
469 struct fo_sampler_view *view = MALLOC(sizeof(struct fo_sampler_view));
470 struct failover_context *failover = failover_context(pipe);
471
472 view->sw = failover->sw->create_sampler_view(failover->sw, texture, templ);
473 view->hw = failover->hw->create_sampler_view(failover->hw, texture, templ);
474
475 view->base = *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;
480
481 return &view->base;
482 }
483
484 static void
485 failover_sampler_view_destroy(struct pipe_context *pipe,
486 struct pipe_sampler_view *view)
487 {
488 struct fo_sampler_view *fo_view = (struct fo_sampler_view *)view;
489 struct failover_context *failover = failover_context(pipe);
490
491 failover->sw->sampler_view_destroy(failover->sw, fo_view->sw);
492 failover->hw->sampler_view_destroy(failover->hw, fo_view->hw);
493
494 pipe_resource_reference(&fo_view->base.texture, NULL);
495 FREE(fo_view);
496 }
497
498 static void
499 failover_set_fragment_sampler_views(struct pipe_context *pipe,
500 unsigned num,
501 struct pipe_sampler_view **views)
502 {
503 struct failover_context *failover = failover_context(pipe);
504 struct pipe_sampler_view *hw_views[PIPE_MAX_SAMPLERS];
505 uint i;
506
507 assert(num <= PIPE_MAX_SAMPLERS);
508
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 *)))
512 return;
513 for (i = 0; i < num; i++) {
514 struct fo_sampler_view *fo_view = (struct fo_sampler_view *)views[i];
515
516 pipe_sampler_view_reference((struct pipe_sampler_view **)&failover->fragment_sampler_views[i], views[i]);
517 hw_views[i] = fo_view->hw;
518 }
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);
524 }
525
526
527 static void
528 failover_set_vertex_sampler_views(struct pipe_context *pipe,
529 unsigned num,
530 struct pipe_sampler_view **views)
531 {
532 struct failover_context *failover = failover_context(pipe);
533 struct pipe_sampler_view *hw_views[PIPE_MAX_VERTEX_SAMPLERS];
534 uint i;
535
536 assert(num <= PIPE_MAX_VERTEX_SAMPLERS);
537
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 *))) {
541 return;
542 }
543 for (i = 0; i < num; i++) {
544 struct fo_sampler_view *fo_view = (struct fo_sampler_view *)views[i];
545
546 pipe_sampler_view_reference((struct pipe_sampler_view **)&failover->vertex_sampler_views[i], views[i]);
547 hw_views[i] = fo_view->hw;
548 }
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);
554 }
555
556
557 static void
558 failover_set_viewport_state( struct pipe_context *pipe,
559 const struct pipe_viewport_state *viewport )
560 {
561 struct failover_context *failover = failover_context(pipe);
562
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 );
567 }
568
569
570 static void
571 failover_set_vertex_buffers(struct pipe_context *pipe,
572 unsigned count,
573 const struct pipe_vertex_buffer *vertex_buffers)
574 {
575 struct failover_context *failover = failover_context(pipe);
576
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 );
583 }
584
585
586 static void
587 failover_set_index_buffer(struct pipe_context *pipe,
588 const struct pipe_index_buffer *ib)
589 {
590 struct failover_context *failover = failover_context(pipe);
591
592 if (ib)
593 memcpy(&failover->index_buffer, ib, sizeof(failover->index_buffer));
594 else
595 memset(&failover->index_buffer, 0, sizeof(failover->index_buffer));
596
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 );
600 }
601
602
603 void
604 failover_set_constant_buffer(struct pipe_context *pipe,
605 uint shader, uint index,
606 struct pipe_resource *res)
607 {
608 struct failover_context *failover = failover_context(pipe);
609
610 assert(shader < PIPE_SHADER_TYPES);
611 assert(index == 0);
612
613 failover->sw->set_constant_buffer(failover->sw, shader, index, res);
614 failover->hw->set_constant_buffer(failover->hw, shader, index, res);
615 }
616
617
618 void
619 failover_init_state_functions( struct failover_context *failover )
620 {
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;
643
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;
659 }