On 07/12/2013 06:25 PM, Paul Berry wrote:
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.

Does this have potential interactions with meta?

---
  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);


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to