[Mesa-dev] is_tex bit for TGSI sampling instructions

Zack Rusin zackr at vmware.com
Wed Aug 24 21:42:00 PDT 2011

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]

> 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.


More information about the mesa-dev mailing list