}
static void
-nouveau_bind_texture(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *t)
+nouveau_bind_texture(struct gl_context *ctx, GLuint texUnit,
+ GLenum target, struct gl_texture_object *t)
{
- context_dirty_i(ctx, TEX_OBJ, ctx->Texture.CurrentUnit);
- context_dirty_i(ctx, TEX_ENV, ctx->Texture.CurrentUnit);
+ context_dirty_i(ctx, TEX_OBJ, texUnit);
+ context_dirty_i(ctx, TEX_ENV, texUnit);
}
static mesa_format
/*@{*/
/**
- * Called by glBindTexture().
+ * Called by glBindTexture() and glBindTextures().
*/
- void (*BindTexture)( struct gl_context *ctx, GLenum target,
- struct gl_texture_object *tObj );
+ void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
+ GLenum target, struct gl_texture_object *tObj );
/**
* Called to allocate a new texture object. Drivers will usually
/* Pass BindTexture call to device driver */
if (ctx->Driver.BindTexture)
- ctx->Driver.BindTexture(ctx, target, newTexObj);
+ ctx->Driver.BindTexture(ctx, ctx->Texture.CurrentUnit, target, newTexObj);
}