[PATCH 3/7] glamor: swallow gl errors before compiling programs
Maarten Lankhorst
maarten.lankhorst at ubuntu.com
Mon Jan 12 06:29:33 PST 2015
In case the glamor implementation is buggy a error might be set
before compiling, which causes glamor_build_program to enter
the failure path even though shader compilation succeeded.
Eat all errors before running glamor_build_program.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
glamor/glamor_program.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/glamor/glamor_program.c b/glamor/glamor_program.c
index 1d0328f..0688205 100644
--- a/glamor/glamor_program.c
+++ b/glamor/glamor_program.c
@@ -253,6 +253,10 @@ glamor_build_program(ScreenPtr screen,
char *fs_prog_string;
GLint fs_prog, vs_prog;
+ GLint error;
+
+ while ((error = glGetError()) != GL_NO_ERROR)
+ glamor_fallback("Error: %x\n", error);
if (!fill)
fill = &facet_null_fill;
--
2.2.1
More information about the xorg-devel
mailing list