[Mesa-dev] [PATCH 7/8] mesa: Fix ff fragment shader inputs calculation when enabling a VS.

Brian Paul brianp at vmware.com
Tue Jul 26 07:11:03 PDT 2011


On 07/25/2011 04:39 PM, Eric Anholt wrote:
> The FF VS generation happens just after the FF FS generation in
> state.c, so the ctx->VP._Current value is for the previous state
> update's vertex shader, not the one that will be chosen as a result of
> this state update.  The vertexShader and vertexProgram variables
> should be accurately telling us whether there's going to be a
> ctx->VP._Current (except on _MaintainTnlProgram drivers, where it's
> always true).
> ---
>   src/mesa/main/ff_fragment_shader.cpp |    3 +--
>   1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
> index 0b53c28..dbfa6b5 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -330,8 +330,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx )
>         /* _NEW_RENDERMODE */
>         fp_inputs = (FRAG_BIT_COL0 | FRAG_BIT_TEX0);
>      }
> -   else if (!(vertexProgram || vertexShader) ||
> -            !ctx->VertexProgram._Current) {
> +   else if (!(vertexProgram || vertexShader)) {
>         /* Fixed function vertex logic */
>         /* _NEW_ARRAY */
>         GLbitfield varying_inputs = ctx->varying_vp_inputs;

This kind of change always requires thorough testing, but anyway:

Reviewed-by: Brian Paul <brianp at vmware.com>




More information about the mesa-dev mailing list