diff options
author | Brian Paul <[email protected]> | 2010-11-21 10:05:47 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-21 10:05:51 -0700 |
commit | 5e3733fadf08178fca7c9f20a0f4783f940383aa (patch) | |
tree | abc8c14b211132200ef928f528b6bfe338cfe1ef /src/mesa/main | |
parent | 0ec0f1025d70d0fc353acd9f6184e3aeb8a0f464 (diff) |
mesa: fix get_texture_dimensions() for texture array targets
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31779
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/teximage.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b3ce5d95b77..060f34b7f97 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -888,23 +888,19 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) /** - * Return number of dimenions per image for the given texture target. + * Return number of dimensions per mipmap level for the given texture target. */ static GLint get_texture_dimensions(GLenum target) { switch (target) { case GL_TEXTURE_1D: - case GL_TEXTURE_1D_ARRAY: case GL_PROXY_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D_ARRAY: return 1; case GL_TEXTURE_2D: - case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_RECTANGLE: case GL_TEXTURE_CUBE_MAP: case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D_ARRAY: case GL_PROXY_TEXTURE_RECTANGLE: case GL_PROXY_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP_POSITIVE_X: @@ -913,9 +909,13 @@ get_texture_dimensions(GLenum target) case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + case GL_TEXTURE_1D_ARRAY: + case GL_PROXY_TEXTURE_1D_ARRAY: return 2; case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: + case GL_TEXTURE_2D_ARRAY: + case GL_PROXY_TEXTURE_2D_ARRAY: return 3; default: _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()", |