2 * Copyright (C) 2009-2010 Francisco Jerez.
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial
15 * portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
21 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #include "nouveau_driver.h"
29 #include "nouveau_context.h"
30 #include "nouveau_fbo.h"
31 #include "nouveau_util.h"
32 #include "nv_object.xml.h"
33 #include "nv20_3d.xml.h"
34 #include "nv04_driver.h"
35 #include "nv10_driver.h"
36 #include "nv20_driver.h"
37 #include "util/u_memory.h"
40 nv20_clear(struct gl_context
*ctx
, GLbitfield buffers
)
42 struct nouveau_context
*nctx
= to_nouveau_context(ctx
);
43 struct nouveau_pushbuf
*push
= context_push(ctx
);
44 struct gl_framebuffer
*fb
= ctx
->DrawBuffer
;
47 nouveau_validate_framebuffer(ctx
);
49 nouveau_pushbuf_bufctx(push
, nctx
->hw
.bufctx
);
50 if (nouveau_pushbuf_validate(push
)) {
51 nouveau_pushbuf_bufctx(push
, NULL
);
55 if (buffers
& BUFFER_BITS_COLOR
) {
56 struct nouveau_surface
*s
= &to_nouveau_renderbuffer(
57 fb
->_ColorDrawBuffers
[0])->surface
;
59 if (GET_COLORMASK_BIT(ctx
->Color
.ColorMask
, 0, 0))
60 clear
|= NV20_3D_CLEAR_BUFFERS_COLOR_R
;
61 if (GET_COLORMASK_BIT(ctx
->Color
.ColorMask
, 0, 1))
62 clear
|= NV20_3D_CLEAR_BUFFERS_COLOR_G
;
63 if (GET_COLORMASK_BIT(ctx
->Color
.ColorMask
, 0, 2))
64 clear
|= NV20_3D_CLEAR_BUFFERS_COLOR_B
;
65 if (GET_COLORMASK_BIT(ctx
->Color
.ColorMask
, 0, 3))
66 clear
|= NV20_3D_CLEAR_BUFFERS_COLOR_A
;
68 BEGIN_NV04(push
, NV20_3D(CLEAR_VALUE
), 1);
69 PUSH_DATA (push
, pack_rgba_clamp_f(s
->format
, ctx
->Color
.ClearColor
.f
));
71 buffers
&= ~BUFFER_BITS_COLOR
;
74 if (buffers
& (BUFFER_BIT_DEPTH
| BUFFER_BIT_STENCIL
)) {
75 struct nouveau_surface
*s
= &to_nouveau_renderbuffer(
76 fb
->Attachment
[BUFFER_DEPTH
].Renderbuffer
)->surface
;
78 if (buffers
& BUFFER_BIT_DEPTH
&& ctx
->Depth
.Mask
)
79 clear
|= NV20_3D_CLEAR_BUFFERS_DEPTH
;
80 if (buffers
& BUFFER_BIT_STENCIL
&& ctx
->Stencil
.WriteMask
[0])
81 clear
|= NV20_3D_CLEAR_BUFFERS_STENCIL
;
83 BEGIN_NV04(push
, NV20_3D(CLEAR_DEPTH_VALUE
), 1);
84 PUSH_DATA (push
, pack_zs_f(s
->format
, ctx
->Depth
.Clear
,
87 buffers
&= ~(BUFFER_BIT_DEPTH
| BUFFER_BIT_STENCIL
);
90 BEGIN_NV04(push
, NV20_3D(CLEAR_BUFFERS
), 1);
91 PUSH_DATA (push
, clear
);
93 nouveau_pushbuf_bufctx(push
, NULL
);
94 nouveau_clear(ctx
, buffers
);
98 nv20_hwctx_init(struct gl_context
*ctx
)
100 struct nouveau_pushbuf
*push
= context_push(ctx
);
101 struct nouveau_hw_state
*hw
= &to_nouveau_context(ctx
)->hw
;
102 struct nv04_fifo
*fifo
= hw
->chan
->data
;
105 BEGIN_NV04(push
, NV01_SUBC(3D
, OBJECT
), 1);
106 PUSH_DATA (push
, hw
->eng3d
->handle
);
107 BEGIN_NV04(push
, NV20_3D(DMA_NOTIFY
), 1);
108 PUSH_DATA (push
, hw
->ntfy
->handle
);
109 BEGIN_NV04(push
, NV20_3D(DMA_TEXTURE0
), 2);
110 PUSH_DATA (push
, fifo
->vram
);
111 PUSH_DATA (push
, fifo
->gart
);
112 BEGIN_NV04(push
, NV20_3D(DMA_COLOR
), 2);
113 PUSH_DATA (push
, fifo
->vram
);
114 PUSH_DATA (push
, fifo
->vram
);
115 BEGIN_NV04(push
, NV20_3D(DMA_VTXBUF0
), 2);
116 PUSH_DATA (push
, fifo
->vram
);
117 PUSH_DATA (push
, fifo
->gart
);
119 BEGIN_NV04(push
, NV20_3D(DMA_QUERY
), 1);
122 BEGIN_NV04(push
, NV20_3D(RT_HORIZ
), 2);
126 BEGIN_NV04(push
, NV20_3D(VIEWPORT_CLIP_HORIZ(0)), 1);
127 PUSH_DATA (push
, 0xfff << 16 | 0x0);
128 BEGIN_NV04(push
, NV20_3D(VIEWPORT_CLIP_VERT(0)), 1);
129 PUSH_DATA (push
, 0xfff << 16 | 0x0);
131 for (i
= 1; i
< NV20_3D_VIEWPORT_CLIP_HORIZ__LEN
; i
++) {
132 BEGIN_NV04(push
, NV20_3D(VIEWPORT_CLIP_HORIZ(i
)), 1);
134 BEGIN_NV04(push
, NV20_3D(VIEWPORT_CLIP_VERT(i
)), 1);
138 BEGIN_NV04(push
, NV20_3D(VIEWPORT_CLIP_MODE
), 1);
141 BEGIN_NV04(push
, SUBC_3D(0x17e0), 3);
142 PUSH_DATAf(push
, 0.0);
143 PUSH_DATAf(push
, 0.0);
144 PUSH_DATAf(push
, 1.0);
146 if (context_chipset(ctx
) >= 0x25) {
147 BEGIN_NV04(push
, NV20_3D(TEX_RCOMP
), 1);
148 PUSH_DATA (push
, NV20_3D_TEX_RCOMP_LEQUAL
| 0xdb0);
150 BEGIN_NV04(push
, SUBC_3D(0x1e68), 1);
151 PUSH_DATA (push
, 0x4b800000); /* 16777216.000000 */
152 BEGIN_NV04(push
, NV20_3D(TEX_RCOMP
), 1);
153 PUSH_DATA (push
, NV20_3D_TEX_RCOMP_LEQUAL
);
156 BEGIN_NV04(push
, SUBC_3D(0x290), 1);
157 PUSH_DATA (push
, 0x10 << 16 | 1);
158 BEGIN_NV04(push
, SUBC_3D(0x9fc), 1);
160 BEGIN_NV04(push
, SUBC_3D(0x1d80), 1);
162 BEGIN_NV04(push
, SUBC_3D(0x9f8), 1);
164 BEGIN_NV04(push
, SUBC_3D(0x17ec), 3);
165 PUSH_DATAf(push
, 0.0);
166 PUSH_DATAf(push
, 1.0);
167 PUSH_DATAf(push
, 0.0);
169 if (context_chipset(ctx
) >= 0x25) {
170 BEGIN_NV04(push
, SUBC_3D(0x1d88), 1);
173 BEGIN_NV04(push
, NV25_3D(DMA_HIERZ
), 1);
174 PUSH_DATA (push
, fifo
->vram
);
175 BEGIN_NV04(push
, NV25_3D(UNK01AC
), 1);
176 PUSH_DATA (push
, fifo
->vram
);
179 BEGIN_NV04(push
, NV20_3D(DMA_FENCE
), 1);
182 BEGIN_NV04(push
, SUBC_3D(0x1e98), 1);
185 BEGIN_NV04(push
, NV04_GRAPH(3D
, NOTIFY
), 1);
188 BEGIN_NV04(push
, SUBC_3D(0x120), 3);
193 if (context_chipset(ctx
) >= 0x25) {
194 BEGIN_NV04(push
, SUBC_3D(0x1da4), 1);
198 BEGIN_NV04(push
, NV20_3D(RT_HORIZ
), 2);
199 PUSH_DATA (push
, 0 << 16 | 0);
200 PUSH_DATA (push
, 0 << 16 | 0);
202 BEGIN_NV04(push
, NV20_3D(ALPHA_FUNC_ENABLE
), 1);
204 BEGIN_NV04(push
, NV20_3D(ALPHA_FUNC_FUNC
), 2);
205 PUSH_DATA (push
, NV20_3D_ALPHA_FUNC_FUNC_ALWAYS
);
208 for (i
= 0; i
< NV20_3D_TEX__LEN
; i
++) {
209 BEGIN_NV04(push
, NV20_3D(TEX_ENABLE(i
)), 1);
213 BEGIN_NV04(push
, NV20_3D(TEX_SHADER_OP
), 1);
215 BEGIN_NV04(push
, NV20_3D(TEX_SHADER_CULL_MODE
), 1);
218 BEGIN_NV04(push
, NV20_3D(RC_IN_ALPHA(0)), 4);
219 PUSH_DATA (push
, 0x30d410d0);
223 BEGIN_NV04(push
, NV20_3D(RC_OUT_RGB(0)), 4);
224 PUSH_DATA (push
, 0x00000c00);
228 BEGIN_NV04(push
, NV20_3D(RC_ENABLE
), 1);
229 PUSH_DATA (push
, 0x00011101);
230 BEGIN_NV04(push
, NV20_3D(RC_FINAL0
), 2);
231 PUSH_DATA (push
, 0x130e0300);
232 PUSH_DATA (push
, 0x0c091c80);
233 BEGIN_NV04(push
, NV20_3D(RC_OUT_ALPHA(0)), 4);
234 PUSH_DATA (push
, 0x00000c00);
238 BEGIN_NV04(push
, NV20_3D(RC_IN_RGB(0)), 4);
239 PUSH_DATA (push
, 0x20c400c0);
243 BEGIN_NV04(push
, NV20_3D(RC_COLOR0
), 2);
246 BEGIN_NV04(push
, NV20_3D(RC_CONSTANT_COLOR0(0)), 4);
247 PUSH_DATA (push
, 0x035125a0);
249 PUSH_DATA (push
, 0x40002000);
252 BEGIN_NV04(push
, NV20_3D(MULTISAMPLE_CONTROL
), 1);
253 PUSH_DATA (push
, 0xffff0000);
254 BEGIN_NV04(push
, NV20_3D(BLEND_FUNC_ENABLE
), 1);
256 BEGIN_NV04(push
, NV20_3D(DITHER_ENABLE
), 1);
258 BEGIN_NV04(push
, NV20_3D(STENCIL_ENABLE
), 1);
260 BEGIN_NV04(push
, NV20_3D(BLEND_FUNC_SRC
), 4);
261 PUSH_DATA (push
, NV20_3D_BLEND_FUNC_SRC_ONE
);
262 PUSH_DATA (push
, NV20_3D_BLEND_FUNC_DST_ZERO
);
264 PUSH_DATA (push
, NV20_3D_BLEND_EQUATION_FUNC_ADD
);
265 BEGIN_NV04(push
, NV20_3D(STENCIL_MASK
), 7);
266 PUSH_DATA (push
, 0xff);
267 PUSH_DATA (push
, NV20_3D_STENCIL_FUNC_FUNC_ALWAYS
);
269 PUSH_DATA (push
, 0xff);
270 PUSH_DATA (push
, NV20_3D_STENCIL_OP_FAIL_KEEP
);
271 PUSH_DATA (push
, NV20_3D_STENCIL_OP_ZFAIL_KEEP
);
272 PUSH_DATA (push
, NV20_3D_STENCIL_OP_ZPASS_KEEP
);
274 BEGIN_NV04(push
, NV20_3D(COLOR_LOGIC_OP_ENABLE
), 2);
276 PUSH_DATA (push
, NV20_3D_COLOR_LOGIC_OP_OP_COPY
);
277 BEGIN_NV04(push
, SUBC_3D(0x17cc), 1);
279 if (context_chipset(ctx
) >= 0x25) {
280 BEGIN_NV04(push
, SUBC_3D(0x1d84), 1);
283 BEGIN_NV04(push
, NV20_3D(LIGHTING_ENABLE
), 1);
285 BEGIN_NV04(push
, NV20_3D(LIGHT_MODEL
), 1);
286 PUSH_DATA (push
, NV20_3D_LIGHT_MODEL_VIEWER_NONLOCAL
);
287 BEGIN_NV04(push
, NV20_3D(SEPARATE_SPECULAR_ENABLE
), 1);
289 BEGIN_NV04(push
, NV20_3D(LIGHT_MODEL_TWO_SIDE_ENABLE
), 1);
291 BEGIN_NV04(push
, NV20_3D(ENABLED_LIGHTS
), 1);
293 BEGIN_NV04(push
, NV20_3D(NORMALIZE_ENABLE
), 1);
295 BEGIN_NV04(push
, NV20_3D(POLYGON_STIPPLE_PATTERN(0)),
296 NV20_3D_POLYGON_STIPPLE_PATTERN__LEN
);
297 for (i
= 0; i
< NV20_3D_POLYGON_STIPPLE_PATTERN__LEN
; i
++) {
298 PUSH_DATA (push
, 0xffffffff);
301 BEGIN_NV04(push
, NV20_3D(POLYGON_OFFSET_POINT_ENABLE
), 3);
305 BEGIN_NV04(push
, NV20_3D(DEPTH_FUNC
), 1);
306 PUSH_DATA (push
, NV20_3D_DEPTH_FUNC_LESS
);
307 BEGIN_NV04(push
, NV20_3D(DEPTH_WRITE_ENABLE
), 1);
309 BEGIN_NV04(push
, NV20_3D(DEPTH_TEST_ENABLE
), 1);
311 BEGIN_NV04(push
, NV20_3D(POLYGON_OFFSET_FACTOR
), 2);
312 PUSH_DATAf(push
, 0.0);
313 PUSH_DATAf(push
, 0.0);
314 BEGIN_NV04(push
, NV20_3D(DEPTH_CLAMP
), 1);
316 if (context_chipset(ctx
) < 0x25) {
317 BEGIN_NV04(push
, SUBC_3D(0x1d84), 1);
320 BEGIN_NV04(push
, NV20_3D(POINT_SIZE
), 1);
321 if (context_chipset(ctx
) >= 0x25)
322 PUSH_DATAf(push
, 1.0);
326 if (context_chipset(ctx
) >= 0x25) {
327 BEGIN_NV04(push
, NV20_3D(POINT_PARAMETERS_ENABLE
), 1);
329 BEGIN_NV04(push
, SUBC_3D(0x0a1c), 1);
330 PUSH_DATA (push
, 0x800);
332 BEGIN_NV04(push
, NV20_3D(POINT_PARAMETERS_ENABLE
), 2);
337 BEGIN_NV04(push
, NV20_3D(LINE_WIDTH
), 1);
339 BEGIN_NV04(push
, NV20_3D(LINE_SMOOTH_ENABLE
), 1);
341 BEGIN_NV04(push
, NV20_3D(POLYGON_MODE_FRONT
), 2);
342 PUSH_DATA (push
, NV20_3D_POLYGON_MODE_FRONT_FILL
);
343 PUSH_DATA (push
, NV20_3D_POLYGON_MODE_BACK_FILL
);
344 BEGIN_NV04(push
, NV20_3D(CULL_FACE
), 2);
345 PUSH_DATA (push
, NV20_3D_CULL_FACE_BACK
);
346 PUSH_DATA (push
, NV20_3D_FRONT_FACE_CCW
);
347 BEGIN_NV04(push
, NV20_3D(POLYGON_SMOOTH_ENABLE
), 1);
349 BEGIN_NV04(push
, NV20_3D(CULL_FACE_ENABLE
), 1);
351 BEGIN_NV04(push
, NV20_3D(SHADE_MODEL
), 1);
352 PUSH_DATA (push
, NV20_3D_SHADE_MODEL_SMOOTH
);
353 BEGIN_NV04(push
, NV20_3D(POLYGON_STIPPLE_ENABLE
), 1);
356 BEGIN_NV04(push
, NV20_3D(TEX_GEN_MODE(0,0)),
357 4 * NV20_3D_TEX_GEN_MODE__ESIZE
);
358 for (i
=0; i
< 4 * NV20_3D_TEX_GEN_MODE__LEN
; i
++)
361 BEGIN_NV04(push
, NV20_3D(FOG_COEFF(0)), 3);
362 PUSH_DATAf(push
, 1.5);
363 PUSH_DATAf(push
, -0.090168);
364 PUSH_DATAf(push
, 0.0);
365 BEGIN_NV04(push
, NV20_3D(FOG_MODE
), 2);
366 PUSH_DATA (push
, NV20_3D_FOG_MODE_EXP_SIGNED
);
367 PUSH_DATA (push
, NV20_3D_FOG_COORD_FOG
);
368 BEGIN_NV04(push
, NV20_3D(FOG_ENABLE
), 2);
372 BEGIN_NV04(push
, NV20_3D(ENGINE
), 1);
373 PUSH_DATA (push
, NV20_3D_ENGINE_FIXED
);
375 for (i
= 0; i
< NV20_3D_TEX_MATRIX_ENABLE__LEN
; i
++) {
376 BEGIN_NV04(push
, NV20_3D(TEX_MATRIX_ENABLE(i
)), 1);
380 BEGIN_NV04(push
, NV20_3D(VERTEX_ATTR_4F_X(1)), 4 * 15);
381 PUSH_DATAf(push
, 1.0);
382 PUSH_DATAf(push
, 0.0);
383 PUSH_DATAf(push
, 0.0);
384 PUSH_DATAf(push
, 1.0);
385 PUSH_DATAf(push
, 0.0);
386 PUSH_DATAf(push
, 0.0);
387 PUSH_DATAf(push
, 1.0);
388 PUSH_DATAf(push
, 1.0);
389 PUSH_DATAf(push
, 1.0);
390 PUSH_DATAf(push
, 1.0);
391 PUSH_DATAf(push
, 1.0);
392 PUSH_DATAf(push
, 1.0);
393 for (i
= 0; i
< 12; i
++) {
394 PUSH_DATAf(push
, 0.0);
395 PUSH_DATAf(push
, 0.0);
396 PUSH_DATAf(push
, 0.0);
397 PUSH_DATAf(push
, 1.0);
400 BEGIN_NV04(push
, NV20_3D(EDGEFLAG_ENABLE
), 1);
402 BEGIN_NV04(push
, NV20_3D(COLOR_MASK
), 1);
403 PUSH_DATA (push
, 0x00010101);
404 BEGIN_NV04(push
, NV20_3D(CLEAR_VALUE
), 1);
407 BEGIN_NV04(push
, NV20_3D(DEPTH_RANGE_NEAR
), 2);
408 PUSH_DATAf(push
, 0.0);
409 PUSH_DATAf(push
, 16777216.0);
411 BEGIN_NV04(push
, NV20_3D(VIEWPORT_TRANSLATE_X
), 4);
412 PUSH_DATAf(push
, 0.0);
413 PUSH_DATAf(push
, 0.0);
414 PUSH_DATAf(push
, 0.0);
415 PUSH_DATAf(push
, 16777215.0);
417 BEGIN_NV04(push
, NV20_3D(VIEWPORT_SCALE_X
), 4);
418 PUSH_DATAf(push
, 0.0);
419 PUSH_DATAf(push
, 0.0);
420 PUSH_DATAf(push
, 16777215.0 * 0.5);
421 PUSH_DATAf(push
, 65535.0);
427 nv20_context_destroy(struct gl_context
*ctx
)
429 struct nouveau_context
*nctx
= to_nouveau_context(ctx
);
431 nv04_surface_takedown(ctx
);
432 nv20_swtnl_destroy(ctx
);
433 nv20_vbo_destroy(ctx
);
435 nouveau_object_del(&nctx
->hw
.eng3d
);
437 nouveau_context_deinit(ctx
);
441 static struct gl_context
*
442 nv20_context_create(struct nouveau_screen
*screen
, gl_api api
,
443 const struct gl_config
*visual
,
444 struct gl_context
*share_ctx
)
446 struct nouveau_context
*nctx
;
447 struct gl_context
*ctx
;
448 unsigned kelvin_class
;
451 nctx
= CALLOC_STRUCT(nouveau_context
);
457 if (!nouveau_context_init(ctx
, api
, screen
, visual
, share_ctx
))
460 ctx
->Extensions
.ARB_texture_env_crossbar
= true;
461 ctx
->Extensions
.ARB_texture_env_combine
= true;
462 ctx
->Extensions
.ARB_texture_env_dot3
= true;
463 ctx
->Extensions
.EXT_texture_env_dot3
= true;
464 ctx
->Extensions
.NV_fog_distance
= true;
465 ctx
->Extensions
.NV_texture_rectangle
= true;
466 ctx
->Extensions
.EXT_texture_compression_s3tc
= true;
467 ctx
->Extensions
.ANGLE_texture_compression_dxt
= true;
470 ctx
->Const
.MaxTextureCoordUnits
= NV20_TEXTURE_UNITS
;
471 ctx
->Const
.Program
[MESA_SHADER_FRAGMENT
].MaxTextureImageUnits
= NV20_TEXTURE_UNITS
;
472 ctx
->Const
.MaxTextureUnits
= NV20_TEXTURE_UNITS
;
473 ctx
->Const
.MaxTextureMaxAnisotropy
= 8;
474 ctx
->Const
.MaxTextureLodBias
= 15;
475 ctx
->Driver
.Clear
= nv20_clear
;
478 ret
= nv04_surface_init(ctx
);
483 if (context_chipset(ctx
) >= 0x25)
484 kelvin_class
= NV25_3D_CLASS
;
486 kelvin_class
= NV20_3D_CLASS
;
488 ret
= nouveau_object_new(context_chan(ctx
), 0xbeef0001, kelvin_class
,
489 NULL
, 0, &nctx
->hw
.eng3d
);
493 nv20_hwctx_init(ctx
);
495 nv20_swtnl_init(ctx
);
500 nv20_context_destroy(ctx
);
504 const struct nouveau_driver nv20_driver
= {
505 .context_create
= nv20_context_create
,
506 .context_destroy
= nv20_context_destroy
,
507 .surface_copy
= nv04_surface_copy
,
508 .surface_fill
= nv04_surface_fill
,
509 .emit
= (nouveau_state_func
[]) {
510 nv10_emit_alpha_func
,
511 nv10_emit_blend_color
,
512 nv10_emit_blend_equation
,
513 nv10_emit_blend_func
,
514 nv20_emit_clip_plane
,
515 nv20_emit_clip_plane
,
516 nv20_emit_clip_plane
,
517 nv20_emit_clip_plane
,
518 nv20_emit_clip_plane
,
519 nv20_emit_clip_plane
,
520 nv10_emit_color_mask
,
521 nv20_emit_color_material
,
523 nv10_emit_front_face
,
527 nv20_emit_framebuffer
,
529 nv10_emit_light_enable
,
530 nv20_emit_light_model
,
531 nv20_emit_light_source
,
532 nv20_emit_light_source
,
533 nv20_emit_light_source
,
534 nv20_emit_light_source
,
535 nv20_emit_light_source
,
536 nv20_emit_light_source
,
537 nv20_emit_light_source
,
538 nv20_emit_light_source
,
539 nv10_emit_line_stipple
,
541 nv20_emit_logic_opcode
,
542 nv20_emit_material_ambient
,
543 nv20_emit_material_ambient
,
544 nv20_emit_material_diffuse
,
545 nv20_emit_material_diffuse
,
546 nv20_emit_material_specular
,
547 nv20_emit_material_specular
,
548 nv20_emit_material_shininess
,
549 nv20_emit_material_shininess
,
551 nv20_emit_point_mode
,
552 nv10_emit_point_parameter
,
553 nv10_emit_polygon_mode
,
554 nv10_emit_polygon_offset
,
555 nv10_emit_polygon_stipple
,
556 nv20_emit_projection
,
557 nv10_emit_render_mode
,
559 nv10_emit_shade_model
,
560 nv10_emit_stencil_func
,
561 nv10_emit_stencil_mask
,
562 nv10_emit_stencil_op
,
582 .num_emit
= NUM_NV20_STATE
,