2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * Keith Whitwell <keith@tungstengraphics.com>
30 #include "bufferobj.h"
37 #include "s_context.h"
41 #include "s_triangle.h"
42 #include "s_texfilter.h"
46 * Recompute the value of swrast->_RasterMask, etc. according to
47 * the current context. The _RasterMask field can be easily tested by
48 * drivers to determine certain basic GL state (does the primitive need
49 * stenciling, logic-op, fog, etc?).
52 _swrast_update_rasterflags( GLcontext
*ctx
)
54 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
55 GLbitfield rasterMask
= 0;
57 if (ctx
->Color
.AlphaEnabled
) rasterMask
|= ALPHATEST_BIT
;
58 if (ctx
->Color
.BlendEnabled
) rasterMask
|= BLEND_BIT
;
59 if (ctx
->Depth
.Test
) rasterMask
|= DEPTH_BIT
;
60 if (swrast
->_FogEnabled
) rasterMask
|= FOG_BIT
;
61 if (ctx
->Scissor
.Enabled
) rasterMask
|= CLIP_BIT
;
62 if (ctx
->Stencil
.Enabled
) rasterMask
|= STENCIL_BIT
;
63 if (ctx
->Visual
.rgbMode
) {
64 const GLuint colorMask
= *((GLuint
*) &ctx
->Color
.ColorMask
);
65 if (colorMask
!= 0xffffffff) rasterMask
|= MASKING_BIT
;
66 if (ctx
->Color
._LogicOpEnabled
) rasterMask
|= LOGIC_OP_BIT
;
67 if (ctx
->Texture
._EnabledUnits
) rasterMask
|= TEXTURE_BIT
;
70 if (ctx
->Color
.IndexMask
!= 0xffffffff) rasterMask
|= MASKING_BIT
;
71 if (ctx
->Color
.IndexLogicOpEnabled
) rasterMask
|= LOGIC_OP_BIT
;
74 if ( ctx
->Viewport
.X
< 0
75 || ctx
->Viewport
.X
+ ctx
->Viewport
.Width
> (GLint
) ctx
->DrawBuffer
->Width
76 || ctx
->Viewport
.Y
< 0
77 || ctx
->Viewport
.Y
+ ctx
->Viewport
.Height
> (GLint
) ctx
->DrawBuffer
->Height
) {
78 rasterMask
|= CLIP_BIT
;
81 if (ctx
->Query
.CurrentOcclusionObject
)
82 rasterMask
|= OCCLUSION_BIT
;
85 /* If we're not drawing to exactly one color buffer set the
86 * MULTI_DRAW_BIT flag. Also set it if we're drawing to no
87 * buffers or the RGBA or CI mask disables all writes.
89 if (ctx
->DrawBuffer
->_NumColorDrawBuffers
[0] != 1) {
90 /* more than one color buffer designated for writing (or zero buffers) */
91 rasterMask
|= MULTI_DRAW_BIT
;
93 else if (ctx
->Visual
.rgbMode
&& *((GLuint
*) ctx
->Color
.ColorMask
) == 0) {
94 rasterMask
|= MULTI_DRAW_BIT
; /* all RGBA channels disabled */
96 else if (!ctx
->Visual
.rgbMode
&& ctx
->Color
.IndexMask
==0) {
97 rasterMask
|= MULTI_DRAW_BIT
; /* all color index bits disabled */
100 if (ctx
->FragmentProgram
._Active
) {
101 rasterMask
|= FRAGPROG_BIT
;
104 if (ctx
->ATIFragmentShader
._Enabled
) {
105 rasterMask
|= ATIFRAGSHADER_BIT
;
108 SWRAST_CONTEXT(ctx
)->_RasterMask
= rasterMask
;
113 * Examine polycon culls tate to compute the _BackfaceSign field.
114 * _BackfaceSign will be 0 if no culling, -1 if culling back-faces,
115 * and 1 if culling front-faces. The Polygon FrontFace state also
119 _swrast_update_polygon( GLcontext
*ctx
)
121 GLfloat backface_sign
= 1;
123 if (ctx
->Polygon
.CullFlag
) {
125 switch(ctx
->Polygon
.CullFaceMode
) {
127 if(ctx
->Polygon
.FrontFace
==GL_CCW
)
131 if(ctx
->Polygon
.FrontFace
!=GL_CCW
)
135 case GL_FRONT_AND_BACK
:
144 SWRAST_CONTEXT(ctx
)->_BackfaceSign
= backface_sign
;
149 * Update the _PreferPixelFog field to indicate if we need to compute
150 * fog factors per-fragment.
153 _swrast_update_fog_hint( GLcontext
*ctx
)
155 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
156 swrast
->_PreferPixelFog
= (!swrast
->AllowVertexFog
||
157 ctx
->FragmentProgram
._Enabled
|| /* not _Active! */
158 (ctx
->Hint
.Fog
== GL_NICEST
&&
159 swrast
->AllowPixelFog
));
165 * Update the swrast->_AnyTextureCombine flag.
168 _swrast_update_texture_env( GLcontext
*ctx
)
170 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
172 swrast
->_AnyTextureCombine
= GL_FALSE
;
173 for (i
= 0; i
< ctx
->Const
.MaxTextureUnits
; i
++) {
174 if (ctx
->Texture
.Unit
[i
].EnvMode
== GL_COMBINE_EXT
||
175 ctx
->Texture
.Unit
[i
].EnvMode
== GL_COMBINE4_NV
) {
176 swrast
->_AnyTextureCombine
= GL_TRUE
;
184 * Update swrast->_FogColor and swrast->_FogEnable values.
187 _swrast_update_fog_state( GLcontext
*ctx
)
189 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
191 /* convert fog color to GLchan values */
192 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[RCOMP
], ctx
->Fog
.Color
[RCOMP
]);
193 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[GCOMP
], ctx
->Fog
.Color
[GCOMP
]);
194 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[BCOMP
], ctx
->Fog
.Color
[BCOMP
]);
196 /* determine if fog is needed, and if so, which fog mode */
197 swrast
->_FogEnabled
= GL_FALSE
;
198 if (ctx
->FragmentProgram
._Active
) {
199 if (ctx
->FragmentProgram
._Current
->Base
.Target
==GL_FRAGMENT_PROGRAM_ARB
) {
200 const struct fragment_program
*p
201 = (struct fragment_program
*) ctx
->FragmentProgram
._Current
;
202 if (p
->FogOption
!= GL_NONE
) {
203 swrast
->_FogEnabled
= GL_TRUE
;
204 swrast
->_FogMode
= p
->FogOption
;
208 else if (ctx
->Fog
.Enabled
) {
209 swrast
->_FogEnabled
= GL_TRUE
;
210 swrast
->_FogMode
= ctx
->Fog
.Mode
;
216 * Update state for running fragment programs. Basically, load the
217 * program parameters with current state values.
220 _swrast_update_fragment_program( GLcontext
*ctx
)
222 if (ctx
->FragmentProgram
._Active
) {
223 struct fragment_program
*program
= ctx
->FragmentProgram
._Current
;
224 _mesa_load_state_parameters(ctx
, program
->Parameters
);
230 #define _SWRAST_NEW_DERIVED (_SWRAST_NEW_RASTERMASK | \
235 /* State referenced by _swrast_choose_triangle, _swrast_choose_line.
237 #define _SWRAST_NEW_TRIANGLE (_SWRAST_NEW_DERIVED | \
244 _SWRAST_NEW_RASTERMASK| \
247 _DD_NEW_SEPARATE_SPECULAR)
249 #define _SWRAST_NEW_LINE (_SWRAST_NEW_DERIVED | \
256 _DD_NEW_SEPARATE_SPECULAR)
258 #define _SWRAST_NEW_POINT (_SWRAST_NEW_DERIVED | \
264 _DD_NEW_SEPARATE_SPECULAR)
266 #define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC _NEW_TEXTURE
268 #define _SWRAST_NEW_TEXTURE_ENV_MODE _NEW_TEXTURE
270 #define _SWRAST_NEW_BLEND_FUNC _NEW_COLOR
275 * Stub for swrast->Triangle to select a true triangle function
276 * after a state change.
279 _swrast_validate_triangle( GLcontext
*ctx
,
284 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
286 _swrast_validate_derived( ctx
);
287 swrast
->choose_triangle( ctx
);
289 if (ctx
->Texture
._EnabledUnits
== 0
290 && NEED_SECONDARY_COLOR(ctx
)
291 && !ctx
->FragmentProgram
._Active
) {
292 /* separate specular color, but no texture */
293 swrast
->SpecTriangle
= swrast
->Triangle
;
294 swrast
->Triangle
= _swrast_add_spec_terms_triangle
;
297 swrast
->Triangle( ctx
, v0
, v1
, v2
);
301 * Called via swrast->Line. Examine current GL state and choose a software
302 * line routine. Then call it.
305 _swrast_validate_line( GLcontext
*ctx
, const SWvertex
*v0
, const SWvertex
*v1
)
307 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
309 _swrast_validate_derived( ctx
);
310 swrast
->choose_line( ctx
);
312 if (ctx
->Texture
._EnabledUnits
== 0
313 && NEED_SECONDARY_COLOR(ctx
)
314 && !ctx
->FragmentProgram
._Active
) {
315 swrast
->SpecLine
= swrast
->Line
;
316 swrast
->Line
= _swrast_add_spec_terms_line
;
320 swrast
->Line( ctx
, v0
, v1
);
324 * Called via swrast->Point. Examine current GL state and choose a software
325 * point routine. Then call it.
328 _swrast_validate_point( GLcontext
*ctx
, const SWvertex
*v0
)
330 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
332 _swrast_validate_derived( ctx
);
333 swrast
->choose_point( ctx
);
335 if (ctx
->Texture
._EnabledUnits
== 0
336 && NEED_SECONDARY_COLOR(ctx
)
337 && !ctx
->FragmentProgram
._Active
) {
338 swrast
->SpecPoint
= swrast
->Point
;
339 swrast
->Point
= _swrast_add_spec_terms_point
;
342 swrast
->Point( ctx
, v0
);
347 * Called via swrast->BlendFunc. Examine GL state to choose a blending
348 * function, then call it.
351 _swrast_validate_blend_func( GLcontext
*ctx
, GLuint n
,
352 const GLubyte mask
[],
354 CONST GLchan dst
[][4] )
356 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
358 _swrast_validate_derived( ctx
);
359 _swrast_choose_blend_func( ctx
);
361 swrast
->BlendFunc( ctx
, n
, mask
, src
, dst
);
366 _swrast_sleep( GLcontext
*ctx
, GLbitfield new_state
)
368 (void) ctx
; (void) new_state
;
373 _swrast_invalidate_state( GLcontext
*ctx
, GLbitfield new_state
)
375 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
378 swrast
->NewState
|= new_state
;
380 /* After 10 statechanges without any swrast functions being called,
381 * put the module to sleep.
383 if (++swrast
->StateChanges
> 10) {
384 swrast
->InvalidateState
= _swrast_sleep
;
385 swrast
->NewState
= ~0;
389 if (new_state
& swrast
->invalidate_triangle
)
390 swrast
->Triangle
= _swrast_validate_triangle
;
392 if (new_state
& swrast
->invalidate_line
)
393 swrast
->Line
= _swrast_validate_line
;
395 if (new_state
& swrast
->invalidate_point
)
396 swrast
->Point
= _swrast_validate_point
;
398 if (new_state
& _SWRAST_NEW_BLEND_FUNC
)
399 swrast
->BlendFunc
= _swrast_validate_blend_func
;
401 if (new_state
& _SWRAST_NEW_TEXTURE_SAMPLE_FUNC
)
402 for (i
= 0 ; i
< ctx
->Const
.MaxTextureUnits
; i
++)
403 swrast
->TextureSample
[i
] = NULL
;
408 _swrast_update_texture_samplers(GLcontext
*ctx
)
410 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
413 for (u
= 0; u
< ctx
->Const
.MaxTextureImageUnits
; u
++) {
414 const struct gl_texture_object
*tObj
= ctx
->Texture
.Unit
[u
]._Current
;
416 swrast
->TextureSample
[u
] =
417 _swrast_choose_texture_sample_func(ctx
, tObj
);
423 _swrast_validate_derived( GLcontext
*ctx
)
425 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
427 if (swrast
->NewState
) {
428 if (swrast
->NewState
& _SWRAST_NEW_RASTERMASK
)
429 _swrast_update_rasterflags( ctx
);
431 if (swrast
->NewState
& _NEW_POLYGON
)
432 _swrast_update_polygon( ctx
);
434 if (swrast
->NewState
& (_NEW_HINT
| _NEW_PROGRAM
))
435 _swrast_update_fog_hint( ctx
);
437 if (swrast
->NewState
& _SWRAST_NEW_TEXTURE_ENV_MODE
)
438 _swrast_update_texture_env( ctx
);
440 if (swrast
->NewState
& (_NEW_FOG
| _NEW_PROGRAM
))
441 _swrast_update_fog_state( ctx
);
443 if (swrast
->NewState
& _NEW_PROGRAM
)
444 _swrast_update_fragment_program( ctx
);
446 if (swrast
->NewState
& _NEW_TEXTURE
)
447 _swrast_update_texture_samplers( ctx
);
449 swrast
->NewState
= 0;
450 swrast
->StateChanges
= 0;
451 swrast
->InvalidateState
= _swrast_invalidate_state
;
455 #define SWRAST_DEBUG 0
457 /* Public entrypoints: See also s_accum.c, s_bitmap.c, etc.
460 _swrast_Quad( GLcontext
*ctx
,
461 const SWvertex
*v0
, const SWvertex
*v1
,
462 const SWvertex
*v2
, const SWvertex
*v3
)
465 _mesa_debug(ctx
, "_swrast_Quad\n");
466 _swrast_print_vertex( ctx
, v0
);
467 _swrast_print_vertex( ctx
, v1
);
468 _swrast_print_vertex( ctx
, v2
);
469 _swrast_print_vertex( ctx
, v3
);
471 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v0
, v1
, v3
);
472 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v1
, v2
, v3
);
476 _swrast_Triangle( GLcontext
*ctx
, const SWvertex
*v0
,
477 const SWvertex
*v1
, const SWvertex
*v2
)
480 _mesa_debug(ctx
, "_swrast_Triangle\n");
481 _swrast_print_vertex( ctx
, v0
);
482 _swrast_print_vertex( ctx
, v1
);
483 _swrast_print_vertex( ctx
, v2
);
485 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v0
, v1
, v2
);
489 _swrast_Line( GLcontext
*ctx
, const SWvertex
*v0
, const SWvertex
*v1
)
492 _mesa_debug(ctx
, "_swrast_Line\n");
493 _swrast_print_vertex( ctx
, v0
);
494 _swrast_print_vertex( ctx
, v1
);
496 SWRAST_CONTEXT(ctx
)->Line( ctx
, v0
, v1
);
500 _swrast_Point( GLcontext
*ctx
, const SWvertex
*v0
)
503 _mesa_debug(ctx
, "_swrast_Point\n");
504 _swrast_print_vertex( ctx
, v0
);
506 SWRAST_CONTEXT(ctx
)->Point( ctx
, v0
);
510 _swrast_InvalidateState( GLcontext
*ctx
, GLbitfield new_state
)
513 _mesa_debug(ctx
, "_swrast_InvalidateState\n");
515 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, new_state
);
519 _swrast_ResetLineStipple( GLcontext
*ctx
)
522 _mesa_debug(ctx
, "_swrast_ResetLineStipple\n");
524 SWRAST_CONTEXT(ctx
)->StippleCounter
= 0;
528 _swrast_allow_vertex_fog( GLcontext
*ctx
, GLboolean value
)
531 _mesa_debug(ctx
, "_swrast_allow_vertex_fog %d\n", value
);
533 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, _NEW_HINT
);
534 SWRAST_CONTEXT(ctx
)->AllowVertexFog
= value
;
538 _swrast_allow_pixel_fog( GLcontext
*ctx
, GLboolean value
)
541 _mesa_debug(ctx
, "_swrast_allow_pixel_fog %d\n", value
);
543 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, _NEW_HINT
);
544 SWRAST_CONTEXT(ctx
)->AllowPixelFog
= value
;
549 _swrast_CreateContext( GLcontext
*ctx
)
552 SWcontext
*swrast
= (SWcontext
*)CALLOC(sizeof(SWcontext
));
555 _mesa_debug(ctx
, "_swrast_CreateContext\n");
561 swrast
->NewState
= ~0;
563 swrast
->choose_point
= _swrast_choose_point
;
564 swrast
->choose_line
= _swrast_choose_line
;
565 swrast
->choose_triangle
= _swrast_choose_triangle
;
567 swrast
->invalidate_point
= _SWRAST_NEW_POINT
;
568 swrast
->invalidate_line
= _SWRAST_NEW_LINE
;
569 swrast
->invalidate_triangle
= _SWRAST_NEW_TRIANGLE
;
571 swrast
->Point
= _swrast_validate_point
;
572 swrast
->Line
= _swrast_validate_line
;
573 swrast
->Triangle
= _swrast_validate_triangle
;
574 swrast
->InvalidateState
= _swrast_sleep
;
575 swrast
->BlendFunc
= _swrast_validate_blend_func
;
577 swrast
->AllowVertexFog
= GL_TRUE
;
578 swrast
->AllowPixelFog
= GL_TRUE
;
580 /* Optimized Accum buffer */
581 swrast
->_IntegerAccumMode
= GL_FALSE
;
582 swrast
->_IntegerAccumScaler
= 0.0;
584 for (i
= 0; i
< MAX_TEXTURE_IMAGE_UNITS
; i
++)
585 swrast
->TextureSample
[i
] = NULL
;
587 swrast
->SpanArrays
= MALLOC_STRUCT(span_arrays
);
588 if (!swrast
->SpanArrays
) {
593 /* init point span buffer */
594 swrast
->PointSpan
.primitive
= GL_POINT
;
595 swrast
->PointSpan
.start
= 0;
596 swrast
->PointSpan
.end
= 0;
597 swrast
->PointSpan
.facing
= 0;
598 swrast
->PointSpan
.array
= swrast
->SpanArrays
;
600 assert(ctx
->Const
.MaxTextureUnits
> 0);
601 assert(ctx
->Const
.MaxTextureUnits
<= MAX_TEXTURE_UNITS
);
603 swrast
->TexelBuffer
= (GLchan
*) MALLOC(ctx
->Const
.MaxTextureUnits
*
604 MAX_WIDTH
* 4 * sizeof(GLchan
));
605 if (!swrast
->TexelBuffer
) {
606 FREE(swrast
->SpanArrays
);
611 ctx
->swrast_context
= swrast
;
617 _swrast_DestroyContext( GLcontext
*ctx
)
619 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
622 _mesa_debug(ctx
, "_swrast_DestroyContext\n");
625 FREE( swrast
->SpanArrays
);
626 FREE( swrast
->TexelBuffer
);
629 ctx
->swrast_context
= 0;
633 struct swrast_device_driver
*
634 _swrast_GetDeviceDriverReference( GLcontext
*ctx
)
636 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
637 return &swrast
->Driver
;
641 _swrast_flush( GLcontext
*ctx
)
643 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
644 /* flush any pending fragments from rendering points */
645 if (swrast
->PointSpan
.end
> 0) {
646 if (ctx
->Visual
.rgbMode
) {
647 _swrast_write_rgba_span(ctx
, &(swrast
->PointSpan
));
650 _swrast_write_index_span(ctx
, &(swrast
->PointSpan
));
652 swrast
->PointSpan
.end
= 0;
657 _swrast_render_primitive( GLcontext
*ctx
, GLenum prim
)
659 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
660 if (swrast
->Primitive
== GL_POINTS
&& prim
!= GL_POINTS
) {
663 swrast
->Primitive
= prim
;
668 _swrast_render_start( GLcontext
*ctx
)
670 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
671 if (swrast
->Driver
.SpanRenderStart
)
672 swrast
->Driver
.SpanRenderStart( ctx
);
673 swrast
->PointSpan
.end
= 0;
677 _swrast_render_finish( GLcontext
*ctx
)
679 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
680 if (swrast
->Driver
.SpanRenderFinish
)
681 swrast
->Driver
.SpanRenderFinish( ctx
);
687 #define SWRAST_DEBUG_VERTICES 0
690 _swrast_print_vertex( GLcontext
*ctx
, const SWvertex
*v
)
694 if (SWRAST_DEBUG_VERTICES
) {
695 _mesa_debug(ctx
, "win %f %f %f %f\n",
696 v
->win
[0], v
->win
[1], v
->win
[2], v
->win
[3]);
698 for (i
= 0 ; i
< ctx
->Const
.MaxTextureUnits
; i
++)
699 if (ctx
->Texture
.Unit
[i
]._ReallyEnabled
)
700 _mesa_debug(ctx
, "texcoord[%d] %f %f %f %f\n", i
,
701 v
->texcoord
[i
][0], v
->texcoord
[i
][1],
702 v
->texcoord
[i
][2], v
->texcoord
[i
][3]);
704 #if CHAN_TYPE == GL_FLOAT
705 _mesa_debug(ctx
, "color %f %f %f %f\n",
706 v
->color
[0], v
->color
[1], v
->color
[2], v
->color
[3]);
707 _mesa_debug(ctx
, "spec %f %f %f %f\n",
708 v
->specular
[0], v
->specular
[1],
709 v
->specular
[2], v
->specular
[3]);
711 _mesa_debug(ctx
, "color %d %d %d %d\n",
712 v
->color
[0], v
->color
[1], v
->color
[2], v
->color
[3]);
713 _mesa_debug(ctx
, "spec %d %d %d %d\n",
714 v
->specular
[0], v
->specular
[1],
715 v
->specular
[2], v
->specular
[3]);
717 _mesa_debug(ctx
, "fog %f\n", v
->fog
);
718 _mesa_debug(ctx
, "index %d\n", v
->index
);
719 _mesa_debug(ctx
, "pointsize %f\n", v
->pointSize
);
720 _mesa_debug(ctx
, "\n");