<div dir="ltr"><span style="font-size:12.8000001907349px">> Why keeping the assertion commented out?</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Because to test the image support functionality I'm working on, I have to create an image and pass it to a kernel, which triggers the assertion ATM.</span></div><div><br></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">Can you just fix evergreen_set_cs_sampler_view so that it supports views==NULL?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Fair point, will do that.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">This will enable the feature for R600, R700, Evegreen, NI, SI, and</span></div><span style="font-size:12.8000001907349px">> CIK, because this function is shared by all of them. I don't think you</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> intended that.</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">You are correct, I'll fix this.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">Anyway, I don't what Tom's policy on OpenCL is, but generally we don't</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> push incomplete features.</span><span style="font-size:12.8000001907349px"><br></span><div><span style="font-size:12.8000001907349px"><br></span></div></div><div><span style="font-size:12.8000001907349px">Fair enough, thanks for the feedback anyway.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 1:33 PM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jun 8, 2015 at 1:20 PM, Zoltan Gilian <<a href="mailto:zoltan.gilian@gmail.com">zoltan.gilian@gmail.com</a>> wrote:<br>
> Allow creation and binding of compute image resources to be able to test the<br>
> currently working pieces of OpenCL image support.<br>
> ---<br>
>  src/gallium/drivers/r600/evergreen_compute.c  | 2 +-<br>
>  src/gallium/drivers/r600/evergreen_state.c    | 4 ++++<br>
>  src/gallium/drivers/r600/r600_state_common.c  | 1 +<br>
>  src/gallium/drivers/radeon/r600_pipe_common.c | 2 +-<br>
>  4 files changed, 7 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c<br>
> index 4c3c34c..ecad25c 100644<br>
> --- a/src/gallium/drivers/r600/evergreen_compute.c<br>
> +++ b/src/gallium/drivers/r600/evergreen_compute.c<br>
> @@ -666,7 +666,7 @@ void evergreen_set_cs_sampler_view(struct pipe_context *ctx_,<br>
>                 if (resource[i]) {<br>
>                         assert(i+1 < 12);<br>
>                         /* XXX: Implement */<br>
> -                       assert(!"Compute samplers not implemented.");<br>
> +                       //assert(!"Compute samplers not implemented.");<br>
<br>
</span>Why keeping the assertion commented out?<br>
<span class=""><br>
>                         ///FETCH0 = VTX0 (param buffer),<br>
>                         //FETCH1 = VTX1 (global buffer pool), FETCH2... = TEX<br>
>                 }<br>
> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c<br>
> index 4ddbc0b..5dba577 100644<br>
> --- a/src/gallium/drivers/r600/evergreen_state.c<br>
> +++ b/src/gallium/drivers/r600/evergreen_state.c<br>
> @@ -299,6 +299,10 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,<br>
>         if (usage & PIPE_BIND_TRANSFER_WRITE)<br>
>                 retval |= PIPE_BIND_TRANSFER_WRITE;<br>
><br>
> +       // XXX: review if something is not supported as a compute resource<br>
> +       if (usage & PIPE_BIND_COMPUTE_RESOURCE)<br>
> +               retval |= PIPE_BIND_COMPUTE_RESOURCE;<br>
> +<br>
>         return retval == usage;<br>
>  }<br>
><br>
> diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c<br>
> index 13dc9ee..0566d00 100644<br>
> --- a/src/gallium/drivers/r600/r600_state_common.c<br>
> +++ b/src/gallium/drivers/r600/r600_state_common.c<br>
> @@ -594,6 +594,7 @@ static void r600_set_sampler_views(struct pipe_context *pipe, unsigned shader,<br>
>         assert(start == 0); /* XXX fix below */<br>
><br>
>         if (shader == PIPE_SHADER_COMPUTE) {<br>
> +               /*XXX*/ if (!views) return;<br>
<br>
</span>Can you just fix evergreen_set_cs_sampler_view so that it supports views==NULL?<br>
<span class=""><br>
>                 evergreen_set_cs_sampler_view(pipe, start, count, views);<br>
>                 return;<br>
>         }<br>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c<br>
> index 3def444..d14791e 100644<br>
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c<br>
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c<br>
> @@ -631,7 +631,7 @@ static int r600_get_compute_param(struct pipe_screen *screen,<br>
>         case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:<br>
>                 if (ret) {<br>
>                         uint32_t *images_supported = ret;<br>
> -                       *images_supported = 0;<br>
> +                       *images_supported = 1;<br>
<br>
</span>This will enable the feature for R600, R700, Evegreen, NI, SI, and<br>
CIK, because this function is shared by all of them. I don't think you<br>
intended that.<br>
<br>
Anyway, I don't what Tom's policy on OpenCL is, but generally we don't<br>
push incomplete features. A tessellation is an example of that. We've<br>
had patches for about a year, but I can't send them to this mailing<br>
list, because they are still not good enough.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marek<br>
</font></span></blockquote></div><br></div>