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
->ShaderObjects
._FragmentShaderPresent
) {
105 rasterMask
|= FRAGPROG_BIT
;
108 if (ctx
->ATIFragmentShader
._Enabled
) {
109 rasterMask
|= ATIFRAGSHADER_BIT
;
112 #if CHAN_TYPE == GL_FLOAT
113 if (ctx
->Color
.ClampFragmentColor
== GL_TRUE
) {
114 rasterMask
|= CLAMPING_BIT
;
118 SWRAST_CONTEXT(ctx
)->_RasterMask
= rasterMask
;
123 * Examine polycon culls tate to compute the _BackfaceSign field.
124 * _BackfaceSign will be 0 if no culling, -1 if culling back-faces,
125 * and 1 if culling front-faces. The Polygon FrontFace state also
129 _swrast_update_polygon( GLcontext
*ctx
)
131 GLfloat backface_sign
= 1;
133 if (ctx
->Polygon
.CullFlag
) {
135 switch(ctx
->Polygon
.CullFaceMode
) {
137 if(ctx
->Polygon
.FrontFace
==GL_CCW
)
141 if(ctx
->Polygon
.FrontFace
!=GL_CCW
)
145 case GL_FRONT_AND_BACK
:
154 SWRAST_CONTEXT(ctx
)->_BackfaceSign
= backface_sign
;
159 * Update the _PreferPixelFog field to indicate if we need to compute
160 * fog factors per-fragment.
163 _swrast_update_fog_hint( GLcontext
*ctx
)
165 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
166 swrast
->_PreferPixelFog
= (!swrast
->AllowVertexFog
||
167 ctx
->FragmentProgram
._Enabled
|| /* not _Active! */
168 (ctx
->Hint
.Fog
== GL_NICEST
&&
169 swrast
->AllowPixelFog
));
175 * Update the swrast->_AnyTextureCombine flag.
178 _swrast_update_texture_env( GLcontext
*ctx
)
180 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
182 swrast
->_AnyTextureCombine
= GL_FALSE
;
183 for (i
= 0; i
< ctx
->Const
.MaxTextureUnits
; i
++) {
184 if (ctx
->Texture
.Unit
[i
].EnvMode
== GL_COMBINE_EXT
||
185 ctx
->Texture
.Unit
[i
].EnvMode
== GL_COMBINE4_NV
) {
186 swrast
->_AnyTextureCombine
= GL_TRUE
;
194 * Update swrast->_FogColor and swrast->_FogEnable values.
197 _swrast_update_fog_state( GLcontext
*ctx
)
199 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
201 /* convert fog color to GLchan values */
202 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[RCOMP
], ctx
->Fog
.Color
[RCOMP
]);
203 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[GCOMP
], ctx
->Fog
.Color
[GCOMP
]);
204 CLAMPED_FLOAT_TO_CHAN(swrast
->_FogColor
[BCOMP
], ctx
->Fog
.Color
[BCOMP
]);
206 /* determine if fog is needed, and if so, which fog mode */
207 swrast
->_FogEnabled
= GL_FALSE
;
208 if (ctx
->FragmentProgram
._Active
) {
209 if (ctx
->FragmentProgram
._Current
->Base
.Target
==GL_FRAGMENT_PROGRAM_ARB
) {
210 const struct fragment_program
*p
211 = (struct fragment_program
*) ctx
->FragmentProgram
._Current
;
212 if (p
->FogOption
!= GL_NONE
) {
213 swrast
->_FogEnabled
= GL_TRUE
;
214 swrast
->_FogMode
= p
->FogOption
;
218 else if (ctx
->Fog
.Enabled
) {
219 swrast
->_FogEnabled
= GL_TRUE
;
220 swrast
->_FogMode
= ctx
->Fog
.Mode
;
226 * Update state for running fragment programs. Basically, load the
227 * program parameters with current state values.
230 _swrast_update_fragment_program( GLcontext
*ctx
)
232 if (ctx
->FragmentProgram
._Active
) {
233 struct fragment_program
*program
= ctx
->FragmentProgram
._Current
;
234 _mesa_load_state_parameters(ctx
, program
->Base
.Parameters
);
240 #define _SWRAST_NEW_DERIVED (_SWRAST_NEW_RASTERMASK | \
245 /* State referenced by _swrast_choose_triangle, _swrast_choose_line.
247 #define _SWRAST_NEW_TRIANGLE (_SWRAST_NEW_DERIVED | \
254 _SWRAST_NEW_RASTERMASK| \
257 _DD_NEW_SEPARATE_SPECULAR)
259 #define _SWRAST_NEW_LINE (_SWRAST_NEW_DERIVED | \
266 _DD_NEW_SEPARATE_SPECULAR)
268 #define _SWRAST_NEW_POINT (_SWRAST_NEW_DERIVED | \
274 _DD_NEW_SEPARATE_SPECULAR)
276 #define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC _NEW_TEXTURE
278 #define _SWRAST_NEW_TEXTURE_ENV_MODE _NEW_TEXTURE
280 #define _SWRAST_NEW_BLEND_FUNC _NEW_COLOR
285 * Stub for swrast->Triangle to select a true triangle function
286 * after a state change.
289 _swrast_validate_triangle( GLcontext
*ctx
,
294 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
296 _swrast_validate_derived( ctx
);
297 swrast
->choose_triangle( ctx
);
299 if (ctx
->Texture
._EnabledUnits
== 0
300 && NEED_SECONDARY_COLOR(ctx
)
301 && !ctx
->FragmentProgram
._Active
) {
302 /* separate specular color, but no texture */
303 swrast
->SpecTriangle
= swrast
->Triangle
;
304 swrast
->Triangle
= _swrast_add_spec_terms_triangle
;
307 swrast
->Triangle( ctx
, v0
, v1
, v2
);
311 * Called via swrast->Line. Examine current GL state and choose a software
312 * line routine. Then call it.
315 _swrast_validate_line( GLcontext
*ctx
, const SWvertex
*v0
, const SWvertex
*v1
)
317 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
319 _swrast_validate_derived( ctx
);
320 swrast
->choose_line( ctx
);
322 if (ctx
->Texture
._EnabledUnits
== 0
323 && NEED_SECONDARY_COLOR(ctx
)
324 && !ctx
->FragmentProgram
._Active
) {
325 swrast
->SpecLine
= swrast
->Line
;
326 swrast
->Line
= _swrast_add_spec_terms_line
;
330 swrast
->Line( ctx
, v0
, v1
);
334 * Called via swrast->Point. Examine current GL state and choose a software
335 * point routine. Then call it.
338 _swrast_validate_point( GLcontext
*ctx
, const SWvertex
*v0
)
340 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
342 _swrast_validate_derived( ctx
);
343 swrast
->choose_point( ctx
);
345 if (ctx
->Texture
._EnabledUnits
== 0
346 && NEED_SECONDARY_COLOR(ctx
)
347 && !ctx
->FragmentProgram
._Active
) {
348 swrast
->SpecPoint
= swrast
->Point
;
349 swrast
->Point
= _swrast_add_spec_terms_point
;
352 swrast
->Point( ctx
, v0
);
357 * Called via swrast->BlendFunc. Examine GL state to choose a blending
358 * function, then call it.
361 _swrast_validate_blend_func( GLcontext
*ctx
, GLuint n
,
362 const GLubyte mask
[],
364 CONST GLchan dst
[][4] )
366 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
368 _swrast_validate_derived( ctx
);
369 _swrast_choose_blend_func( ctx
);
371 swrast
->BlendFunc( ctx
, n
, mask
, src
, dst
);
376 _swrast_sleep( GLcontext
*ctx
, GLbitfield new_state
)
378 (void) ctx
; (void) new_state
;
383 _swrast_invalidate_state( GLcontext
*ctx
, GLbitfield new_state
)
385 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
388 swrast
->NewState
|= new_state
;
390 /* After 10 statechanges without any swrast functions being called,
391 * put the module to sleep.
393 if (++swrast
->StateChanges
> 10) {
394 swrast
->InvalidateState
= _swrast_sleep
;
395 swrast
->NewState
= ~0;
399 if (new_state
& swrast
->InvalidateTriangleMask
)
400 swrast
->Triangle
= _swrast_validate_triangle
;
402 if (new_state
& swrast
->InvalidateLineMask
)
403 swrast
->Line
= _swrast_validate_line
;
405 if (new_state
& swrast
->InvalidatePointMask
)
406 swrast
->Point
= _swrast_validate_point
;
408 if (new_state
& _SWRAST_NEW_BLEND_FUNC
)
409 swrast
->BlendFunc
= _swrast_validate_blend_func
;
411 if (new_state
& _SWRAST_NEW_TEXTURE_SAMPLE_FUNC
)
412 for (i
= 0 ; i
< ctx
->Const
.MaxTextureUnits
; i
++)
413 swrast
->TextureSample
[i
] = NULL
;
418 _swrast_update_texture_samplers(GLcontext
*ctx
)
420 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
423 for (u
= 0; u
< ctx
->Const
.MaxTextureImageUnits
; u
++) {
424 const struct gl_texture_object
*tObj
= ctx
->Texture
.Unit
[u
]._Current
;
426 swrast
->TextureSample
[u
] =
427 _swrast_choose_texture_sample_func(ctx
, tObj
);
433 _swrast_validate_derived( GLcontext
*ctx
)
435 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
437 if (swrast
->NewState
) {
438 if (swrast
->NewState
& _SWRAST_NEW_RASTERMASK
)
439 _swrast_update_rasterflags( ctx
);
441 if (swrast
->NewState
& _NEW_POLYGON
)
442 _swrast_update_polygon( ctx
);
444 if (swrast
->NewState
& (_NEW_HINT
| _NEW_PROGRAM
))
445 _swrast_update_fog_hint( ctx
);
447 if (swrast
->NewState
& _SWRAST_NEW_TEXTURE_ENV_MODE
)
448 _swrast_update_texture_env( ctx
);
450 if (swrast
->NewState
& (_NEW_FOG
| _NEW_PROGRAM
))
451 _swrast_update_fog_state( ctx
);
453 if (swrast
->NewState
& _NEW_PROGRAM
)
454 _swrast_update_fragment_program( ctx
);
456 if (swrast
->NewState
& _NEW_TEXTURE
)
457 _swrast_update_texture_samplers( ctx
);
459 swrast
->NewState
= 0;
460 swrast
->StateChanges
= 0;
461 swrast
->InvalidateState
= _swrast_invalidate_state
;
465 #define SWRAST_DEBUG 0
467 /* Public entrypoints: See also s_accum.c, s_bitmap.c, etc.
470 _swrast_Quad( GLcontext
*ctx
,
471 const SWvertex
*v0
, const SWvertex
*v1
,
472 const SWvertex
*v2
, const SWvertex
*v3
)
475 _mesa_debug(ctx
, "_swrast_Quad\n");
476 _swrast_print_vertex( ctx
, v0
);
477 _swrast_print_vertex( ctx
, v1
);
478 _swrast_print_vertex( ctx
, v2
);
479 _swrast_print_vertex( ctx
, v3
);
481 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v0
, v1
, v3
);
482 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v1
, v2
, v3
);
486 _swrast_Triangle( GLcontext
*ctx
, const SWvertex
*v0
,
487 const SWvertex
*v1
, const SWvertex
*v2
)
490 _mesa_debug(ctx
, "_swrast_Triangle\n");
491 _swrast_print_vertex( ctx
, v0
);
492 _swrast_print_vertex( ctx
, v1
);
493 _swrast_print_vertex( ctx
, v2
);
495 SWRAST_CONTEXT(ctx
)->Triangle( ctx
, v0
, v1
, v2
);
499 _swrast_Line( GLcontext
*ctx
, const SWvertex
*v0
, const SWvertex
*v1
)
502 _mesa_debug(ctx
, "_swrast_Line\n");
503 _swrast_print_vertex( ctx
, v0
);
504 _swrast_print_vertex( ctx
, v1
);
506 SWRAST_CONTEXT(ctx
)->Line( ctx
, v0
, v1
);
510 _swrast_Point( GLcontext
*ctx
, const SWvertex
*v0
)
513 _mesa_debug(ctx
, "_swrast_Point\n");
514 _swrast_print_vertex( ctx
, v0
);
516 SWRAST_CONTEXT(ctx
)->Point( ctx
, v0
);
520 _swrast_InvalidateState( GLcontext
*ctx
, GLbitfield new_state
)
523 _mesa_debug(ctx
, "_swrast_InvalidateState\n");
525 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, new_state
);
529 _swrast_ResetLineStipple( GLcontext
*ctx
)
532 _mesa_debug(ctx
, "_swrast_ResetLineStipple\n");
534 SWRAST_CONTEXT(ctx
)->StippleCounter
= 0;
538 _swrast_allow_vertex_fog( GLcontext
*ctx
, GLboolean value
)
541 _mesa_debug(ctx
, "_swrast_allow_vertex_fog %d\n", value
);
543 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, _NEW_HINT
);
544 SWRAST_CONTEXT(ctx
)->AllowVertexFog
= value
;
548 _swrast_allow_pixel_fog( GLcontext
*ctx
, GLboolean value
)
551 _mesa_debug(ctx
, "_swrast_allow_pixel_fog %d\n", value
);
553 SWRAST_CONTEXT(ctx
)->InvalidateState( ctx
, _NEW_HINT
);
554 SWRAST_CONTEXT(ctx
)->AllowPixelFog
= value
;
559 _swrast_CreateContext( GLcontext
*ctx
)
562 SWcontext
*swrast
= (SWcontext
*)CALLOC(sizeof(SWcontext
));
565 _mesa_debug(ctx
, "_swrast_CreateContext\n");
571 swrast
->NewState
= ~0;
573 swrast
->choose_point
= _swrast_choose_point
;
574 swrast
->choose_line
= _swrast_choose_line
;
575 swrast
->choose_triangle
= _swrast_choose_triangle
;
577 swrast
->InvalidatePointMask
= _SWRAST_NEW_POINT
;
578 swrast
->InvalidateLineMask
= _SWRAST_NEW_LINE
;
579 swrast
->InvalidateTriangleMask
= _SWRAST_NEW_TRIANGLE
;
581 swrast
->Point
= _swrast_validate_point
;
582 swrast
->Line
= _swrast_validate_line
;
583 swrast
->Triangle
= _swrast_validate_triangle
;
584 swrast
->InvalidateState
= _swrast_sleep
;
585 swrast
->BlendFunc
= _swrast_validate_blend_func
;
587 swrast
->AllowVertexFog
= GL_TRUE
;
588 swrast
->AllowPixelFog
= GL_TRUE
;
590 /* Optimized Accum buffer */
591 swrast
->_IntegerAccumMode
= GL_FALSE
;
592 swrast
->_IntegerAccumScaler
= 0.0;
594 for (i
= 0; i
< MAX_TEXTURE_IMAGE_UNITS
; i
++)
595 swrast
->TextureSample
[i
] = NULL
;
597 swrast
->SpanArrays
= MALLOC_STRUCT(span_arrays
);
598 if (!swrast
->SpanArrays
) {
603 /* init point span buffer */
604 swrast
->PointSpan
.primitive
= GL_POINT
;
605 swrast
->PointSpan
.start
= 0;
606 swrast
->PointSpan
.end
= 0;
607 swrast
->PointSpan
.facing
= 0;
608 swrast
->PointSpan
.array
= swrast
->SpanArrays
;
610 assert(ctx
->Const
.MaxTextureUnits
> 0);
611 assert(ctx
->Const
.MaxTextureUnits
<= MAX_TEXTURE_UNITS
);
613 swrast
->TexelBuffer
= (GLchan
*) MALLOC(ctx
->Const
.MaxTextureUnits
*
614 MAX_WIDTH
* 4 * sizeof(GLchan
));
615 if (!swrast
->TexelBuffer
) {
616 FREE(swrast
->SpanArrays
);
621 ctx
->swrast_context
= swrast
;
627 _swrast_DestroyContext( GLcontext
*ctx
)
629 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
632 _mesa_debug(ctx
, "_swrast_DestroyContext\n");
635 FREE( swrast
->SpanArrays
);
636 FREE( swrast
->TexelBuffer
);
639 ctx
->swrast_context
= 0;
643 struct swrast_device_driver
*
644 _swrast_GetDeviceDriverReference( GLcontext
*ctx
)
646 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
647 return &swrast
->Driver
;
651 _swrast_flush( GLcontext
*ctx
)
653 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
654 /* flush any pending fragments from rendering points */
655 if (swrast
->PointSpan
.end
> 0) {
656 if (ctx
->Visual
.rgbMode
) {
657 _swrast_write_rgba_span(ctx
, &(swrast
->PointSpan
));
660 _swrast_write_index_span(ctx
, &(swrast
->PointSpan
));
662 swrast
->PointSpan
.end
= 0;
667 _swrast_render_primitive( GLcontext
*ctx
, GLenum prim
)
669 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
670 if (swrast
->Primitive
== GL_POINTS
&& prim
!= GL_POINTS
) {
673 swrast
->Primitive
= prim
;
678 _swrast_render_start( GLcontext
*ctx
)
680 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
681 if (swrast
->Driver
.SpanRenderStart
)
682 swrast
->Driver
.SpanRenderStart( ctx
);
683 swrast
->PointSpan
.end
= 0;
687 _swrast_render_finish( GLcontext
*ctx
)
689 SWcontext
*swrast
= SWRAST_CONTEXT(ctx
);
690 if (swrast
->Driver
.SpanRenderFinish
)
691 swrast
->Driver
.SpanRenderFinish( ctx
);
697 #define SWRAST_DEBUG_VERTICES 0
700 _swrast_print_vertex( GLcontext
*ctx
, const SWvertex
*v
)
704 if (SWRAST_DEBUG_VERTICES
) {
705 _mesa_debug(ctx
, "win %f %f %f %f\n",
706 v
->win
[0], v
->win
[1], v
->win
[2], v
->win
[3]);
708 for (i
= 0 ; i
< ctx
->Const
.MaxTextureUnits
; i
++)
709 if (ctx
->Texture
.Unit
[i
]._ReallyEnabled
)
710 _mesa_debug(ctx
, "texcoord[%d] %f %f %f %f\n", i
,
711 v
->texcoord
[i
][0], v
->texcoord
[i
][1],
712 v
->texcoord
[i
][2], v
->texcoord
[i
][3]);
714 #if CHAN_TYPE == GL_FLOAT
715 _mesa_debug(ctx
, "color %f %f %f %f\n",
716 v
->color
[0], v
->color
[1], v
->color
[2], v
->color
[3]);
717 _mesa_debug(ctx
, "spec %f %f %f %f\n",
718 v
->specular
[0], v
->specular
[1],
719 v
->specular
[2], v
->specular
[3]);
721 _mesa_debug(ctx
, "color %d %d %d %d\n",
722 v
->color
[0], v
->color
[1], v
->color
[2], v
->color
[3]);
723 _mesa_debug(ctx
, "spec %d %d %d %d\n",
724 v
->specular
[0], v
->specular
[1],
725 v
->specular
[2], v
->specular
[3]);
727 _mesa_debug(ctx
, "fog %f\n", v
->fog
);
728 _mesa_debug(ctx
, "index %d\n", v
->index
);
729 _mesa_debug(ctx
, "pointsize %f\n", v
->pointSize
);
730 _mesa_debug(ctx
, "\n");