Re: [Mesa-dev] [PATCH 1/2] pipe-loader: Don't destroy the winsys in the sw loader

2014-05-08 Thread Tom Stellard
On Thu, May 08, 2014 at 11:38:13PM -0400, Tom Stellard wrote: > The screen takes ownership of the winsys, and is responsible for > destroying it. Users of pipe-loader should make sure they destory > and screens they've created to avoid memory leaks. > I did not mean to send

[Mesa-dev] [PATCH 1/2] configure.ac: Add LLVM_VERSION_PATCH to DEFINES

2014-05-08 Thread Tom Stellard
--- configure.ac | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d6f21ea..c68db00 100644 --- a/configure.ac +++ b/configure.ac @@ -1605,6 +1605,12 @@ if test "x$enable_gallium_llvm" = xyes; then AC_COMPUTE_INT([LLVM_VERSION_MINO

[Mesa-dev] [PATCH 2/2] radeonsi: Enable geometry shaders with LLVM 3.4.1

2014-05-08 Thread Tom Stellard
--- I tested this patch with LLVM 3.4, 3.4.1, and 3.5 and observed the correct behavior for all three versions. src/gallium/drivers/radeonsi/si_descriptors.c | 4 ++-- src/gallium/drivers/radeonsi/si_pipe.c| 4 ++-- src/gallium/drivers/radeonsi/si_pipe.h| 4 src/gallium/d

[Mesa-dev] [PATCH] clover: Prevent Clang from printing number of errors and warnings to stderr.

2014-05-12 Thread Tom Stellard
https://bugs.freedesktop.org/show_bug.cgi?id=78581 CC: "10.1 10.2" --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp inde

Re: [Mesa-dev] [PATCH] clover: Prevent Clang from printing number of errors and warnings to stderr.

2014-05-12 Thread Tom Stellard
On Tue, May 13, 2014 at 01:23:03AM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > https://bugs.freedesktop.org/show_bug.cgi?id=78581 > > > > CC: "10.1 10.2" > > --- > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 >

Re: [Mesa-dev] [PATCH] clover: Prevent Clang from printing number of errors and warnings to stderr.

2014-05-13 Thread Tom Stellard
On Tue, May 13, 2014 at 11:35:36AM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > On Tue, May 13, 2014 at 01:23:03AM +0200, Francisco Jerez wrote: > >> Tom Stellard writes: > >> > >> > https://bugs.freedesktop.org/show_bug

Re: [Mesa-dev] [PATCH 1/3] gallium/radeon: build only a single common library libradeon

2014-05-14 Thread Tom Stellard
On Tue, May 13, 2014 at 12:15:01AM +0100, Emil Velikov wrote: > Just fold libllvmradeon in libradeon. For the series: Reviewed-by: Tom Stellard > > Signed-off-by: Emil Velikov > --- > src/gallium/drivers/r600/Makefile.am | 2 -- > src/gallium/drivers/radeon/

Re: [Mesa-dev] [RFC] clover: Attempt to make clover fail when a kernel fails to build

2014-05-15 Thread Tom Stellard
On Thu, May 15, 2014 at 06:22:11PM +0200, Francisco Jerez wrote: > Bruno Jimenez writes: > > > Hi, > > > > I'm trying to make clover fail in the case that a kernel fails to build. > > My first attempt has been to track a llvm compile failure up from > > 'radeon_llvm_compile' (at radeon/radeon_llv

Re: [Mesa-dev] [RFC] clover: Attempt to make clover fail when a kernel fails to build

2014-05-15 Thread Tom Stellard
On Thu, May 15, 2014 at 10:42:07PM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > On Thu, May 15, 2014 at 06:22:11PM +0200, Francisco Jerez wrote: > >> Bruno Jimenez writes: > >> > >> > Hi, > >> > > >> > I

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-19 Thread Tom Stellard
On Wed, Apr 17, 2013 at 07:54:32AM +0200, Mathias Fröhlich wrote: > > Tom, > > > -class LLVMEnsureMultithreaded { > > -public: > > - LLVMEnsureMultithreaded() > > - { > > - llvm_start_multithreaded(); > > - } > > -}; > > - > > -static LLVMEnsureMultithreaded lLVMEnsureMultithreaded; >

Re: [Mesa-dev] [PATCH] libclc: Add clamp(vec, scalar, scalar) and max(vec, scalar)

2013-04-19 Thread Tom Stellard
I've pushed all of your libclc patches to my repo. If I missed one, let me know. Thanks for the patches! -Tom On Sat, Apr 13, 2013 at 11:32:18AM -0500, Aaron Watry wrote: > For any GENTYPE that isn't scalar, we need to implement a mixed > vector/scalar version of clamp/max. > > This depends on

Re: [Mesa-dev] [PATCH v3] R600/SI: Add pattern for AMDGPUurecip

2013-04-19 Thread Tom Stellard
On Thu, Apr 11, 2013 at 10:12:01AM +0200, Christian König wrote: > Am 10.04.2013 18:50, schrieb Tom Stellard: > >On Wed, Apr 10, 2013 at 05:59:48PM +0200, Michel Dänzer wrote: > >>[SNIP] > >We should start using the updated pattern syntax for all new patterns. > >

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-21 Thread Tom Stellard
s it works stable if we ensure llvm being multithreaded. > > > > So, I tried to distill a piglit testcase out of this somehow huger setup > > with > > flightgear, OpenSceneGraph, multiple gpu's and what not. > > > > On Friday, April 19, 2013 20:08:54 Tom

[Mesa-dev] [PATCH 1/5] r600g/compute: Fix input buffer size calculation

2013-04-22 Thread Tom Stellard
From: Tom Stellard Buffer size should be in bytes not dwords. --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 189ffac..58dc36d

[Mesa-dev] [PATCH 2/5] r600g/compute: Don't use radeon_winsys::buffer_wait() after dispatching a kernel

2013-04-22 Thread Tom Stellard
From: Tom Stellard The state tracker should be responsible for waiting for the kernel to finish. --- src/gallium/drivers/r600/evergreen_compute.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c

[Mesa-dev] [PATCH 3/5] r600g: Add evergreen_emit_cs_constant_buffers()

2013-04-22 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_state.c | 34 +- src/gallium/drivers/r600/evergreend.h | 2 ++ src/gallium/drivers/r600/r600_pipe.h | 9 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 4/5] r600g/compute: Use a constant buffer to store kernel parameters

2013-04-22 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_compute.c | 47 +++--- .../drivers/r600/evergreen_compute_internal.h | 2 +- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers

[Mesa-dev] [PATCH 5/5] r600g/compute: Removed unused and untested code

2013-04-22 Thread Tom Stellard
From: Tom Stellard There was a lot of code in evergreen_compute_internal.c that was not being used at all and most of it was duplicating code from other parts of the driver. --- src/gallium/drivers/r600/Makefile.sources | 1 - src/gallium/drivers/r600/compute_resource.def | 38

[Mesa-dev] [PATCH 1/2] gallivm: Fix build with LLVM >= r180063

2013-04-23 Thread Tom Stellard
From: Tom Stellard --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 4 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 2 files changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index ac8e10b

[Mesa-dev] [PATCH 2/2] radeon/llvm: Fix build with LLVM >= r180063

2013-04-23 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index d2dc035..5b770d0 100644 --- a/src/gallium/drivers/radeon

[Mesa-dev] [PATCH] radeon/llvm: Fix segfault with a specifc libelf implementation

2013-04-23 Thread Tom Stellard
From: Tom Stellard The libelf implementation that is distributed here: http://www.mr511.de/software/english.html requires calling elf_version() prior to calling elf_memory() --- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium

[Mesa-dev] [PATCH] R600: Use SHT_PROGBITS for the .AMDGPU.config section

2013-04-23 Thread Tom Stellard
From: Tom Stellard The libelf implementation that is distributed here: http://www.mr511.de/software/english.html will not parse sections that are marked SHT_NULL. --- lib/Target/R600/AMDGPUAsmPrinter.cpp | 2 +- test/CodeGen/R600/elf.ll | 1 + 2 files changed, 2 insertions(+), 1

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-23 Thread Tom Stellard
with > flightgear, OpenSceneGraph, multiple gpu's and what not. > > On Friday, April 19, 2013 20:08:54 Tom Stellard wrote: > > On Wed, Apr 17, 2013 at 07:54:32AM +0200, Mathias Fröhlich wrote: > > > Tom, > > > > > > > -class LLVMEnsureMultithread

[Mesa-dev] [PATCH] r600g/llvm: Read stack size from .AMDGPU.config ELF section

2013-04-23 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/r600_llvm.c | 5 +++-- src/gallium/drivers/r600/r600_llvm.h | 3 ++- src/gallium/drivers/r600/r600_shader.c | 5 ++--- src/gallium/drivers/radeon/LLVM_REVISION.txt | 2 +- 4 files changed, 8 insertions(+), 7 deletions

Re: [Mesa-dev] [PATCH] r600g/llvm: Read stack size from .AMDGPU.config ELF section

2013-04-23 Thread Tom Stellard
Hi Vincent, I didn't see your Mesa commits from earlier today, so I wrote this patch. You can ignore it, but in your patch you forgot to update the compute shader path, which I think breaks the build with --enable-opencl. -Tom On Tue, Apr 23, 2013 at 08:49:43PM -0700, Tom Stellard

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-24 Thread Tom Stellard
On Wed, Apr 24, 2013 at 09:40:44PM +0200, Mathias Fröhlich wrote: > > Hi Tom, > > On Tuesday, April 23, 2013 20:47:24 Tom Stellard wrote: > > First of all, thanks for investigating this. The information you've > > provided has helped me a lot. > Good to hear tha

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-25 Thread Tom Stellard
On Wed, Apr 24, 2013 at 09:54:02PM -0700, Jose Fonseca wrote: > - Original Message - > > On Wed, Apr 24, 2013 at 09:40:44PM +0200, Mathias Fröhlich wrote: > > > > > > Hi Tom, > > > > > > On Tuesday, April 23, 2013 20:47:24 Tom Ste

[Mesa-dev] [PATCH] r600g/compute: Use a constant buffer to store kernel parameters v2

2013-04-25 Thread Tom Stellard
From: Tom Stellard v2: - Fix usage of set_constant_buffer() - Fix typo in comment --- src/gallium/drivers/r600/evergreen_compute.c | 46 +++--- .../drivers/r600/evergreen_compute_internal.h | 2 +- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a

[Mesa-dev] [PATCH] r600g: Add evergreen_emit_cs_constant_buffers() v2

2013-04-25 Thread Tom Stellard
From: Tom Stellard v2: - Bump R600_NUM_ATOMS --- src/gallium/drivers/r600/evergreen_state.c | 34 +- src/gallium/drivers/r600/evergreend.h | 2 ++ src/gallium/drivers/r600/r600_pipe.h | 11 +- 3 files changed, 36 insertions(+), 11 deletions

Re: [Mesa-dev] [PATCH 1/6] configure.ac: Remove unused HAVE_PIPE_LOADER_XLIB macro.

2013-04-25 Thread Tom Stellard
On Thu, Apr 25, 2013 at 12:02:05PM -0700, Matt Turner wrote: > Added in e1364530 but never used. For the series: Tested-by: Tom Stellard > --- > configure.ac |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/configure.ac b/configure.ac > i

[Mesa-dev] [PATCH 1/3] r600g/compute: Fix build error in debug code

2013-04-26 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 189ffac..8f19dfc 100644 --- a/src/gallium/drivers/r600

[Mesa-dev] [PATCH 2/3] r600g/compute: Use the GFX ring for compute

2013-04-26 Thread Tom Stellard
From: Tom Stellard Only Cayman has a separate compute ring, but it has some hw bugs, so to be safe we will stick with the GFX. --- src/gallium/drivers/r600/evergreen_compute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b

[Mesa-dev] [PATCH 3/3] r600g: Don't set the dest cache bits on surface sync for R600_CONTEXT_FLUSH_AND_INV

2013-04-26 Thread Tom Stellard
From: Tom Stellard We are already emitting a EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT packet when this flush flag is set, so flushing the dest caches with a SURFACE_SYNC should not be necessary. The motivation for this change is that emitting a SURFACE_SYNC packet with the CB bits set was causing

[Mesa-dev] [PATCH 1/2] R600: Fix encoding of CF_END_{EG, R600} instructions

2013-04-26 Thread Tom Stellard
From: Tom Stellard The EOP bit was not being encoded. --- lib/Target/R600/R600Instructions.td | 1 + test/CodeGen/R600/cf_end.ll | 6 ++ 2 files changed, 7 insertions(+) create mode 100644 test/CodeGen/R600/cf_end.ll diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target

[Mesa-dev] [PATCH 2/2] R600: Use correct CF_END instruction on Northern Island GPUs

2013-04-26 Thread Tom Stellard
From: Tom Stellard --- lib/Target/R600/R600ControlFlowFinalizer.cpp | 2 +- test/CodeGen/R600/cf_end.ll | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Target/R600/R600ControlFlowFinalizer.cpp b/lib/Target/R600/R600ControlFlowFinalizer.cpp index

[Mesa-dev] [PATCH 1/2] R600: Add some new processor variants

2013-04-29 Thread Tom Stellard
From: Tom Stellard --- lib/Target/R600/AMDILDeviceInfo.cpp | 2 +- lib/Target/R600/Processors.td | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/R600/AMDILDeviceInfo.cpp b/lib/Target/R600/AMDILDeviceInfo.cpp index 19792b7..1787959 100644 --- a/lib/Target

[Mesa-dev] [PATCH 2/2] R600: Clean up comments in Processors.td

2013-04-29 Thread Tom Stellard
From: Tom Stellard --- lib/Target/R600/Processors.td | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Target/R600/Processors.td b/lib/Target/R600/Processors.td index c2cc63a..730335d 100644 --- a/lib/Target/R600/Processors.td +++ b/lib/Target/R600/Processors.td

[Mesa-dev] [PATCH] r600g/llvm: Update radeon family mappings for LLVM backend

2013-04-29 Thread Tom Stellard
From: Tom Stellard New processors were added to the backend to distinguish between GPUs with and without vtx caches. --- src/gallium/drivers/r600/r600_pipe.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium

[Mesa-dev] R600 Patchset: Optimizations for bfgminer

2013-04-29 Thread Tom Stellard
oad/store support * Added R600_Reg64 class * Added T#Index#.XY registers definition * Added v2i32 register reads from parameter and global space * Added f32 and i32 elements extraction from v2f32 and v2i32 * Added v2i32 -> v2f32 conversions Signed-off-by: Dmitry Cherkassov Tom Stellard:

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-30 Thread Tom Stellard
On Sat, Apr 27, 2013 at 10:33:29AM +0200, Mathias Fröhlich wrote: > > Hi, > > On Thursday, April 25, 2013 10:29:27 Jose Fonseca wrote: > > - There are a bunch of options that need to be set via globals, (see > > lp_set_target_options), so app/drivers could tamper with each other > > options. > >

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-05-01 Thread Tom Stellard
On Wed, May 01, 2013 at 04:11:51PM +0200, Mathias Fröhlich wrote: > > Tom, Jose, > > On Tuesday, April 30, 2013 16:56:56 Tom Stellard wrote: > > I took the linker script from your email and took at shot at creating > > libMesaLLVM.so within Mesa. I've pushed m

[Mesa-dev] [PATCH] gallium: Fix build with LLVM >= r180881

2013-05-02 Thread Tom Stellard
From: Tom Stellard --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 - src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm

[Mesa-dev] [PATCH 3/3] radeon/llvm: Always build libradeonllvm as static

2013-05-02 Thread Tom Stellard
From: Tom Stellard This library is very small, so there is not much to gain from building it as a shared library. Also, when linking statically with LLVM, a shared libradeonllvm exports LLVM symbols and creates problems when used with other shared objects that also link statically to LLVM

[Mesa-dev] [PATCH 1/3] gallivm: Move LLVMStartMultithreaded() static initializer into gallivm

2013-05-02 Thread Tom Stellard
From: Tom Stellard This does not solve all of the problems with using LLVM in a multithreaded enivronment, but it should help in some cases. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 15 +++ src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 14 -- 2 files

[Mesa-dev] [PATCH 2/3] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA v2

2013-05-02 Thread Tom Stellard
From: Tom Stellard The LLVM C API is considered stable and should never change, so it is much more desirable to use than the LLVM C++ API, which is constantly in flux. v2: - Split target initialization and lookup into separate functions --- src/gallium/drivers/radeon/Makefile.am

Re: [Mesa-dev] [PATCH] gallium: Fix build with LLVM >= r180881

2013-05-02 Thread Tom Stellard
On Thu, May 02, 2013 at 05:18:51PM +0200, Armin K. wrote: > On 05/02/2013 04:56 PM, Tom Stellard wrote: > >From: Tom Stellard > > > >--- > > src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 - > > src/gallium/drivers/radeon/radeon_llvm_emit.c

Re: [Mesa-dev] [PATCH] r600g/llvm: Undefines unrequired texture coord values

2013-05-02 Thread Tom Stellard
On Tue, Apr 30, 2013 at 03:59:43PM +0200, Vincent Lejeune wrote: > This is a port of "r600g:mask unused source components for SAMPLE" > patch from Vadim Girlin. Reviewed-by: Tom Stellard Can you wrap those long line before you commit. > --- > src/gallium/drivers

[Mesa-dev] [PATCH] radeon/llvm: Don't use the global context when parsing LLVM IR

2013-05-02 Thread Tom Stellard
From: Tom Stellard This leads to crashes when multiple threads try to compile compute shaders in the same time. Fixes a crash in bfgminer when using more than one thread. --- src/gallium/drivers/radeon/radeon_llvm_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

Re: [Mesa-dev] [PATCH] r600g: don't emit surface_sync after FLUSH_AND_INV_EVENT

2013-05-03 Thread Tom Stellard
On Fri, May 03, 2013 at 10:01:00AM -0400, alexdeuc...@gmail.com wrote: > From: Alex Deucher > Reviewed-by: Tom Stellard > It shouldn't be needed since the FLUSH_AND_INV_EVENT has already > made sure the destination caches are flushed. Additionally, > we didn&#

[Mesa-dev] R600 Patchset: Emit true ISA

2013-05-03 Thread Tom Stellard
. Please test/review. Thanks, Tom >From 4fc6af0637de0eae0542a987e93d467bad3a4eee Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 3 May 2013 11:17:18 -0700 Subject: [PATCH 1/4] R600: Emit ISA for CALL_FS_* instructions --- lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 1 - t

[Mesa-dev] [PATCH 1/3] r600g/llvm: Don't emit CALL_FS for vertex shaders

2013-05-03 Thread Tom Stellard
From: Tom Stellard The LLVM backend takes care of this now. --- src/gallium/drivers/r600/r600_shader.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 9afd57f..b3b124e

[Mesa-dev] [PATCH 2/3] r600g/llvm: Don't feed LLVM output through r600_bytecode_build()

2013-05-03 Thread Tom Stellard
From: Tom Stellard The LLVM backend emits raw ISA now, so we can just its output unmodified. --- src/gallium/drivers/r600/r600_llvm.c | 11 +- src/gallium/drivers/r600/r600_llvm.h | 2 - src/gallium/drivers/r600/r600_shader.c | 401 ++--- 3 files changed, 20

[Mesa-dev] [PATCH 3/3] r600g/llvm: Parse config values in register / value pairs

2013-05-03 Thread Tom Stellard
From: Tom Stellard Rather than relying on a predetermined order for the config values. --- src/gallium/drivers/r600/r600_llvm.c | 33 ++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600

Re: [Mesa-dev] R600 Patchset: Emit true ISA

2013-05-06 Thread Tom Stellard
> Is it possible to use R600_InstFlag::VTX_INST and R600_InstFlag::TEX_INST > instead and to remove the switch() statement ? > >@@ -234,44 +207,6 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst > >&MI, raw_ostream &OS, > > Emit((u_int32_t) 0, OS); > &g

Re: [Mesa-dev] [RFC] R600/SI: New patterns and intrinsics for GLSL 1.30 support in radeonsi

2013-05-06 Thread Tom Stellard
they can hopefully make it into the LLVM 3.3 > release. > These all look good to me, for the series: Reviewed-by: Tom Stellard > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast |

[Mesa-dev] [PATCH] R600: Remove AMDILPeeopholeOptimizer and replace optimizations with tablegen patterns

2013-05-06 Thread Tom Stellard
From: Tom Stellard The BFE optimization was the only one we were actually using, and it was emitting an intrinsic that we don't support. https://bugs.freedesktop.org/show_bug.cgi?id=64201 --- lib/Target/R600/AMDGPUInstructions.td | 11 + lib/Target/R600/AMDGPUTargetMachine.cpp|

Re: [Mesa-dev] Mesa (master): gallivm: Move LLVMStartMultithreaded() static initializer into gallivm

2013-05-06 Thread Tom Stellard
On Mon, May 06, 2013 at 10:44:46AM -0600, Brian Paul wrote: > On 05/06/2013 10:09 AM, Tom Stellard wrote: > >Module: Mesa > >Branch: master > >Commit: 55eb8eaaa8bf8696d56effce6ed87f03bea779e0 > >URL: > >http://cgit.freedesktop.org/mesa/mesa/commit/?id=55eb8ea

Re: [Mesa-dev] Mesa (master): gallivm: Move LLVMStartMultithreaded() static initializer into gallivm

2013-05-06 Thread Tom Stellard
On Mon, May 06, 2013 at 09:51:31AM -0700, Tom Stellard wrote: > On Mon, May 06, 2013 at 10:44:46AM -0600, Brian Paul wrote: > > On 05/06/2013 10:09 AM, Tom Stellard wrote: > > >Module: Mesa > > >Branch: master > > >Commit: 55eb8eaaa8bf8696d56effce6ed8

Re: [Mesa-dev] [RFC] R600/SI: New patterns and intrinsics for GLSL 1.30 support in radeonsi

2013-05-06 Thread Tom Stellard
On Mon, May 06, 2013 at 09:30:58AM -0700, Tom Stellard wrote: > On Mon, May 06, 2013 at 06:23:05PM +0200, Michel Dänzer wrote: > > > > AFAICT these new patterns and intrinsics should be sufficient for full > > GLSL 1.30 support in radeonsi. > > > > I suspect thes

Re: [Mesa-dev] R600: Expand vselect and SRA for v2i32 and v4i32

2013-05-06 Thread Tom Stellard
On Mon, May 06, 2013 at 07:35:42PM -0500, Aaron Watry wrote: > These two patches fix a number of piglit OpenCL test failures on my > HD6850 (Barts). > > There are no piglit CL test regressions and the llvm make check runs > without any unexpected failures. > Hi Aaron, These patches look good to

Re: [Mesa-dev] [PATCH] R600: Remove AMDILPeeopholeOptimizer and replace optimizations with tablegen patterns

2013-05-08 Thread Tom Stellard
On Tue, May 07, 2013 at 10:48:53AM +0200, Christian König wrote: > Am 06.05.2013 18:48, schrieb Tom Stellard: > >From: Tom Stellard > > > >The BFE optimization was the only one we were actually using, and it was > >emitting an intrinsic that we don't support. >

Re: [Mesa-dev] R600: Various improvements

2013-05-13 Thread Tom Stellard
mall comments on patches 4 and 5. With those changes, this series is: Reviewed-by: Tom Stellard > From 3974315f153e67913f8cc4b4d52550bf6ab33e59 Mon Sep 17 00:00:00 2001 > From: Vincent Lejeune > Date: Sun, 12 May 2013 16:29:50 +0200 > Subject: [PATCH 4/5] R600: Rename 12

Re: [Mesa-dev] R600: Various improvements

2013-05-14 Thread Tom Stellard
t; have the abilities to swizzle their argument and output. Instead of printing > default swizzle for each 128 bits reg, rename T*.XYZW to T* and let > instructions > print potentially optimized swizzle themselve. Typo here: swizzle themselve -> swizzles themselves Both patche

Re: [Mesa-dev] [PATCH] gallivm: Fix build with LLVM >= 3.4 r181680.

2013-05-14 Thread Tom Stellard
On Sun, May 12, 2013 at 08:37:17PM -0700, Vinson Lee wrote: > Signed-off-by: Vinson Lee > --- Thanks Vinson, I've pushed this patch. > src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld

[Mesa-dev] [PATCH] clover: Support multiple devices in clCreateContextFromType()

2013-05-14 Thread Tom Stellard
From: Tom Stellard --- src/gallium/state_trackers/clover/api/context.cpp | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp index 3717441..e0fed31 100644 --- a

[Mesa-dev] [PATCH 1/2] R600: Pass MCSubtargetInfo reference to R600CodeEmitter

2013-05-14 Thread Tom Stellard
From: Tom Stellard --- Patches 1 and 2 are separate, so that patch number 2 can be applied cleanly to the 3.3 branch. lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp | 2 +- lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h | 3 ++- lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp

[Mesa-dev] [PATCH 2/2] R600: Fix encoding for R600 family GPUs

2013-05-14 Thread Tom Stellard
From: Tom Stellard https://bugs.freedesktop.org/show_bug.cgi?id=64193 https://bugs.freedesktop.org/show_bug.cgi?id=64257 https://bugs.freedesktop.org/show_bug.cgi?id=64320 NOTE: This is a candidate for the 3.3 branch. --- lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 7 +++ test

[Mesa-dev] [PATCH] radeon/llvm: Run standard optimization passes on compute shader modules

2013-05-14 Thread Tom Stellard
From: Tom Stellard The SROA and function inliner passes are espically important, because they optimize away unsupported features: functions and indirect private memory access. --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- src/gallium/drivers/radeon/radeon_llvm_util.c | 16

[Mesa-dev] [PATCH] radeon/llvm: Run standard optimization passes on compute shader modules

2013-05-14 Thread Tom Stellard
From: Tom Stellard The SROA and function inliner passes are espically important, because they optimize away unsupported features: functions and indirect private memory access. --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- src/gallium/drivers/radeon/radeon_llvm_util.c | 16

[Mesa-dev] R600/SI Patches: A few cleanups for compute

2013-05-15 Thread Tom Stellard
Hi, The attached patches add some new patterns and instructions for SI and are a prerequisite for more invasive compute shader changes that I'm working on. Please Review. -Tom >From 5b87402d1290df5ec8bdbe1333cadb5739a8c8bd Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 May

Re: [Mesa-dev] R600/SI Patches: A few cleanups for compute

2013-05-16 Thread Tom Stellard
On Thu, May 16, 2013 at 08:21:36AM -0700, Vincent Lejeune wrote: > Hi, > > > >-- next part -- > >>From dc547a89dac5039ce521f3c27fb23346251d488d Mon Sep 17 00:00:00 2001 > >>>From: Tom Stellard > >Date: Tue, 7 May 2013 16:26:2

Re: [Mesa-dev] [PATCH] r600g: fixup for MSAA texture support checking

2013-05-16 Thread Tom Stellard
On Thu, May 16, 2013 at 12:09:23AM +0200, Niels Ole Salscheider wrote: > Signed-off-by: Niels Ole Salscheider > --- Pushed. Thanks. -Tom > src/gallium/drivers/r600/r600_shader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/r600/r600_shader.c >

[Mesa-dev] [PATCH 1/2] r600g/compute: Use common transfer_{map, unmap} functions for kernel inputs

2013-05-17 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_compute.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 5f67759..4d490c4 100644 --- a/src/gallium

[Mesa-dev] [PATCH 2/2] r600g/compute: Use common transfer_{map, unmap} functions for global resources

2013-05-17 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_compute.c | 68 ++-- 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 4d490c4..6d26b8e 100644 --- a

Re: [Mesa-dev] [PATCH 1/4] r600g/llvm: Factorize code loading from const buffer.

2013-05-20 Thread Tom Stellard
On Mon, May 20, 2013 at 04:49:19PM +0200, Vincent Lejeune wrote: > --- For the series: Reviewed-by: Tom Stellard > src/gallium/drivers/r600/r600_llvm.c | 51 > +--- > 1 file changed, 24 insertions(+), 27 deletions(-) > > diff --git a/src/ga

Re: [Mesa-dev] [PATCH 1/2] r600g/llvm: fix sample cube shadow

2013-05-22 Thread Tom Stellard
On Tue, May 21, 2013 at 04:34:51PM +0200, Vincent Lejeune wrote: For the series: Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium

[Mesa-dev] [PATCH libclc] Add bitselect builtin

2013-05-23 Thread Tom Stellard
From: Tom Stellard --- generic/include/clc/clc.h | 1 + generic/include/clc/relational/bitselect.h | 1 + 2 files changed, 2 insertions(+) create mode 100644 generic/include/clc/relational/bitselect.h diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h index

[Mesa-dev] radeonsi compute improvements

2013-05-24 Thread Tom Stellard
Hi, These patches along with the associated LLVM changes improve compute support on radeonsi to the point were it can run a number of simple apps, including the bitcoin mining program bfgminer. Patch #4 re-introduces the r600_upload_const_buffer() function that was removed in eb19163a4dd3d7bfeed

[Mesa-dev] [PATCH 1/5] radeonsi/compute: Add missing PIPE_COMPUTE caps

2013-05-24 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeonsi/radeonsi_pipe.c | 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index b988e72..7a79db3 100644 --- a/src/gallium/drivers/radeonsi

[Mesa-dev] [PATCH 3/5] radeonsi/compute: Implement un-binding of global buffers

2013-05-24 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeonsi/radeonsi_compute.c | 31 +++-- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/radeonsi_compute.c index 1ae7d9b..3fb6eb1 100644

[Mesa-dev] [PATCH 4/5] radeonsi/compute: Pass kernel arguments in a buffer

2013-05-24 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeonsi/r600_buffer.c | 31 + src/gallium/drivers/radeonsi/radeonsi_compute.c | 26 ++--- src/gallium/drivers/radeonsi/si_state.c | 29 +++ 3 files changed, 51 insertions(+), 35

[Mesa-dev] [PATCH 2/5] radeonsi/compute: Support multiple kernels in a compute program

2013-05-24 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeonsi/radeonsi_compute.c | 27 - 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/radeonsi_compute.c index e67d127..1ae7d9b 100644

[Mesa-dev] [PATCH 5/5] radeonsi/compute: Upload work group, work item size in input buffer

2013-05-24 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/radeonsi/radeonsi_compute.c | 38 ++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_compute.c b/src/gallium/drivers/radeonsi/radeonsi_compute.c index 035076d..3abf50b 100644

Re: [Mesa-dev] [PATCH 4/5] radeonsi/compute: Pass kernel arguments in a buffer

2013-05-24 Thread Tom Stellard
This was the problem, thanks for spotting it! u_upload_data() was deleting the old buffer, so by initializing rbuffer to NULL, the old buffer was never being deleted. An updated patch is on the way. -Tom > Patrick > > > On Fri, May 24, 2013 at 1:07 PM, Tom Stellard wrote:

[Mesa-dev] [PATCH] radeonsi/compute: Pass kernel arguments in a buffer v2

2013-05-24 Thread Tom Stellard
From: Tom Stellard v2: - Fix memory leak in si_set_constant_buffer() --- src/gallium/drivers/radeonsi/r600_buffer.c | 29 + src/gallium/drivers/radeonsi/radeonsi_compute.c | 26 ++ src/gallium/drivers/radeonsi/si_state.c | 23

Re: [Mesa-dev] libclc: vload/vstore initial implementation

2013-05-24 Thread Tom Stellard
On Thu, May 23, 2013 at 07:49:39PM -0500, Aaron Watry wrote: > I've implemented the OpenCL vload/vstore builtin functions in two parts. > 1) Pure CL C implementation. No Assembly > 2) Add assembly optimizations for 32-bit int/uint loads/stores of 4+ component >vectors > > Note: The vstore impl

Re: [Mesa-dev] [PATCH] radeonsi needs libLLVMipo.

2013-05-28 Thread Tom Stellard
On Tue, May 28, 2013 at 12:21:20PM +0200, Michel Dänzer wrote: > On Die, 2013-05-28 at 04:16 +0200, Andreas Hartmetz wrote: > > --- > > configure.ac | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/configure.ac b/configure.ac > > index eef4327..486a4e9 100644 > > --- a/configure.ac

Re: [Mesa-dev] [PATCH v2] radeonsi needs libLLVMipo.

2013-05-28 Thread Tom Stellard
On Tue, May 28, 2013 at 11:59:41PM +0200, Andreas Hartmetz wrote: > r600g needs it too, so add ipo in the common radeon_llvm_check(). > > radeonsi compiled and linked, but it failed at dynamic link time > with a missing symbol. Pushed, thanks! -Tom > --- > configure.ac | 4 ++-- > 1 file chang

Re: [Mesa-dev] [PATCH 1/2] r600g: add ISA info for RAT instructions

2013-05-29 Thread Tom Stellard
On Mon, May 27, 2013 at 02:15:21AM +0400, Vadim Girlin wrote: > This will help to improve dumps of the compute shaders, > also it will be required for complete handling of RAT instructions in sb. > > Signed-off-by: Vadim Girlin > --- > src/gallium/drivers/r600/r600_isa.c | 19 ++ > src/gall

Re: [Mesa-dev] [PATCH] r600g: fix mega_fetch_count

2013-06-05 Thread Tom Stellard
On Tue, Jun 04, 2013 at 12:46:02AM +0200, Grigori Goronzy wrote: > According to ISA docs, the range is 1..64, so effectively > bytes_to_fetch-1. As far as I can tell this patch is correct, though I'm not sure what impact this really has on the shader. Reviewed-by: Tom Stellard &

[Mesa-dev] [PATCH] clover: Don't segfault when compiling a program with no kernel

2013-06-05 Thread Tom Stellard
From: Tom Stellard --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 2d115ed..8ec089d 100644 --- a/src/gallium

Re: [Mesa-dev] R600/SI: Intrinsics for derivatives

2013-06-07 Thread Tom Stellard
ts to > pass. > > For the series: Reviewed-by: Tom Stellard ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] R600/SI: Intrinsics for derivatives

