mesa: Add a texUnit parameter to dd_function_table::BindTexture
This is for glBindTextures(), since it doesn't change the active texture unit. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
b8ee235e72
commit
659d94b256
|
@ -575,11 +575,11 @@ nouveau_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -314,10 +314,10 @@ struct dd_function_table {
|
|||
/*@{*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -1390,7 +1390,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
|||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue