1 #include "pipe/p_state.h"
2 #include "pipe/p_defines.h"
3 #include "util/u_inlines.h"
5 #include "draw/draw_context.h"
7 #include "tgsi/tgsi_parse.h"
9 #include "nvfx_context.h"
10 #include "nvfx_state.h"
14 nvfx_blend_state_create(struct pipe_context
*pipe
,
15 const struct pipe_blend_state
*cso
)
17 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
18 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
19 struct nvfx_blend_state
*bso
= CALLOC(1, sizeof(*bso
));
20 struct nouveau_stateobj
*so
= so_new(5, 8, 0);
22 if (cso
->rt
[0].blend_enable
) {
23 so_method(so
, eng3d
, NV34TCL_BLEND_FUNC_ENABLE
, 3);
25 so_data (so
, (nvgl_blend_func(cso
->rt
[0].alpha_src_factor
) << 16) |
26 nvgl_blend_func(cso
->rt
[0].rgb_src_factor
));
27 so_data (so
, nvgl_blend_func(cso
->rt
[0].alpha_dst_factor
) << 16 |
28 nvgl_blend_func(cso
->rt
[0].rgb_dst_factor
));
29 if(nvfx
->screen
->base
.device
->chipset
< 0x40) {
30 so_method(so
, eng3d
, NV34TCL_BLEND_EQUATION
, 1);
31 so_data (so
, nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
33 so_method(so
, eng3d
, NV40TCL_BLEND_EQUATION
, 1);
34 so_data (so
, nvgl_blend_eqn(cso
->rt
[0].alpha_func
) << 16 |
35 nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
38 so_method(so
, eng3d
, NV34TCL_BLEND_FUNC_ENABLE
, 1);
42 so_method(so
, eng3d
, NV34TCL_COLOR_MASK
, 1);
43 so_data (so
, (((cso
->rt
[0].colormask
& PIPE_MASK_A
) ? (0x01 << 24) : 0) |
44 ((cso
->rt
[0].colormask
& PIPE_MASK_R
) ? (0x01 << 16) : 0) |
45 ((cso
->rt
[0].colormask
& PIPE_MASK_G
) ? (0x01 << 8) : 0) |
46 ((cso
->rt
[0].colormask
& PIPE_MASK_B
) ? (0x01 << 0) : 0)));
48 /* TODO: add NV40 MRT color mask */
50 if (cso
->logicop_enable
) {
51 so_method(so
, eng3d
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 2);
53 so_data (so
, nvgl_logicop_func(cso
->logicop_func
));
55 so_method(so
, eng3d
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 1);
59 so_method(so
, eng3d
, NV34TCL_DITHER_ENABLE
, 1);
60 so_data (so
, cso
->dither
? 1 : 0);
69 nvfx_blend_state_bind(struct pipe_context
*pipe
, void *hwcso
)
71 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
74 nvfx
->dirty
|= NVFX_NEW_BLEND
;
78 nvfx_blend_state_delete(struct pipe_context
*pipe
, void *hwcso
)
80 struct nvfx_blend_state
*bso
= hwcso
;
82 so_ref(NULL
, &bso
->so
);
87 nvfx_sampler_state_create(struct pipe_context
*pipe
,
88 const struct pipe_sampler_state
*cso
)
90 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
91 struct nvfx_sampler_state
*ps
;
93 ps
= MALLOC(sizeof(struct nvfx_sampler_state
));
95 /* on nv30, we use this as an internal flag */
96 ps
->fmt
= cso
->normalized_coords
? 0 : NV40TCL_TEX_FORMAT_RECT
;
98 ps
->filt
= nvfx_tex_filter(cso
);
99 ps
->wrap
= (nvfx_tex_wrap_mode(cso
->wrap_s
) << NV34TCL_TX_WRAP_S_SHIFT
) |
100 (nvfx_tex_wrap_mode(cso
->wrap_t
) << NV34TCL_TX_WRAP_T_SHIFT
) |
101 (nvfx_tex_wrap_mode(cso
->wrap_r
) << NV34TCL_TX_WRAP_R_SHIFT
) |
102 nvfx_tex_wrap_compare_mode(cso
);
103 ps
->bcol
= nvfx_tex_border_color(cso
->border_color
);
106 nv40_sampler_state_init(pipe
, ps
, cso
);
108 nv30_sampler_state_init(pipe
, ps
, cso
);
114 nvfx_sampler_state_bind(struct pipe_context
*pipe
, unsigned nr
, void **sampler
)
116 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
119 for (unit
= 0; unit
< nr
; unit
++) {
120 nvfx
->tex_sampler
[unit
] = sampler
[unit
];
121 nvfx
->dirty_samplers
|= (1 << unit
);
124 for (unit
= nr
; unit
< nvfx
->nr_samplers
; unit
++) {
125 nvfx
->tex_sampler
[unit
] = NULL
;
126 nvfx
->dirty_samplers
|= (1 << unit
);
129 nvfx
->nr_samplers
= nr
;
130 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
134 nvfx_sampler_state_delete(struct pipe_context
*pipe
, void *hwcso
)
140 nvfx_set_fragment_sampler_views(struct pipe_context
*pipe
,
142 struct pipe_sampler_view
**views
)
144 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
147 for (unit
= 0; unit
< nr
; unit
++) {
148 pipe_sampler_view_reference(&nv30
->fragment_sampler_views
[unit
],
150 pipe_texture_reference((struct pipe_texture
**)
151 &nvfx
->tex_miptree
[unit
], miptree
[unit
]);
152 nvfx
->dirty_samplers
|= (1 << unit
);
155 for (unit
= nr
; unit
< nvfx
->nr_textures
; unit
++) {
156 pipe_sampler_view_reference(&nv30
->fragment_sampler_views
[unit
],
158 pipe_texture_reference((struct pipe_texture
**)
159 &nvfx
->tex_miptree
[unit
], NULL
);
160 nvfx
->dirty_samplers
|= (1 << unit
);
163 nvfx
->nr_textures
= nr
;
164 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
168 static struct pipe_sampler_view
*
169 nv30_create_sampler_view(struct pipe_context
*pipe
,
170 struct pipe_texture
*texture
,
171 const struct pipe_sampler_view
*templ
)
173 struct pipe_sampler_view
*view
= CALLOC_STRUCT(pipe_sampler_view
);
177 view
->reference
.count
= 1;
178 view
->texture
= NULL
;
179 pipe_texture_reference(&view
->texture
, texture
);
180 view
->context
= pipe
;
188 nv30_sampler_view_destroy(struct pipe_context
*pipe
,
189 struct pipe_sampler_view
*view
)
191 pipe_texture_reference(&view
->texture
, NULL
);
196 nvfx_rasterizer_state_create(struct pipe_context
*pipe
,
197 const struct pipe_rasterizer_state
*cso
)
199 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
200 struct nvfx_rasterizer_state
*rsso
= CALLOC(1, sizeof(*rsso
));
201 struct nouveau_stateobj
*so
= so_new(9, 19, 0);
202 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
210 so_method(so
, eng3d
, NV34TCL_SHADE_MODEL
, 1);
211 so_data (so
, cso
->flatshade
? NV34TCL_SHADE_MODEL_FLAT
:
212 NV34TCL_SHADE_MODEL_SMOOTH
);
214 so_method(so
, eng3d
, NV34TCL_LINE_WIDTH
, 2);
215 so_data (so
, (unsigned char)(cso
->line_width
* 8.0) & 0xff);
216 so_data (so
, cso
->line_smooth
? 1 : 0);
217 so_method(so
, eng3d
, NV34TCL_LINE_STIPPLE_ENABLE
, 2);
218 so_data (so
, cso
->line_stipple_enable
? 1 : 0);
219 so_data (so
, (cso
->line_stipple_pattern
<< 16) |
220 cso
->line_stipple_factor
);
222 so_method(so
, eng3d
, NV34TCL_POINT_SIZE
, 1);
223 so_data (so
, fui(cso
->point_size
));
225 so_method(so
, eng3d
, NV34TCL_POLYGON_MODE_FRONT
, 6);
226 if (cso
->front_winding
== PIPE_WINDING_CCW
) {
227 so_data(so
, nvgl_polygon_mode(cso
->fill_ccw
));
228 so_data(so
, nvgl_polygon_mode(cso
->fill_cw
));
229 switch (cso
->cull_mode
) {
230 case PIPE_WINDING_CCW
:
231 so_data(so
, NV34TCL_CULL_FACE_FRONT
);
233 case PIPE_WINDING_CW
:
234 so_data(so
, NV34TCL_CULL_FACE_BACK
);
236 case PIPE_WINDING_BOTH
:
237 so_data(so
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
240 so_data(so
, NV34TCL_CULL_FACE_BACK
);
243 so_data(so
, NV34TCL_FRONT_FACE_CCW
);
245 so_data(so
, nvgl_polygon_mode(cso
->fill_cw
));
246 so_data(so
, nvgl_polygon_mode(cso
->fill_ccw
));
247 switch (cso
->cull_mode
) {
248 case PIPE_WINDING_CCW
:
249 so_data(so
, NV34TCL_CULL_FACE_BACK
);
251 case PIPE_WINDING_CW
:
252 so_data(so
, NV34TCL_CULL_FACE_FRONT
);
254 case PIPE_WINDING_BOTH
:
255 so_data(so
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
258 so_data(so
, NV34TCL_CULL_FACE_BACK
);
261 so_data(so
, NV34TCL_FRONT_FACE_CW
);
263 so_data(so
, cso
->poly_smooth
? 1 : 0);
264 so_data(so
, (cso
->cull_mode
!= PIPE_WINDING_NONE
) ? 1 : 0);
266 so_method(so
, eng3d
, NV34TCL_POLYGON_STIPPLE_ENABLE
, 1);
267 so_data (so
, cso
->poly_stipple_enable
? 1 : 0);
269 so_method(so
, eng3d
, NV34TCL_POLYGON_OFFSET_POINT_ENABLE
, 3);
270 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_POINT
) ||
271 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_POINT
))
275 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_LINE
) ||
276 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_LINE
))
280 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_FILL
) ||
281 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_FILL
))
285 if (cso
->offset_cw
|| cso
->offset_ccw
) {
286 so_method(so
, eng3d
, NV34TCL_POLYGON_OFFSET_FACTOR
, 2);
287 so_data (so
, fui(cso
->offset_scale
));
288 so_data (so
, fui(cso
->offset_units
* 2));
291 so_method(so
, eng3d
, NV34TCL_POINT_SPRITE
, 1);
292 if (cso
->point_quad_rasterization
) {
293 unsigned psctl
= (1 << 0), i
;
295 for (i
= 0; i
< 8; i
++) {
296 if ((cso
->sprite_coord_enable
>> i
) & 1)
297 psctl
|= (1 << (8 + i
));
305 so_ref(so
, &rsso
->so
);
312 nvfx_rasterizer_state_bind(struct pipe_context
*pipe
, void *hwcso
)
314 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
316 nvfx
->rasterizer
= hwcso
;
317 nvfx
->dirty
|= NVFX_NEW_RAST
;
318 nvfx
->draw_dirty
|= NVFX_NEW_RAST
;
322 nvfx_rasterizer_state_delete(struct pipe_context
*pipe
, void *hwcso
)
324 struct nvfx_rasterizer_state
*rsso
= hwcso
;
326 so_ref(NULL
, &rsso
->so
);
331 nvfx_depth_stencil_alpha_state_create(struct pipe_context
*pipe
,
332 const struct pipe_depth_stencil_alpha_state
*cso
)
334 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
335 struct nvfx_zsa_state
*zsaso
= CALLOC(1, sizeof(*zsaso
));
336 struct nouveau_stateobj
*so
= so_new(6, 20, 0);
337 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
339 so_method(so
, eng3d
, NV34TCL_DEPTH_FUNC
, 3);
340 so_data (so
, nvgl_comparison_op(cso
->depth
.func
));
341 so_data (so
, cso
->depth
.writemask
? 1 : 0);
342 so_data (so
, cso
->depth
.enabled
? 1 : 0);
344 so_method(so
, eng3d
, NV34TCL_ALPHA_FUNC_ENABLE
, 3);
345 so_data (so
, cso
->alpha
.enabled
? 1 : 0);
346 so_data (so
, nvgl_comparison_op(cso
->alpha
.func
));
347 so_data (so
, float_to_ubyte(cso
->alpha
.ref_value
));
349 if (cso
->stencil
[0].enabled
) {
350 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_ENABLE
, 3);
351 so_data (so
, cso
->stencil
[0].enabled
? 1 : 0);
352 so_data (so
, cso
->stencil
[0].writemask
);
353 so_data (so
, nvgl_comparison_op(cso
->stencil
[0].func
));
354 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_FUNC_MASK
, 4);
355 so_data (so
, cso
->stencil
[0].valuemask
);
356 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].fail_op
));
357 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].zfail_op
));
358 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].zpass_op
));
360 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_ENABLE
, 1);
364 if (cso
->stencil
[1].enabled
) {
365 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_ENABLE
, 3);
366 so_data (so
, cso
->stencil
[1].enabled
? 1 : 0);
367 so_data (so
, cso
->stencil
[1].writemask
);
368 so_data (so
, nvgl_comparison_op(cso
->stencil
[1].func
));
369 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_FUNC_MASK
, 4);
370 so_data (so
, cso
->stencil
[1].valuemask
);
371 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].fail_op
));
372 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].zfail_op
));
373 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].zpass_op
));
375 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_ENABLE
, 1);
379 so_ref(so
, &zsaso
->so
);
382 return (void *)zsaso
;
386 nvfx_depth_stencil_alpha_state_bind(struct pipe_context
*pipe
, void *hwcso
)
388 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
391 nvfx
->dirty
|= NVFX_NEW_ZSA
;
395 nvfx_depth_stencil_alpha_state_delete(struct pipe_context
*pipe
, void *hwcso
)
397 struct nvfx_zsa_state
*zsaso
= hwcso
;
399 so_ref(NULL
, &zsaso
->so
);
404 nvfx_vp_state_create(struct pipe_context
*pipe
,
405 const struct pipe_shader_state
*cso
)
407 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
408 struct nvfx_vertex_program
*vp
;
410 vp
= CALLOC(1, sizeof(struct nvfx_vertex_program
));
411 vp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
412 vp
->draw
= draw_create_vertex_shader(nvfx
->draw
, &vp
->pipe
);
418 nvfx_vp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
420 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
422 nvfx
->vertprog
= hwcso
;
423 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
424 nvfx
->draw_dirty
|= NVFX_NEW_VERTPROG
;
428 nvfx_vp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
430 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
431 struct nvfx_vertex_program
*vp
= hwcso
;
433 draw_delete_vertex_shader(nvfx
->draw
, vp
->draw
);
434 nvfx_vertprog_destroy(nvfx
, vp
);
435 FREE((void*)vp
->pipe
.tokens
);
440 nvfx_fp_state_create(struct pipe_context
*pipe
,
441 const struct pipe_shader_state
*cso
)
443 struct nvfx_fragment_program
*fp
;
445 fp
= CALLOC(1, sizeof(struct nvfx_fragment_program
));
446 fp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
448 tgsi_scan_shader(fp
->pipe
.tokens
, &fp
->info
);
454 nvfx_fp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
456 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
458 nvfx
->fragprog
= hwcso
;
459 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
463 nvfx_fp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
465 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
466 struct nvfx_fragment_program
*fp
= hwcso
;
468 nvfx_fragprog_destroy(nvfx
, fp
);
469 FREE((void*)fp
->pipe
.tokens
);
474 nvfx_set_blend_color(struct pipe_context
*pipe
,
475 const struct pipe_blend_color
*bcol
)
477 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
479 nvfx
->blend_colour
= *bcol
;
480 nvfx
->dirty
|= NVFX_NEW_BCOL
;
484 nvfx_set_stencil_ref(struct pipe_context
*pipe
,
485 const struct pipe_stencil_ref
*sr
)
487 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
489 nvfx
->stencil_ref
= *sr
;
490 nvfx
->dirty
|= NVFX_NEW_SR
;
494 nvfx_set_clip_state(struct pipe_context
*pipe
,
495 const struct pipe_clip_state
*clip
)
497 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
500 nvfx
->dirty
|= NVFX_NEW_UCP
;
501 nvfx
->draw_dirty
|= NVFX_NEW_UCP
;
505 nvfx_set_constant_buffer(struct pipe_context
*pipe
, uint shader
, uint index
,
506 struct pipe_buffer
*buf
)
508 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
510 nvfx
->constbuf
[shader
] = buf
;
511 nvfx
->constbuf_nr
[shader
] = buf
->size
/ (4 * sizeof(float));
513 if (shader
== PIPE_SHADER_VERTEX
) {
514 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
516 if (shader
== PIPE_SHADER_FRAGMENT
) {
517 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
522 nvfx_set_framebuffer_state(struct pipe_context
*pipe
,
523 const struct pipe_framebuffer_state
*fb
)
525 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
527 nvfx
->framebuffer
= *fb
;
528 nvfx
->dirty
|= NVFX_NEW_FB
;
532 nvfx_set_polygon_stipple(struct pipe_context
*pipe
,
533 const struct pipe_poly_stipple
*stipple
)
535 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
537 memcpy(nvfx
->stipple
, stipple
->stipple
, 4 * 32);
538 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
542 nvfx_set_scissor_state(struct pipe_context
*pipe
,
543 const struct pipe_scissor_state
*s
)
545 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
548 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
552 nvfx_set_viewport_state(struct pipe_context
*pipe
,
553 const struct pipe_viewport_state
*vpt
)
555 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
557 nvfx
->viewport
= *vpt
;
558 nvfx
->dirty
|= NVFX_NEW_VIEWPORT
;
559 nvfx
->draw_dirty
|= NVFX_NEW_VIEWPORT
;
563 nvfx_set_vertex_buffers(struct pipe_context
*pipe
, unsigned count
,
564 const struct pipe_vertex_buffer
*vb
)
566 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
568 memcpy(nvfx
->vtxbuf
, vb
, sizeof(*vb
) * count
);
569 nvfx
->vtxbuf_nr
= count
;
571 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
572 nvfx
->draw_dirty
|= NVFX_NEW_ARRAYS
;
576 nvfx_vtxelts_state_create(struct pipe_context
*pipe
,
577 unsigned num_elements
,
578 const struct pipe_vertex_element
*elements
)
580 struct nvfx_vtxelt_state
*cso
= CALLOC_STRUCT(nvfx_vtxelt_state
);
582 assert(num_elements
< 16); /* not doing fallbacks yet */
583 cso
->num_elements
= num_elements
;
584 memcpy(cso
->pipe
, elements
, num_elements
* sizeof(*elements
));
586 /* nvfx_vtxelt_construct(cso);*/
592 nvfx_vtxelts_state_delete(struct pipe_context
*pipe
, void *hwcso
)
598 nvfx_vtxelts_state_bind(struct pipe_context
*pipe
, void *hwcso
)
600 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
602 nvfx
->vtxelt
= hwcso
;
603 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
604 /*nvfx->draw_dirty |= NVFX_NEW_ARRAYS;*/
608 nvfx_init_state_functions(struct nvfx_context
*nvfx
)
610 nvfx
->pipe
.create_blend_state
= nvfx_blend_state_create
;
611 nvfx
->pipe
.bind_blend_state
= nvfx_blend_state_bind
;
612 nvfx
->pipe
.delete_blend_state
= nvfx_blend_state_delete
;
614 nvfx
->pipe
.create_sampler_state
= nvfx_sampler_state_create
;
615 nvfx
->pipe
.bind_fragment_sampler_states
= nvfx_sampler_state_bind
;
616 nvfx
->pipe
.delete_sampler_state
= nvfx_sampler_state_delete
;
617 nvfx
->pipe
.set_fragment_sampler_textures
= nvfx_set_sampler_texture
;
619 nvfx
->pipe
.create_rasterizer_state
= nvfx_rasterizer_state_create
;
620 nvfx
->pipe
.bind_rasterizer_state
= nvfx_rasterizer_state_bind
;
621 nvfx
->pipe
.delete_rasterizer_state
= nvfx_rasterizer_state_delete
;
623 nvfx
->pipe
.create_depth_stencil_alpha_state
=
624 nvfx_depth_stencil_alpha_state_create
;
625 nvfx
->pipe
.bind_depth_stencil_alpha_state
=
626 nvfx_depth_stencil_alpha_state_bind
;
627 nvfx
->pipe
.delete_depth_stencil_alpha_state
=
628 nvfx_depth_stencil_alpha_state_delete
;
630 nvfx
->pipe
.create_vs_state
= nvfx_vp_state_create
;
631 nvfx
->pipe
.bind_vs_state
= nvfx_vp_state_bind
;
632 nvfx
->pipe
.delete_vs_state
= nvfx_vp_state_delete
;
634 nvfx
->pipe
.create_fs_state
= nvfx_fp_state_create
;
635 nvfx
->pipe
.bind_fs_state
= nvfx_fp_state_bind
;
636 nvfx
->pipe
.delete_fs_state
= nvfx_fp_state_delete
;
638 nvfx
->pipe
.set_blend_color
= nvfx_set_blend_color
;
639 nvfx
->pipe
.set_stencil_ref
= nvfx_set_stencil_ref
;
640 nvfx
->pipe
.set_clip_state
= nvfx_set_clip_state
;
641 nvfx
->pipe
.set_constant_buffer
= nvfx_set_constant_buffer
;
642 nvfx
->pipe
.set_framebuffer_state
= nvfx_set_framebuffer_state
;
643 nvfx
->pipe
.set_polygon_stipple
= nvfx_set_polygon_stipple
;
644 nvfx
->pipe
.set_scissor_state
= nvfx_set_scissor_state
;
645 nvfx
->pipe
.set_viewport_state
= nvfx_set_viewport_state
;
647 nvfx
->pipe
.create_vertex_elements_state
= nvfx_vtxelts_state_create
;
648 nvfx
->pipe
.delete_vertex_elements_state
= nvfx_vtxelts_state_delete
;
649 nvfx
->pipe
.bind_vertex_elements_state
= nvfx_vtxelts_state_bind
;
651 nvfx
->pipe
.set_vertex_buffers
= nvfx_set_vertex_buffers
;