pointcoord.o: pointcoord.c readtex.h extfuncs.h shaderutil.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
+ $(APP_CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
pointcoord: pointcoord.o readtex.o shaderutil.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
+ $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
+ samplers.o: samplers.c readtex.h extfuncs.h shaderutil.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) samplers.c
+
+ samplers: samplers.o readtex.o shaderutil.o
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) samplers.o readtex.o shaderutil.o $(LIBS) -o $@
+
+
skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
- $(CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
+ $(APP_CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
skinning: skinning.o readtex.o shaderutil.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
+ $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
*/
static struct ureg register_input( struct tnl_program *p, GLuint input )
{
- p->program->Base.InputsRead |= (1<<input);
- return make_ureg(PROGRAM_INPUT, input);
+ /* Material attribs are passed here as inputs >= 32
+ */
+ if (input >= 32 || (p->state->varying_vp_inputs & (1<<input))) {
+ p->program->Base.InputsRead |= (1<<input);
+ return make_ureg(PROGRAM_INPUT, input);
+ }
+ else {
+ return register_param3( p, STATE_INTERNAL, STATE_CURRENT_ATTRIB, input );
+ }
}
+
/**
* \param input one of VERT_RESULT_x tokens.
*/
/**
- * This MAX is probably a bit generous, but that's OK. There can be
- * up to four instructions per texture unit (TEX + 3 for combine),
- * then there's fog and specular add.
+ * Up to nine instructions per tex unit, plus fog, specular color.
*/
- #define MAX_INSTRUCTIONS ((MAX_TEXTURE_UNITS * 9) + 12)
-#define MAX_INSTRUCTIONS ((MAX_TEXTURE_COORD_UNITS * 4) + 12)
++#define MAX_INSTRUCTIONS ((MAX_TEXTURE_COORD_UNITS * 9) + 12)
#define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM)
static void make_state_key( GLcontext *ctx, struct state_key *key )
{
GLuint i, j;
-
+ GLbitfield inputs_referenced = FRAG_BIT_COL0;
+ GLbitfield inputs_available = get_fp_input_mask( ctx );
+
memset(key, 0, sizeof(*key));
- for (i=0;i<MAX_TEXTURE_UNITS;i++) {
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
GLenum format;
GLcontext *ctx;
struct state_key *state;
- GLbitfield alu_temps; /* Track texture indirections, see spec. */
- GLbitfield temps_output; /* Track texture indirections, see spec. */
- GLbitfield temp_in_use; /* Tracks temporary regs which are in use. */
+ GLbitfield alu_temps; /**< Track texture indirections, see spec. */
+ GLbitfield temps_output; /**< Track texture indirections, see spec. */
+ GLbitfield temp_in_use; /**< Tracks temporary regs which are in use. */
GLboolean error;
- struct ureg src_texture[MAX_TEXTURE_UNITS];
+ struct ureg src_texture[MAX_TEXTURE_COORD_UNITS];
/* Reg containing each texture unit's sampled texture color,
* else undef.
*/