summaryrefslogtreecommitdiff
path: root/xserver/glamor/glamor_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/glamor/glamor_text.c')
-rw-r--r--xserver/glamor/glamor_text.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xserver/glamor/glamor_text.c b/xserver/glamor/glamor_text.c
index cf165cad8..e92f55b3c 100644
--- a/xserver/glamor/glamor_text.c
+++ b/xserver/glamor/glamor_text.c
@@ -235,7 +235,11 @@ static const char fs_vars_text[] =
static const char fs_exec_text[] =
" ivec2 itile_texture = ivec2(glyph_pos);\n"
+#if BITMAP_BIT_ORDER == MSBFirst
+ " uint x = uint(7) - uint(itile_texture.x & 7);\n"
+#else
" uint x = uint(itile_texture.x & 7);\n"
+#endif
" itile_texture.x >>= 3;\n"
" uint texel = texelFetch(font, itile_texture, 0).x;\n"
" uint bit = (texel >> x) & uint(1);\n"
@@ -244,7 +248,11 @@ static const char fs_exec_text[] =
static const char fs_exec_te[] =
" ivec2 itile_texture = ivec2(glyph_pos);\n"
+#if BITMAP_BIT_ORDER == MSBFirst
+ " uint x = uint(7) - uint(itile_texture.x & 7);\n"
+#else
" uint x = uint(itile_texture.x & 7);\n"
+#endif
" itile_texture.x >>= 3;\n"
" uint texel = texelFetch(font, itile_texture, 0).x;\n"
" uint bit = (texel >> x) & uint(1);\n"