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

Dave Airlie airlied at gmail.com
Mon Jan 18 16:56:53 PST 2016


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);
+
     /* Driver-specific hack: Avoid using GL_QUADS on VC4, where
      * they'll be emulated more expensively than we can with our
      * cached IB.
diff --git a/glamor/glamor.h b/glamor/glamor.h
index a4e0655..8f34409 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -63,8 +63,9 @@ typedef enum glamor_pixmap_type {
 #define GLAMOR_EGL_EXTERNAL_BUFFER 3
 #define GLAMOR_USE_EGL_SCREEN		(1 << 0)
 #define GLAMOR_NO_DRI3			(1 << 1)
+#define GLAMOR_USE_CORE_PROFILE         (1 << 2)
 #define GLAMOR_VALID_FLAGS      (GLAMOR_USE_EGL_SCREEN                \
-                                 | GLAMOR_NO_DRI3)
+                                 | GLAMOR_NO_DRI3 | GLAMOR_USE_CORE_PROFILE)
 
 /* @glamor_init: Initialize glamor internal data structure.
  *
-- 
2.4.3



More information about the xorg-devel mailing list