mesa/src
Kenneth Graunke 58d11524da mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]
For cube maps, _mesa_generate_mipmap() calls this with
GL_TEXTURE_CUBE_MAP (the gl_texture_object's Target) rather than one
of the faces.  This caused _mesa_max_texture_levels() to return 0, which
resulted in maxLevels == -1 and the next line's assertion to fail.

This function is called from seven places:
- fbobject.c: framebuffer_texture()
- mipmap.c: _mesa_generate_mipmap()
- texgetimage.c:
  - getteximage_error_check()
  - getcompressedteximage_error_check()
- texparam.c: _mesa_GetTexLevelParameteriv()
- texstorage.c: tex_storage_error_check()

All of these (or their callers) now explicitly check for invalid targets
already, so this shouldn't cause invalid targets to slip through.
(Technically _mesa_generate_mipmap() doesn't check for invalid targets,
but the API-facing _mesa_GenerateMipmapEXT() function does.)

+2 oglconforms (float-texture/mipmap.automatic and mipmap.manual)

In addition to fixing the mipmap bug, it should also cause glTexStorage
to accept GL_TEXTURE_CUBE_MAP, which is explicitly allowed by the spec.

v2: Drop alterations to callers; this is now in a patch series that adds
    explicit checking to API functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-08-17 09:14:36 -07:00
..
egl egl: Allow OpenGL ES 3.0 as a version 2012-08-14 15:41:03 -07:00
gallium llvmpipe: remove polygon stipple assertion 2012-08-17 09:07:49 -06:00
gbm gbm: Fix build for wayland include 2012-07-30 11:58:02 -04:00
getopt
glsl build: Fix out-of-tree generation of builtin_function.cpp 2012-08-14 10:54:39 -07:00
glu
glx glx/dri2: add dri2 prime support. 2012-08-16 10:02:10 +10:00
gtest build: Fix gtest out-of-tree build 2012-08-14 10:54:39 -07:00
mapi glapi: Add GL_ARB_invalidate_subdata 2012-08-14 14:39:33 -07:00
mesa mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2] 2012-08-17 09:14:36 -07:00
.gitignore
Makefile.am
SConscript