From abccd5b729209086e77b2b2f53fb2cdfdcf75a8e Mon Sep 17 00:00:00 2001 From: Aapo Tahkola Date: Tue, 6 Dec 2005 22:26:21 +0000 Subject: Make missing interpolator inputs fatal --- src/mesa/drivers/dri/r300/r300_state.c | 43 +++++++++++++++++++++++++---- src/mesa/drivers/dri/r300/r300_vertexprog.c | 1 - 2 files changed, 38 insertions(+), 6 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index f4d588af526..0987735b505 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1152,10 +1152,9 @@ void r300_setup_rs_unit(GLcontext *ctx) if (OutputsWritten & (hw_tcl_on ? (1 << (VERT_RESULT_TEX0+i)) : (_TNL_BIT_TEX0<hw.rr.cmd[R300_RR_ROUTE_0] |= 0 | R300_RS_ROUTE_0_COLOR @@ -1174,8 +1175,10 @@ void r300_setup_rs_unit(GLcontext *ctx) } if (InputsRead & FRAG_BIT_COL1) { - if (!(OutputsWritten & (hw_tcl_on ? (1<hw.rr.cmd[R300_RR_ROUTE_1] |= R300_RS_ROUTE_1_UNKNOWN11 | R300_RS_ROUTE_1_COLOR1 @@ -1576,6 +1579,36 @@ void r300UpdateShaderStates(r300ContextPtr rmesa) #ifdef CB_DPATH r300UpdateTextureState(ctx); #endif + +#if 0 +#define B_FLAG(x) ((x)?1:0) + + if(hw_tcl_on){ + int i; + GLuint InputsRead; + GLuint OutputsWritten; + + InputsRead = ctx->FragmentProgram._Current->Base.InputsRead; + OutputsWritten = CURRENT_VERTEX_SHADER(ctx)->Base.OutputsWritten; + + for (i=0;iConst.MaxTextureUnits;i++) { + /*if(B_FLAG(OutputsWritten & (1 << (VERT_RESULT_TEX0+i))) != B_FLAG(InputsRead & (FRAG_BIT_TEX0<Texture.Unit[i]._ReallyEnabled) != B_FLAG(InputsRead & (FRAG_BIT_TEX0<Texture.Unit[i]._ReallyEnabled) != B_FLAG(OutputsWritten & (1 << (VERT_RESULT_TEX0+i)))){ + fprintf(stderr, "re != vp_out fails for unit %d\n", i); + exit(1); + }*/ + } + } +#endif r300_setup_textures(ctx); r300_setup_rs_unit(ctx); diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index c7a0c105266..b2444411294 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -463,7 +463,6 @@ void translate_vertex_shader(struct r300_vertex_program *vp) vp->outputs[i] = -1; assert(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS)); - assert(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_COL0)); /* Assign outputs */ if(mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_HPOS)) -- cgit v1.2.3