summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2013-11-12 17:23:05 +0100
committerFredrik Höglund <[email protected]>2014-05-02 02:53:25 +0200
commit6bf8ac846aeb8b6e53b4a3545ee5f8ce94055ae7 (patch)
tree51701d8ae560c64d7a091dfd2caae85605ea7ba6 /src/mesa/main/texobj.c
parentd55e5a323b81af1020104df1ccc1ddfe31b78b83 (diff)
mesa: Store the target index in gl_texture_object
This will be used by glBindTextures() so we don't have to look it up for each texture. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 85246c8ab00..42d057c6ae3 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -260,6 +260,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src )
{
dest->Target = src->Target;
+ dest->TargetIndex = src->TargetIndex;
dest->Name = src->Name;
dest->Priority = src->Priority;
dest->Sampler.BorderColor.f[0] = src->Sampler.BorderColor.f[0];
@@ -1327,6 +1328,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
mtx_unlock(&ctx->Shared->Mutex);
}
newTexObj->Target = target;
+ newTexObj->TargetIndex = targetIndex;
}
assert(valid_texture_object(newTexObj));