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"
13 nvfx_blend_state_create(struct pipe_context
*pipe
,
14 const struct pipe_blend_state
*cso
)
16 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
17 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
18 struct nvfx_blend_state
*bso
= CALLOC(1, sizeof(*bso
));
19 struct nouveau_stateobj
*so
= so_new(5, 8, 0);
21 if (cso
->rt
[0].blend_enable
) {
22 so_method(so
, eng3d
, NV34TCL_BLEND_FUNC_ENABLE
, 3);
24 so_data (so
, (nvgl_blend_func(cso
->rt
[0].alpha_src_factor
) << 16) |
25 nvgl_blend_func(cso
->rt
[0].rgb_src_factor
));
26 so_data (so
, 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 so_method(so
, eng3d
, NV34TCL_BLEND_EQUATION
, 1);
30 so_data (so
, nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
32 so_method(so
, eng3d
, NV40TCL_BLEND_EQUATION
, 1);
33 so_data (so
, nvgl_blend_eqn(cso
->rt
[0].alpha_func
) << 16 |
34 nvgl_blend_eqn(cso
->rt
[0].rgb_func
));
37 so_method(so
, eng3d
, NV34TCL_BLEND_FUNC_ENABLE
, 1);
41 so_method(so
, eng3d
, NV34TCL_COLOR_MASK
, 1);
42 so_data (so
, (((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 so_method(so
, eng3d
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 2);
52 so_data (so
, nvgl_logicop_func(cso
->logicop_func
));
54 so_method(so
, eng3d
, NV34TCL_COLOR_LOGIC_OP_ENABLE
, 1);
58 so_method(so
, eng3d
, NV34TCL_DITHER_ENABLE
, 1);
59 so_data (so
, cso
->dither
? 1 : 0);
68 nvfx_blend_state_bind(struct pipe_context
*pipe
, void *hwcso
)
70 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
73 nvfx
->dirty
|= NVFX_NEW_BLEND
;
77 nvfx_blend_state_delete(struct pipe_context
*pipe
, void *hwcso
)
79 struct nvfx_blend_state
*bso
= hwcso
;
81 so_ref(NULL
, &bso
->so
);
86 nv40_sampler_state_bind(struct pipe_context
*pipe
, unsigned nr
, void **sampler
)
88 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
91 for (unit
= 0; unit
< nr
; unit
++) {
92 nvfx
->tex_sampler
[unit
] = sampler
[unit
];
93 nvfx
->dirty_samplers
|= (1 << unit
);
96 for (unit
= nr
; unit
< nvfx
->nr_samplers
; unit
++) {
97 nvfx
->tex_sampler
[unit
] = NULL
;
98 nvfx
->dirty_samplers
|= (1 << unit
);
101 nvfx
->nr_samplers
= nr
;
102 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
106 nv40_sampler_state_delete(struct pipe_context
*pipe
, void *hwcso
)
112 nvfx_set_sampler_texture(struct pipe_context
*pipe
, unsigned nr
,
113 struct pipe_texture
**miptree
)
115 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
118 for (unit
= 0; unit
< nr
; unit
++) {
119 pipe_texture_reference((struct pipe_texture
**)
120 &nvfx
->tex_miptree
[unit
], miptree
[unit
]);
121 nvfx
->dirty_samplers
|= (1 << unit
);
124 for (unit
= nr
; unit
< nvfx
->nr_textures
; unit
++) {
125 pipe_texture_reference((struct pipe_texture
**)
126 &nvfx
->tex_miptree
[unit
], NULL
);
127 nvfx
->dirty_samplers
|= (1 << unit
);
130 nvfx
->nr_textures
= nr
;
131 nvfx
->dirty
|= NVFX_NEW_SAMPLER
;
135 nvfx_rasterizer_state_create(struct pipe_context
*pipe
,
136 const struct pipe_rasterizer_state
*cso
)
138 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
139 struct nvfx_rasterizer_state
*rsso
= CALLOC(1, sizeof(*rsso
));
140 struct nouveau_stateobj
*so
= so_new(9, 19, 0);
141 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
149 so_method(so
, eng3d
, NV34TCL_SHADE_MODEL
, 1);
150 so_data (so
, cso
->flatshade
? NV34TCL_SHADE_MODEL_FLAT
:
151 NV34TCL_SHADE_MODEL_SMOOTH
);
153 so_method(so
, eng3d
, NV34TCL_LINE_WIDTH
, 2);
154 so_data (so
, (unsigned char)(cso
->line_width
* 8.0) & 0xff);
155 so_data (so
, cso
->line_smooth
? 1 : 0);
156 so_method(so
, eng3d
, NV34TCL_LINE_STIPPLE_ENABLE
, 2);
157 so_data (so
, cso
->line_stipple_enable
? 1 : 0);
158 so_data (so
, (cso
->line_stipple_pattern
<< 16) |
159 cso
->line_stipple_factor
);
161 so_method(so
, eng3d
, NV34TCL_POINT_SIZE
, 1);
162 so_data (so
, fui(cso
->point_size
));
164 so_method(so
, eng3d
, NV34TCL_POLYGON_MODE_FRONT
, 6);
165 if (cso
->front_winding
== PIPE_WINDING_CCW
) {
166 so_data(so
, nvgl_polygon_mode(cso
->fill_ccw
));
167 so_data(so
, nvgl_polygon_mode(cso
->fill_cw
));
168 switch (cso
->cull_mode
) {
169 case PIPE_WINDING_CCW
:
170 so_data(so
, NV34TCL_CULL_FACE_FRONT
);
172 case PIPE_WINDING_CW
:
173 so_data(so
, NV34TCL_CULL_FACE_BACK
);
175 case PIPE_WINDING_BOTH
:
176 so_data(so
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
179 so_data(so
, NV34TCL_CULL_FACE_BACK
);
182 so_data(so
, NV34TCL_FRONT_FACE_CCW
);
184 so_data(so
, nvgl_polygon_mode(cso
->fill_cw
));
185 so_data(so
, nvgl_polygon_mode(cso
->fill_ccw
));
186 switch (cso
->cull_mode
) {
187 case PIPE_WINDING_CCW
:
188 so_data(so
, NV34TCL_CULL_FACE_BACK
);
190 case PIPE_WINDING_CW
:
191 so_data(so
, NV34TCL_CULL_FACE_FRONT
);
193 case PIPE_WINDING_BOTH
:
194 so_data(so
, NV34TCL_CULL_FACE_FRONT_AND_BACK
);
197 so_data(so
, NV34TCL_CULL_FACE_BACK
);
200 so_data(so
, NV34TCL_FRONT_FACE_CW
);
202 so_data(so
, cso
->poly_smooth
? 1 : 0);
203 so_data(so
, (cso
->cull_mode
!= PIPE_WINDING_NONE
) ? 1 : 0);
205 so_method(so
, eng3d
, NV34TCL_POLYGON_STIPPLE_ENABLE
, 1);
206 so_data (so
, cso
->poly_stipple_enable
? 1 : 0);
208 so_method(so
, eng3d
, NV34TCL_POLYGON_OFFSET_POINT_ENABLE
, 3);
209 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_POINT
) ||
210 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_POINT
))
214 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_LINE
) ||
215 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_LINE
))
219 if ((cso
->offset_cw
&& cso
->fill_cw
== PIPE_POLYGON_MODE_FILL
) ||
220 (cso
->offset_ccw
&& cso
->fill_ccw
== PIPE_POLYGON_MODE_FILL
))
224 if (cso
->offset_cw
|| cso
->offset_ccw
) {
225 so_method(so
, eng3d
, NV34TCL_POLYGON_OFFSET_FACTOR
, 2);
226 so_data (so
, fui(cso
->offset_scale
));
227 so_data (so
, fui(cso
->offset_units
* 2));
230 so_method(so
, eng3d
, NV34TCL_POINT_SPRITE
, 1);
231 if (cso
->point_quad_rasterization
) {
232 unsigned psctl
= (1 << 0), i
;
234 for (i
= 0; i
< 8; i
++) {
235 if ((cso
->sprite_coord_enable
>> i
) & 1)
236 psctl
|= (1 << (8 + i
));
244 so_ref(so
, &rsso
->so
);
251 nvfx_rasterizer_state_bind(struct pipe_context
*pipe
, void *hwcso
)
253 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
255 nvfx
->rasterizer
= hwcso
;
256 nvfx
->dirty
|= NVFX_NEW_RAST
;
257 nvfx
->draw_dirty
|= NVFX_NEW_RAST
;
261 nvfx_rasterizer_state_delete(struct pipe_context
*pipe
, void *hwcso
)
263 struct nvfx_rasterizer_state
*rsso
= hwcso
;
265 so_ref(NULL
, &rsso
->so
);
270 nvfx_depth_stencil_alpha_state_create(struct pipe_context
*pipe
,
271 const struct pipe_depth_stencil_alpha_state
*cso
)
273 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
274 struct nvfx_zsa_state
*zsaso
= CALLOC(1, sizeof(*zsaso
));
275 struct nouveau_stateobj
*so
= so_new(6, 20, 0);
276 struct nouveau_grobj
*eng3d
= nvfx
->screen
->eng3d
;
278 so_method(so
, eng3d
, NV34TCL_DEPTH_FUNC
, 3);
279 so_data (so
, nvgl_comparison_op(cso
->depth
.func
));
280 so_data (so
, cso
->depth
.writemask
? 1 : 0);
281 so_data (so
, cso
->depth
.enabled
? 1 : 0);
283 so_method(so
, eng3d
, NV34TCL_ALPHA_FUNC_ENABLE
, 3);
284 so_data (so
, cso
->alpha
.enabled
? 1 : 0);
285 so_data (so
, nvgl_comparison_op(cso
->alpha
.func
));
286 so_data (so
, float_to_ubyte(cso
->alpha
.ref_value
));
288 if (cso
->stencil
[0].enabled
) {
289 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_ENABLE
, 3);
290 so_data (so
, cso
->stencil
[0].enabled
? 1 : 0);
291 so_data (so
, cso
->stencil
[0].writemask
);
292 so_data (so
, nvgl_comparison_op(cso
->stencil
[0].func
));
293 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_FUNC_MASK
, 4);
294 so_data (so
, cso
->stencil
[0].valuemask
);
295 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].fail_op
));
296 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].zfail_op
));
297 so_data (so
, nvgl_stencil_op(cso
->stencil
[0].zpass_op
));
299 so_method(so
, eng3d
, NV34TCL_STENCIL_FRONT_ENABLE
, 1);
303 if (cso
->stencil
[1].enabled
) {
304 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_ENABLE
, 3);
305 so_data (so
, cso
->stencil
[1].enabled
? 1 : 0);
306 so_data (so
, cso
->stencil
[1].writemask
);
307 so_data (so
, nvgl_comparison_op(cso
->stencil
[1].func
));
308 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_FUNC_MASK
, 4);
309 so_data (so
, cso
->stencil
[1].valuemask
);
310 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].fail_op
));
311 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].zfail_op
));
312 so_data (so
, nvgl_stencil_op(cso
->stencil
[1].zpass_op
));
314 so_method(so
, eng3d
, NV34TCL_STENCIL_BACK_ENABLE
, 1);
318 so_ref(so
, &zsaso
->so
);
321 return (void *)zsaso
;
325 nvfx_depth_stencil_alpha_state_bind(struct pipe_context
*pipe
, void *hwcso
)
327 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
330 nvfx
->dirty
|= NVFX_NEW_ZSA
;
334 nvfx_depth_stencil_alpha_state_delete(struct pipe_context
*pipe
, void *hwcso
)
336 struct nvfx_zsa_state
*zsaso
= hwcso
;
338 so_ref(NULL
, &zsaso
->so
);
343 nvfx_vp_state_create(struct pipe_context
*pipe
,
344 const struct pipe_shader_state
*cso
)
346 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
347 struct nvfx_vertex_program
*vp
;
349 vp
= CALLOC(1, sizeof(struct nvfx_vertex_program
));
350 vp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
351 vp
->draw
= draw_create_vertex_shader(nvfx
->draw
, &vp
->pipe
);
357 nvfx_vp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
359 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
361 nvfx
->vertprog
= hwcso
;
362 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
363 nvfx
->draw_dirty
|= NVFX_NEW_VERTPROG
;
367 nvfx_vp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
369 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
370 struct nvfx_vertex_program
*vp
= hwcso
;
372 draw_delete_vertex_shader(nvfx
->draw
, vp
->draw
);
374 nv30_vertprog_destroy(nvfx
, vp
);
376 nv40_vertprog_destroy(nvfx
, vp
);
377 FREE((void*)vp
->pipe
.tokens
);
382 nvfx_fp_state_create(struct pipe_context
*pipe
,
383 const struct pipe_shader_state
*cso
)
385 struct nvfx_fragment_program
*fp
;
387 fp
= CALLOC(1, sizeof(struct nvfx_fragment_program
));
388 fp
->pipe
.tokens
= tgsi_dup_tokens(cso
->tokens
);
390 tgsi_scan_shader(fp
->pipe
.tokens
, &fp
->info
);
396 nvfx_fp_state_bind(struct pipe_context
*pipe
, void *hwcso
)
398 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
400 nvfx
->fragprog
= hwcso
;
401 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
405 nvfx_fp_state_delete(struct pipe_context
*pipe
, void *hwcso
)
407 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
408 struct nvfx_fragment_program
*fp
= hwcso
;
410 nvfx_fragprog_destroy(nvfx
, fp
);
411 FREE((void*)fp
->pipe
.tokens
);
416 nvfx_set_blend_color(struct pipe_context
*pipe
,
417 const struct pipe_blend_color
*bcol
)
419 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
421 nvfx
->blend_colour
= *bcol
;
422 nvfx
->dirty
|= NVFX_NEW_BCOL
;
426 nvfx_set_stencil_ref(struct pipe_context
*pipe
,
427 const struct pipe_stencil_ref
*sr
)
429 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
431 nvfx
->stencil_ref
= *sr
;
432 nvfx
->dirty
|= NVFX_NEW_SR
;
436 nvfx_set_clip_state(struct pipe_context
*pipe
,
437 const struct pipe_clip_state
*clip
)
439 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
442 nvfx
->dirty
|= NVFX_NEW_UCP
;
443 nvfx
->draw_dirty
|= NVFX_NEW_UCP
;
447 nvfx_set_constant_buffer(struct pipe_context
*pipe
, uint shader
, uint index
,
448 struct pipe_buffer
*buf
)
450 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
452 nvfx
->constbuf
[shader
] = buf
;
453 nvfx
->constbuf_nr
[shader
] = buf
->size
/ (4 * sizeof(float));
455 if (shader
== PIPE_SHADER_VERTEX
) {
456 nvfx
->dirty
|= NVFX_NEW_VERTPROG
;
458 if (shader
== PIPE_SHADER_FRAGMENT
) {
459 nvfx
->dirty
|= NVFX_NEW_FRAGPROG
;
464 nvfx_set_framebuffer_state(struct pipe_context
*pipe
,
465 const struct pipe_framebuffer_state
*fb
)
467 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
469 nvfx
->framebuffer
= *fb
;
470 nvfx
->dirty
|= NVFX_NEW_FB
;
474 nvfx_set_polygon_stipple(struct pipe_context
*pipe
,
475 const struct pipe_poly_stipple
*stipple
)
477 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
479 memcpy(nvfx
->stipple
, stipple
->stipple
, 4 * 32);
480 nvfx
->dirty
|= NVFX_NEW_STIPPLE
;
484 nvfx_set_scissor_state(struct pipe_context
*pipe
,
485 const struct pipe_scissor_state
*s
)
487 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
490 nvfx
->dirty
|= NVFX_NEW_SCISSOR
;
494 nvfx_set_viewport_state(struct pipe_context
*pipe
,
495 const struct pipe_viewport_state
*vpt
)
497 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
499 nvfx
->viewport
= *vpt
;
500 nvfx
->dirty
|= NVFX_NEW_VIEWPORT
;
501 nvfx
->draw_dirty
|= NVFX_NEW_VIEWPORT
;
505 nvfx_set_vertex_buffers(struct pipe_context
*pipe
, unsigned count
,
506 const struct pipe_vertex_buffer
*vb
)
508 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
510 memcpy(nvfx
->vtxbuf
, vb
, sizeof(*vb
) * count
);
511 nvfx
->vtxbuf_nr
= count
;
513 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
514 nvfx
->draw_dirty
|= NVFX_NEW_ARRAYS
;
518 nvfx_vtxelts_state_create(struct pipe_context
*pipe
,
519 unsigned num_elements
,
520 const struct pipe_vertex_element
*elements
)
522 struct nvfx_vtxelt_state
*cso
= CALLOC_STRUCT(nvfx_vtxelt_state
);
524 assert(num_elements
< 16); /* not doing fallbacks yet */
525 cso
->num_elements
= num_elements
;
526 memcpy(cso
->pipe
, elements
, num_elements
* sizeof(*elements
));
528 /* nvfx_vtxelt_construct(cso);*/
534 nvfx_vtxelts_state_delete(struct pipe_context
*pipe
, void *hwcso
)
540 nvfx_vtxelts_state_bind(struct pipe_context
*pipe
, void *hwcso
)
542 struct nvfx_context
*nvfx
= nvfx_context(pipe
);
544 nvfx
->vtxelt
= hwcso
;
545 nvfx
->dirty
|= NVFX_NEW_ARRAYS
;
546 /*nvfx->draw_dirty |= NVFX_NEW_ARRAYS;*/
550 nv30_sampler_state_create(struct pipe_context
*pipe
,
551 const struct pipe_sampler_state
*cso
);
554 nv40_sampler_state_create(struct pipe_context
*pipe
,
555 const struct pipe_sampler_state
*cso
);
558 nvfx_init_state_functions(struct nvfx_context
*nvfx
)
560 nvfx
->pipe
.create_blend_state
= nvfx_blend_state_create
;
561 nvfx
->pipe
.bind_blend_state
= nvfx_blend_state_bind
;
562 nvfx
->pipe
.delete_blend_state
= nvfx_blend_state_delete
;
565 nvfx
->pipe
.create_sampler_state
= nv40_sampler_state_create
;
567 nvfx
->pipe
.create_sampler_state
= nv30_sampler_state_create
;
568 nvfx
->pipe
.bind_fragment_sampler_states
= nv40_sampler_state_bind
;
569 nvfx
->pipe
.delete_sampler_state
= nv40_sampler_state_delete
;
570 nvfx
->pipe
.set_fragment_sampler_textures
= nvfx_set_sampler_texture
;
572 nvfx
->pipe
.create_rasterizer_state
= nvfx_rasterizer_state_create
;
573 nvfx
->pipe
.bind_rasterizer_state
= nvfx_rasterizer_state_bind
;
574 nvfx
->pipe
.delete_rasterizer_state
= nvfx_rasterizer_state_delete
;
576 nvfx
->pipe
.create_depth_stencil_alpha_state
=
577 nvfx_depth_stencil_alpha_state_create
;
578 nvfx
->pipe
.bind_depth_stencil_alpha_state
=
579 nvfx_depth_stencil_alpha_state_bind
;
580 nvfx
->pipe
.delete_depth_stencil_alpha_state
=
581 nvfx_depth_stencil_alpha_state_delete
;
583 nvfx
->pipe
.create_vs_state
= nvfx_vp_state_create
;
584 nvfx
->pipe
.bind_vs_state
= nvfx_vp_state_bind
;
585 nvfx
->pipe
.delete_vs_state
= nvfx_vp_state_delete
;
587 nvfx
->pipe
.create_fs_state
= nvfx_fp_state_create
;
588 nvfx
->pipe
.bind_fs_state
= nvfx_fp_state_bind
;
589 nvfx
->pipe
.delete_fs_state
= nvfx_fp_state_delete
;
591 nvfx
->pipe
.set_blend_color
= nvfx_set_blend_color
;
592 nvfx
->pipe
.set_stencil_ref
= nvfx_set_stencil_ref
;
593 nvfx
->pipe
.set_clip_state
= nvfx_set_clip_state
;
594 nvfx
->pipe
.set_constant_buffer
= nvfx_set_constant_buffer
;
595 nvfx
->pipe
.set_framebuffer_state
= nvfx_set_framebuffer_state
;
596 nvfx
->pipe
.set_polygon_stipple
= nvfx_set_polygon_stipple
;
597 nvfx
->pipe
.set_scissor_state
= nvfx_set_scissor_state
;
598 nvfx
->pipe
.set_viewport_state
= nvfx_set_viewport_state
;
600 nvfx
->pipe
.create_vertex_elements_state
= nvfx_vtxelts_state_create
;
601 nvfx
->pipe
.delete_vertex_elements_state
= nvfx_vtxelts_state_delete
;
602 nvfx
->pipe
.bind_vertex_elements_state
= nvfx_vtxelts_state_bind
;
604 nvfx
->pipe
.set_vertex_buffers
= nvfx_set_vertex_buffers
;