OSDN Git Service

meta: Don't modify GL_GENERATE_MIPMAP state when it doesn't exist
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Aug 2012 01:53:42 +0000 (18:53 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Aug 2012 17:15:29 +0000 (10:15 -0700)
commit2abf555496b8f5a7319542756508dd2f2e8ed07c
treefb251995d7629cc2148c60d52a18e68ee22ebef9
parent2ddfca98378a1eb4044e8e9d7168d73443709068
meta: Don't modify GL_GENERATE_MIPMAP state when it doesn't exist

This is a bit of a hack.  _mesa_meta_GenerateMipmap shouldn't even be
used in contexts where GL_GENERATE_MIPMAP doesn't exist (i.e., core
profile and ES2) because it uses fixed-function, and fixed-function
doesn't exist there either!

A GLSL-based _mesa_meta_GenerateMipmap should be available soon.  When
that is available, this patch will be irrelevant and should be reverted.

v2: Change (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) to
(ctx->API == API_OPENGL || ctx->API == API_OPENGLES) based on review
comment from Brian Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/common/meta.c