[Mesa-dev] [PATCH 2/2] main/state: Flag new constants for compute shaders

Marek Olšák maraeo at gmail.com
Tue Jun 16 14:51:38 PDT 2015


One question: Why?

I just removed the same code for GS:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a3c1ec8471fc76eb6d3d6f1bd1739e24a5f33a

Marek

On Tue, Jun 16, 2015 at 11:21 PM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/mesa/main/state.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
> index bede7fe..beb2721 100644
> --- a/src/mesa/main/state.c
> +++ b/src/mesa/main/state.c
> @@ -278,6 +278,16 @@ update_program_constants(struct gl_context *ctx)
>        }
>     }
>
> +   if (ctx->ComputeProgram._Current) {
> +      const struct gl_program_parameter_list *params =
> +         ctx->ComputeProgram._Current->Base.Parameters;
> +      /*FIXME: StateFlags is always 0 because we have unnamed constant
> +       *       not state changes */
> +      if (params /*&& params->StateFlags & ctx->NewState*/) {
> +         new_state |= _NEW_PROGRAM_CONSTANTS;
> +      }
> +   }
> +
>     return new_state;
>  }
>
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list