nv30, nv40: partially unify nv[34]0_state.c
[mesa.git] / src / gallium / drivers / nvfx / nvfx_state.c
1 #include "pipe/p_state.h"
2 #include "pipe/p_defines.h"
3 #include "util/u_inlines.h"
4
5 #include "draw/draw_context.h"
6
7 #include "tgsi/tgsi_parse.h"
8
9 #include "nvfx_context.h"
10 #include "nvfx_state.h"
11
12 static void *
13 nvfx_blend_state_create(struct pipe_context *pipe,
14 const struct pipe_blend_state *cso)
15 {
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);
20
21 if (cso->rt[0].blend_enable) {
22 so_method(so, eng3d, NV34TCL_BLEND_FUNC_ENABLE, 3);
23 so_data (so, 1);
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));
31 } else {
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));
35 }
36 } else {
37 so_method(so, eng3d, NV34TCL_BLEND_FUNC_ENABLE, 1);
38 so_data (so, 0);
39 }
40
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)));
46
47 /* TODO: add NV40 MRT color mask */
48
49 if (cso->logicop_enable) {
50 so_method(so, eng3d, NV34TCL_COLOR_LOGIC_OP_ENABLE, 2);
51 so_data (so, 1);
52 so_data (so, nvgl_logicop_func(cso->logicop_func));
53 } else {
54 so_method(so, eng3d, NV34TCL_COLOR_LOGIC_OP_ENABLE, 1);
55 so_data (so, 0);
56 }
57
58 so_method(so, eng3d, NV34TCL_DITHER_ENABLE, 1);
59 so_data (so, cso->dither ? 1 : 0);
60
61 so_ref(so, &bso->so);
62 so_ref(NULL, &so);
63 bso->pipe = *cso;
64 return (void *)bso;
65 }
66
67 static void
68 nvfx_blend_state_bind(struct pipe_context *pipe, void *hwcso)
69 {
70 struct nvfx_context *nvfx = nvfx_context(pipe);
71
72 nvfx->blend = hwcso;
73 nvfx->dirty |= NVFX_NEW_BLEND;
74 }
75
76 static void
77 nvfx_blend_state_delete(struct pipe_context *pipe, void *hwcso)
78 {
79 struct nvfx_blend_state *bso = hwcso;
80
81 so_ref(NULL, &bso->so);
82 FREE(bso);
83 }
84
85 static void
86 nv40_sampler_state_bind(struct pipe_context *pipe, unsigned nr, void **sampler)
87 {
88 struct nvfx_context *nvfx = nvfx_context(pipe);
89 unsigned unit;
90
91 for (unit = 0; unit < nr; unit++) {
92 nvfx->tex_sampler[unit] = sampler[unit];
93 nvfx->dirty_samplers |= (1 << unit);
94 }
95
96 for (unit = nr; unit < nvfx->nr_samplers; unit++) {
97 nvfx->tex_sampler[unit] = NULL;
98 nvfx->dirty_samplers |= (1 << unit);
99 }
100
101 nvfx->nr_samplers = nr;
102 nvfx->dirty |= NVFX_NEW_SAMPLER;
103 }
104
105 static void
106 nv40_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
107 {
108 FREE(hwcso);
109 }
110
111 static void
112 nvfx_set_sampler_texture(struct pipe_context *pipe, unsigned nr,
113 struct pipe_texture **miptree)
114 {
115 struct nvfx_context *nvfx = nvfx_context(pipe);
116 unsigned unit;
117
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);
122 }
123
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);
128 }
129
130 nvfx->nr_textures = nr;
131 nvfx->dirty |= NVFX_NEW_SAMPLER;
132 }
133
134 static void *
135 nvfx_rasterizer_state_create(struct pipe_context *pipe,
136 const struct pipe_rasterizer_state *cso)
137 {
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;
142
143 /*XXX: ignored:
144 * light_twoside
145 * point_smooth -nohw
146 * multisample
147 */
148
149 so_method(so, eng3d, NV34TCL_SHADE_MODEL, 1);
150 so_data (so, cso->flatshade ? NV34TCL_SHADE_MODEL_FLAT :
151 NV34TCL_SHADE_MODEL_SMOOTH);
152
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);
160
161 so_method(so, eng3d, NV34TCL_POINT_SIZE, 1);
162 so_data (so, fui(cso->point_size));
163
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);
171 break;
172 case PIPE_WINDING_CW:
173 so_data(so, NV34TCL_CULL_FACE_BACK);
174 break;
175 case PIPE_WINDING_BOTH:
176 so_data(so, NV34TCL_CULL_FACE_FRONT_AND_BACK);
177 break;
178 default:
179 so_data(so, NV34TCL_CULL_FACE_BACK);
180 break;
181 }
182 so_data(so, NV34TCL_FRONT_FACE_CCW);
183 } else {
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);
189 break;
190 case PIPE_WINDING_CW:
191 so_data(so, NV34TCL_CULL_FACE_FRONT);
192 break;
193 case PIPE_WINDING_BOTH:
194 so_data(so, NV34TCL_CULL_FACE_FRONT_AND_BACK);
195 break;
196 default:
197 so_data(so, NV34TCL_CULL_FACE_BACK);
198 break;
199 }
200 so_data(so, NV34TCL_FRONT_FACE_CW);
201 }
202 so_data(so, cso->poly_smooth ? 1 : 0);
203 so_data(so, (cso->cull_mode != PIPE_WINDING_NONE) ? 1 : 0);
204
205 so_method(so, eng3d, NV34TCL_POLYGON_STIPPLE_ENABLE, 1);
206 so_data (so, cso->poly_stipple_enable ? 1 : 0);
207
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))
211 so_data(so, 1);
212 else
213 so_data(so, 0);
214 if ((cso->offset_cw && cso->fill_cw == PIPE_POLYGON_MODE_LINE) ||
215 (cso->offset_ccw && cso->fill_ccw == PIPE_POLYGON_MODE_LINE))
216 so_data(so, 1);
217 else
218 so_data(so, 0);
219 if ((cso->offset_cw && cso->fill_cw == PIPE_POLYGON_MODE_FILL) ||
220 (cso->offset_ccw && cso->fill_ccw == PIPE_POLYGON_MODE_FILL))
221 so_data(so, 1);
222 else
223 so_data(so, 0);
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));
228 }
229
230 so_method(so, eng3d, NV34TCL_POINT_SPRITE, 1);
231 if (cso->point_quad_rasterization) {
232 unsigned psctl = (1 << 0), i;
233
234 for (i = 0; i < 8; i++) {
235 if ((cso->sprite_coord_enable >> i) & 1)
236 psctl |= (1 << (8 + i));
237 }
238
239 so_data(so, psctl);
240 } else {
241 so_data(so, 0);
242 }
243
244 so_ref(so, &rsso->so);
245 so_ref(NULL, &so);
246 rsso->pipe = *cso;
247 return (void *)rsso;
248 }
249
250 static void
251 nvfx_rasterizer_state_bind(struct pipe_context *pipe, void *hwcso)
252 {
253 struct nvfx_context *nvfx = nvfx_context(pipe);
254
255 nvfx->rasterizer = hwcso;
256 nvfx->dirty |= NVFX_NEW_RAST;
257 nvfx->draw_dirty |= NVFX_NEW_RAST;
258 }
259
260 static void
261 nvfx_rasterizer_state_delete(struct pipe_context *pipe, void *hwcso)
262 {
263 struct nvfx_rasterizer_state *rsso = hwcso;
264
265 so_ref(NULL, &rsso->so);
266 FREE(rsso);
267 }
268
269 static void *
270 nvfx_depth_stencil_alpha_state_create(struct pipe_context *pipe,
271 const struct pipe_depth_stencil_alpha_state *cso)
272 {
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;
277
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);
282
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));
287
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));
298 } else {
299 so_method(so, eng3d, NV34TCL_STENCIL_FRONT_ENABLE, 1);
300 so_data (so, 0);
301 }
302
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));
313 } else {
314 so_method(so, eng3d, NV34TCL_STENCIL_BACK_ENABLE, 1);
315 so_data (so, 0);
316 }
317
318 so_ref(so, &zsaso->so);
319 so_ref(NULL, &so);
320 zsaso->pipe = *cso;
321 return (void *)zsaso;
322 }
323
324 static void
325 nvfx_depth_stencil_alpha_state_bind(struct pipe_context *pipe, void *hwcso)
326 {
327 struct nvfx_context *nvfx = nvfx_context(pipe);
328
329 nvfx->zsa = hwcso;
330 nvfx->dirty |= NVFX_NEW_ZSA;
331 }
332
333 static void
334 nvfx_depth_stencil_alpha_state_delete(struct pipe_context *pipe, void *hwcso)
335 {
336 struct nvfx_zsa_state *zsaso = hwcso;
337
338 so_ref(NULL, &zsaso->so);
339 FREE(zsaso);
340 }
341
342 static void *
343 nvfx_vp_state_create(struct pipe_context *pipe,
344 const struct pipe_shader_state *cso)
345 {
346 struct nvfx_context *nvfx = nvfx_context(pipe);
347 struct nvfx_vertex_program *vp;
348
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);
352
353 return (void *)vp;
354 }
355
356 static void
357 nvfx_vp_state_bind(struct pipe_context *pipe, void *hwcso)
358 {
359 struct nvfx_context *nvfx = nvfx_context(pipe);
360
361 nvfx->vertprog = hwcso;
362 nvfx->dirty |= NVFX_NEW_VERTPROG;
363 nvfx->draw_dirty |= NVFX_NEW_VERTPROG;
364 }
365
366 static void
367 nvfx_vp_state_delete(struct pipe_context *pipe, void *hwcso)
368 {
369 struct nvfx_context *nvfx = nvfx_context(pipe);
370 struct nvfx_vertex_program *vp = hwcso;
371
372 draw_delete_vertex_shader(nvfx->draw, vp->draw);
373 if(!nvfx->is_nv4x)
374 nv30_vertprog_destroy(nvfx, vp);
375 else
376 nv40_vertprog_destroy(nvfx, vp);
377 FREE((void*)vp->pipe.tokens);
378 FREE(vp);
379 }
380
381 static void *
382 nvfx_fp_state_create(struct pipe_context *pipe,
383 const struct pipe_shader_state *cso)
384 {
385 struct nvfx_fragment_program *fp;
386
387 fp = CALLOC(1, sizeof(struct nvfx_fragment_program));
388 fp->pipe.tokens = tgsi_dup_tokens(cso->tokens);
389
390 tgsi_scan_shader(fp->pipe.tokens, &fp->info);
391
392 return (void *)fp;
393 }
394
395 static void
396 nvfx_fp_state_bind(struct pipe_context *pipe, void *hwcso)
397 {
398 struct nvfx_context *nvfx = nvfx_context(pipe);
399
400 nvfx->fragprog = hwcso;
401 nvfx->dirty |= NVFX_NEW_FRAGPROG;
402 }
403
404 static void
405 nvfx_fp_state_delete(struct pipe_context *pipe, void *hwcso)
406 {
407 struct nvfx_context *nvfx = nvfx_context(pipe);
408 struct nvfx_fragment_program *fp = hwcso;
409
410 nvfx_fragprog_destroy(nvfx, fp);
411 FREE((void*)fp->pipe.tokens);
412 FREE(fp);
413 }
414
415 static void
416 nvfx_set_blend_color(struct pipe_context *pipe,
417 const struct pipe_blend_color *bcol)
418 {
419 struct nvfx_context *nvfx = nvfx_context(pipe);
420
421 nvfx->blend_colour = *bcol;
422 nvfx->dirty |= NVFX_NEW_BCOL;
423 }
424
425 static void
426 nvfx_set_stencil_ref(struct pipe_context *pipe,
427 const struct pipe_stencil_ref *sr)
428 {
429 struct nvfx_context *nvfx = nvfx_context(pipe);
430
431 nvfx->stencil_ref = *sr;
432 nvfx->dirty |= NVFX_NEW_SR;
433 }
434
435 static void
436 nvfx_set_clip_state(struct pipe_context *pipe,
437 const struct pipe_clip_state *clip)
438 {
439 struct nvfx_context *nvfx = nvfx_context(pipe);
440
441 nvfx->clip = *clip;
442 nvfx->dirty |= NVFX_NEW_UCP;
443 nvfx->draw_dirty |= NVFX_NEW_UCP;
444 }
445
446 static void
447 nvfx_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
448 struct pipe_buffer *buf )
449 {
450 struct nvfx_context *nvfx = nvfx_context(pipe);
451
452 nvfx->constbuf[shader] = buf;
453 nvfx->constbuf_nr[shader] = buf->size / (4 * sizeof(float));
454
455 if (shader == PIPE_SHADER_VERTEX) {
456 nvfx->dirty |= NVFX_NEW_VERTPROG;
457 } else
458 if (shader == PIPE_SHADER_FRAGMENT) {
459 nvfx->dirty |= NVFX_NEW_FRAGPROG;
460 }
461 }
462
463 static void
464 nvfx_set_framebuffer_state(struct pipe_context *pipe,
465 const struct pipe_framebuffer_state *fb)
466 {
467 struct nvfx_context *nvfx = nvfx_context(pipe);
468
469 nvfx->framebuffer = *fb;
470 nvfx->dirty |= NVFX_NEW_FB;
471 }
472
473 static void
474 nvfx_set_polygon_stipple(struct pipe_context *pipe,
475 const struct pipe_poly_stipple *stipple)
476 {
477 struct nvfx_context *nvfx = nvfx_context(pipe);
478
479 memcpy(nvfx->stipple, stipple->stipple, 4 * 32);
480 nvfx->dirty |= NVFX_NEW_STIPPLE;
481 }
482
483 static void
484 nvfx_set_scissor_state(struct pipe_context *pipe,
485 const struct pipe_scissor_state *s)
486 {
487 struct nvfx_context *nvfx = nvfx_context(pipe);
488
489 nvfx->scissor = *s;
490 nvfx->dirty |= NVFX_NEW_SCISSOR;
491 }
492
493 static void
494 nvfx_set_viewport_state(struct pipe_context *pipe,
495 const struct pipe_viewport_state *vpt)
496 {
497 struct nvfx_context *nvfx = nvfx_context(pipe);
498
499 nvfx->viewport = *vpt;
500 nvfx->dirty |= NVFX_NEW_VIEWPORT;
501 nvfx->draw_dirty |= NVFX_NEW_VIEWPORT;
502 }
503
504 static void
505 nvfx_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
506 const struct pipe_vertex_buffer *vb)
507 {
508 struct nvfx_context *nvfx = nvfx_context(pipe);
509
510 memcpy(nvfx->vtxbuf, vb, sizeof(*vb) * count);
511 nvfx->vtxbuf_nr = count;
512
513 nvfx->dirty |= NVFX_NEW_ARRAYS;
514 nvfx->draw_dirty |= NVFX_NEW_ARRAYS;
515 }
516
517 static void *
518 nvfx_vtxelts_state_create(struct pipe_context *pipe,
519 unsigned num_elements,
520 const struct pipe_vertex_element *elements)
521 {
522 struct nvfx_vtxelt_state *cso = CALLOC_STRUCT(nvfx_vtxelt_state);
523
524 assert(num_elements < 16); /* not doing fallbacks yet */
525 cso->num_elements = num_elements;
526 memcpy(cso->pipe, elements, num_elements * sizeof(*elements));
527
528 /* nvfx_vtxelt_construct(cso);*/
529
530 return (void *)cso;
531 }
532
533 static void
534 nvfx_vtxelts_state_delete(struct pipe_context *pipe, void *hwcso)
535 {
536 FREE(hwcso);
537 }
538
539 static void
540 nvfx_vtxelts_state_bind(struct pipe_context *pipe, void *hwcso)
541 {
542 struct nvfx_context *nvfx = nvfx_context(pipe);
543
544 nvfx->vtxelt = hwcso;
545 nvfx->dirty |= NVFX_NEW_ARRAYS;
546 /*nvfx->draw_dirty |= NVFX_NEW_ARRAYS;*/
547 }
548
549 void *
550 nv30_sampler_state_create(struct pipe_context *pipe,
551 const struct pipe_sampler_state *cso);
552
553 void *
554 nv40_sampler_state_create(struct pipe_context *pipe,
555 const struct pipe_sampler_state *cso);
556
557 void
558 nvfx_init_state_functions(struct nvfx_context *nvfx)
559 {
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;
563
564 if(nvfx->is_nv4x)
565 nvfx->pipe.create_sampler_state = nv40_sampler_state_create;
566 else
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;
571
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;
575
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;
582
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;
586
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;
590
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;
599
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;
603
604 nvfx->pipe.set_vertex_buffers = nvfx_set_vertex_buffers;
605 }