Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-27 Thread Francisco Jerez
Zoltán Gilián writes: >> > Hmmm... So you only need it as padding? Wouldn't it be possible for >> > you to declare samplers to be 0 bytes? >> Maybe it can be done by changing the type of the sampler arg from i32 >> to an empty struct. I'll have to try this, I don't know if it will >> work. > >

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-27 Thread Zoltán Gilián
But samplers aren't necessary for the image attributes, so I'll break this patch into two. On Mon, Jul 27, 2015 at 10:25 AM, Zoltán Gilián wrote: >> > Hmmm... So you only need it as padding? Wouldn't it be possible for >> > you to declare samplers to be 0 bytes? >> Maybe it can be done by chang

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-27 Thread Zoltán Gilián
> > Hmmm... So you only need it as padding? Wouldn't it be possible for > > you to declare samplers to be 0 bytes? > Maybe it can be done by changing the type of the sampler arg from i32 > to an empty struct. I'll have to try this, I don't know if it will > work. But then it would only work for

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-26 Thread Zoltán Gilián
> Why? Your module::argument::image_size and ::image_format cases don't > touch the explicit_arg iterator at all AFAICT, so it will be left > pointing one past the last general semantic argument Ok, my mistake, I didn't think this through. > Hmmm... So you only need it as padding? Wouldn't it

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-26 Thread Francisco Jerez
Zoltán Gilián writes: >> auto img = dynamic_cast(**(explicit_arg - 1)) > > Ok, so it should be (explicit_arg - 2) for the image format, I > presume. Why? Your module::argument::image_size and ::image_format cases don't touch the explicit_arg iterator at all AFAICT, so it will be left pointing o

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-26 Thread Zoltán Gilián
> auto img = dynamic_cast(**(explicit_arg - 1)) Ok, so it should be (explicit_arg - 2) for the image format, I presume. This will be incorrect, however, if the targets that need implicit argument for format metadata are indeed a strict superset of the ones that need dimension, as you mentioned bef

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-25 Thread Francisco Jerez
Zoltan Gilian writes: > Read-only and write-only image arguments are recognized and > distinguished. > Attributes of the image arguments are passed to the kernel as implicit > arguments. > --- > src/gallium/state_trackers/clover/core/kernel.cpp | 46 ++- > src/gallium/state_trackers/clover

[Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-21 Thread Zoltan Gilian
Read-only and write-only image arguments are recognized and distinguished. Attributes of the image arguments are passed to the kernel as implicit arguments. --- src/gallium/state_trackers/clover/core/kernel.cpp | 46 ++- src/gallium/state_trackers/clover/core/kernel.hpp | 13 +- src/galliu

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-14 Thread Francisco Jerez
Zoltán Gilián writes: >> I have the suspicion >> that it would simplify both the OpenCL front-end and compiler back-end >> code if the image metadata was interleaved with images themselves. > > In fact this complicates the back-end, since the location of each > argument following an image argume

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-14 Thread Zoltán Gilián
> I have the suspicion > that it would simplify both the OpenCL front-end and compiler back-end > code if the image metadata was interleaved with images themselves. In fact this complicates the back-end, since the location of each argument following an image argument changes because of the metada

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-10 Thread Francisco Jerez
Zoltan Gilian writes: > Read-only and write-only image arguments are recognized and > distinguished. > Attributes of the image arguments are passed to the kernel as implicit > arguments. Thanks, this looks much better. One thing that still seems kind of unfortunate is the fact that you've added

[Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-06 Thread Zoltan Gilian
Read-only and write-only image arguments are recognized and distinguished. Attributes of the image arguments are passed to the kernel as implicit arguments. --- src/gallium/state_trackers/clover/core/kernel.cpp | 27 ++ src/gallium/state_trackers/clover/core/kernel.hpp | 13 ++- src/galliu