[Mesa-dev] [PATCH v2 2/5] main: do nothing in the ff fragment shader when using the core profile.

Ian Romanick idr at freedesktop.org
Mon Jul 15 15:50:47 PDT 2013


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



More information about the mesa-dev mailing list