[Mesa-dev] is_tex bit for TGSI sampling instructions

Christoph Bumiller e0425955 at student.tuwien.ac.at
Thu Aug 25 13:30:26 PDT 2011

On 25.08.2011 06:42, Zack Rusin wrote:
> On Wednesday, August 24, 2011 10:14:48 PM Bryan Cain wrote:
>> Like Dave said, the GLSL->TGSI translator needs to account for this.
> Probably not, at least yet. All of those instructions are DX10.1 level 
> instructions which support splitting of samplers and the underlaying resource, 
> we don't support that yet.
>> I'm not sure on how to initialize a resource in TGSI, though.  Is there
>> a state tracker that uses it that could provide an example?
> I don't think any of the open drivers actually implement this scheme quite 
> yet. The resources are declared using ureg_DECL_resource, the resulting code 
> would look something like:
> LOAD DST[0], SRC[0], RES[0]
Putting the resource type in the resource declaration instead of the
instruction isn't necessarily smart considering indirect resource access ...
I just hope the person implementing it remembers to provide a base array
address so we can identify the type.

( think of something like: LOAD DST[0], SRC[0], RES[ADDR[0].x - 4] )
what's the type of resource -4 ?

>> I also have an unrelated TGSI question: has it been determined exactly
>> what the source regs for TXF should be and what order they should be in?
> Two four component integer vectors, first is the coordinate the other is the 
> offset. I think gpu_program4 specifies that instruction.
> Ultimately I wanted to replace all the texture sampling/fetching/loading 
> instructions with the DX10.1 variants. There's less of them and they're 
> cleaner. Drivers which don't support that split could just ignore it. For 
> various reasons I never finished it so this texture sampling code is quite 
> frankly half-assed, I'd just use the documented/driver implemented opcodes and 
> leave others untouched.
> z
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

More information about the mesa-dev mailing list