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
);
130 failover_create_depth_stencil_state(struct pipe_context
*pipe
,
131 const struct pipe_depth_stencil_alpha_state
*templ
)
133 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
134 struct failover_context
*failover
= failover_context(pipe
);
136 state
->sw_state
= failover
->sw
->create_depth_stencil_alpha_state(failover
->sw
, templ
);
137 state
->hw_state
= failover
->hw
->create_depth_stencil_alpha_state(failover
->hw
, templ
);
143 failover_bind_depth_stencil_state(struct pipe_context
*pipe
,
146 struct failover_context
*failover
= failover_context(pipe
);
147 struct fo_state
*state
= (struct fo_state
*)depth_stencil
;
148 failover
->depth_stencil
= state
;
149 failover
->dirty
|= FO_NEW_DEPTH_STENCIL
;
150 failover
->sw
->bind_depth_stencil_alpha_state(failover
->sw
, state
->sw_state
);
151 failover
->hw
->bind_depth_stencil_alpha_state(failover
->hw
, state
->hw_state
);
155 failover_delete_depth_stencil_state(struct pipe_context
*pipe
,
158 struct fo_state
*state
= (struct fo_state
*)ds
;
159 struct failover_context
*failover
= failover_context(pipe
);
161 failover
->sw
->delete_depth_stencil_alpha_state(failover
->sw
, state
->sw_state
);
162 failover
->hw
->delete_depth_stencil_alpha_state(failover
->hw
, state
->hw_state
);
169 failover_set_framebuffer_state(struct pipe_context
*pipe
,
170 const struct pipe_framebuffer_state
*framebuffer
)
172 struct failover_context
*failover
= failover_context(pipe
);
174 failover
->framebuffer
= *framebuffer
;
175 failover
->dirty
|= FO_NEW_FRAMEBUFFER
;
176 failover
->sw
->set_framebuffer_state( failover
->sw
, framebuffer
);
177 failover
->hw
->set_framebuffer_state( failover
->hw
, framebuffer
);
182 failover_create_fs_state(struct pipe_context
*pipe
,
183 const struct pipe_shader_state
*templ
)
185 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
186 struct failover_context
*failover
= failover_context(pipe
);
188 state
->sw_state
= failover
->sw
->create_fs_state(failover
->sw
, templ
);
189 state
->hw_state
= failover
->hw
->create_fs_state(failover
->hw
, templ
);
195 failover_bind_fs_state(struct pipe_context
*pipe
, void *fs
)
197 struct failover_context
*failover
= failover_context(pipe
);
198 struct fo_state
*state
= (struct fo_state
*)fs
;
199 failover
->fragment_shader
= state
;
200 failover
->dirty
|= FO_NEW_FRAGMENT_SHADER
;
201 failover
->sw
->bind_fs_state(failover
->sw
, state
->sw_state
);
202 failover
->hw
->bind_fs_state(failover
->hw
, state
->hw_state
);
206 failover_delete_fs_state(struct pipe_context
*pipe
,
209 struct fo_state
*state
= (struct fo_state
*)fs
;
210 struct failover_context
*failover
= failover_context(pipe
);
212 failover
->sw
->delete_fs_state(failover
->sw
, state
->sw_state
);
213 failover
->hw
->delete_fs_state(failover
->hw
, state
->hw_state
);
220 failover_create_vs_state(struct pipe_context
*pipe
,
221 const struct pipe_shader_state
*templ
)
223 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
224 struct failover_context
*failover
= failover_context(pipe
);
226 state
->sw_state
= failover
->sw
->create_vs_state(failover
->sw
, templ
);
227 state
->hw_state
= failover
->hw
->create_vs_state(failover
->hw
, templ
);
233 failover_bind_vs_state(struct pipe_context
*pipe
,
236 struct failover_context
*failover
= failover_context(pipe
);
238 struct fo_state
*state
= (struct fo_state
*)vs
;
239 failover
->vertex_shader
= state
;
240 failover
->dirty
|= FO_NEW_VERTEX_SHADER
;
241 failover
->sw
->bind_vs_state(failover
->sw
, state
->sw_state
);
242 failover
->hw
->bind_vs_state(failover
->hw
, state
->hw_state
);
246 failover_delete_vs_state(struct pipe_context
*pipe
,
249 struct fo_state
*state
= (struct fo_state
*)vs
;
250 struct failover_context
*failover
= failover_context(pipe
);
252 failover
->sw
->delete_vs_state(failover
->sw
, state
->sw_state
);
253 failover
->hw
->delete_vs_state(failover
->hw
, state
->hw_state
);
262 failover_create_vertex_elements_state( struct pipe_context
*pipe
,
264 const struct pipe_vertex_element
*velems
)
266 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
267 struct failover_context
*failover
= failover_context(pipe
);
269 state
->sw_state
= failover
->sw
->create_vertex_elements_state(failover
->sw
, count
, velems
);
270 state
->hw_state
= failover
->hw
->create_vertex_elements_state(failover
->hw
, count
, velems
);
276 failover_bind_vertex_elements_state(struct pipe_context
*pipe
,
279 struct failover_context
*failover
= failover_context(pipe
);
280 struct fo_state
*state
= (struct fo_state
*)velems
;
282 failover
->vertex_elements
= state
;
283 failover
->dirty
|= FO_NEW_VERTEX_ELEMENT
;
284 failover
->sw
->bind_vertex_elements_state( failover
->sw
, velems
);
285 failover
->hw
->bind_vertex_elements_state( failover
->hw
, velems
);
289 failover_delete_vertex_elements_state( struct pipe_context
*pipe
,
292 struct fo_state
*state
= (struct fo_state
*)velems
;
293 struct failover_context
*failover
= failover_context(pipe
);
295 failover
->sw
->delete_vertex_elements_state(failover
->sw
, state
->sw_state
);
296 failover
->hw
->delete_vertex_elements_state(failover
->hw
, state
->hw_state
);
303 failover_set_polygon_stipple( struct pipe_context
*pipe
,
304 const struct pipe_poly_stipple
*stipple
)
306 struct failover_context
*failover
= failover_context(pipe
);
308 failover
->poly_stipple
= *stipple
;
309 failover
->dirty
|= FO_NEW_STIPPLE
;
310 failover
->sw
->set_polygon_stipple( failover
->sw
, stipple
);
311 failover
->hw
->set_polygon_stipple( failover
->hw
, stipple
);
316 failover_create_rasterizer_state(struct pipe_context
*pipe
,
317 const struct pipe_rasterizer_state
*templ
)
319 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
320 struct failover_context
*failover
= failover_context(pipe
);
322 state
->sw_state
= failover
->sw
->create_rasterizer_state(failover
->sw
, templ
);
323 state
->hw_state
= failover
->hw
->create_rasterizer_state(failover
->hw
, templ
);
329 failover_bind_rasterizer_state(struct pipe_context
*pipe
,
332 struct failover_context
*failover
= failover_context(pipe
);
334 struct fo_state
*state
= (struct fo_state
*)raster
;
335 failover
->rasterizer
= state
;
336 failover
->dirty
|= FO_NEW_RASTERIZER
;
337 failover
->sw
->bind_rasterizer_state(failover
->sw
, state
->sw_state
);
338 failover
->hw
->bind_rasterizer_state(failover
->hw
, state
->hw_state
);
342 failover_delete_rasterizer_state(struct pipe_context
*pipe
,
345 struct fo_state
*state
= (struct fo_state
*)raster
;
346 struct failover_context
*failover
= failover_context(pipe
);
348 failover
->sw
->delete_rasterizer_state(failover
->sw
, state
->sw_state
);
349 failover
->hw
->delete_rasterizer_state(failover
->hw
, state
->hw_state
);
357 failover_set_scissor_state( struct pipe_context
*pipe
,
358 const struct pipe_scissor_state
*scissor
)
360 struct failover_context
*failover
= failover_context(pipe
);
362 failover
->scissor
= *scissor
;
363 failover
->dirty
|= FO_NEW_SCISSOR
;
364 failover
->sw
->set_scissor_state( failover
->sw
, scissor
);
365 failover
->hw
->set_scissor_state( failover
->hw
, scissor
);
370 failover_create_sampler_state(struct pipe_context
*pipe
,
371 const struct pipe_sampler_state
*templ
)
373 struct fo_state
*state
= MALLOC(sizeof(struct fo_state
));
374 struct failover_context
*failover
= failover_context(pipe
);
376 state
->sw_state
= failover
->sw
->create_sampler_state(failover
->sw
, templ
);
377 state
->hw_state
= failover
->hw
->create_sampler_state(failover
->hw
, templ
);
383 failover_bind_fragment_sampler_states(struct pipe_context
*pipe
,
387 struct failover_context
*failover
= failover_context(pipe
);
388 struct fo_state
*state
= (struct fo_state
*)sampler
;
390 assert(num
<= PIPE_MAX_SAMPLERS
);
391 /* Check for no-op */
392 if (num
== failover
->num_samplers
&&
393 !memcmp(failover
->sampler
, sampler
, num
* sizeof(void *)))
395 for (i
= 0; i
< PIPE_MAX_SAMPLERS
; i
++) {
396 failover
->sw_sampler_state
[i
] = i
< num
? state
[i
].sw_state
: NULL
;
397 failover
->hw_sampler_state
[i
] = i
< num
? state
[i
].hw_state
: NULL
;
399 failover
->dirty
|= FO_NEW_SAMPLER
;
400 failover
->num_samplers
= num
;
401 failover
->sw
->bind_fragment_sampler_states(failover
->sw
, num
,
402 failover
->sw_sampler_state
);
403 failover
->hw
->bind_fragment_sampler_states(failover
->hw
, num
,
404 failover
->hw_sampler_state
);
408 failover_bind_vertex_sampler_states(struct pipe_context
*pipe
,
409 unsigned num_samplers
,
412 struct failover_context
*failover
= failover_context(pipe
);
413 struct fo_state
*state
= (struct fo_state
*)samplers
;
416 assert(num_samplers
<= PIPE_MAX_VERTEX_SAMPLERS
);
418 /* Check for no-op */
419 if (num_samplers
== failover
->num_vertex_samplers
&&
420 !memcmp(failover
->vertex_samplers
, samplers
, num_samplers
* sizeof(void *))) {
423 for (i
= 0; i
< PIPE_MAX_VERTEX_SAMPLERS
; i
++) {
424 failover
->sw_vertex_sampler_state
[i
] = i
< num_samplers
? state
[i
].sw_state
: NULL
;
425 failover
->hw_vertex_sampler_state
[i
] = i
< num_samplers
? state
[i
].hw_state
: NULL
;
427 failover
->dirty
|= FO_NEW_SAMPLER
;
428 failover
->num_vertex_samplers
= num_samplers
;
429 failover
->sw
->bind_vertex_sampler_states(failover
->sw
,
431 failover
->sw_vertex_sampler_state
);
432 failover
->hw
->bind_vertex_sampler_states(failover
->hw
,
434 failover
->hw_vertex_sampler_state
);
438 failover_delete_sampler_state(struct pipe_context
*pipe
, void *sampler
)
440 struct fo_state
*state
= (struct fo_state
*)sampler
;
441 struct failover_context
*failover
= failover_context(pipe
);
443 failover
->sw
->delete_sampler_state(failover
->sw
, state
->sw_state
);
444 failover
->hw
->delete_sampler_state(failover
->hw
, state
->hw_state
);
451 static struct pipe_sampler_view
*
452 failover_create_sampler_view(struct pipe_context
*pipe
,
453 struct pipe_resource
*texture
,
454 const struct pipe_sampler_view
*templ
)
456 struct fo_sampler_view
*view
= MALLOC(sizeof(struct fo_sampler_view
));
457 struct failover_context
*failover
= failover_context(pipe
);
459 view
->sw
= failover
->sw
->create_sampler_view(failover
->sw
, texture
, templ
);
460 view
->hw
= failover
->hw
->create_sampler_view(failover
->hw
, texture
, templ
);
463 view
->base
.reference
.count
= 1;
464 view
->base
.texture
= NULL
;
465 pipe_resource_reference(&view
->base
.texture
, texture
);
466 view
->base
.context
= pipe
;
472 failover_sampler_view_destroy(struct pipe_context
*pipe
,
473 struct pipe_sampler_view
*view
)
475 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)view
;
476 struct failover_context
*failover
= failover_context(pipe
);
478 failover
->sw
->sampler_view_destroy(failover
->sw
, fo_view
->sw
);
479 failover
->hw
->sampler_view_destroy(failover
->hw
, fo_view
->hw
);
481 pipe_resource_reference(&fo_view
->base
.texture
, NULL
);
486 failover_set_fragment_sampler_views(struct pipe_context
*pipe
,
488 struct pipe_sampler_view
**views
)
490 struct failover_context
*failover
= failover_context(pipe
);
491 struct pipe_sampler_view
*hw_views
[PIPE_MAX_SAMPLERS
];
494 assert(num
<= PIPE_MAX_SAMPLERS
);
496 /* Check for no-op */
497 if (num
== failover
->num_fragment_sampler_views
&&
498 !memcmp(failover
->fragment_sampler_views
, views
, num
* sizeof(struct pipe_sampler_view
*)))
500 for (i
= 0; i
< num
; i
++) {
501 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)views
[i
];
503 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->fragment_sampler_views
[i
], views
[i
]);
504 hw_views
[i
] = fo_view
->hw
;
506 for (i
= num
; i
< failover
->num_fragment_sampler_views
; i
++)
507 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->fragment_sampler_views
[i
], NULL
);
508 failover
->dirty
|= FO_NEW_SAMPLER_VIEW
;
509 failover
->num_fragment_sampler_views
= num
;
510 failover
->hw
->set_fragment_sampler_views(failover
->hw
, num
, hw_views
);
515 failover_set_vertex_sampler_views(struct pipe_context
*pipe
,
517 struct pipe_sampler_view
**views
)
519 struct failover_context
*failover
= failover_context(pipe
);
520 struct pipe_sampler_view
*hw_views
[PIPE_MAX_VERTEX_SAMPLERS
];
523 assert(num
<= PIPE_MAX_VERTEX_SAMPLERS
);
525 /* Check for no-op */
526 if (num
== failover
->num_vertex_sampler_views
&&
527 !memcmp(failover
->vertex_sampler_views
, views
, num
* sizeof(struct pipe_sampler_view
*))) {
530 for (i
= 0; i
< num
; i
++) {
531 struct fo_sampler_view
*fo_view
= (struct fo_sampler_view
*)views
[i
];
533 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->vertex_sampler_views
[i
], views
[i
]);
534 hw_views
[i
] = fo_view
->hw
;
536 for (i
= num
; i
< failover
->num_vertex_sampler_views
; i
++)
537 pipe_sampler_view_reference((struct pipe_sampler_view
**)&failover
->vertex_sampler_views
[i
], NULL
);
538 failover
->dirty
|= FO_NEW_SAMPLER_VIEW
;
539 failover
->num_vertex_sampler_views
= num
;
540 failover
->hw
->set_vertex_sampler_views(failover
->hw
, num
, hw_views
);
545 failover_set_viewport_state( struct pipe_context
*pipe
,
546 const struct pipe_viewport_state
*viewport
)
548 struct failover_context
*failover
= failover_context(pipe
);
550 failover
->viewport
= *viewport
;
551 failover
->dirty
|= FO_NEW_VIEWPORT
;
552 failover
->sw
->set_viewport_state( failover
->sw
, viewport
);
553 failover
->hw
->set_viewport_state( failover
->hw
, viewport
);
558 failover_set_vertex_buffers(struct pipe_context
*pipe
,
560 const struct pipe_vertex_buffer
*vertex_buffers
)
562 struct failover_context
*failover
= failover_context(pipe
);
564 memcpy(failover
->vertex_buffers
, vertex_buffers
,
565 count
* sizeof(vertex_buffers
[0]));
566 failover
->dirty
|= FO_NEW_VERTEX_BUFFER
;
567 failover
->num_vertex_buffers
= count
;
568 failover
->sw
->set_vertex_buffers( failover
->sw
, count
, vertex_buffers
);
569 failover
->hw
->set_vertex_buffers( failover
->hw
, count
, vertex_buffers
);
574 failover_set_constant_buffer(struct pipe_context
*pipe
,
575 uint shader
, uint index
,
576 struct pipe_resource
*res
)
578 struct failover_context
*failover
= failover_context(pipe
);
580 assert(shader
< PIPE_SHADER_TYPES
);
583 failover
->sw
->set_constant_buffer(failover
->sw
, shader
, index
, res
);
584 failover
->hw
->set_constant_buffer(failover
->hw
, shader
, index
, res
);
589 failover_init_state_functions( struct failover_context
*failover
)
591 failover
->pipe
.create_blend_state
= failover_create_blend_state
;
592 failover
->pipe
.bind_blend_state
= failover_bind_blend_state
;
593 failover
->pipe
.delete_blend_state
= failover_delete_blend_state
;
594 failover
->pipe
.create_sampler_state
= failover_create_sampler_state
;
595 failover
->pipe
.bind_fragment_sampler_states
= failover_bind_fragment_sampler_states
;
596 failover
->pipe
.bind_vertex_sampler_states
= failover_bind_vertex_sampler_states
;
597 failover
->pipe
.delete_sampler_state
= failover_delete_sampler_state
;
598 failover
->pipe
.create_depth_stencil_alpha_state
= failover_create_depth_stencil_state
;
599 failover
->pipe
.bind_depth_stencil_alpha_state
= failover_bind_depth_stencil_state
;
600 failover
->pipe
.delete_depth_stencil_alpha_state
= failover_delete_depth_stencil_state
;
601 failover
->pipe
.create_rasterizer_state
= failover_create_rasterizer_state
;
602 failover
->pipe
.bind_rasterizer_state
= failover_bind_rasterizer_state
;
603 failover
->pipe
.delete_rasterizer_state
= failover_delete_rasterizer_state
;
604 failover
->pipe
.create_fs_state
= failover_create_fs_state
;
605 failover
->pipe
.bind_fs_state
= failover_bind_fs_state
;
606 failover
->pipe
.delete_fs_state
= failover_delete_fs_state
;
607 failover
->pipe
.create_vs_state
= failover_create_vs_state
;
608 failover
->pipe
.bind_vs_state
= failover_bind_vs_state
;
609 failover
->pipe
.delete_vs_state
= failover_delete_vs_state
;
610 failover
->pipe
.create_vertex_elements_state
= failover_create_vertex_elements_state
;
611 failover
->pipe
.bind_vertex_elements_state
= failover_bind_vertex_elements_state
;
612 failover
->pipe
.delete_vertex_elements_state
= failover_delete_vertex_elements_state
;
614 failover
->pipe
.set_blend_color
= failover_set_blend_color
;
615 failover
->pipe
.set_stencil_ref
= failover_set_stencil_ref
;
616 failover
->pipe
.set_clip_state
= failover_set_clip_state
;
617 failover
->pipe
.set_framebuffer_state
= failover_set_framebuffer_state
;
618 failover
->pipe
.set_polygon_stipple
= failover_set_polygon_stipple
;
619 failover
->pipe
.set_scissor_state
= failover_set_scissor_state
;
620 failover
->pipe
.set_fragment_sampler_views
= failover_set_fragment_sampler_views
;
621 failover
->pipe
.set_vertex_sampler_views
= failover_set_vertex_sampler_views
;
622 failover
->pipe
.set_viewport_state
= failover_set_viewport_state
;
623 failover
->pipe
.set_vertex_buffers
= failover_set_vertex_buffers
;
624 failover
->pipe
.set_constant_buffer
= failover_set_constant_buffer
;
625 failover
->pipe
.create_sampler_view
= failover_create_sampler_view
;
626 failover
->pipe
.sampler_view_destroy
= failover_sampler_view_destroy
;