Changed parts of r300_setup_routing to use WARN_ONCE.
authorAapo Tahkola <aet@rasterburn.org>
Wed, 2 Feb 2005 13:29:11 +0000 (13:29 +0000)
committerAapo Tahkola <aet@rasterburn.org>
Wed, 2 Feb 2005 13:29:11 +0000 (13:29 +0000)
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_state.c

index 1e4db5e1d34f9e29720cc72866f642e7d3e25f4a..dac7006e5752cf8f5909b5c6647a0d17b55df1aa 100644 (file)
@@ -411,7 +411,7 @@ static void upload_vertex_buffer(r300ContextPtr rmesa, GLcontext *ctx)
                offset+=v->size*4*VB->Count; \
                idx++; \
                }
-               
+
        UPLOAD_VECTOR(VB->ObjPtr);
        UPLOAD_VECTOR(VB->ColorPtr[0]);
        /* texture coordinates */
@@ -518,8 +518,8 @@ static GLboolean r300_run_render(GLcontext *ctx,
        
        if (RADEON_DEBUG == DEBUG_PRIMS)
                fprintf(stderr, "%s\n", __FUNCTION__);
-
-               
+       
+       
    #if 1
        
        #if 1
@@ -597,7 +597,13 @@ static void r300_check_render(GLcontext *ctx, struct tnl_pipeline_stage *stage)
                stage->active = GL_FALSE;
                return;
        }
-
+       
+#if 0 // selecting VERT_BIT_NORMAL still doesnt give us normals but why?
+       stage->inputs |= VERT_BIT_POS;
+       stage->inputs |= VERT_BIT_NORMAL;
+       stage->inputs |= VERT_BIT_COLOR0;
+#endif
+       
        // I failed to figure out how dither works in hardware,
        // let's just ignore it for now
        //FALLBACK_IF(ctx->Color.DitherFlag);
index e17cb8fe4d8d210a8cbed6ad494cc321a581d698..306a921b9b29fec9635445c83dfec70ab5666e01 100644 (file)
@@ -853,31 +853,31 @@ void r300_setup_routing(GLcontext *ctx, GLboolean immediate)
                if(tnl->render_inputs & _TNL_BIT_POS){
                        reg=r300->current_vp->inputs[VERT_ATTRIB_POS];
                        CONFIGURE_AOS(VB->ObjPtr, 0, i_coords, AOS_FORMAT_FLOAT);
-               }else fprintf(stderr, "vp expects pos but none was given\n");
+               }else WARN_ONCE("vp expects pos but none was given\n");
        }
        if(r300->current_vp->inputs[VERT_ATTRIB_NORMAL] != -1){
                if(tnl->render_inputs & _TNL_BIT_NORMAL){
                        reg=r300->current_vp->inputs[VERT_ATTRIB_NORMAL];
                        CONFIGURE_AOS(VB->NormalPtr, 0, i_normal, AOS_FORMAT_FLOAT);
-               }else fprintf(stderr, "vp expects normal but none was given\n");
+               }else WARN_ONCE("vp expects normal but none was given\n");
        }
        if(r300->current_vp->inputs[VERT_ATTRIB_COLOR0] != -1){
                if(tnl->render_inputs & _TNL_BIT_COLOR0){
                        reg=r300->current_vp->inputs[VERT_ATTRIB_COLOR0];
                        CONFIGURE_AOS(VB->ColorPtr[0], 0, i_color[0], AOS_FORMAT_FLOAT_COLOR);
-               }else fprintf(stderr, "vp expects primary color but none was given\n");
+               }else WARN_ONCE("vp expects primary color but none was given\n");
        }
        if(r300->current_vp->inputs[VERT_ATTRIB_COLOR1] != -1){
                if(tnl->render_inputs & _TNL_BIT_COLOR1){
                        reg=r300->current_vp->inputs[VERT_ATTRIB_COLOR1];
                        CONFIGURE_AOS(VB->SecondaryColorPtr[0], 0, i_color[1], AOS_FORMAT_FLOAT_COLOR);
-               }else fprintf(stderr, "vp expects secondary color but none was given\n");
+               }else WARN_ONCE("vp expects secondary color but none was given\n");
        }
        if(r300->current_vp->inputs[VERT_ATTRIB_FOG] != -1){
                if(tnl->render_inputs & _TNL_BIT_FOG){
                        reg=r300->current_vp->inputs[VERT_ATTRIB_FOG];
                        CONFIGURE_AOS(VB->FogCoordPtr, 0, i_fog, AOS_FORMAT_FLOAT);
-               }else fprintf(stderr, "vp expects fog but none was given\n");
+               }else WARN_ONCE("vp expects fog but none was given\n");
        }
        for(i=0;i < ctx->Const.MaxTextureUnits;i++) // tex 7 is last 
                if(r300->current_vp->inputs[VERT_ATTRIB_TEX0+i] != -1){
@@ -1807,7 +1807,6 @@ void r300InitState(r300ContextPtr r300)
 }
 
 
-
 /**
  * Initialize driver's state callback functions
  */
@@ -1838,4 +1837,3 @@ void r300InitStateFuncs(struct dd_function_table* functions)
        functions->DepthRange = r300DepthRange;
        functions->PointSize = r300PointSize;
 }
-