glamor: add core profile support. (v2)
Glamor works out from the profile if it is core. This flag is used to disable quads for rendering. v1.1: split long line + make whitespace conform (Michel) v1.2: add GL 3.1 version defines v2: move to having glamor work out the profile. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
e6754dcb59
commit
564d9f0f8c
|
@ -579,9 +579,15 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
|||
glamor_priv->has_dual_blend =
|
||||
epoxy_has_gl_extension("GL_ARB_blend_func_extended");
|
||||
|
||||
/* assume a core profile if we are GL 3.1 and don't have ARB_compatibility */
|
||||
glamor_priv->is_core_profile =
|
||||
gl_version >= 31 && !epoxy_has_gl_extension("GL_ARB_compatibility");
|
||||
|
||||
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->is_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.
|
||||
|
|
|
@ -66,6 +66,10 @@ typedef enum glamor_pixmap_type {
|
|||
#define GLAMOR_VALID_FLAGS (GLAMOR_USE_EGL_SCREEN \
|
||||
| GLAMOR_NO_DRI3)
|
||||
|
||||
/* until we need geometry shaders GL3.1 should suffice. */
|
||||
#define GLAMOR_GL_CORE_VER_MAJOR 3
|
||||
#define GLAMOR_GL_CORE_VER_MINOR 1
|
||||
|
||||
/* @glamor_init: Initialize glamor internal data structure.
|
||||
*
|
||||
* @screen: Current screen pointer.
|
||||
|
|
|
@ -217,6 +217,7 @@ typedef struct glamor_screen_private {
|
|||
Bool use_quads;
|
||||
Bool has_vertex_array_object;
|
||||
Bool has_dual_blend;
|
||||
Bool is_core_profile;
|
||||
int max_fbo_size;
|
||||
|
||||
GLuint one_channel_format;
|
||||
|
|
Loading…
Reference in New Issue