[Mesa-dev] [PATCH 2/2] meta: Drop ctx->API checks.

Eric Anholt eric at anholt.net
Thu Feb 27 08:59:39 PST 2014


Kenneth Graunke <kenneth at whitecape.org> writes:

> API is always API_OPENGL_COMPAT (since commit 4e4a537ad55f61a25,
> "meta: Push into desktop GL mode when doing meta operations."),
> so most of these checks do nothing.
>
> We could instead check save->API to only bother setting/restoring
> relevant GL state, but I'm not sure saving a few _mesa_set_enable
> calls is worth the complexity.  My understanding is the point of
> the ctx->API guards was to avoid raising GL errors.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/common/meta.c      | 139 +++++++++++++-----------------------
>  src/mesa/drivers/common/meta_blit.c |   3 +-
>  2 files changed, 50 insertions(+), 92 deletions(-)
>
> We either ought to do this, or move _mesa_meta_begin's ctx->API override
> to /after/ the state saving.  I'm not sure which we ought to do.
>
> This simplifies a lot of the core/compat/ES insanity quite a bit, but doing
> the save state/restore state in the real API might be more sensible...

I think I like it this way more.

If we're concerned about state save/restore overhead, then I think some
day we'd want to just avoid all the FF state save/restore in the
GLSL-based paths.

These two are:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140227/8d135691/attachment.pgp>


More information about the mesa-dev mailing list