<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 26, 2017 at 12:03 PM, Jan Vesely <span dir="ltr"><<a href="mailto:jan.vesely@rutgers.edu" target="_blank">jan.vesely@rutgers.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Fri, 2017-05-26 at 11:53 -0500, Aaron Watry wrote:<br>
> On Fri, May 26, 2017 at 10:56 AM, Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br>
><br>
> > I think this will break r600 clover support. I don't know if anybody uses<br>
> > it.<br>
> ><br>
><br>
> I just rebuild my desktop a month ago with a new Ryzen setup, which means<br>
> that my BARTS is actually in my old machine now. WIth the open-source<br>
> release of the OpenCL CTS last week, I had actually been hoping to make<br>
> some progress on r600g/radeonsi clover/libclc in the near future. It'd be a<br>
> shame to remove that support from r600g right now. Note that I haven't<br>
> tested this patch yet, so I can't say whether this has broken anything at<br>
> this point in time.<br>
<br>
</span>+1 for keeping r600g opencl. I still plan to work on this as $DAYJOB(or<br>
rather $DAYSCHOOL) permits. There's a lot more work on LLVM side, so<br>
mesa probably won't see much activity (the big parts are: private<br>
buffers for register spilling, rat space reservation for atomics, and<br>
images)<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Jan<br>
</font></span><br>
PS: the up to date status of piglit on Turks is here:<br>
<a href="http://paul.rutgers.edu/%7Ejv356/piglit/radeon-latest-5/problems.html" rel="noreferrer" target="_blank">http://paul.rutgers.edu/~<wbr>jv356/piglit/radeon-latest-5/<wbr>problems.html</a><br>
PS2: thanks vedran for the CC<br></blockquote><div><br></div><div>While we're on the topic, I spent a little time last week beating the CMake build system for the 1.2 branch of the CL CTS into some sort of shape for running on Linux.<br><br><a href="https://github.com/awatry/OpenCL-CTS/tree/cl12_cmake_fixes">https://github.com/awatry/OpenCL-CTS/tree/cl12_cmake_fixes</a><br><br></div><div>That branch at least builds for me with just:<br></div><div>cmake . && make -j<br><br></div><div>And then to run:<br></div><div>cd test_conformance && python run_conformance.py [pick_a_test_profile.csv]<br><br></div><div>Out of tree builds aren't working yet, and there are some mis-named created binaries, but it's much better than it was (Makefiles were all MacOS specific, and the CMake build was just broken).<br></div><div><br></div><div>--Aaron<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
><br>
> --Aaron<br>
><br>
><br>
> ><br>
> > Marek<br>
> ><br>
> > On Fri, May 26, 2017 at 5:32 PM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>><br>
> > wrote:<br>
> ><br>
> > > From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
> > ><br>
> > > The code hasn't bee en touched in a very long time, and was never<br>
> > > completed.<br>
> > ><br>
> > > It is conditionally built only when OpenCL is selected at built time,<br>
> > > and pulls the libamd_common static library, which in itself depends on<br>
> > > amdgpu.<br>
> > ><br>
> > > With later commit(s) we'll address the amdgpu dependency, but for now<br>
> > > drop this partial code. If anyone is interested in reviving and beating<br>
> > > it into shape they are welcome to git revert.<br>
> > ><br>
> > > Cc: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
> > > Cc: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
> > > Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
> > > ---<br>
> > > src/gallium/drivers/r600/<wbr>Makefile.am | 5 --<br>
> > > src/gallium/drivers/r600/<wbr>evergreen_compute.c | 90<br>
> > > ----------------------<br>
> > > .../drivers/r600/evergreen_<wbr>compute_internal.h | 7 --<br>
> > > src/gallium/drivers/radeon/<wbr>r600_pipe_common.h | 2 -<br>
> > > 4 files changed, 104 deletions(-)<br>
> > ><br>
> > > diff --git a/src/gallium/drivers/r600/<wbr>Makefile.am<br>
> > > b/src/gallium/drivers/r600/<wbr>Makefile.am<br>
> > > index 21762d838d0..127e7424b74 100644<br>
> > > --- a/src/gallium/drivers/r600/<wbr>Makefile.am<br>
> > > +++ b/src/gallium/drivers/r600/<wbr>Makefile.am<br>
> > > @@ -25,11 +25,6 @@ AM_CFLAGS += \<br>
> > ><br>
> > > endif<br>
> > ><br>
> > > -if HAVE_GALLIUM_COMPUTE<br>
> > > -AM_CFLAGS += \<br>
> > > - -DHAVE_OPENCL<br>
> > > -endif<br>
> > > -<br>
> > > EXTRA_DIST = \<br>
> > > sb/notes.markdown \<br>
> > > sb/sb_bc_fmt_def.inc<br>
> > > diff --git a/src/gallium/drivers/r600/<wbr>evergreen_compute.c<br>
> > > b/src/gallium/drivers/r600/<wbr>evergreen_compute.c<br>
> > > index 37ef1058d3f..45df11296c6 100644<br>
> > > --- a/src/gallium/drivers/r600/<wbr>evergreen_compute.c<br>
> > > +++ b/src/gallium/drivers/r600/<wbr>evergreen_compute.c<br>
> > > @@ -26,7 +26,6 @@<br>
> > ><br>
> > > #include <stdio.h><br>
> > > #include <errno.h><br>
> > > -#include "ac_binary.h"<br>
> > > #include "pipe/p_defines.h"<br>
> > > #include "pipe/p_state.h"<br>
> > > #include "pipe/p_context.h"<br>
> > > @@ -172,65 +171,6 @@ static void evergreen_cs_set_constant_<wbr>buffer(struct<br>
> > > r600_context *rctx,<br>
> > > rctx->b.b.set_constant_buffer(<wbr>&rctx->b.b, PIPE_SHADER_COMPUTE,<br>
> > > cb_index, &cb);<br>
> > > }<br>
> > ><br>
> > > -/* We need to define these R600 registers here, because we can't include<br>
> > > - * evergreend.h and r600d.h.<br>
> > > - */<br>
> > > -#define R_028868_SQ_PGM_RESOURCES_VS 0x028868<br>
> > > -#define R_028850_SQ_PGM_RESOURCES_PS 0x028850<br>
> > > -<br>
> > > -#ifdef HAVE_OPENCL<br>
> > > -<br>
> > > -static void r600_shader_binary_read_<wbr>config(const struct<br>
> > > ac_shader_binary *binary,<br>
> > > - struct r600_bytecode *bc,<br>
> > > - uint64_t symbol_offset,<br>
> > > - boolean *use_kill)<br>
> > > -{<br>
> > > - unsigned i;<br>
> > > - const unsigned char *config =<br>
> > > - ac_shader_binary_config_start(<wbr>binary, symbol_offset);<br>
> > > -<br>
> > > - for (i = 0; i < binary->config_size_per_<wbr>symbol; i+= 8) {<br>
> > > - unsigned reg =<br>
> > > - util_le32_to_cpu(*(uint32_t*)(<wbr>config + i));<br>
> > > - unsigned value =<br>
> > > - util_le32_to_cpu(*(uint32_t*)(<wbr>config + i + 4));<br>
> > > - switch (reg) {<br>
> > > - /* R600 / R700 */<br>
> > > - case R_028850_SQ_PGM_RESOURCES_PS:<br>
> > > - case R_028868_SQ_PGM_RESOURCES_VS:<br>
> > > - /* Evergreen / Northern Islands */<br>
> > > - case R_028844_SQ_PGM_RESOURCES_PS:<br>
> > > - case R_028860_SQ_PGM_RESOURCES_VS:<br>
> > > - case R_0288D4_SQ_PGM_RESOURCES_LS:<br>
> > > - bc->ngpr = MAX2(bc->ngpr,<br>
> > > G_028844_NUM_GPRS(value));<br>
> > > - bc->nstack = MAX2(bc->nstack,<br>
> > > G_028844_STACK_SIZE(value));<br>
> > > - break;<br>
> > > - case R_02880C_DB_SHADER_CONTROL:<br>
> > > - *use_kill = G_02880C_KILL_ENABLE(value);<br>
> > > - break;<br>
> > > - case R_0288E8_SQ_LDS_ALLOC:<br>
> > > - bc->nlds_dw = value;<br>
> > > - break;<br>
> > > - }<br>
> > > - }<br>
> > > -}<br>
> > > -<br>
> > > -static unsigned r600_create_shader(struct r600_bytecode *bc,<br>
> > > - const struct ac_shader_binary *binary,<br>
> > > - boolean *use_kill)<br>
> > > -<br>
> > > -{<br>
> > > - assert(binary->code_size % 4 == 0);<br>
> > > - bc->bytecode = CALLOC(1, binary->code_size);<br>
> > > - memcpy(bc->bytecode, binary->code, binary->code_size);<br>
> > > - bc->ndw = binary->code_size / 4;<br>
> > > -<br>
> > > - r600_shader_binary_read_<wbr>config(binary, bc, 0, use_kill);<br>
> > > - return 0;<br>
> > > -}<br>
> > > -<br>
> > > -#endif<br>
> > > -<br>
> > > static void r600_destroy_shader(struct r600_bytecode *bc)<br>
> > > {<br>
> > > FREE(bc->bytecode);<br>
> > > @@ -241,27 +181,6 @@ static void *evergreen_create_compute_<wbr>state(struct<br>
> > > pipe_context *ctx,<br>
> > > {<br>
> > > struct r600_context *rctx = (struct r600_context *)ctx;<br>
> > > struct r600_pipe_compute *shader = CALLOC_STRUCT(r600_pipe_comput<br>
> > > e);<br>
> > > -#ifdef HAVE_OPENCL<br>
> > > - const struct pipe_llvm_program_header *header;<br>
> > > - const char *code;<br>
> > > - void *p;<br>
> > > - boolean use_kill;<br>
> > > -<br>
> > > - COMPUTE_DBG(rctx->screen, "*** evergreen_create_compute_state<br>
> > > \n");<br>
> > > - header = cso->prog;<br>
> > > - code = cso->prog + sizeof(struct pipe_llvm_program_header);<br>
> > > - radeon_shader_binary_init(&<wbr>shader->binary);<br>
> > > - ac_elf_read(code, header->num_bytes, &shader->binary);<br>
> > > - r600_create_shader(&shader-><wbr>bc, &shader->binary, &use_kill);<br>
> > > -<br>
> > > - /* Upload code + ROdata */<br>
> > > - shader->code_bo = r600_compute_buffer_alloc_<wbr>vram(rctx->screen,<br>
> > > - shader->bc.ndw *<br>
> > > 4);<br>
> > > - p = r600_buffer_map_sync_with_<wbr>rings(&rctx->b, shader->code_bo,<br>
> > > PIPE_TRANSFER_WRITE);<br>
> > > - //TODO: use util_memcpy_cpu_to_le32 ?<br>
> > > - memcpy(p, shader->bc.bytecode, shader->bc.ndw * 4);<br>
> > > - rctx->b.ws->buffer_unmap(<wbr>shader->code_bo->buf);<br>
> > > -#endif<br>
> > ><br>
> > > shader->ctx = rctx;<br>
> > > shader->local_size = cso->req_local_mem;<br>
> > > @@ -589,15 +508,6 @@ static void evergreen_launch_grid(struct<br>
> > > pipe_context *ctx,<br>
> > > const struct pipe_grid_info *info)<br>
> > > {<br>
> > > struct r600_context *rctx = (struct r600_context *)ctx;<br>
> > > -#ifdef HAVE_OPENCL<br>
> > > - struct r600_pipe_compute *shader = rctx->cs_shader_state.shader;<br>
> > > - boolean use_kill;<br>
> > > -<br>
> > > - rctx->cs_shader_state.pc = info->pc;<br>
> > > - /* Get the config information for this kernel. */<br>
> > > - r600_shader_binary_read_<wbr>config(&shader->binary, &shader->bc,<br>
> > > - info->pc, &use_kill);<br>
> > > -#endif<br>
> > ><br>
> > > COMPUTE_DBG(rctx->screen, "*** evergreen_launch_grid: pc = %u\n",<br>
> > > info->pc);<br>
> > ><br>
> > > diff --git a/src/gallium/drivers/r600/<wbr>evergreen_compute_internal.h<br>
> > > b/src/gallium/drivers/r600/<wbr>evergreen_compute_internal.h<br>
> > > index 6f4be3ea57f..4c1bed909ec 100644<br>
> > > --- a/src/gallium/drivers/r600/<wbr>evergreen_compute_internal.h<br>
> > > +++ b/src/gallium/drivers/r600/<wbr>evergreen_compute_internal.h<br>
> > > @@ -26,9 +26,6 @@<br>
> > > #define EVERGREEN_COMPUTE_INTERNAL_H<br>
> > ><br>
> > > #include "r600_asm.h"<br>
> > > -#ifdef HAVE_OPENCL<br>
> > > -#include <llvm-c/Core.h><br>
> > > -#endif<br>
> > ><br>
> > > struct r600_pipe_compute {<br>
> > > struct r600_context *ctx;<br>
> > > @@ -41,10 +38,6 @@ struct r600_pipe_compute {<br>
> > > unsigned private_size;<br>
> > > unsigned input_size;<br>
> > > struct r600_resource *kernel_param;<br>
> > > -<br>
> > > -#ifdef HAVE_OPENCL<br>
> > > - LLVMContextRef llvm_ctx;<br>
> > > -#endif<br>
> > > };<br>
> > ><br>
> > > struct r600_resource* r600_compute_buffer_alloc_<wbr>vram(struct r600_screen<br>
> > > *screen, unsigned size);<br>
> > > diff --git a/src/gallium/drivers/radeon/<wbr>r600_pipe_common.h<br>
> > > b/src/gallium/drivers/radeon/<wbr>r600_pipe_common.h<br>
> > > index b17b690faba..1fbd79d23b4 100644<br>
> > > --- a/src/gallium/drivers/radeon/<wbr>r600_pipe_common.h<br>
> > > +++ b/src/gallium/drivers/radeon/<wbr>r600_pipe_common.h<br>
> > > @@ -34,8 +34,6 @@<br>
> > ><br>
> > > #include <stdio.h><br>
> > ><br>
> > > -#include "amd/common/ac_binary.h"<br>
> > > -<br>
> > > #include "radeon/radeon_winsys.h"<br>
> > ><br>
> > > #include "util/disk_cache.h"<br>
> > > --<br>
> > > 2.12.2<br>
> > ><br>
> > > ______________________________<wbr>_________________<br>
> > > mesa-dev mailing list<br>
> > > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
> > ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
> ><br>
> ><br>
><br>
> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>