2013-06-07 Thread Tom Stellard
On Fri, Jun 07, 2013 at 05:24:42PM +0200, Michel Dänzer wrote: > > The most important difference to the previous version of these is that > whole quad mode is now enabled and M0 initialized appropriately for the > LDS instructions, which now allows all of the relevant piglit tests to > pass. > Hi

Re: [Mesa-dev] R600/SI: Intrinsics for derivatives

2013-06-08 Thread Tom Stellard
On Fri, Jun 07, 2013 at 05:48:05PM -0700, Tom Stellard wrote: > On Fri, Jun 07, 2013 at 05:24:42PM +0200, Michel Dänzer wrote: > > > > The most important difference to the previous version of these is that > > whole quad mode is now enabled and M0 initialized appropri

Re: [Mesa-dev] [PATCH] winsys/radeon: add env var to disable VM on Cayman/Trinity

2013-06-10 Thread Tom Stellard
or doing this. Reviewed-by: Tom Stellard > --- > src/gallium/winsys/radeon/drm/radeon_drm_winsys.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c > b/src/gallium/winsys/radeon/drm/radeon_dr

[Mesa-dev] [PATCH libclc] Implement barrier() builtin

2013-06-12 Thread Tom Stellard
From: Tom Stellard --- r600/lib/SOURCES | 2 ++ r600/lib/synchronization/barrier.cl | 15 +++ r600/lib/synchronization/barrier_impl.ll | 12 3 files changed, 29 insertions(+) create mode 100644 r600/lib/synchronization/barrier.cl create

