5 #include "nv_include.h"
7 typedef struct nv10_exa_state {
11 PictTransformPtr transform;
16 static nv10_exa_state_t state;
18 static int NV10TexFormat(int ExaFormat)
20 struct {int exa;int hw;} tex_format[] =
22 {PICT_a8r8g8b8, NV10_TCL_PRIMITIVE_3D_TX_FORMAT_FORMAT_R8G8B8A8},
23 {PICT_a1r5g5b5, NV10_TCL_PRIMITIVE_3D_TX_FORMAT_FORMAT_R5G5B5A1},
24 {PICT_a4r4g4b4, NV10_TCL_PRIMITIVE_3D_TX_FORMAT_FORMAT_R4G4B4A4},
25 {PICT_a8, NV10_TCL_PRIMITIVE_3D_TX_FORMAT_FORMAT_A8_RECT}
26 // FIXME other formats
30 for(i=0;i<sizeof(tex_format)/sizeof(tex_format[0]);i++)
32 if(tex_format[i].exa==ExaFormat)
33 return tex_format[i].hw;
39 static int NV10DstFormat(int ExaFormat)
41 struct {int exa;int hw;} dst_format[] =
43 {PICT_a8r8g8b8, 0x108},
44 {PICT_x8r8g8b8, 0x108}, // FIXME that one might need more
46 // FIXME other formats
50 for(i=0;i<sizeof(dst_format)/sizeof(dst_format[0]);i++)
52 if(dst_format[i].exa==ExaFormat)
53 return dst_format[i].hw;
59 static Bool NV10CheckTexture(PicturePtr Picture)
61 int w = Picture->pDrawable->width;
62 int h = Picture->pDrawable->height;
64 if ((w > 2046) || (h>2046))
66 if (!NV10TexFormat(Picture->format))
68 if (Picture->filter != PictFilterNearest && Picture->filter != PictFilterBilinear)
70 if (Picture->repeat != RepeatNone)
75 static Bool NV10CheckBuffer(PicturePtr Picture)
77 int w = Picture->pDrawable->width;
78 int h = Picture->pDrawable->height;
80 if ((w > 4096) || (h>4096))
82 if (!NV10DstFormat(Picture->format))
87 static Bool NV10CheckComposite(int op,
88 PicturePtr pSrcPicture,
89 PicturePtr pMaskPicture,
90 PicturePtr pDstPicture)
92 // XXX A8 + A8 special case "TO BE DONE LATER"
93 /* if ((!pMaskPicture) &&
94 (pSrcPicture->format == PICT_a8) &&
95 (pDstPicture->format == PICT_a8) )
98 if (!NV10CheckBuffer(pDstPicture))
100 if (!NV10CheckTexture(pSrcPicture))
102 if ((pMaskPicture)&&(!NV10CheckTexture(pMaskPicture)))
108 static void NV10SetTexture(NVPtr pNv,int unit,PicturePtr Pict,PixmapPtr pixmap)
110 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_OFFSET(unit), 1 );
111 NVDmaNext (pNv, NVAccelGetPixmapOffset(pixmap));
113 int log2w = (int)log2(Pict->pDrawable->width);
114 int log2h = (int)log2(Pict->pDrawable->height);
115 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_FORMAT(unit), 1 );
116 NVDmaNext (pNv, (NV10_TCL_PRIMITIVE_3D_TX_FORMAT_WRAP_T_CLAMP_TO_EDGE<<28) |
117 (NV10_TCL_PRIMITIVE_3D_TX_FORMAT_WRAP_S_CLAMP_TO_EDGE<<24) |
120 (1<<12) | /* lod == 1 */
121 (1<<11) | /* enable NPOT */
122 (NV10TexFormat(Pict->format)<<7) |
126 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_ENABLE(unit), 1 );
129 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(unit), 1);
130 NVDmaNext (pNv, exaGetPixmapPitch(pixmap) << 16);
132 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(unit), 1);
133 NVDmaNext (pNv, (Pict->pDrawable->width<<16) | Pict->pDrawable->height); /* FIXME alignment restrictions, should be even at least */
135 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_FILTER(unit), 1);
136 if (Pict->filter == PictFilterNearest)
137 NVDmaNext (pNv, (NV10_TCL_PRIMITIVE_3D_TX_FILTER_MAG_FILTER_NEAREST<<28) |
138 (NV10_TCL_PRIMITIVE_3D_TX_FILTER_MIN_FILTER_NEAREST<<24));
140 NVDmaNext (pNv, (NV10_TCL_PRIMITIVE_3D_TX_FILTER_MAG_FILTER_LINEAR<<28) |
141 (NV10_TCL_PRIMITIVE_3D_TX_FILTER_MIN_FILTER_LINEAR<<24));
143 state.unit[unit].width = (float)pixmap->drawable.width;
144 state.unit[unit].height = (float)pixmap->drawable.height;
145 state.unit[unit].transform = Pict->transform;
148 static void NV10SetBuffer(NVPtr pNv,PicturePtr Pict,PixmapPtr pixmap)
151 int w = Pict->pDrawable->width;
152 int h = Pict->pDrawable->height;
153 float projectionmatrix[16];
155 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BUFFER_FORMAT, 4);
156 NVDmaNext (pNv, NV10DstFormat(Pict->format));
157 NVDmaNext (pNv, ((uint32_t)exaGetPixmapPitch(pixmap) << 16) |(uint32_t)exaGetPixmapPitch(pixmap));
158 NVDmaNext (pNv, NVAccelGetPixmapOffset(pixmap));
160 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2);
161 NVDmaNext (pNv, (w<<16)|x);
162 NVDmaNext (pNv, (h<<16)|y);
163 NVDmaStart(pNv, Nv3D, 0x2b4, 1); /* clip_mode */
165 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 1);
166 NVDmaNext (pNv, ((w-1+x)<<16)|x|0x08000800);
167 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(0), 1);
168 NVDmaNext (pNv, ((h-1+y)<<16)|y|0x08000800);
170 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_PROJECTION_MATRIX(0), 16);
171 projectionmatrix[0*4+0] = w * 0.5;
172 projectionmatrix[1*4+1] = h * -0.5;
174 projectionmatrix[2*4+2] = 16777215.0 * 0.5;
176 projectionmatrix[2*4+2] = 65535.0 * 0.5;
178 projectionmatrix[3*4+3] = 1.0;
180 NVDmaFloat (pNv, projectionmatrix[i]);
182 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2);
185 NVDmaFloat (pNv, 16777216.0);
187 NVDmaFloat (pNv, 65536.0);
189 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_SCALE_X, 4);
190 NVDmaFloat (pNv, (w * 0.5) - 2048.0);
191 NVDmaFloat (pNv, (h * 0.5) - 2048.0);
193 NVDmaFloat (pNv, 16777215.0 * 0.5);
195 NVDmaFloat (pNv, 65535.0 * 0.5);
200 static void NV10SetPictOp(NVPtr pNv,int op)
202 struct {int src;int dst;} pictops[] =
204 {0x0000,0x0000}, // PictOpClear
205 {0x0001,0x0000}, // PictOpSrc
206 {0x0000,0x0001}, // PictOpDst
207 {0x0001,0x0303}, // PictOpOver
208 {0x0305,0x0001}, // PictOpOverReverse
209 {0x0304,0x0000}, // PictOpIn
210 {0x0000,0x0302}, // PictOpInReverse
211 {0x0305,0x0000}, // PictOpOut
212 {0x0000,0x0303}, // PictOpOutReverse
213 {0x0304,0x0303}, // PictOpAtop
214 {0x0305,0x0302}, // PictOpAtopReverse
215 {0x0305,0x0303}, // PictOpXor
216 {0x0001,0x0001}, // PictOpAdd
219 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 2);
220 NVDmaNext (pNv, pictops[op].src);
221 NVDmaNext (pNv, pictops[op].dst);
224 static Bool NV10PrepareComposite(int op,
225 PicturePtr pSrcPicture,
226 PicturePtr pMaskPicture,
227 PicturePtr pDstPicture,
232 ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
233 NVPtr pNv = NVPTR(pScrn);
236 NV10SetBuffer(pNv,pDstPicture,pDst);
239 NV10SetTexture(pNv,0,pSrcPicture,pSrc);
241 /* Set mask format */
243 NV10SetTexture(pNv,1,pMaskPicture,pMask);
245 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BEGIN_END, 1);
246 NVDmaNext (pNv, 8); /* GL_QUADS + 1 */
249 NV10SetPictOp(pNv, op);
251 state.have_mask=(pMaskPicture!=NULL);
255 static inline void NV10Vertex(NVPtr pNv,float vx,float vy,float tx,float ty)
257 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S, 2);
260 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X, 3);
263 NVDmaFloat(pNv, 0.f);
266 static inline void NV10MVertex(NVPtr pNv,float vx,float vy,float t0x,float t0y,float t1x,float t1y)
268 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_2F_S, 2);
269 NVDmaFloat(pNv, t0x);
270 NVDmaFloat(pNv, t0y);
271 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_2F_S, 2);
272 NVDmaFloat(pNv, t1x);
273 NVDmaFloat(pNv, t1y);
274 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_POS_3F_X, 3);
277 NVDmaFloat(pNv, 0.f);
280 #define xFixedToFloat(v) \
281 ((float)xFixedToInt((v)) + ((float)xFixedFrac(v) / 65536.0))
284 NV10EXATransformCoord(PictTransformPtr t, int x, int y, float sx, float sy,
285 float *x_ret, float *y_ret)
290 v.vector[0] = IntToxFixed(x);
291 v.vector[1] = IntToxFixed(y);
292 v.vector[2] = xFixed1;
293 PictureTransformPoint(t, &v);
294 *x_ret = xFixedToFloat(v.vector[0]) / sx;
295 *y_ret = xFixedToFloat(v.vector[1]) / sy;
297 *x_ret = (float)x / sx;
298 *y_ret = (float)y / sy;
303 static void NV10Composite(PixmapPtr pDst,
313 ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
314 NVPtr pNv = NVPTR(pScrn);
315 float sX0, sX1, sY0, sY1;
316 float mX0, mX1, mY0, mY1;
318 NV10EXATransformCoord(state.unit[0].transform, srcX, srcY,
320 state.unit[0].height, &sX0, &sY0);
321 NV10EXATransformCoord(state.unit[0].transform,
322 srcX + width, srcY + height,
324 state.unit[0].height, &sX1, &sY1);
326 if (state.have_mask) {
327 NV10EXATransformCoord(state.unit[1].transform, maskX, maskY,
329 state.unit[1].height, &mX0, &mY0);
330 NV10EXATransformCoord(state.unit[1].transform,
331 maskX + width, maskY + height,
333 state.unit[1].height, &mX1, &mY1);
334 NV10MVertex(pNv , dstX , dstY,sX0 , sY0 , mX0 , mY0);
335 NV10MVertex(pNv , dstX + width , dstY,sX1 , sY0 , mX1 , mY0);
336 NV10MVertex(pNv , dstX + width , dstY + height,sX1 , sY1 , mX1 , mY1);
337 NV10MVertex(pNv , dstX , dstY + height,sX0 , sY1 , mX0 , mY1);
339 NV10Vertex(pNv , dstX , dstY , sX0 , sY0);
340 NV10Vertex(pNv , dstX + width , dstY , sX1 , sY0);
341 NV10Vertex(pNv , dstX + width , dstY + height , sX1 , sY1);
342 NV10Vertex(pNv , dstX , dstY + height , sX0 , sY1);
348 static void NV10DoneComposite (PixmapPtr pDst)
350 ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
351 NVPtr pNv = NVPTR(pScrn);
353 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BEGIN_END, 1);
354 NVDmaNext (pNv, 0); /* STOP */
356 exaMarkSync(pDst->drawable.pScreen);
361 NVAccelInitNV10TCL(ScrnInfoPtr pScrn)
363 NVPtr pNv = NVPTR(pScrn);
364 static int have_object = FALSE;
365 uint32_t class = 0, chipset;
368 chipset = (nvReadMC(pNv, 0) >> 20) & 0xff;
369 if ( ((chipset & 0xf0) != NV_ARCH_10) &&
370 ((chipset & 0xf0) != NV_ARCH_20) )
374 class = NV11_TCL_PRIMITIVE_3D;
375 else if (chipset>=0x17)
376 class = NV17_TCL_PRIMITIVE_3D;
377 else if (chipset>=0x11)
378 class = NV11_TCL_PRIMITIVE_3D;
380 class = NV10_TCL_PRIMITIVE_3D;
383 if (!NVDmaCreateContextObject(pNv, Nv3D, class))
388 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_SET_DMA_NOTIFY, 1);
389 NVDmaNext (pNv, NvNullObject);
391 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY0, 2);
392 NVDmaNext (pNv, NvDmaFB);
393 NVDmaNext (pNv, NvDmaTT);
395 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_SET_DMA_IN_MEMORY2, 2);
396 NVDmaNext (pNv, NvDmaFB);
397 NVDmaNext (pNv, NvDmaFB);
399 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOP, 1);
402 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 2);
406 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 1);
407 NVDmaNext (pNv, (0x7ff<<16)|0x800);
408 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(0), 1);
409 NVDmaNext (pNv, (0x7ff<<16)|0x800);
412 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 1);
414 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_VERT(i), 1);
418 NVDmaStart(pNv, Nv3D, 0x290, 1);
419 NVDmaNext (pNv, (0x10<<16)|1);
420 NVDmaStart(pNv, Nv3D, 0x3f4, 1);
423 // NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOTIFY, 1);
424 // NVDmaNext (pNv, 0);
425 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOP, 1);
429 NVDmaStart(pNv, Nv3D, 0x120, 3);
434 NVDmaStart(pNv, NvImageBlit, 0x120, 3);
439 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOP, 1);
443 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOP, 1);
447 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_FOG_ENABLE, 1);
449 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_ENABLE, 1);
451 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_ALPHA_FUNC_FUNC, 2);
452 NVDmaNext (pNv, 0x207);
454 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_TX_ENABLE(0), 2);
457 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_RC_IN_ALPHA(0), 12);
458 NVDmaNext (pNv, 0x30141010);
460 NVDmaNext (pNv, 0x20040000);
464 NVDmaNext (pNv, 0x00000c00);
466 NVDmaNext (pNv, 0x00000c00);
467 NVDmaNext (pNv, 0x18000000);
468 NVDmaNext (pNv, 0x300e0300);
469 NVDmaNext (pNv, 0x0c091c80);
470 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_ENABLE, 1);
472 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_DITHER_ENABLE, 2);
475 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1);
477 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_WEIGHT_ENABLE, 2);
480 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_BLEND_FUNC_SRC, 4);
484 NVDmaNext (pNv, 0x8006);
485 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 8);
486 NVDmaNext (pNv, 0xff);
487 NVDmaNext (pNv, 0x207);
489 NVDmaNext (pNv, 0xff);
490 NVDmaNext (pNv, 0x1e00);
491 NVDmaNext (pNv, 0x1e00);
492 NVDmaNext (pNv, 0x1e00);
493 NVDmaNext (pNv, 0x1d01);
494 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NORMALIZE_ENABLE, 1);
496 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_FOG_ENABLE, 2);
499 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_LIGHT_MODEL, 1);
501 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_COLOR_CONTROL, 1);
503 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_ENABLED_LIGHTS, 1);
505 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
509 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_DEPTH_FUNC, 1);
510 NVDmaNext (pNv, 0x201);
511 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_DEPTH_WRITE_ENABLE, 1);
513 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_DEPTH_TEST_ENABLE, 1);
515 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POLYGON_OFFSET_FACTOR, 2);
518 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POINT_SIZE, 1);
520 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POINT_PARAMETERS_ENABLE, 2);
523 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_LINE_WIDTH, 1);
525 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_LINE_SMOOTH_ENABLE, 1);
527 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POLYGON_MODE_FRONT, 2);
528 NVDmaNext (pNv, 0x1b02);
529 NVDmaNext (pNv, 0x1b02);
530 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE, 2);
531 NVDmaNext (pNv, 0x405);
532 NVDmaNext (pNv, 0x901);
533 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_POLYGON_SMOOTH_ENABLE, 1);
535 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_CULL_FACE_ENABLE, 1);
537 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_CLIP_PLANE_ENABLE(0), 8);
541 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_FOG_EQUATION_CONSTANT, 3);
542 NVDmaNext (pNv, 0x3fc00000); /* -1.50 */
543 NVDmaNext (pNv, 0xbdb8aa0a); /* -0.09 */
544 NVDmaNext (pNv, 0); /* 0.00 */
546 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_NOP, 1);
549 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 2);
550 NVDmaNext (pNv, 0x802);
552 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VIEW_MATRIX_ENABLE, 1);
554 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_COLOR_MASK, 1);
555 NVDmaNext (pNv, 0x01010101);
557 /* Set vertex component */
558 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_COL_4F_R, 4);
559 NVDmaFloat (pNv, 0.6);
560 NVDmaFloat (pNv, 0.4);
561 NVDmaFloat (pNv, 0.2);
562 NVDmaFloat (pNv, 1.0);
563 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_COL2_3F_R, 3);
567 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_NOR_3F_X, 3);
570 NVDmaFloat (pNv, 1.0);
571 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_TX0_4F_S, 4);
572 NVDmaFloat (pNv, 0.0);
573 NVDmaFloat (pNv, 0.0);
574 NVDmaFloat (pNv, 0.0);
575 NVDmaFloat (pNv, 1.0);
576 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_TX1_4F_S, 4);
577 NVDmaFloat (pNv, 0.0);
578 NVDmaFloat (pNv, 0.0);
579 NVDmaFloat (pNv, 0.0);
580 NVDmaFloat (pNv, 1.0);
581 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_VERTEX_FOG_1F, 1);
582 NVDmaFloat (pNv, 0.0);
583 NVDmaStart(pNv, Nv3D, NV10_TCL_PRIMITIVE_3D_EDGEFLAG_ENABLE, 1);