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 sb_data(sb
, nvgl_polygon_mode(cso
->fill_front
));
220 sb_data(sb
, nvgl_polygon_mode(cso
->fill_back
));
221 switch (cso
->cull_face
) {
222 case PIPE_FACE_FRONT
:
223 sb_data(sb
, NV34TCL_CULL_FACE_FRONT
);
226 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
228 case PIPE_FACE_FRONT_AND_BACK
:
229 sb_data(sb
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
232 sb_data(sb
, NV34TCL_CULL_FACE_BACK
);
235 if (cso
->front_ccw
) {
236 sb_data(sb
, NV34TCL_FRONT_FACE_CCW
);
238 sb_data(sb
, NV34TCL_FRONT_FACE_CW
);
240 sb_data(sb
, cso
->poly_smooth
? 1 : 0);
241 sb_data(sb
, (cso
->cull_face
!= PIPE_FACE_NONE
) ? 1 : 0);
243 sb_method(sb
, NV34TCL_POLYGON_STIPPLE_ENABLE
, 1);
244 sb_data(sb
, cso
->poly_stipple_enable
? 1 : 0);
246 sb_method(sb
, NV34TCL_POLYGON_OFFSET_POINT_ENABLE
, 3);
247 sb_data(sb
, cso
->offset_point
);
248 sb_data(sb
, cso
->offset_line
);
249 sb_data(sb
, cso
->offset_tri
);
251 if (cso
->offset_point
|| cso
->offset_line
|| cso
->offset_tri
) {
252 sb_method(sb
, NV34TCL_POLYGON_OFFSET_FACTOR
, 2);
253 sb_data(sb
, fui(cso
->offset_scale
));
254 sb_data(sb
, fui(cso
->offset_units
* 2));
257 sb_method(sb
, NV34TCL_POINT_SPRITE
, 1);
258 if (cso
->point_quad_rasterization
) {
259 unsigned psctl
= (1 << 0), i
;
261 for (i
= 0; i
< 8; i
++) {
262 if ((cso
->sprite_coord_enable
>> i
) & 1)
263 psctl
|= (1 << (8 + i
));
272 rsso
->sb_len
= sb_len(sb
, rsso
->sb
);
277 nvfx_rasterizer_state_bind(struct pipe_context
*pipe
, void *hwcso
)
279 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
281 if(nvfx
->rasterizer
&& hwcso
)
283 if(!nvfx
->rasterizer
|| ((struct nvfx_rasterizer_state
*)hwcso
)->pipe
.scissor
284 != nvfx
->rasterizer
->pipe
.scissor
)
286 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
287 nvfx
->draw_dirty
|= NVFX_NEW_SCISSOR
;
290 if(((struct nvfx_rasterizer_state
*)hwcso
)->pipe
.poly_stipple_enable
291 != nvfx
->rasterizer
->pipe
.poly_stipple_enable
)
293 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
294 nvfx
->draw_dirty
|= NVFX_NEW_STIPPLE
;
298 nvfx
->rasterizer
= hwcso
;
299 nvfx
->dirty
|= NVFX_NEW_RAST
;
300 nvfx
->draw_dirty
|= NVFX_NEW_RAST
;
304 nvfx_rasterizer_state_delete(struct pipe_context
*pipe
, void *hwcso
)
306 struct nvfx_rasterizer_state
*rsso
= hwcso
;
312 nvfx_depth_stencil_alpha_state_create(struct pipe_context
*pipe
,
313 const struct pipe_depth_stencil_alpha_state
*cso
)
315 struct nvfx_zsa_state
*zsaso
= CALLOC(1, sizeof(*zsaso
));
316 struct nouveau_statebuf_builder sb
= sb_init(zsaso
->sb
);
318 sb_method(sb
, NV34TCL_DEPTH_FUNC
, 3);
319 sb_data (sb
, nvgl_comparison_op(cso
->depth
.func
));
320 sb_data (sb
, cso
->depth
.writemask
? 1 : 0);
321 sb_data (sb
, cso
->depth
.enabled
? 1 : 0);
323 sb_method(sb
, NV34TCL_ALPHA_FUNC_ENABLE
, 3);
324 sb_data (sb
, cso
->alpha
.enabled
? 1 : 0);
325 sb_data (sb
, nvgl_comparison_op(cso
->alpha
.func
));
326 sb_data (sb
, float_to_ubyte(cso
->alpha
.ref_value
));
328 if (cso
->stencil
[0].enabled
) {
329 sb_method(sb
, NV34TCL_STENCIL_FRONT_ENABLE
, 3);
330 sb_data (sb
, cso
->stencil
[0].enabled
? 1 : 0);
331 sb_data (sb
, cso
->stencil
[0].writemask
);
332 sb_data (sb
, nvgl_comparison_op(cso
->stencil
[0].func
));
333 sb_method(sb
, NV34TCL_STENCIL_FRONT_FUNC_MASK
, 4);
334 sb_data (sb
, cso
->stencil
[0].valuemask
);
335 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].fail_op
));
336 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].zfail_op
));
337 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[0].zpass_op
));
339 sb_method(sb
, NV34TCL_STENCIL_FRONT_ENABLE
, 1);
343 if (cso
->stencil
[1].enabled
) {
344 sb_method(sb
, NV34TCL_STENCIL_BACK_ENABLE
, 3);
345 sb_data (sb
, cso
->stencil
[1].enabled
? 1 : 0);
346 sb_data (sb
, cso
->stencil
[1].writemask
);
347 sb_data (sb
, nvgl_comparison_op(cso
->stencil
[1].func
));
348 sb_method(sb
, NV34TCL_STENCIL_BACK_FUNC_MASK
, 4);
349 sb_data (sb
, cso
->stencil
[1].valuemask
);
350 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].fail_op
));
351 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].zfail_op
));
352 sb_data (sb
, nvgl_stencil_op(cso
->stencil
[1].zpass_op
));
354 sb_method(sb
, NV34TCL_STENCIL_BACK_ENABLE
, 1);
359 zsaso
->sb_len
= sb_len(sb
, zsaso
->sb
);
360 return (void *)zsaso
;
364 nvfx_depth_stencil_alpha_state_bind(struct pipe_context
*pipe
, void *hwcso
)
366 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
369 nvfx
->dirty
|= NVFX_NEW_ZSA
;
373 nvfx_depth_stencil_alpha_state_delete(struct pipe_context
*pipe
, void *hwcso
)
375 struct nvfx_zsa_state
*zsaso
= hwcso
;
381 nvfx_vp_state_create(struct pipe_context
*pipe
,
382 const struct pipe_shader_state
*cso
)
384 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
385 struct nvfx_vertex_program
*vp
;
387 vp
= CALLOC(1, sizeof(struct nvfx_vertex_program
));
388 vp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
389 vp
->draw
= draw_create_vertex_shader(nvfx
->draw
, &vp
->pipe
);
395 nvfx_vp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
397 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
399 nvfx
->vertprog
= hwcso
;
400 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
401 nvfx
->draw_dirty
|= NVFX_NEW_VERTPROG
;
405 nvfx_vp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
407 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
408 struct nvfx_vertex_program
*vp
= hwcso
;
410 draw_delete_vertex_shader(nvfx
->draw
, vp
->draw
);
411 nvfx_vertprog_destroy(nvfx
, vp
);
412 FREE((void*)vp
->pipe
.tokens
);
417 nvfx_fp_state_create(struct pipe_context
*pipe
,
418 const struct pipe_shader_state
*cso
)
420 struct nvfx_fragment_program
*fp
;
422 fp
= CALLOC(1, sizeof(struct nvfx_fragment_program
));
423 fp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
425 tgsi_scan_shader(fp
->pipe
.tokens
, &fp
->info
);
431 nvfx_fp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
433 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
435 nvfx
->fragprog
= hwcso
;
436 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
440 nvfx_fp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
442 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
443 struct nvfx_fragment_program
*fp
= hwcso
;
445 nvfx_fragprog_destroy(nvfx
, fp
);
446 FREE((void*)fp
->pipe
.tokens
);
451 nvfx_set_blend_color(struct pipe_context
*pipe
,
452 const struct pipe_blend_color
*bcol
)
454 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
456 nvfx
->blend_colour
= *bcol
;
457 nvfx
->dirty
|= NVFX_NEW_BCOL
;
461 nvfx_set_stencil_ref(struct pipe_context
*pipe
,
462 const struct pipe_stencil_ref
*sr
)
464 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
466 nvfx
->stencil_ref
= *sr
;
467 nvfx
->dirty
|= NVFX_NEW_SR
;
471 nvfx_set_clip_state(struct pipe_context
*pipe
,
472 const struct pipe_clip_state
*clip
)
474 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
477 nvfx
->dirty
|= NVFX_NEW_UCP
;
478 nvfx
->draw_dirty
|= NVFX_NEW_UCP
;
482 nvfx_set_sample_mask(struct pipe_context
*pipe
,
483 unsigned sample_mask
)
488 nvfx_set_constant_buffer(struct pipe_context
*pipe
, uint shader
, uint index
,
489 struct pipe_resource
*buf
)
491 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
493 nvfx
->constbuf
[shader
] = buf
;
494 nvfx
->constbuf_nr
[shader
] = buf
->width0
/ (4 * sizeof(float));
496 if (shader
== PIPE_SHADER_VERTEX
) {
497 nvfx
->dirty
|= NVFX_NEW_VERTCONST
;
499 if (shader
== PIPE_SHADER_FRAGMENT
) {
500 nvfx
->dirty
|= NVFX_NEW_FRAGCONST
;
505 nvfx_set_framebuffer_state(struct pipe_context
*pipe
,
506 const struct pipe_framebuffer_state
*fb
)
508 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
510 nvfx
->framebuffer
= *fb
;
511 nvfx
->dirty
|= NVFX_NEW_FB
;
515 nvfx_set_polygon_stipple(struct pipe_context
*pipe
,
516 const struct pipe_poly_stipple
*stipple
)
518 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
520 memcpy(nvfx
->stipple
, stipple
->stipple
, 4 * 32);
521 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
525 nvfx_set_scissor_state(struct pipe_context
*pipe
,
526 const struct pipe_scissor_state
*s
)
528 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
531 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
535 nvfx_set_viewport_state(struct pipe_context
*pipe
,
536 const struct pipe_viewport_state
*vpt
)
538 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
540 nvfx
->viewport
= *vpt
;
541 nvfx
->dirty
|= NVFX_NEW_VIEWPORT
;
542 nvfx
->draw_dirty
|= NVFX_NEW_VIEWPORT
;
546 nvfx_set_vertex_buffers(struct pipe_context
*pipe
, unsigned count
,
547 const struct pipe_vertex_buffer
*vb
)
549 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
551 memcpy(nvfx
->vtxbuf
, vb
, sizeof(*vb
) * count
);
552 nvfx
->vtxbuf_nr
= count
;
554 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
555 nvfx
->draw_dirty
|= NVFX_NEW_ARRAYS
;
559 nvfx_vtxelts_state_create(struct pipe_context
*pipe
,
560 unsigned num_elements
,
561 const struct pipe_vertex_element
*elements
)
563 struct nvfx_vtxelt_state
*cso
= CALLOC_STRUCT(nvfx_vtxelt_state
);
565 assert(num_elements
< 16); /* not doing fallbacks yet */
566 cso
->num_elements
= num_elements
;
567 memcpy(cso
->pipe
, elements
, num_elements
* sizeof(*elements
));
569 /* nvfx_vtxelt_construct(cso);*/
575 nvfx_vtxelts_state_delete(struct pipe_context
*pipe
, void *hwcso
)
581 nvfx_vtxelts_state_bind(struct pipe_context
*pipe
, void *hwcso
)
583 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
585 nvfx
->vtxelt
= hwcso
;
586 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
587 /*nvfx->draw_dirty |= NVFX_NEW_ARRAYS;*/
591 nvfx_init_state_functions(struct nvfx_context
*nvfx
)
593 nvfx
->pipe
.create_blend_state
= nvfx_blend_state_create
;
594 nvfx
->pipe
.bind_blend_state
= nvfx_blend_state_bind
;
595 nvfx
->pipe
.delete_blend_state
= nvfx_blend_state_delete
;
597 nvfx
->pipe
.create_sampler_state
= nvfx_sampler_state_create
;
598 nvfx
->pipe
.bind_fragment_sampler_states
= nvfx_sampler_state_bind
;
599 nvfx
->pipe
.delete_sampler_state
= nvfx_sampler_state_delete
;
600 nvfx
->pipe
.set_fragment_sampler_views
= nvfx_set_fragment_sampler_views
;
601 nvfx
->pipe
.create_sampler_view
= nvfx_create_sampler_view
;
602 nvfx
->pipe
.sampler_view_destroy
= nvfx_sampler_view_destroy
;
604 nvfx
->pipe
.create_rasterizer_state
= nvfx_rasterizer_state_create
;
605 nvfx
->pipe
.bind_rasterizer_state
= nvfx_rasterizer_state_bind
;
606 nvfx
->pipe
.delete_rasterizer_state
= nvfx_rasterizer_state_delete
;
608 nvfx
->pipe
.create_depth_stencil_alpha_state
=
609 nvfx_depth_stencil_alpha_state_create
;
610 nvfx
->pipe
.bind_depth_stencil_alpha_state
=
611 nvfx_depth_stencil_alpha_state_bind
;
612 nvfx
->pipe
.delete_depth_stencil_alpha_state
=
613 nvfx_depth_stencil_alpha_state_delete
;
615 nvfx
->pipe
.create_vs_state
= nvfx_vp_state_create
;
616 nvfx
->pipe
.bind_vs_state
= nvfx_vp_state_bind
;
617 nvfx
->pipe
.delete_vs_state
= nvfx_vp_state_delete
;
619 nvfx
->pipe
.create_fs_state
= nvfx_fp_state_create
;
620 nvfx
->pipe
.bind_fs_state
= nvfx_fp_state_bind
;
621 nvfx
->pipe
.delete_fs_state
= nvfx_fp_state_delete
;
623 nvfx
->pipe
.set_blend_color
= nvfx_set_blend_color
;
624 nvfx
->pipe
.set_stencil_ref
= nvfx_set_stencil_ref
;
625 nvfx
->pipe
.set_clip_state
= nvfx_set_clip_state
;
626 nvfx
->pipe
.set_sample_mask
= nvfx_set_sample_mask
;
627 nvfx
->pipe
.set_constant_buffer
= nvfx_set_constant_buffer
;
628 nvfx
->pipe
.set_framebuffer_state
= nvfx_set_framebuffer_state
;
629 nvfx
->pipe
.set_polygon_stipple
= nvfx_set_polygon_stipple
;
630 nvfx
->pipe
.set_scissor_state
= nvfx_set_scissor_state
;
631 nvfx
->pipe
.set_viewport_state
= nvfx_set_viewport_state
;
633 nvfx
->pipe
.create_vertex_elements_state
= nvfx_vtxelts_state_create
;
634 nvfx
->pipe
.delete_vertex_elements_state
= nvfx_vtxelts_state_delete
;
635 nvfx
->pipe
.bind_vertex_elements_state
= nvfx_vtxelts_state_bind
;
637 nvfx
->pipe
.set_vertex_buffers
= nvfx_set_vertex_buffers
;