unsigned fog_enabled:1;
unsigned fog_mode:2;
unsigned point_attenuated:1;
- unsigned nr_tex:4;
- unsigned texgen_enabled_global:1;
+ unsigned texture_enabled_global:1;
struct {
unsigned light_enabled:1;
if (ctx->Point._Attenuated)
key->point_attenuated = 1;
- if (ctx->Texture._TexGenEnabled)
- key->texgen_enabled_global = 1;
-
+ if (ctx->Texture._TexGenEnabled ||
+ ctx->Texture._TexMatEnabled ||
+ ctx->Texture._EnabledUnits)
+ key->texture_enabled_global = 1;
+
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
else {
register_matrix_param6( p, STATE_MATRIX, STATE_TEXTURE, i,
0, 3, STATE_MATRIX_TRANSPOSE, texmat );
- emit_matrix_transform_vec4( p, out, texmat, in );
+ emit_transpose_matrix_transform_vec4( p, out, texmat, in );
}
}
if (p->state->fog_enabled)
build_fog(p);
- if (p->state->nr_tex)
+ if (p->state->texture_enabled_global)
build_texture_transform(p);
if (p->state->point_attenuated)
/* Look for an already-prepared program for this state:
*/
ctx->_TnlProgram = (struct vertex_program *)
- search_cache( tnl->vp_cache, hash, key, sizeof(key) );
+ search_cache( tnl->vp_cache, hash, key, sizeof(*key) );
/* OK, we'll have to build a new one:
*/