[Mesa-dev] [PATCH 05/14] mesa/main/ff_frag: Don't bother with VARYING_BIT_FOGC.

Ian Romanick idr at freedesktop.org
Mon May 15 18:28:37 UTC 2017


With this patch I applied, I still see this bit used in several
places, including the i915 driver.  Did you test that?

rc/compiler/shader_enums.h:#define VARYING_BIT_FOGC BITFIELD64_BIT(VARYING_SLOT_FOGC)
src/mesa/swrast/s_context.c:                    VARYING_BIT_FOGC | VARYING_BITS_TEX_ANY;
src/mesa/swrast/s_context.c:         attribsMask |= VARYING_BIT_FOGC;
src/mesa/swrast/s_fog.c:if (span->arrayAttribs & VARYING_BIT_FOGC) {					\
src/mesa/program/programopt.c: * This function sets \c VARYING_BIT_FOGC in \c fprog->info.inputs_read.
src/mesa/program/programopt.c:   fprog->info.inputs_read |= VARYING_BIT_FOGC;
src/mesa/main/ffvertex_prog.c:   if (p->state->fragprog_inputs_read & VARYING_BIT_FOGC)
src/mesa/drivers/dri/i915/i915_fragprog.c:   if ((inputsRead & VARYING_BIT_FOGC)) {
src/mesa/tnl/t_context.c:       || (fp != NULL && (fp->info.inputs_read & VARYING_BIT_FOGC) != 0)) {


On 03/30/2017 11:09 AM, Gustaw Smolarczyk wrote:
> It's not used.
> 
> Signed-off-by: Gustaw Smolarczyk <wielkiegie at gmail.com>
> ---
>  src/mesa/main/ff_fragment_shader.cpp | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
> index 95c74e2b92..05641997de 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -449,10 +449,8 @@ static GLuint make_state_key( struct gl_context *ctx,  struct state_key *key )
>     }
>  
>     /* _NEW_FOG */
> -   if (ctx->Fog.Enabled) {
> +   if (ctx->Fog.Enabled)
>        key->fog_mode = translate_fog_mode(ctx->Fog.Mode);
> -      inputs_referenced |= VARYING_BIT_FOGC; /* maybe */
> -   }
>  
>     /* _NEW_BUFFERS */
>     key->num_draw_buffers = ctx->DrawBuffer->_NumColorDrawBuffers;
> 



More information about the mesa-dev mailing list