summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2012-05-26 10:13:07 +0300
committerOliver McFadden <[email protected]>2012-05-30 15:20:34 +0300
commitff3eef1affd0d3b56d4ce689947947be97c5d0f6 (patch)
tree5d570b1c2e0b9f7dc90b013dab06cf6a63fc446b /src
parent47b64c9290d54f78e5a20e378593977cd47e285f (diff)
mesa: don't compile integer clear shaders for unsupported APIs
Discovered while running the Khronos conformance test suite and receiving "implementation error: meta program compile failed." This bug was recently introduced by the i965 clear patch set and would only be detected while using the ES2 API and only on gen6+ hardware. Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/common/meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 95336fc282b..a20e41972a2 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1793,7 +1793,7 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
clear->ColorLocation = _mesa_GetUniformLocationARB(clear->ShaderProg,
"color");
- if (ctx->Const.GLSLVersion >= 130) {
+ if (ctx->API == API_OPENGL && ctx->Const.GLSLVersion >= 130) {
vs = compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_int_source);
fs = compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_int_source);