summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-08-11 15:23:02 -0700
committerKeith Packard <keithp@keithp.com>2014-08-12 16:37:11 -0700
commitc47ee880e742e15fdbd5f5ac3eba64db6228c09f (patch)
treefed0064895a74aff4d0bc58122f697b870ee6e5b /glamor
parentd09c9ddb866dea31e2adf82be329d5d3489718f5 (diff)
glamor: Don't try to set up core fonts textures when we won't use them.
This happens to avoid GL errors on hardware without EXT_texture_integer (which implies < GLSL 130, and thus glamor_text.c programs not compiling anyway). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor_font.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/glamor/glamor_font.c b/glamor/glamor_font.c
index 57c607dc2..0ca91fa2e 100644
--- a/glamor/glamor_font.c
+++ b/glamor/glamor_font.c
@@ -46,6 +46,8 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
CharInfoPtr glyph;
unsigned long count;
+ if (glamor_priv->glsl_version < 130)
+ return NULL;
privates = FontGetPrivate(font, glamor_font_private_index);
if (!privates) {
@@ -167,6 +169,11 @@ glamor_unrealize_font(ScreenPtr screen, FontPtr font)
Bool
glamor_font_init(ScreenPtr screen)
{
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+
+ if (glamor_priv->glsl_version < 130)
+ return TRUE;
+
if (glamor_font_generation != serverGeneration) {
glamor_font_private_index = AllocateFontPrivateIndex();
if (glamor_font_private_index == -1)