From bb372f1c9bc08e8b0dca983cb4ba36b2f2f039fb Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 16 May 2007 15:34:22 -0700 Subject: Initial implementation of MESA_texture_array Shadow sampling from texture arrays is still not implemented. Everything else should be there, though. --- src/mesa/main/attrib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index e2cfb8a1f6..4654704afd 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -744,6 +744,18 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) target = GL_TEXTURE_RECTANGLE_NV; obj = &unit->SavedRect; break; + case 5: + if (!ctx->Extensions.MESA_texture_array) + continue; + target = GL_TEXTURE_1D_ARRAY_EXT; + obj = &unit->Saved1DArray; + break; + case 6: + if (!ctx->Extensions.MESA_texture_array) + continue; + target = GL_TEXTURE_2D_ARRAY_EXT; + obj = &unit->Saved2DArray; + break; default: ; /* silence warnings */ } -- cgit v1.2.3 From a2305ebfa213adb16e72d1a819895a68991c9462 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 19 May 2007 09:10:44 -0600 Subject: need to copy new 1D/2D array texture objects in _mesa_PushAttrib() --- src/mesa/main/attrib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 4654704afd..4699546262 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -363,6 +363,10 @@ _mesa_PushAttrib(GLbitfield mask) attr->Unit[u].CurrentCubeMap); _mesa_copy_texture_object(&attr->Unit[u].SavedRect, attr->Unit[u].CurrentRect); + _mesa_copy_texture_object(&attr->Unit[u].Saved1DArray, + attr->Unit[u].Current1DArray); + _mesa_copy_texture_object(&attr->Unit[u].Saved2DArray, + attr->Unit[u].Current2DArray); } _mesa_unlock_context_textures(ctx); -- cgit v1.2.3 From e5ed09e60e32cf7d5afc778321e417ea97fe8494 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 23 May 2007 16:42:29 -0600 Subject: incr/decr 1D/2DArray texture refcounts like other targets --- src/mesa/main/attrib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 4699546262..0ee3418fdd 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.1 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -348,6 +348,8 @@ _mesa_PushAttrib(GLbitfield mask) ctx->Texture.Unit[u].Current3D->RefCount++; ctx->Texture.Unit[u].CurrentCubeMap->RefCount++; ctx->Texture.Unit[u].CurrentRect->RefCount++; + ctx->Texture.Unit[u].Current1DArray->RefCount++; + ctx->Texture.Unit[u].Current2DArray->RefCount++; } attr = MALLOC_STRUCT( gl_texture_attrib ); MEMCPY( attr, &ctx->Texture, sizeof(struct gl_texture_attrib) ); @@ -813,6 +815,8 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) ctx->Texture.Unit[u].Current3D->RefCount--; ctx->Texture.Unit[u].CurrentCubeMap->RefCount--; ctx->Texture.Unit[u].CurrentRect->RefCount--; + ctx->Texture.Unit[u].Current1DArray->RefCount--; + ctx->Texture.Unit[u].Current2DArray->RefCount--; } } -- cgit v1.2.3 From f116aed1ede0d802e9f3c5989290002975c00330 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 23 May 2007 16:49:32 -0600 Subject: restore GL_TEXTURE_LOD_BIAS in _mesa_PopAttrib(), bug 11049 --- src/mesa/main/attrib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 0ee3418fdd..1aa0a02fc7 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -782,6 +782,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter); _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod); _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod); + _mesa_TexParameterf(target, GL_TEXTURE_LOD_BIAS, obj->LodBias); _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); if (target != GL_TEXTURE_RECTANGLE_ARB) _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); -- cgit v1.2.3