On 5 February 2016 at 14:28, Ilia Mirkin <[email protected]> wrote:
> On Thu, Feb 4, 2016 at 11:25 PM, Dave Airlie <[email protected]> wrote:
>>> +
>>> +   *base = 
>>> this->shader_program->UniformStorage[location].opaque[shader].index;
>>
>> self-review: this needs to use UniformRemapTable here, so it picks up
>> the correct uniforms
>> (fixes fs-texelFetch-2D).
>
> So... _mesa_get_sampler_uniform_value does:
>
>    get_sampler_name getname(sampler, shader_program);
>    unsigned location;
>    shader_program->UniformHash->get(location, getname.name)
> return shader_program->UniformStorage[location].opaque[shader].index +
>           getname.offset
>
> Was it wrong before? Or are you getting the location incorrectly?

Looking up the value in the UniformHash with the name gives you the
correct answer,

pulling it from var->data.location means going via the UniformRemapTable.

Dave.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to