[Mesa-dev] [PATCH] mesa: remove stray GL_TEXTURE_1D_ARRAY code in _mesa_store_teximage3d()

2011-12-19 Thread Brian Paul
GL_TEXTURE_1D_ARRAY is never a legal target for glTexImage3D.  This was
probably copypaste code from the _mesa_store_teximage2d() function above.
---
 src/mesa/main/texstore.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index a57a38e..cfe1c24 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -4775,11 +4775,6 @@ _mesa_store_teximage3d(struct gl_context *ctx, GLenum 
target, GLint level,
   return;
}
 
-   if (target == GL_TEXTURE_1D_ARRAY) {
-  depth = height;
-  height = 1;
-   }
-
sliceMaps = (GLubyte **) calloc(depth, sizeof(GLubyte *));
 
/* Map dest texture buffer slices */
-- 
1.7.3.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: remove stray GL_TEXTURE_1D_ARRAY code in _mesa_store_teximage3d()

2011-12-19 Thread Eric Anholt
On Mon, 19 Dec 2011 13:47:42 -0700, Brian Paul bri...@vmware.com wrote:
 GL_TEXTURE_1D_ARRAY is never a legal target for glTexImage3D.  This was
 probably copypaste code from the _mesa_store_teximage2d() function above.

Radeon and intel use texstore3d for all our TexImage* storage.  Though
it does look like we could dump our 1D and 3D overrides of 1D and 3D,
and then use texstore2d.


pgpcSPyYdBnOL.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: remove stray GL_TEXTURE_1D_ARRAY code in _mesa_store_teximage3d()

2011-12-19 Thread Brian Paul

On 12/19/2011 02:56 PM, Eric Anholt wrote:

On Mon, 19 Dec 2011 13:47:42 -0700, Brian Paulbri...@vmware.com  wrote:

GL_TEXTURE_1D_ARRAY is never a legal target for glTexImage3D.  This was
probably copypaste code from the _mesa_store_teximage2d() function above.


Radeon and intel use texstore3d for all our TexImage* storage.  Though
it does look like we could dump our 1D and 3D overrides of 1D and 3D,
and then use texstore2d.


OK, I'll leave that as-is for now.  There should probably be a comment 
explaining what's going on there.


I found this when I was looking at consolidating the texstore code.  I 
think that all six variations of 1D/2D/3D whole/sub-image could be 
consolidated into one function.  I'll see if I can finish that up tonight.


-Brian
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev