[Mesa-dev] [PATCH 3/4] radeonsi: Use llvm.amdgcn.mbcnt.* intrinsics instead of llvm.SI.tid v2

2016-04-19 Thread Tom Stellard
We're trying to move to more of the new style intrinsics with include the correct target name, and map directly to ISA instructions. v2: - Only do this with LLVM 3.8 and newer. --- src/gallium/drivers/radeonsi/si_shader.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 4/4] radeonsi: Implement ddx/ddy on VI using ds_bpermute

2016-04-19 Thread Tom Stellard
The ds_bpermute instruction allows threads to transfer data directly to or from the vgprs of other threads. These instructions use the lds hardware to transfer data, but do not read or write lds memory. DDX BEFORE:| DDX AFTER: | v_mbcnt_

[Mesa-dev] [PATCH 2/4] radeonsi: Set range metadata on calls to llvm.SI.tid

2016-04-19 Thread Tom Stellard
The range metadata tells LLVM the range of expected values for this intrinsic, so it can do some additional optimizations on the result. --- src/gallium/drivers/radeonsi/si_shader.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/gallium/drive

Re: [Mesa-dev] [PATCH] configure.ac: fix the --disable-llvm-shared-libs build

2016-04-19 Thread Tom Stellard
On Tue, Apr 19, 2016 at 07:39:13PM +0100, Emil Velikov wrote: > Hi Chuck, > > Thanks for chipping in. > > On 19 April 2016 at 15:47, Chuck Atkins wrote: > > This still doesn't quite give what you want. One can also have an llvm with > > component shared libs. So there's three different options

Re: [Mesa-dev] [PATCH 2/4] radeonsi: Set range metadata on calls to llvm.SI.tid

2016-04-19 Thread Tom Stellard
On Tue, Apr 19, 2016 at 08:12:08PM +0200, Michael Schellenberger Costa wrote: > Hi Tom, > > Am 19.04.2016 um 19:52 schrieb Tom Stellard: > > The range metadata tells LLVM the range of expected values for this > > intrinsic, > > so it can do some additional

Re: [Mesa-dev] [PATCH] radeonsi: Add config parameter to si_shader_apply_scratch_relocs.

2016-04-21 Thread Tom Stellard
On Thu, Apr 21, 2016 at 06:28:15PM +0200, Bas Nieuwenhuizen wrote: > shader->config is not updated for compute kernels. > > Signed-off-by: Bas Nieuwenhuizen This fixes compute shaders that use scratch. Thanks. Reviewed-by: Tom Stellard > --- > src/gallium/drivers/rad

Re: [Mesa-dev] [PATCH 0/4] clover: this serie remove util/compat.*

2015-04-28 Thread Tom Stellard
On Fri, Apr 24, 2015 at 12:59:53PM +0200, EdB wrote: > Since clover should compile use -std=c++11, > compat classes are no longer neccessary > > EdB (4): > clover: remove compat class that matche std one > clover: remove compat::string > clover: make module::symbol::name a string > clover:

Re: [Mesa-dev] [PATCH v2] clover: compile all sources with c++11

2015-04-29 Thread Tom Stellard
I've pushed this patch, thanks! -Tom On Tue, Apr 21, 2015 at 03:49:09PM +0200, EdB wrote: > Later we can remove the compat code > > According to Francisco Jerez, it happen that some time llvm requiring exotic > compilation flags and it would be preferable not to to contaminate the rest of > the

Re: [Mesa-dev] [PATCH 0/4] clover: this serie remove util/compat.*

2015-04-29 Thread Tom Stellard
I've pushed patches 1-3, thanks! -Tom On Fri, Apr 24, 2015 at 12:59:53PM +0200, EdB wrote: > Since clover should compile use -std=c++11, > compat classes are no longer neccessary > > EdB (4): > clover: remove compat class that matche std one > clover: remove compat::string > clover: make m

Re: [Mesa-dev] [PATCH 4/4] clover: remove util/compat

2015-04-29 Thread Tom Stellard
I've pushed this patch, thanks! -Tom On Wed, Apr 29, 2015 at 08:22:02AM +0200, EdB wrote: > > --- > src/gallium/state_trackers/clover/Makefile.sources | 1 - > src/gallium/state_trackers/clover/api/program.cpp | 14 +- > .../state_trackers/clover/core/compiler.hpp| 4 +- > src/gal

Re: [Mesa-dev] [PATCH] clover: add --with-icd-file-dir option

2015-05-04 Thread Tom Stellard
On Sat, May 02, 2015 at 01:31:41PM -0400, Ilia Mirkin wrote: > On Sat, May 2, 2015 at 1:19 PM, EdB wrote: > > The standard ICD file path is /etc/OpenCL/vendor/. > > However it doesn't fit well with custom build. > > This option allow ICD vendor file installation path override > > --- > > configur

Re: [Mesa-dev] [PATCH] clover: add --with-icd-file-dir option

2015-05-04 Thread Tom Stellard
On Mon, May 04, 2015 at 10:13:19AM -0400, Ilia Mirkin wrote: > On Mon, May 4, 2015 at 10:04 AM, Tom Stellard wrote: > > On Sat, May 02, 2015 at 01:31:41PM -0400, Ilia Mirkin wrote: > >> On Sat, May 2, 2015 at 1:19 PM, EdB wrote: > >> > The standard ICD f

Re: [Mesa-dev] [PATCH] clover: add --with-icd-file-dir option

2015-05-05 Thread Tom Stellard
On Tue, May 05, 2015 at 03:48:29PM +0100, Emil Velikov wrote: > On 4 May 2015 at 18:11, Ilia Mirkin wrote: > > On Mon, May 4, 2015 at 12:47 PM, Tom Stellard wrote: > >> On Mon, May 04, 2015 at 10:13:19AM -0400, Ilia Mirkin wrote: > >>> On Mon, May 4, 2015 at

Re: [Mesa-dev] [PATCH] r600g: Fix Clang return-type build error.

2015-05-06 Thread Tom Stellard
:3: error: non-void function 'r600_begin_query' should return > a value [-Wreturn-type] > return; > ^ > > Signed-off-by: Vinson Lee Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/r600_query.c | 2 +- > 1 file change

Re: [Mesa-dev] [PATCH] clover: add --with-icd-file-dir option

2015-05-07 Thread Tom Stellard
On Thu, May 07, 2015 at 04:59:41PM +0900, Michel Dänzer wrote: > On 05.05.2015 01:47, Tom Stellard wrote: > > On Mon, May 04, 2015 at 10:13:19AM -0400, Ilia Mirkin wrote: > >> On Mon, May 4, 2015 at 10:04 AM, Tom Stellard wrote: > >>> On Sat, May 02, 2015 at 01:31

[Mesa-dev] [PATCH 1/5] clover: Add threadsafe wrappers for pipe_screen and pipe_context

2015-05-07 Thread Tom Stellard
ONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Authors: Tom Stellard + * + */ + +#include + +/** + * \file + * + * threadsafe_context is a wrapper around a pipe_context to make it thread + * safe. + */ + +#include "os/os_thread.h" +#include

[Mesa-dev] [PATCH 2/5] clover: Replace open-coded event::signalled()

2015-05-07 Thread Tom Stellard
This consolidates signalled checks into the same place. --- src/gallium/state_trackers/clover/core/event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp index 58de888..3c933

[Mesa-dev] [PATCH 3/5] clover: Fix a bug with multi-threaded events

2015-05-07 Thread Tom Stellard
It was possible for some events never to get triggered if one thread was creating events and another threads was waiting for them. This patch consolidates soft_event::wait() and hard_event::wait() into event::wait() so that hard_event objects will now wait for all their dependencies to be submitte

[Mesa-dev] [PATCH 4/5] clover: Add a mutex to guard queue::queued_events

2015-05-07 Thread Tom Stellard
This fixes a potential crash where on a sequence like this: Thread 0: Check if queue is not empty. Thread 1: Remove item from queue, making it empty. Thread 0: Do something assuming queue is not empty. --- src/gallium/state_trackers/clover/core/queue.cpp | 2 ++ src/gallium/state_trackers/clover/

[Mesa-dev] [PATCH 5/5] clover: Add a mutex to guard event::chain and event::wait_count

2015-05-07 Thread Tom Stellard
This mutex effectively prevents an event's chain or wait_count from being updated while it is in the process of triggering. Otherwise it may be possible to add to an event's chain after it has been triggered, which causes the chained event to never be triggered. --- src/gallium/state_trackers/clo

Re: [Mesa-dev] [PATCH 1/3] clover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.

2015-05-11 Thread Tom Stellard
ome deadlock situations when locking is implemented. I've pushed the two bug-fixes that you reviewed, so this series should apply cleanly to master now. For the series: Tested-by: Tom Stellard CC: stable should also be added to these. Thanks, Tom > --- > src/gallium/state_trackers/clo

[Mesa-dev] [PATCH 2/2] clover: Use threadsafe wrappers for pipe_screen and pipe_context

2015-05-12 Thread Tom Stellard
Events can be added to an OpenCL command queue concurrently from multiple threads, but pipe_context and pipe_screen objects are not threadsafe. The threadsafe wrappers protect all pipe_screen and pipe_context function calls with a mutex, so we can safely use them with multiple threads. CC: 10.5 d

[Mesa-dev] [PATCH 1/2] gallium/drivers: Add threadsafe wrappers for pipe_context and pipe_screen

2015-05-12 Thread Tom Stellard
CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Authors: Tom Stellard + * + */ + +#include + +/** + * \file + * + * threadsafe_context is a wrapper around a pipe_context to make it thread + * safe. + * + * TODO: Implement all gallium functions. Only the functi

Re: [Mesa-dev] [PATCH] gallivm: Do not use NoFramePointerElim with LLVM 3.7

2015-05-27 Thread Tom Stellard
On Tue, May 26, 2015 at 10:27:34PM -0700, Vinson Lee wrote: > TargetOptions::NoFramePointerElim was removed in llvm-3.7.0svn r238244 > "Remove NoFramePointerElim and NoFramePointerElimOverride from > TargetOptions and remove ExecutionEngine's dependence on CodeGen. NFC.&qu

