[Mesa-dev] [PATCH v2 2/5] main: do nothing in the ff fragment shader when using the core profile.
Paul Berry
stereotype441 at gmail.com
Fri Jul 12 18:25:15 PDT 2013
When the core profile is active, there is no fixed function fragment
shader functionality. However, we still need to generate a dummy
fragment shader program in case the back-end expects it (e.g. to cover
the case where GL_RASTERIZER_DISCARD is active and the client hasn't
supplied a fragment shader).
This patch makes the dummy fragment shader program do nothing when the
core profile is active. This will prevent breakages in later patches,
when we stop exposing compatibility-only builtin variables in the core
profile.
---
src/mesa/main/ff_fragment_shader.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 86317ef..713e52a 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1331,7 +1331,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
main_f->add_signature(main_sig);
p.instructions = &main_sig->body;
- if (key->num_draw_buffers)
+ if (key->num_draw_buffers && ctx->API != API_OPENGL_CORE)
emit_instructions(&p);
validate_ir_tree(p.shader->ir);
--
1.8.3.2
More information about the mesa-dev
mailing list