[Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

Ilia Mirkin imirkin at alum.mit.edu
Fri Feb 5 04:28:29 UTC 2016


On Thu, Feb 4, 2016 at 11:25 PM, Dave Airlie <airlied at gmail.com> 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?


More information about the mesa-dev mailing list