[Mesa-dev] [PATCH 1/2] r600g/compute: Move compute_shader_create() function into evergreen_compute.c

2013-06-12 Thread Tom Stellard
From: Tom Stellard --- src/gallium/drivers/r600/evergreen_compute.c | 23 +++- src/gallium/drivers/r600/r600_shader.c | 32 2 files changed, 22 insertions(+), 33 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src

[Mesa-dev] [PATCH 2/2] r600g/compute: Accept LDS size from the LLVM backend

2013-06-12 Thread Tom Stellard
From: Tom Stellard And allocate the correct amount before dispatching the kernel. --- src/gallium/drivers/r600/evergreen_compute.c | 53 +++--- .../drivers/r600/evergreen_compute_internal.h | 1 + src/gallium/drivers/r600/evergreen_state.c | 6 +-- src

Re: [Mesa-dev] R600 Patches: Add support for the local address space

2013-06-13 Thread Tom Stellard
On Wed, Jun 12, 2013 at 06:37:39PM -0700, Matt Arsenault wrote: > On 06/12/2013 05:42 PM, Tom Stellard wrote: > >Hi, > > > >The attached patches add support for local address space on > >Evergreen / Northern Islands GPUs. > > > >Please Review. > >

Re: [Mesa-dev] [PATCH 1/2] r600g/compute: Move compute_shader_create() function into evergreen_compute.c

2013-06-13 Thread Tom Stellard
On Thu, Jun 13, 2013 at 05:51:49PM -0500, Aaron Watry wrote: > On Wed, Jun 12, 2013 at 7:34 PM, Tom Stellard wrote: > > From: Tom Stellard > > > > --- > > src/gallium/drivers/r600/evergreen_compute.c | 23 +++- > > src/gallium/driv

<    2   3   4   5   6   7   8   9   10   11   >