[Mesa-dev] is_tex bit for TGSI sampling instructions
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Thu Aug 25 13:42:21 PDT 2011
On 25.08.2011 22:40, Zack Rusin wrote:
> On Thursday, August 25, 2011 04:30:26 PM Christoph Bumiller wrote:
>> 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 don't think that's a meaningful objection. What's the sampler of SAMP[-4]?
> What's the source register of SRC[-4] ? In other words bug in a shader is a
> bug in a shader. Also indirect addressing on resources seems silly.
Of course -4 isn't a valid resource, I just meant to emphasize that I
cannot tell at all the resource to be accessed.
ADDR[0].x - 4 should of course be >= 0 and valid.
And, maybe it seems silly to you, but OpenGL allows it.
uniform sampler2D tex[4];
uniform int i;
... = texture(tex[i - 4]);
Yes.
More information about the mesa-dev
mailing list