[Mesa-dev] [PATCH 3/3] st/mesa: add texture gather support. (v2)

Dave Airlie airlied at gmail.com
Mon Feb 10 20:03:34 PST 2014


>>     const GLuint *inputMapping;
>> @@ -4379,22 +4428,34 @@ translate_src(struct st_translate *t, const st_src_reg *src_reg)
>>
>>  static struct tgsi_texture_offset
>>  translate_tex_offset(struct st_translate *t,
>> -                     const struct tgsi_texture_offset *in_offset)
>> +                     const st_src_reg *in_offset, int idx)
>
> idx does not appear to get used... did you mean to use it, or
> left-over code change?

Oh indeed that was for when I had array support here, which I ripped
out for the lowering pass.

>>        src[num_src++] = t->samplers[inst->sampler];
>>        for (i = 0; i < inst->tex_offset_num_offset; i++) {
>> -         texoffsets[i] = translate_tex_offset(t, &inst->tex_offsets[i]);
>> +         texoffsets[i] = translate_tex_offset(t, &inst->tex_offsets[i], i);
>
> and so this new parameter wouldn't be needed either.

Good point.

Dave.


More information about the mesa-dev mailing list