[Mesa-dev] [PATCH 6/7] st/mesa: convert GLSL image intrinsics into TGSI

Dave Airlie airlied at gmail.com
Sun Jan 31 12:26:18 PST 2016


On 31 January 2016 at 23:39, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Sun, Jan 31, 2016 at 2:37 AM, Dave Airlie <airlied at gmail.com> wrote:
>>> +   for (i = 0; i < program->shader->NumImages; i++) {
>>> +      if (program->images_used & (1 << i)) {
>>> +         t->images[i] = ureg_DECL_image(ureg, i,
>>> +                                        program->image_targets[i],
>>> +                                        program->image_formats[i],
>>> +                                        true, false);
>>
>> Can we not know if the image is writable from the GL level?
>
> Yes, we can. But do we care? It was there already so I kept the flag,
> but I'd be fully in favor of removing it...
>
> layout(writeonly) in GLSL lets you not specify a format, which would
> come through as PIPE_FORMAT_NONE in here. But beyond validation, I
> don't see what the use is. Something like layout(readonly) just causes
> imageStore() to error out...

I think on radeon it might let us not bind the image to the CB, but just
texture loads on it directly.

I'm not sure how valuable this is, but I think it's possibly what fglrx might
do.

Dave.


More information about the mesa-dev mailing list