summaryrefslogtreecommitdiff
path: root/glamor/glamor_priv.h
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2015-02-05 11:59:22 +0100
committerEric Anholt <eric@anholt.net>2015-03-24 12:43:34 -0700
commit4218a1e066cf39bb980ebbc9f69536c85232da5c (patch)
treedbf13764f61076246d094fd5fa5fe72a06ced649 /glamor/glamor_priv.h
parente0788a03144186522fd0ef0e9c954e2744b40275 (diff)
glamor: check max native ALU instructions
When using glamor (either in Xephyr or Xwayland) on hardware with too low instructions limit, glamor fallbacks to sw due to large shaders. This makes glamor unbearably slow on such hardware. Check reported value for GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB and fail in glamor_init() if the limit is lower than 128. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88316 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor_priv.h')
-rw-r--r--glamor/glamor_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index cd9192446..898a9348a 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -1082,4 +1082,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
#include "glamor_font.h"
+#define GLAMOR_MIN_ALU_INSTRUCTIONS 128 /* Minimum required number of native ALU instructions */
+
#endif /* GLAMOR_PRIV_H */