[Mesa-dev] [PATCH] mesa: remove unused variable warning in release builds

Marek Olšák maraeo at gmail.com
Mon Feb 20 15:00:11 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Feb 20, 2017 at 12:16 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> This assert might have made sense before but we no longer use
> gl_linked_shader here. Unless the caller has really done something
> crazy this assert is fairly useless.
>
> We also do some small tidy ups in this change.
> ---
>  src/mesa/main/uniforms.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
> index 8376a95..59ae4c5 100644
> --- a/src/mesa/main/uniforms.c
> +++ b/src/mesa/main/uniforms.c
> @@ -65,18 +65,13 @@
>   */
>  void
>  _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
> -                                 struct gl_program *prog)
> +                                  struct gl_program *prog)
>  {
> -   GLbitfield mask = prog->SamplersUsed;
> -   struct gl_linked_shader *shader =
> -      shProg->_LinkedShaders[_mesa_program_enum_to_shader_stage(prog->Target)];
> -
> -   assert(shader);
> -
>     memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
>
>     shProg->SamplersValidated = GL_TRUE;
>
> +   GLbitfield mask = prog->SamplersUsed;
>     while (mask) {
>        const int s = u_bit_scan(&mask);
>        GLuint unit = prog->SamplerUnits[s];
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list