[Mesa-dev] is_tex bit for TGSI sampling instructions

Bryan Cain bryancain3 at gmail.com
Wed Aug 24 21:51:55 PDT 2011


On 08/24/2011 11:42 PM, 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:
> DCL RES[0], 2D, FLOAT
>
> LOAD DST[0], SRC[0], RES[0]

Okay, thanks for your answer.

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

The problem is that we need these for GLSL 1.30.  Since all the pieces
are falling into place on the Mesa side, we need to have support for
these operations soon on the Gallium side.  That's why I want someone to
actually implement these operations in at least one driver.  Especially
TXF; how hard would that really be for someone who understands the code
to implement in tgsi_exec?

Bryan


More information about the mesa-dev mailing list