[Mesa-dev] [PATCH v2 7/7] mesa: don't enable legacy GL functions when using API_OPENGL_CORE

nobled nobled at dreamwidth.org
Fri Jul 27 09:23:38 PDT 2012


On Fri, Jul 27, 2012 at 6:43 AM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/mesa/main/api_exec.c |  227 ++++++++++++++++++++++++++++------------------
>  src/mesa/main/api_exec.h |    3 +-
>  src/mesa/main/context.c  |    2 +-
>  src/mesa/main/vtxfmt.c   |  167 ++++++++++++++++++----------------
>  4 files changed, 232 insertions(+), 167 deletions(-)
>

Adding this whole new enum seems like a lot of unnecessary code
everywhere in the previous 6 patches -- I just sent out a patch with a
function that checks the same thing (I wrote it a while ago trying to
work on some of this but didn't get around to testing it), and you can
just replace all

if (ctx->API != API_OPENGL_CORE)

with

if (!_mesa_feature_removed(ctx, 30, 31))

For all these instances of stuff that was deprecated in 3.0 and
removed in 3.1. (Some other small features were only deprecated in
later versions.)


More information about the mesa-dev mailing list