[Mesa-dev] [PATCH] gallium/tgsi: add offset to TXF
airlied at gmail.com
Fri Aug 26 07:33:37 PDT 2011
On Fri, Aug 26, 2011 at 3:04 PM, Brian Paul <brianp at vmware.com> wrote:
> On 08/26/2011 04:50 AM, Dave Airlie wrote:
>> From: Dave Airlie<airlied at redhat.com>
>> In order to implement the GLSL texelFetchOffset I needed to modify TXF
>> (which wasn't defined anyways). It now corresponds to the NV_gpu_shader4.
>> I've limited things to a u8, since hw can only do about 4-5 bits, since
>> that is what DX specifies, TGSI passes stuff in an immediate so its not a
>> problem there, if we need to change the tgsi_exec/driver interface later
>> it isn't a major problem.
> With OpenGL you can query the range of supported offsets with
> GL_MIN_PROGRAM_TEXEL_OFFSET and GL_MAX_PROGRAM_TEXEL_OFFSET. Maybe we
> should add new PIPE_CAP_MIN/MAX_TEXEL_OFFSETS right away...
Oh interesting, also on irc calim pointed out the textureGatherOffsets
which can take up to 4 2 vector offsets for one instruction.
We've been talking about it a bit and I think we need a new TGSI token
for this, I'll do a patch up and see how it looks.
More information about the mesa-dev