On 25.08.2011 22:42, Christoph Bumiller wrote:
> 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;
make that "in int i;", so you don't get the idea to emulate it.

> ... = texture(tex[i - 4]);
>
> Yes.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to