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 nvfx_blend_state
*bso
= CALLOC(1, sizeof(*bso
));
19 struct nouveau_statebuf_builder sb
= sb_init(bso
->sb
);
21 if (cso
->rt
[0].blend_enable
) {
22 sb_method(sb
, NV34TCL_BLEND_FUNC_ENABLE
, 3);
24 sb_data(sb
, (nvgl_blend_func(cso
->rt
[0].alpha_src_factor
) << 16) |
25 nvgl_blend_func(cso
->rt
[0].rgb_src_factor
));
26 sb_data(sb
, nvgl_blend_func(cso
->rt
[0].alpha_dst_factor
) << 16 |
27 nvgl_blend_func(cso
->rt
[0].rgb_dst_factor
));
28 if(nvfx
->screen
->base
.device
->chipset
< 0x40) {
29 sb_method(sb
, NV34TCL_BLEND_EQUATION
, 1);
30 sb_data(sb
, nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
32 sb_method(sb
, NV40TCL_BLEND_EQUATION
, 1);
33 sb_data(sb
, nvgl_blend_eqn(cso
->rt
[0].alpha_func
) << 16 |
34 nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
37 sb_method(sb
, NV34TCL_BLEND_FUNC_ENABLE
, 1);
41 sb_method(sb
, NV34TCL_COLOR_MASK
, 1);
42 sb_data(sb
, (((cso
->rt
[0].colormask
& PIPE_MASK_A
) ? (0x01 << 24) : 0) |
43 ((cso
->rt
[0].colormask
& PIPE_MASK_R
) ? (0x01 << 16) : 0) |
44 ((cso
->rt
[0].colormask
& PIPE_MASK_G
) ? (0x01 << 8) : 0) |
45 ((cso
->rt
[0].colormask
& PIPE_MASK_B
) ? (0x01 << 0) : 0)));
47 /* TODO: add NV40 MRT color mask */
49 if (cso
->logicop_enable
) {
50 sb_method(sb
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 2);
52 sb_data(sb
, nvgl_logicop_func(cso
->logicop_func
));
54 sb_method(sb
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 1);
58 sb_method(sb
, NV34TCL_DITHER_ENABLE
, 1);
59 sb_data(sb
, cso
->dither
? 1 : 0);
61 bso
->sb_len
= sb_len(sb
, bso
->sb
);
67 nvfx_blend_state_bind(struct pipe_context
*pipe
, void *hwcso
)
69 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
72 nvfx
->dirty
|= NVFX_NEW_BLEND
;
76 nvfx_blend_state_delete(struct pipe_context
*pipe
, void *hwcso
)
78 struct nvfx_blend_state
*bso
= hwcso
;
84 nvfx_sampler_state_create(struct pipe_context
*pipe
,
85 const struct pipe_sampler_state
*cso
)
87 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
88 struct nvfx_sampler_state
*ps
;
90 ps
= MALLOC(sizeof(struct nvfx_sampler_state
));
92 /* on nv30, we use this as an internal flag */
93 ps
->fmt
= cso
->normalized_coords
? 0 : NV40TCL_TEX_FORMAT_RECT
;
95 ps
->filt
= nvfx_tex_filter(cso
);
96 ps
->wrap
= (nvfx_tex_wrap_mode(cso
->wrap_s
) << NV34TCL_TX_WRAP_S_SHIFT
) |
97 (nvfx_tex_wrap_mode(cso
->wrap_t
) << NV34TCL_TX_WRAP_T_SHIFT
) |
98 (nvfx_tex_wrap_mode(cso
->wrap_r
) << NV34TCL_TX_WRAP_R_SHIFT
) |
99 nvfx_tex_wrap_compare_mode(cso
);
100 ps
->bcol
= nvfx_tex_border_color(cso
->border_color
);
103 nv40_sampler_state_init(pipe
, ps
, cso
);
105 nv30_sampler_state_init(pipe
, ps
, cso
);
111 nvfx_sampler_state_bind(struct pipe_context
*pipe
, unsigned nr
, void **sampler
)
113 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
116 for (unit
= 0; unit
< nr
; unit
++) {
117 nvfx
->tex_sampler
[unit
] = sampler
[unit
];
118 nvfx
->dirty_samplers
|= (1 << unit
);
121 for (unit
= nr
; unit
< nvfx
->nr_samplers
; unit
++) {
122 nvfx
->tex_sampler
[unit
] = NULL
;
123 nvfx
->dirty_samplers
|= (1 << unit
);
126 nvfx
->nr_samplers
= nr
;
127 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
131 nvfx_sampler_state_delete(struct pipe_context
*pipe
, void *hwcso
)
137 nvfx_set_fragment_sampler_views(struct pipe_context
*pipe
,
139 struct pipe_sampler_view
**views
)
141 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
144 for (unit
= 0; unit
< nr
; unit
++) {
145 pipe_sampler_view_reference(&nvfx
->fragment_sampler_views
[unit
],
147 nvfx
->dirty_samplers
|= (1 << unit
);
150 for (unit
= nr
; unit
< nvfx
->nr_textures
; unit
++) {
151 pipe_sampler_view_reference(&nvfx
->fragment_sampler_views
[unit
],
153 nvfx
->dirty_samplers
|= (1 << unit
);
156 nvfx
->nr_textures
= nr
;
157 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
161 static struct pipe_sampler_view
*
162 nvfx_create_sampler_view(struct pipe_context
*pipe
,
163 struct pipe_resource
*texture
,
164 const struct pipe_sampler_view
*templ
)
166 struct pipe_sampler_view
*view
= CALLOC_STRUCT(pipe_sampler_view
);
170 view
->reference
.count
= 1;
171 view
->texture
= NULL
;
172 pipe_resource_reference(&view
->texture
, texture
);
173 view
->context
= pipe
;
181 nvfx_sampler_view_destroy(struct pipe_context
*pipe
,
182 struct pipe_sampler_view
*view
)
184 pipe_resource_reference(&view
->texture
, NULL
);
189 nvfx_rasterizer_state_create(struct pipe_context
*pipe
,
190 const struct pipe_rasterizer_state
*cso
)
192 struct nvfx_rasterizer_state
*rsso
= CALLOC(1, sizeof(*rsso
));
193 struct nouveau_statebuf_builder sb
= sb_init(rsso
->sb
);
200 sb_method(sb
, NV34TCL_SHADE_MODEL
, 1);
201 sb_data(sb
, cso
->flatshade
? NV34TCL_SHADE_MODEL_FLAT
:
202 NV34TCL_SHADE_MODEL_SMOOTH
);
204 sb_method(sb
, NV34TCL_VERTEX_TWO_SIDE_ENABLE
, 1);
205 sb_data(sb
, cso
->light_twoside
);
207 sb_method(sb
, NV34TCL_LINE_WIDTH
, 2);
208 sb_data(sb
, (unsigned char)(cso
->line_width
* 8.0) & 0xff);
209 sb_data(sb
, cso
->line_smooth
? 1 : 0);
210 sb_method(sb
, NV34TCL_LINE_STIPPLE_ENABLE
, 2);
211 sb_data(sb
, cso
->line_stipple_enable
? 1 : 0);
212 sb_data(sb
, (cso
->line_stipple_pattern
<< 16) |
213 cso
->line_stipple_factor
);
215 sb_method(sb
, NV34TCL_POINT_SIZE
, 1);
216 sb_data(sb
, fui(cso
->point_size
));
218 sb_method(sb
, NV34TCL_POLYGON_MODE_FRONT
, 6);
219 if (cso
->front_winding
== PIPE_WINDING_CCW
) {
220 sb_data(sb
, nvgl_polygon_mode(cso
->fill_ccw
));
221 sb_data(sb
, nvgl_polygon_mode(cso
->fill_cw
));
222 switch (cso
->cull_mode
) {
223 case PIPE_WINDING_CCW
:
224 sb_data(sb
, NV34TCL_CULL_FACE_FRONT
);
226 case PIPE_WINDING_CW
:
227 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
229 case PIPE_WINDING_BOTH
:
230 sb_data(sb
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
233 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
236 sb_data(sb
, NV34TCL_FRONT_FACE_CCW
);
238 sb_data(sb
, nvgl_polygon_mode(cso
->fill_cw
));
239 sb_data(sb
, nvgl_polygon_mode(cso
->fill_ccw
));
240 switch (cso
->cull_mode
) {
241 case PIPE_WINDING_CCW
:
242 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
244 case PIPE_WINDING_CW
:
245 sb_data(sb
, NV34TCL_CULL_FACE_FRONT
);
247 case PIPE_WINDING_BOTH
:
248 sb_data(sb
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
251 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
254 sb_data(sb
, NV34TCL_FRONT_FACE_CW
);
256 sb_data(sb
, cso
->poly_smooth
? 1 : 0);
257 sb_data(sb
, (cso
->cull_mode
!= PIPE_WINDING_NONE
) ? 1 : 0);
259 sb_method(sb
, NV34TCL_POLYGON_STIPPLE_ENABLE
, 1);
260 sb_data(sb
, cso
->poly_stipple_enable
? 1 : 0);
262 sb_method(sb
, NV34TCL_POLYGON_OFFSET_POINT_ENABLE
, 3);
263 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_POINT
) ||
264 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_POINT
))
268 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_LINE
) ||
269 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_LINE
))
273 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_FILL
) ||
274 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_FILL
))
278 if (cso
->offset_cw
|| cso
->offset_ccw
) {
279 sb_method(sb
, NV34TCL_POLYGON_OFFSET_FACTOR
, 2);
280 sb_data(sb
, fui(cso
->offset_scale
));
281 sb_data(sb
, fui(cso
->offset_units
* 2));
284 sb_method(sb
, NV34TCL_POINT_SPRITE
, 1);
285 if (cso
->point_quad_rasterization
) {
286 unsigned psctl
= (1 << 0), i
;
288 for (i
= 0; i
< 8; i
++) {
289 if ((cso
->sprite_coord_enable
>> i
) & 1)
290 psctl
|= (1 << (8 + i
));
299 rsso
->sb_len
= sb_len(sb
, rsso
->sb
);
304 nvfx_rasterizer_state_bind(struct pipe_context
*pipe
, void *hwcso
)
306 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
308 if(nvfx
->rasterizer
&& hwcso
)
310 if(!nvfx
->rasterizer
|| ((struct nvfx_rasterizer_state
*)hwcso
)->pipe
.scissor
311 != nvfx
->rasterizer
->pipe
.scissor
)
313 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
314 nvfx
->draw_dirty
|= NVFX_NEW_SCISSOR
;
317 if(((struct nvfx_rasterizer_state
*)hwcso
)->pipe
.poly_stipple_enable
318 != nvfx
->rasterizer
->pipe
.poly_stipple_enable
)
320 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
321 nvfx
->draw_dirty
|= NVFX_NEW_STIPPLE
;
325 nvfx
->rasterizer
= hwcso
;
326 nvfx
->dirty
|= NVFX_NEW_RAST
;
327 nvfx
->draw_dirty
|= NVFX_NEW_RAST
;
331 nvfx_rasterizer_state_delete(struct pipe_context
*pipe
, void *hwcso
)
333 struct nvfx_rasterizer_state
*rsso
= hwcso
;
339 nvfx_depth_stencil_alpha_state_create(struct pipe_context
*pipe
,
340 const struct pipe_depth_stencil_alpha_state
*cso
)
342 struct nvfx_zsa_state
*zsaso
= CALLOC(1, sizeof(*zsaso
));
343 struct nouveau_statebuf_builder sb
= sb_init(zsaso
->sb
);
345 sb_method(sb
, NV34TCL_DEPTH_FUNC
, 3);
346 sb_data (sb
, nvgl_comparison_op(cso
->depth
.func
));
347 sb_data (sb
, cso
->depth
.writemask
? 1 : 0);
348 sb_data (sb
, cso
->depth
.enabled
? 1 : 0);
350 sb_method(sb
, NV34TCL_ALPHA_FUNC_ENABLE
, 3);
351 sb_data (sb
, cso
->alpha
.enabled
? 1 : 0);
352 sb_data (sb
, nvgl_comparison_op(cso
->alpha
.func
));
353 sb_data (sb
, float_to_ubyte(cso
->alpha
.ref_value
));
355 if (cso
->stencil
[0].enabled
) {
356 sb_method(sb
, NV34TCL_STENCIL_FRONT_ENABLE
, 3);
357 sb_data (sb
, cso
->stencil
[0].enabled
? 1 : 0);
358 sb_data (sb
, cso
->stencil
[0].writemask
);
359 sb_data (sb
, nvgl_comparison_op(cso
->stencil
[0].func
));
360 sb_method(sb
, NV34TCL_STENCIL_FRONT_FUNC_MASK
, 4);
361 sb_data (sb
, cso
->stencil
[0].valuemask
);
362 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].fail_op
));
363 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].zfail_op
));
364 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].zpass_op
));
366 sb_method(sb
, NV34TCL_STENCIL_FRONT_ENABLE
, 1);
370 if (cso
->stencil
[1].enabled
) {
371 sb_method(sb
, NV34TCL_STENCIL_BACK_ENABLE
, 3);
372 sb_data (sb
, cso
->stencil
[1].enabled
? 1 : 0);
373 sb_data (sb
, cso
->stencil
[1].writemask
);
374 sb_data (sb
, nvgl_comparison_op(cso
->stencil
[1].func
));
375 sb_method(sb
, NV34TCL_STENCIL_BACK_FUNC_MASK
, 4);
376 sb_data (sb
, cso
->stencil
[1].valuemask
);
377 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].fail_op
));
378 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].zfail_op
));
379 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].zpass_op
));
381 sb_method(sb
, NV34TCL_STENCIL_BACK_ENABLE
, 1);
386 zsaso
->sb_len
= sb_len(sb
, zsaso
->sb
);
387 return (void *)zsaso
;
391 nvfx_depth_stencil_alpha_state_bind(struct pipe_context
*pipe
, void *hwcso
)
393 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
396 nvfx
->dirty
|= NVFX_NEW_ZSA
;
400 nvfx_depth_stencil_alpha_state_delete(struct pipe_context
*pipe
, void *hwcso
)
402 struct nvfx_zsa_state
*zsaso
= hwcso
;
408 nvfx_vp_state_create(struct pipe_context
*pipe
,
409 const struct pipe_shader_state
*cso
)
411 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
412 struct nvfx_vertex_program
*vp
;
414 vp
= CALLOC(1, sizeof(struct nvfx_vertex_program
));
415 vp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
416 vp
->draw
= draw_create_vertex_shader(nvfx
->draw
, &vp
->pipe
);
422 nvfx_vp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
424 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
426 nvfx
->vertprog
= hwcso
;
427 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
428 nvfx
->draw_dirty
|= NVFX_NEW_VERTPROG
;
432 nvfx_vp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
434 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
435 struct nvfx_vertex_program
*vp
= hwcso
;
437 draw_delete_vertex_shader(nvfx
->draw
, vp
->draw
);
438 nvfx_vertprog_destroy(nvfx
, vp
);
439 FREE((void*)vp
->pipe
.tokens
);
444 nvfx_fp_state_create(struct pipe_context
*pipe
,
445 const struct pipe_shader_state
*cso
)
447 struct nvfx_fragment_program
*fp
;
449 fp
= CALLOC(1, sizeof(struct nvfx_fragment_program
));
450 fp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
452 tgsi_scan_shader(fp
->pipe
.tokens
, &fp
->info
);
458 nvfx_fp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
460 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
462 nvfx
->fragprog
= hwcso
;
463 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
467 nvfx_fp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
469 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
470 struct nvfx_fragment_program
*fp
= hwcso
;
472 nvfx_fragprog_destroy(nvfx
, fp
);
473 FREE((void*)fp
->pipe
.tokens
);
478 nvfx_set_blend_color(struct pipe_context
*pipe
,
479 const struct pipe_blend_color
*bcol
)
481 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
483 nvfx
->blend_colour
= *bcol
;
484 nvfx
->dirty
|= NVFX_NEW_BCOL
;
488 nvfx_set_stencil_ref(struct pipe_context
*pipe
,
489 const struct pipe_stencil_ref
*sr
)
491 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
493 nvfx
->stencil_ref
= *sr
;
494 nvfx
->dirty
|= NVFX_NEW_SR
;
498 nvfx_set_clip_state(struct pipe_context
*pipe
,
499 const struct pipe_clip_state
*clip
)
501 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
504 nvfx
->dirty
|= NVFX_NEW_UCP
;
505 nvfx
->draw_dirty
|= NVFX_NEW_UCP
;
509 nvfx_set_constant_buffer(struct pipe_context
*pipe
, uint shader
, uint index
,
510 struct pipe_resource
*buf
)
512 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
514 nvfx
->constbuf
[shader
] = buf
;
515 nvfx
->constbuf_nr
[shader
] = buf
->width0
/ (4 * sizeof(float));
517 if (shader
== PIPE_SHADER_VERTEX
) {
518 nvfx
->dirty
|= NVFX_NEW_VERTCONST
;
520 if (shader
== PIPE_SHADER_FRAGMENT
) {
521 nvfx
->dirty
|= NVFX_NEW_FRAGCONST
;
526 nvfx_set_framebuffer_state(struct pipe_context
*pipe
,
527 const struct pipe_framebuffer_state
*fb
)
529 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
531 nvfx
->framebuffer
= *fb
;
532 nvfx
->dirty
|= NVFX_NEW_FB
;
536 nvfx_set_polygon_stipple(struct pipe_context
*pipe
,
537 const struct pipe_poly_stipple
*stipple
)
539 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
541 memcpy(nvfx
->stipple
, stipple
->stipple
, 4 * 32);
542 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
546 nvfx_set_scissor_state(struct pipe_context
*pipe
,
547 const struct pipe_scissor_state
*s
)
549 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
552 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
556 nvfx_set_viewport_state(struct pipe_context
*pipe
,
557 const struct pipe_viewport_state
*vpt
)
559 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
561 nvfx
->viewport
= *vpt
;
562 nvfx
->dirty
|= NVFX_NEW_VIEWPORT
;
563 nvfx
->draw_dirty
|= NVFX_NEW_VIEWPORT
;
567 nvfx_set_vertex_buffers(struct pipe_context
*pipe
, unsigned count
,
568 const struct pipe_vertex_buffer
*vb
)
570 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
572 memcpy(nvfx
->vtxbuf
, vb
, sizeof(*vb
) * count
);
573 nvfx
->vtxbuf_nr
= count
;
575 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
576 nvfx
->draw_dirty
|= NVFX_NEW_ARRAYS
;
580 nvfx_vtxelts_state_create(struct pipe_context
*pipe
,
581 unsigned num_elements
,
582 const struct pipe_vertex_element
*elements
)
584 struct nvfx_vtxelt_state
*cso
= CALLOC_STRUCT(nvfx_vtxelt_state
);
586 assert(num_elements
< 16); /* not doing fallbacks yet */
587 cso
->num_elements
= num_elements
;
588 memcpy(cso
->pipe
, elements
, num_elements
* sizeof(*elements
));
590 /* nvfx_vtxelt_construct(cso);*/
596 nvfx_vtxelts_state_delete(struct pipe_context
*pipe
, void *hwcso
)
602 nvfx_vtxelts_state_bind(struct pipe_context
*pipe
, void *hwcso
)
604 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
606 nvfx
->vtxelt
= hwcso
;
607 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
608 /*nvfx->draw_dirty |= NVFX_NEW_ARRAYS;*/
612 nvfx_init_state_functions(struct nvfx_context
*nvfx
)
614 nvfx
->pipe
.create_blend_state
= nvfx_blend_state_create
;
615 nvfx
->pipe
.bind_blend_state
= nvfx_blend_state_bind
;
616 nvfx
->pipe
.delete_blend_state
= nvfx_blend_state_delete
;
618 nvfx
->pipe
.create_sampler_state
= nvfx_sampler_state_create
;
619 nvfx
->pipe
.bind_fragment_sampler_states
= nvfx_sampler_state_bind
;
620 nvfx
->pipe
.delete_sampler_state
= nvfx_sampler_state_delete
;
621 nvfx
->pipe
.set_fragment_sampler_views
= nvfx_set_fragment_sampler_views
;
622 nvfx
->pipe
.create_sampler_view
= nvfx_create_sampler_view
;
623 nvfx
->pipe
.sampler_view_destroy
= nvfx_sampler_view_destroy
;
625 nvfx
->pipe
.create_rasterizer_state
= nvfx_rasterizer_state_create
;
626 nvfx
->pipe
.bind_rasterizer_state
= nvfx_rasterizer_state_bind
;
627 nvfx
->pipe
.delete_rasterizer_state
= nvfx_rasterizer_state_delete
;
629 nvfx
->pipe
.create_depth_stencil_alpha_state
=
630 nvfx_depth_stencil_alpha_state_create
;
631 nvfx
->pipe
.bind_depth_stencil_alpha_state
=
632 nvfx_depth_stencil_alpha_state_bind
;
633 nvfx
->pipe
.delete_depth_stencil_alpha_state
=
634 nvfx_depth_stencil_alpha_state_delete
;
636 nvfx
->pipe
.create_vs_state
= nvfx_vp_state_create
;
637 nvfx
->pipe
.bind_vs_state
= nvfx_vp_state_bind
;
638 nvfx
->pipe
.delete_vs_state
= nvfx_vp_state_delete
;
640 nvfx
->pipe
.create_fs_state
= nvfx_fp_state_create
;
641 nvfx
->pipe
.bind_fs_state
= nvfx_fp_state_bind
;
642 nvfx
->pipe
.delete_fs_state
= nvfx_fp_state_delete
;
644 nvfx
->pipe
.set_blend_color
= nvfx_set_blend_color
;
645 nvfx
->pipe
.set_stencil_ref
= nvfx_set_stencil_ref
;
646 nvfx
->pipe
.set_clip_state
= nvfx_set_clip_state
;
647 nvfx
->pipe
.set_constant_buffer
= nvfx_set_constant_buffer
;
648 nvfx
->pipe
.set_framebuffer_state
= nvfx_set_framebuffer_state
;
649 nvfx
->pipe
.set_polygon_stipple
= nvfx_set_polygon_stipple
;
650 nvfx
->pipe
.set_scissor_state
= nvfx_set_scissor_state
;
651 nvfx
->pipe
.set_viewport_state
= nvfx_set_viewport_state
;
653 nvfx
->pipe
.create_vertex_elements_state
= nvfx_vtxelts_state_create
;
654 nvfx
->pipe
.delete_vertex_elements_state
= nvfx_vtxelts_state_delete
;
655 nvfx
->pipe
.bind_vertex_elements_state
= nvfx_vtxelts_state_bind
;
657 nvfx
->pipe
.set_vertex_buffers
= nvfx_set_vertex_buffers
;