[PATCH 5/8] glamor: add core profile support.

Eric Anholt eric at anholt.net
Tue Jan 19 09:31:39 PST 2016


Dave Airlie <airlied at gmail.com> writes:

> From: Dave Airlie <airlied at redhat.com>
>
> This adds a new flag to glamor_init to denote the context is
> core profile.
>
> This flag is used to disable quads for rendering.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  glamor/glamor.c | 3 ++-
>  glamor/glamor.h | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/glamor/glamor.c b/glamor/glamor.c
> index 7fa3a46..a2bd687 100644
> --- a/glamor/glamor.c
> +++ b/glamor/glamor.c
> @@ -578,7 +578,8 @@ glamor_init(ScreenPtr screen, unsigned int flags)
>  
>      glamor_setup_debug_output(screen);
>  
> -    glamor_priv->use_quads = (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP);
> +    glamor_priv->use_quads = (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) && !(glamor_priv->flags & GLAMOR_USE_CORE_PROFILE);
> +

Instead of having the context creator pass us a flag, couldn't we just
have

bool core_context = gl_version >= 32 && !epoxy_has_gl_extension("GL_ARB_compatibility")?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20160119/08588d4e/attachment-0001.sig>


More information about the xorg-devel mailing list