On Fri, Oct 9, 2015 at 6:52 PM, Ian Romanick <[email protected]> wrote:
> From: Ian Romanick <[email protected]>
>
> This is the way layout(binding=xxx) works from GLSL.  The old method
> just happened to work (and significantly predated support for
> layout(binding=xxx)), but future changes will break this.
>
> Signed-off-by: Ian Romanick <[email protected]>
> Cc: "10.6 11.0" <[email protected]>
> ---
>  src/mesa/main/ff_fragment_shader.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/ff_fragment_shader.cpp 
> b/src/mesa/main/ff_fragment_shader.cpp
> index e4e2a18..f5a4fa5 100644
> --- a/src/mesa/main/ff_fragment_shader.cpp
> +++ b/src/mesa/main/ff_fragment_shader.cpp
> @@ -981,7 +981,8 @@ static void load_texture( texenv_fragment_program *p, 
> GLuint unit )
>      * NOTE: The cast to int is important.  Without it, the constant will have
>      * type uint, and things later on may get confused.
>      */
> -   sampler->constant_value = new(p->mem_ctx) ir_constant(int(unit));
> +   sampler->data.explicit_binding = true;
> +   sampler->data.binding = unit;

With the comment immediately above removed,

Reviewed-by: Matt Turner <[email protected]>
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to