[Mesa-dev] XDC2015: Call for papers

2015-06-01 Thread Tom Stellard
u are attending please add your name as early as possible. I am looking forward to seeing you there, if you have any inquiries/questions, please send them to me (please also CC: board at foundation.x.org). Tom Stellard ___ mesa-dev mailin

[Mesa-dev] [PATCH] gallivm: Only build lp_profile() body when PROFILE is defined

2015-06-05 Thread Tom Stellard
The only use of lp_profile() is wrapped in #if defined(PROFILE), so there is no reason to build it unless this macro is defined. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/

Re: [Mesa-dev] [PATCH 1/2] clover: fix event handling of buffer operations

2015-06-08 Thread Tom Stellard
cc Francisco On Thu, May 28, 2015 at 10:10:19AM +0200, Grigori Goronzy wrote: > Wrap MapBuffer and MapImage as hard_event actions, like other > operations. This enables correct profiling. Also make sure to wait > for events to finish when blocking is requested by the caller. > --- > src/gallium/s

[Mesa-dev] [PATCH] clover: Add support to mem objects for multiple destructor callbacks v2

2014-09-22 Thread Tom Stellard
The spec says that mem objects should maintain a stack of callbacks not just one. v2: - Remove stray printf. CC: "10.3" --- src/gallium/state_trackers/clover/core/memory.cpp | 10 ++ src/gallium/state_trackers/clover/core/memory.hpp | 3 ++- 2 files changed, 8 insertions(+), 5 deleti

[Mesa-dev] [PATCH] clover: Add support to mem objects for multiple destructor callbacks

2014-09-22 Thread Tom Stellard
The spec says that mem objects should maintain a stack of callbacks not just one. CC: "10.3" --- src/gallium/state_trackers/clover/core/memory.cpp | 11 +++ src/gallium/state_trackers/clover/core/memory.hpp | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gall

[Mesa-dev] [PATCH] gallivm: Disable gallivm to fix build with LLVM 3.6

2014-09-23 Thread Tom Stellard
LLVM commit r218316 removes the JITMemoryManager class, which is the parent for a seemingly important class in gallivm. In order to fix the build, I've wrapped most of lp_bld_misc.cpp in if HAVE_LLVM < 0x0306 and modifyed the lp_build_create_jit_compiler_for_module() function to return false for 3

Re: [Mesa-dev] [PATCH 1/4] radeonsi/compute: directly emit CONTEXT_CONTROL

2014-09-23 Thread Tom Stellard
On Sat, Sep 20, 2014 at 12:11:02PM +0200, Marek Olšák wrote: > From: Marek Olšák Patches 1-3 are: Reviewed-by: Tom Stellard > > --- > src/gallium/drivers/radeonsi/si_compute.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/gal

Re: [Mesa-dev] [PATCH 1/4] radeonsi/compute: directly emit CONTEXT_CONTROL

2014-09-25 Thread Tom Stellard
On Mon, Sep 22, 2014 at 09:48:43PM +0200, Marek Olšák wrote: > No, we cannot detect compute-only contexts yet. We need to add a new > parameter to pipe_context::context_create which says that a context is > compute-only. That should be OpenCL but not OpenGL. > > Also, some code paths like resource

[Mesa-dev] [PATCH] configure.ac: Compute LLVM_VERSION_PATCH using llvm-config

2014-09-25 Thread Tom Stellard
This is the only guaranteed way get the patch level for llvm, since the define cannot always be found in config.h depending on the version of llvm or the build system used. CC: mesa-sta...@lists.freedesktop.org --- configure.ac | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

Re: [Mesa-dev] [PATCH] gallivm: More fallout from disabling with LLVM 3.6

2014-09-25 Thread Tom Stellard
On Thu, Sep 25, 2014 at 12:24:14PM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > The draw module would still try to use gallivm, causing many piglit tests > to fail with an assertion failure. llvmpipe might have been similarly > affected. > Reviewed-by: Tom Stellar

Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Tom Stellard
On Tue, Sep 30, 2014 at 12:29:52PM -0400, Ilia Mirkin wrote: > Perhaps do the same thing as util_bitcount, i.e. > > #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) > return __builtin_popcountll(n); > #else > ... > #endif > > Perhaps the gcc version check is no longer necessary, unlikel

[Mesa-dev] [PATCH 04/10] clover: Register an llvm diagnostic handler to catch internal compiler errors

2014-10-06 Thread Tom Stellard
--- .../state_trackers/clover/llvm/invocation.cpp | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 088039a..a1a54e0 100644 --- a/src/gallium/state_tr

[Mesa-dev] [PATCH 01/10] clover: Factor kernel argument parsing into its own function

2014-10-06 Thread Tom Stellard
--- .../state_trackers/clover/llvm/invocation.cpp | 142 +++-- 1 file changed, 75 insertions(+), 67 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 7bca0d6..3137591 100644 --- a/src

[Mesa-dev] [PATCH 03/10] clover: Add support for compiling to native object code

2014-10-06 Thread Tom Stellard
--- .../state_trackers/clover/llvm/invocation.cpp | 173 - src/gallium/targets/opencl/Makefile.am | 1 + 2 files changed, 167 insertions(+), 7 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clove

[Mesa-dev] Native object code support for clover and radeon

2014-10-06 Thread Tom Stellard
Hi, The attached patches add support to clover for compiling kernels to native object code and it updates r600g and radeonsi to accept these binaries from clover. This change significantly reduces the number of compiles that the drivers need to do. Since the OpenCL programs can now be stored in

[Mesa-dev] [PATCH 06/10] radeon/compute: Bump minimum required LLVM version to 3.5.1

2014-10-06 Thread Tom Stellard
LLVM >= 3.5.1 will be requried in order to enable PIPE_SHADER_IR_NATIVE for compute shaders. --- configure.ac | 4 src/gallium/drivers/radeonsi/si_compute.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index

[Mesa-dev] [PATCH 09/10] radeonsi/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders

2014-10-06 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 51 +-- src/gallium/drivers/radeonsi/si_pipe.c| 2 +- src/gallium/drivers/radeonsi/si_shader.c | 104 ++ src/gallium/drivers/radeonsi/si_shader.h | 7 ++ 4 files changed, 88 insertions(+), 76 deletio

[Mesa-dev] [PATCH 08/10] r600g/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders

2014-10-06 Thread Tom Stellard
--- src/gallium/drivers/r600/evergreen_compute.c | 95 ++ .../drivers/r600/evergreen_compute_internal.h | 15 +--- src/gallium/drivers/r600/r600_llvm.c | 71 ++-- src/gallium/drivers/r600/r600_llvm.h | 10 +++ src/gallium/drive

[Mesa-dev] [PATCH 05/10] clover: Add environment variables for dumping kernel code

2014-10-06 Thread Tom Stellard
--- .../state_trackers/clover/llvm/invocation.cpp | 74 ++ 1 file changed, 63 insertions(+), 11 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index a1a54e0..3e6a186 100644 --- a/src

[Mesa-dev] [PATCH 02/10] gallium: Add PIPE_SHADER_IR_NATIVE to enum pipe_shader_ir

2014-10-06 Thread Tom Stellard
Drivers can return this value for PIPE_COMPUTE_CAP_IR_TARGET if they want clover to give them native object code. --- src/gallium/docs/source/screen.rst | 4 ++-- src/gallium/include/pipe/p_defines.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/docs/source/

[Mesa-dev] [PATCH 07/10] gallium/radeon: Add query for symbol specific config information

2014-10-06 Thread Tom Stellard
This adds a query which allows drivers to access the config information of a specific function within the LLVM generated ELF binary. This makes it possible for the driver to handle ELF binaries with multiple kernels / global functions. --- src/gallium/drivers/radeon/r600_pipe_common.h | 8

[Mesa-dev] [PATCH 10/10] radeon: Remove unused files radeon_llvm_util.[ch]

2014-10-06 Thread Tom Stellard
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Authors: Tom Stellard - * - */ - -#include "radeon_llvm_util.h" -#include "util/u_memory.h" - -#include -#

Re: [Mesa-dev] [PATCH v2] r600: Use DMA transfers in r600_copy_global_buffer

2014-10-07 Thread Tom Stellard
On Sun, Sep 28, 2014 at 09:48:11PM +0200, Niels Ole Salscheider wrote: > On Sunday 28 September 2014, 17:44:53, Bruno Jimenez wrote: > > Hi, > > > > Sorry for not answering until now, but I have had some personal issues > > (changing university, moving to another city...) > > > > As you said, thi

[Mesa-dev] [PATCH] clover: Add support for compiling to native object code v2

2014-10-07 Thread Tom Stellard
v2: - Split build_module_native() into three separate functions. - Code cleanups. --- .../state_trackers/clover/llvm/invocation.cpp | 200 - src/gallium/targets/opencl/Makefile.am | 1 + 2 files changed, 192 insertions(+), 9 deletions(-) diff --git a/src

[Mesa-dev] [PATCH] clover: Register an llvm diagnostic handler v2

2014-10-07 Thread Tom Stellard
This will allow us to handle internal compiler errors. v2: - Code cleanups. --- .../state_trackers/clover/llvm/invocation.cpp | 27 ++ 1 file changed, 27 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clov

Re: [Mesa-dev] [PATCH 3/3] clover: add clCompile

2014-10-09 Thread Tom Stellard
On Sun, Sep 28, 2014 at 12:57:22PM +0200, EdB wrote: > --- > src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- > src/gallium/state_trackers/clover/api/program.cpp | 39 > +++--- > .../state_trackers/clover/core/compiler.hpp| 12 --- > src/gallium/state_track

Re: [Mesa-dev] [PATCH 05/10] clover: Add environment variables for dumping kernel code

2014-10-09 Thread Tom Stellard
On Wed, Oct 08, 2014 at 09:15:39AM -0700, Matt Arsenault wrote: > > On Oct 6, 2014, at 12:44 PM, Tom Stellard wrote: > > > --- > > .../state_trackers/clover/llvm/invocation.cpp | 74 > > ++ > > 1 file changed, 63 insertions(+), 11 delet

[Mesa-dev] [PATCH 5/5] clover: Add environment variables for dumping kernel code v2

2014-10-09 Thread Tom Stellard
There are two debug variables: CLOVER_DEBUG which you can set to any combination of llvm,clc,asm (separated by commas) to dump llvm IR, OpenCL C, and native assembly. CLOVER_DEBUG_FILE which you can set to a file name for dumping output instead of stderr. If you set this variable, the output wil

[Mesa-dev] [PATCH 3/5] clover: Add support for compiling to native object code v3

2014-10-09 Thread Tom Stellard
v2: - Split build_module_native() into three separate functions. - Code cleanups. v3: - More cleanups. --- .../state_trackers/clover/llvm/invocation.cpp | 208 - src/gallium/targets/opencl/Makefile.am | 1 + 2 files changed, 200 insertions(+), 9 deleti

[Mesa-dev] [PATCH 1/5] clover: Factor kernel argument parsing into its own function v2

2014-10-09 Thread Tom Stellard
v2: - Code cleanups. --- .../state_trackers/clover/llvm/invocation.cpp | 141 +++-- 1 file changed, 74 insertions(+), 67 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 7bca0d6..b

[Mesa-dev] [PATCH 2/5] gallium: Add PIPE_SHADER_IR_NATIVE to enum pipe_shader_ir

2014-10-09 Thread Tom Stellard
Drivers can return this value for PIPE_COMPUTE_CAP_IR_TARGET if they want clover to give them native object code. Reviewed-by: Francisco Jerez --- src/gallium/docs/source/screen.rst | 4 ++-- src/gallium/include/pipe/p_defines.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff -

[Mesa-dev] [PATCH 4/5] clover: Register an llvm diagnostic handler v3

2014-10-09 Thread Tom Stellard
This will allow us to handle internal compiler errors. v2: - Code cleanups. v3: - More cleanups. --- .../state_trackers/clover/llvm/invocation.cpp | 25 ++ 1 file changed, 25 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gal

Re: [Mesa-dev] [PATCH 3/3] clover: add clCompile

2014-10-10 Thread Tom Stellard
On Thu, Oct 09, 2014 at 09:22:46PM +0200, EdB wrote: > On Thursday, October 09, 2014 06:29:40 AM Tom Stellard wrote: > > On Sun, Sep 28, 2014 at 12:57:22PM +0200, EdB wrote: > > > --- > > > > > > src/gallium/state_trackers/clover/api/dispatch.cpp | 2 +- >

Re: [Mesa-dev] [PATCH 3/3] clover: add clCompile

2014-10-10 Thread Tom Stellard
On Fri, Oct 10, 2014 at 07:51:40PM +0200, EdB wrote: > On Friday 10 October 2014 10:16:08 Tom Stellard wrote: > > On Thu, Oct 09, 2014 at 09:22:46PM +0200, EdB wrote: > > > On Thursday, October 09, 2014 06:29:40 AM Tom Stellard wrote: > > > > On Sun, Sep 28, 2014

Re: [Mesa-dev] [PATCH] r300/compiler: remove useless check

2014-10-14 Thread Tom Stellard
On Tue, Oct 14, 2014 at 03:27:58AM +0200, David Heidelberger wrote: > > This code is already in if (!variable->C->is_r500) so no need check > twice. > I've pushed this patch, thanks! -Tom > Signed-off-by: David Heidelberger > --- > src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c |

[Mesa-dev] [PATCH 2/3] r600g/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2

2014-10-16 Thread Tom Stellard
v2: - Drop dependency on LLVM >= 3.5.1 --- src/gallium/drivers/r600/evergreen_compute.c | 167 + .../drivers/r600/evergreen_compute_internal.h | 12 +- src/gallium/drivers/r600/r600_llvm.c | 71 ++--- src/gallium/drivers/r600/r600_llvm.h

[Mesa-dev] [PATCH 3/3] radeonsi/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2

2014-10-16 Thread Tom Stellard
v2: - Drop dependency on LLVM >= 3.5.1 - Rename si_create_shader() to si_shader_binary_read() --- src/gallium/drivers/radeonsi/si_compute.c | 79 ++- src/gallium/drivers/radeonsi/si_pipe.c| 4 ++ src/gallium/drivers/radeonsi/si_shader.c | 104 ++-

[Mesa-dev] [PATCH 1/3] gallium/radeon: Add query for symbol specific config information

2014-10-16 Thread Tom Stellard
This adds a query which allows drivers to access the config information of a specific function within the LLVM generated ELF binary. This makes it possible for the driver to handle ELF binaries with multiple kernels / global functions. --- src/gallium/drivers/radeon/r600_pipe_common.h | 8

Re: [Mesa-dev] clEnqueueNDRangeKerne return error -52 with off-line compiled kernel

2014-10-17 Thread Tom Stellard
On Fri, Oct 17, 2014 at 05:34:40PM +0200, Vincent DEDIEU wrote: > Hi > > > > I compiled the very last mesa package (V10.4.0-devel) on Ubuntu-14.04 with > AMD RADEON. > > > > On a test program when I used clCreateProgramWithSource() and > clBuildProgram(), my kernel works perfectly. > > >

Re: [Mesa-dev] [PATCH] clover: Require libelf

2014-10-21 Thread Tom Stellard
On Mon, Oct 20, 2014 at 05:44:53PM -0400, Jan Vesely wrote: > From: Jan Vesely > > CC: Tom Stellard > CC: Emil Velikov > CC: Francisco Jerez > Signed-off-by: Jan Vesely > --- > > This fixes clover build failures when building without radeon > > configu

Re: [Mesa-dev] [PATCH] clover: Fix build error with LLVM 3.4.

2014-10-21 Thread Tom Stellard
t; CXX llvm/libclllvm_la-invocation.lo > llvm/invocation.cpp: In function 'void {anonymous}::optimize(llvm::Module*, > unsigned int, const std::vector&)': > llvm/invocation.cpp:324:18: error: expected type-specifier >PM.add(new llvm::DataLayoutPas

Re: [Mesa-dev] [PATCH 3/3] radeonsi/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2

2014-10-21 Thread Tom Stellard
On Mon, Oct 20, 2014 at 01:06:34PM +0900, Michel Dänzer wrote: > On 17.10.2014 08:41, Tom Stellard wrote: > >v2: > > - Drop dependency on LLVM >= 3.5.1 > > Have you tested this patch with LLVM < 3.6? Yes, I tested them with 3.5 on both radeonsi and r600. > &

Re: [Mesa-dev] [PATCH] r600g: disable sqrt for the LLVM backend.

2014-10-21 Thread Tom Stellard
On Mon, Oct 20, 2014 at 10:53:21PM +0200, Christopher Egert wrote: > sqrt is not supported by the LLVM backend. > What version of LLVM are you using, and what error message are you seeing? -Tom > Fixes rendering errors in Passing by Still. > http://demozoo.org/productions/156/ > > Signed-off-b

[Mesa-dev] [PATCH 2/2] clover: Fix bug when binary programs are passed to clBuildProgram()

2014-10-21 Thread Tom Stellard
This was a regression introduced by 611d66fe4513e53bde052dd2bab95d448c909a2a Passing a binary program to clBuildProgram() is legal, but passing one to clCompileProgram() is not. --- src/gallium/state_trackers/clover/api/program.cpp | 21 - 1 file changed, 16 insertions(+), 5 d

[Mesa-dev] [PATCH 1/2] clover: Factor input validation of clCompileProgram into a new function

2014-10-21 Thread Tom Stellard
This factors out the validation that is common with clBuildProgram(). --- src/gallium/state_trackers/clover/api/program.cpp | 36 --- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/

Re: [Mesa-dev] [PATCH 3/5] clover: Add support for compiling to native object code v3

2014-10-21 Thread Tom Stellard
On Tue, Oct 21, 2014 at 12:16:12PM -0400, Jan Vesely wrote: > On Thu, 2014-10-09 at 11:07 -0400, Tom Stellard wrote: > > v2: > > - Split build_module_native() into three separate functions. > > - Code cleanups. > > > > v3: > > - More cleanups. >

Re: [Mesa-dev] [PATCH] clover: Add support for compiling to native object code v2

2014-10-24 Thread Tom Stellard
On Wed, Oct 08, 2014 at 12:06:20PM +0300, Francisco Jerez wrote: > Tom Stellard writes: > > > v2: > > - Split build_module_native() into three separate functions. > > - Code cleanups. > > --- > > .../state_trackers/clover/llvm/invocation.cpp | 200

Re: [Mesa-dev] [PATCH] glsl: Lower constant arrays to uniform arrays.

2014-10-24 Thread Tom Stellard
On Wed, Oct 15, 2014 at 05:32:11PM -0700, Kenneth Graunke wrote: > Consider GLSL code such as: > >const ivec2 offsets[] = > ivec2[](ivec2(-1, -1), ivec2(-1, 0), ivec2(-1, 1), > ivec2(0, -1), ivec2(0, 0), ivec2(0, 1), > ivec2(1, -1), ivec2(1, 0), ivec2(1, 1

Re: [Mesa-dev] [PATCH] clover: fix clBuildProgram Piglit regression

2014-11-02 Thread Tom Stellard
On Sun, Nov 02, 2014 at 08:03:31PM +0200, Francisco Jerez wrote: > EdB writes: > > > should trigger CL_INVALID_VALUE > > if device_list is NULL and num_devices is greater than zero. > > > > introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 > > Tom, can you just drop the the vector of device

[Mesa-dev] [PATCH] clover: Fix clBuildProgram piglit regression

2014-11-03 Thread Tom Stellard
Should trigger CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero. Introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 Reported by: EdB --- Hi Francisco, I understand what you are saying now about why we don't need to pass the vector of devices. It's because the de

Re: [Mesa-dev] [PATCH 1/1] clover: Fix build after llvm r221375

2014-11-06 Thread Tom Stellard
On Thu, Nov 06, 2014 at 11:46:41AM -0500, Jan Vesely wrote: > Signed-off-by: Jan Vesely I've pushed this, thanks! -Tom > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.c

Re: [Mesa-dev] [PATCH 1/1] clover: Fix build after llvm r221375

2014-11-12 Thread Tom Stellard
On Wed, Nov 12, 2014 at 07:36:04PM +0100, Laurent Carlier wrote: > Le jeudi 6 novembre 2014, 09:45:40 Tom Stellard a écrit : > > On Thu, Nov 06, 2014 at 11:46:41AM -0500, Jan Vesely wrote: > > > Signed-off-by: Jan Vesely > > > > I've pushed this, thanks! > &

Re: [Mesa-dev] [PATCH] llvmpipe: Avoid deadlock when unloading opengl32.dll

2014-11-12 Thread Tom Stellard
On Fri, Nov 07, 2014 at 04:52:25PM +, jfons...@vmware.com wrote: > From: José Fonseca > Hi Jose, This patch is causing random segfaults with OpenCL programs on radeonsi. I haven't been able to figure out exactly what is happening, so I was hoping you could help. I think the problem has som

Re: [Mesa-dev] [PATCH] llvmpipe: Avoid deadlock when unloading opengl32.dll

2014-11-13 Thread Tom Stellard
;t think that the Windows deadlock ever happens on Linux. > This solution works for me. Feel free to commit. I wonder if the problem may be the pipe-loader is unloading pipe_swrast.so before all the threads have finished. -Tom > Jose > > >

Re: [Mesa-dev] [PATCH] radeonsi: use minnum and maxnum LLVM intrinsics for MIN and MAX opcodes

2014-11-20 Thread Tom Stellard
On Thu, Nov 20, 2014 at 10:21:07PM +0100, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > So far it has been compiled into pretty ugly code (8 instructions or so > for either opcode). > --- > src/gallium/drivers/radeonsi/si_shader.c | 7 +++ &g

Re: [Mesa-dev] [PATCH 2/2] radeonsi: implement TGSI_OPCODE_BFI (v2)

2015-03-16 Thread Tom Stellard
On Sun, Mar 15, 2015 at 07:59:52PM +0100, Marek Olšák wrote: > From: Marek Olšák > > v2: Don't use the intrinsics, the shader backend can recognize these > patterns and generates optimal code automatically. Reviewed-by: Tom Stellard > --- > .../drivers/radeon/r

Re: [Mesa-dev] [PATCH 1/2] radeonsi: add a helper for extracting bitfields from parameters (v2)

2015-03-16 Thread Tom Stellard
On Sun, Mar 15, 2015 at 07:59:51PM +0100, Marek Olšák wrote: > From: Marek Olšák > > This will be used a lot (especially by tessellation). > > v2: don't use the bfe intrinsic Reviewed-by: Tom Stellard > --- > src/gallium/drivers

Re: [Mesa-dev] [PATCH 3/4] gallium: implement get_device_vendor() for existing drivers

2015-03-20 Thread Tom Stellard
On Wed, Mar 11, 2015 at 03:27:18PM +0100, Giuseppe Bilotta wrote: > The only hackish ones are llvmpipe and softpipe, which currently return > the same string as for get_vendor(), while ideally they should return > the CPU vendor. > > Signed-off-by: Giuseppe Bilotta Reviewed-b

[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set

2015-03-20 Thread Tom Stellard
The storage size for local kernel args can be queried before the arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param of clGetKernelWorkGroupInfo(). The spec says that if local kernel arguments have not been specified, then we should assume their size is 0. --- src/gallium/state_trackers

[Mesa-dev] [PATCH 2/3] clover: Add all the mandatory 1.1 extensions to the extension string

2015-03-20 Thread Tom Stellard
--- src/gallium/state_trackers/clover/api/device.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 04f293d..43e7475 100644 --- a/src/gallium/state_trackers/clover

[Mesa-dev] [PATCH 3/3] radeonsi/compute: Default to the same PIPE_SHADER_CAP values as other shader types

2015-03-20 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_pipe.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index f1a5388..545c156 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/

[Mesa-dev] [PATCH 1/3] clover: Add a space at the end of CL_DEVICE_OPENCL_C_VERSION

2015-03-20 Thread Tom Stellard
This is required by the spec. --- src/gallium/state_trackers/clover/api/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 5d1f4ab..04f293d 100644 --- a/src/galliu

[Mesa-dev] [PATCH] clover: The unit for CL_DEVICE_MEM_BASE_ADDR_ALIGN is bits not bytes

2015-03-20 Thread Tom Stellard
--- src/gallium/state_trackers/clover/api/device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 43e7475..bc93f91 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++

Re: [Mesa-dev] [PATCHv5 0/4] Separate device from driver vendor

2015-03-23 Thread Tom Stellard
On Sun, Mar 22, 2015 at 07:20:58AM +0100, Giuseppe Bilotta wrote: > OpenCL (as opposed to OpenGL) has separate vendor strings for the > implementation/driver/platform and the device. CL_PLATFORM_VENDOR > is akin to the GL_VENDOR string, while CL_DEVICE_VENDOR is supposed to > return the actual devi

[Mesa-dev] Force update in mesa/master

2015-03-23 Thread Tom Stellard
Hi, I just did a fetch from mesa git and I received a force update from mesa/master. The current head commit form that remote is: commit 1e02f2badfd925739099bcfaa55ca99a484470d8 Author: Tiziano Bacocco Date: Fri Feb 6 19:03:41 2015 +0100 nv50,nvc0: Mark PIPE_QUERY_TIMESTAMP_DISJOINT as re

Re: [Mesa-dev] Force update in mesa/master

2015-03-23 Thread Tom Stellard
On Mon, Mar 23, 2015 at 07:53:06AM -0700, Tom Stellard wrote: > Hi, > > I just did a fetch from mesa git and I received a force update from > mesa/master. > The current head commit form that remote is: > > commit 1e02f2badfd925739099bcfaa55ca99a484470d8 > Author: Tizian

[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set v2

2015-03-23 Thread Tom Stellard
The storage size for local kernel args can be queried before the arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param of clGetKernelWorkGroupInfo(). The spec says that if local kernel arguments have not been specified, then we should assume their size is 0. v2: - Implement using c++11

[Mesa-dev] [PATCH] radeonsi/compute: Default to the same PIPE_SHADER_CAP values as other shader types v2

2015-03-23 Thread Tom Stellard
v2: - Fix typo --- src/gallium/drivers/radeonsi/si_pipe.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index d335bda..c7773b7 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src

[Mesa-dev] [PATCH 2/2] clover: Add support for handling reqd_work_group_size attribute

2015-03-24 Thread Tom Stellard
This patch enables clover to return the correct value for CL_KERNEL_COMPILE_WORK_GROUP_SIZE and also verify that the correct local_work_size is used when enqueuing kernels with this attribute. --- src/gallium/state_trackers/clover/api/kernel.cpp | 9 +++- src/gallium/state_trackers/clover/core/

[Mesa-dev] [PATCH 1/2] clover: Use a structure to hold information about llvm kernel functions

2015-03-24 Thread Tom Stellard
--- .../state_trackers/clover/llvm/invocation.cpp | 71 +- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 4da62b9..28198a5 100644 --- a/src

Re: [Mesa-dev] [PATCH 1/2] clover: Use a structure to hold information about llvm kernel functions

2015-03-24 Thread Tom Stellard
On Tue, Mar 24, 2015 at 06:51:31PM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > --- > > .../state_trackers/clover/llvm/invocation.cpp | 71 > > +- > > 1 file changed, 41 insertions(+), 30 deletions(-) > > > > T

[Mesa-dev] [PATCH] clover: Return CL_BUILD_ERROR for CL_PROGRAM_BUILD_STATUS when compilation fails

2015-03-24 Thread Tom Stellard
Cc: 10.5 10.4 --- src/gallium/state_trackers/clover/core/program.cpp | 6 +- src/gallium/state_trackers/clover/core/program.hpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/pro

Re: [Mesa-dev] [PATCH] clover: Return CL_BUILD_ERROR for CL_PROGRAM_BUILD_STATUS when compilation fails

2015-03-24 Thread Tom Stellard
On Tue, Mar 24, 2015 at 10:36:19PM +0200, Francisco Jerez wrote: > Jan Vesely writes: > > > On Tue, 2015-03-24 at 22:24 +0200, Francisco Jerez wrote: > >> Tom Stellard writes: > >> > >> > Cc: 10.5 10.4 > >> > --- > >

[Mesa-dev] [PATCH] clover: Call clBuildProgram() notification function when build completes

2015-03-24 Thread Tom Stellard
Cc: 10.5 10.4 --- src/gallium/state_trackers/clover/api/program.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 60184ed..fcec1d7 100644 --- a/src/gallium/state_trackers/clover/

[Mesa-dev] [PATCH] clover: Update the wait_count of the correct event when chaining events

2015-03-25 Thread Tom Stellard
Cc: 10.5 10.4 --- src/gallium/state_trackers/clover/core/event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp index 58de888..9d78b48 100644 --- a/src/gallium/state_tracker

Re: [Mesa-dev] [PATCH] st/mesa: remove copy-propagation pass

2015-03-25 Thread Tom Stellard
On Wed, Mar 25, 2015 at 04:35:03PM -0400, Ilia Mirkin wrote: > On Wed, Mar 25, 2015 at 4:27 PM, Dave Airlie wrote: > > On 26 March 2015 at 06:07, Ilia Mirkin wrote: > >> So what do you do when someone goes to shadertoy.com which on > >> average uses 1000 temps? > > > > Fall over in a heap, li

<    5   6   7   8   9   10   11   12   13   14   >