aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 569adc16a..fd02a1be2 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -946,6 +946,7 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
case GL_TEXTURE_3D:
case GL_PROXY_TEXTURE_3D:
return ctx->Const.Max3DTextureLevels;
+ case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
@@ -966,6 +967,9 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
ctx->Extensions.EXT_texture_array)
? ctx->Const.MaxTextureLevels : 0;
case GL_TEXTURE_BUFFER:
+ return _mesa_is_desktop_gl(ctx) &&
+ (ctx->Extensions.ARB_texture_buffer_object ||
+ (ctx->Version >= 31)) ? 1 : 0;
case GL_TEXTURE_EXTERNAL_OES:
/* fall-through */
default: