Re: [Mesa-dev] [PATCH] clover: Fix building with latest llvm

2014-03-03 Thread Tom Stellard
On Sat, Mar 01, 2014 at 11:51:24PM +0100, Bruno Jiménez wrote: > Recently, llvm has changed to use c++11, so we also should use it > --- > src/gallium/state_trackers/clover/Makefile.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/M

Re: [Mesa-dev] [PATCH] clover: Fix build since LLVM's switch to c++11

2014-03-03 Thread Tom Stellard
On Mon, Mar 03, 2014 at 08:03:23AM -0800, Tom Stellard wrote: > --- > > This patch should work for older LLVM versions too. Disregard this, there is a better fix already on the list. -Tom > > configure.ac | 5 + > src/gallium/sta

Re: [Mesa-dev] [PATCH] clover: Fix building with latest llvm

2014-03-03 Thread Tom Stellard
On Mon, Mar 03, 2014 at 08:05:26AM -0800, Tom Stellard wrote: > On Sat, Mar 01, 2014 at 11:51:24PM +0100, Bruno Jiménez wrote: > > Recently, llvm has changed to use c++11, so we also should use it > > --- > > src/gallium/state_trackers/clover/Makefile.am | 4 ++-- > > 1

Re: [Mesa-dev] [PATCH 19/20] configure: update enable-llvm-shared-libs comments

2014-03-04 Thread Tom Stellard
pilation problems. > > XXX: Tom please update the wiki [1]. Currently it lists the old configure > switch --with-llvm-shared-libs I've updated the wiki. The patch is: Reviewed-by: Tom Stellard > > [1] http://dri.freedesktop.org/wiki/GalliumCompute/ > > Cc:

[Mesa-dev] [PATCH 1/3] radeon: Rename struct radeon_llvm_binary to radeon_shader_binary

2014-03-05 Thread Tom Stellard
And move its definition into r600_pipe_common.h; This struct is a just a container for shader code and has nothing to do with LLVM. --- src/gallium/drivers/r600/r600_llvm.c | 4 ++-- src/gallium/drivers/radeon/Makefile.am| 1 + src/gallium/drivers/radeon/r600_pipe_common.h | 16

[Mesa-dev] [PATCH 3/3] clover: Inline all functions for drivers that don't support subroutines

2014-03-05 Thread Tom Stellard
--- src/gallium/drivers/radeon/radeon_llvm_util.c | 35 -- .../state_trackers/clover/core/compiler.hpp| 3 +- src/gallium/state_trackers/clover/core/device.cpp | 6 +++ src/gallium/state_trackers/clover/core/device.hpp | 1 + src/gallium/state_trackers/clover/core/pro

[Mesa-dev] [PATCH 2/3] radeon/llvm: Factor elf parsing code out into its own function

2014-03-05 Thread Tom Stellard
IM, DAMAGES OR OTHER + * LIABILITY, 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_elf_util.h" +#include "r6

[Mesa-dev] [PATCH] R600/SI: Custom lower i1 stores

2014-03-05 Thread Tom Stellard
These are sometimes created by the shrink to boolean optimization in the globalopt pass. --- lib/Target/R600/SIISelLowering.cpp | 6 ++ test/CodeGen/R600/store.ll | 23 --- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lib/Target/R600/SIISelLoweri

Re: [Mesa-dev] [PATCH 1/3] radeon: Rename struct radeon_llvm_binary to radeon_shader_binary

2014-03-06 Thread Tom Stellard
On Thu, Mar 06, 2014 at 11:57:29AM +0900, Michel Dänzer wrote: > On Mit, 2014-03-05 at 21:25 -0500, Tom Stellard wrote: > > And move its definition into r600_pipe_common.h; This struct is a just > > a container for shader code and has nothing to do with LLVM. > > Well, i

Re: [Mesa-dev] [PATCH 3/3] clover: Inline all functions for drivers that don't support subroutines

2014-03-06 Thread Tom Stellard
On Thu, Mar 06, 2014 at 01:45:36PM +0100, Francisco Jerez wrote: > Tom Stellard writes: > > > --- > > src/gallium/drivers/radeon/radeon_llvm_util.c | 35 -- > > .../state_trackers/clover/core/compiler.hpp| 3 +- > > src/gallium/state_t

Re: [Mesa-dev] [PATCH] clover: Fix build against LLVM SVN r203065 or newer

2014-03-06 Thread Tom Stellard
On Fri, Mar 07, 2014 at 10:49:59AM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > llvm/Linker.h was moved to llvm/Linker/Linker.h. > > Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 4

[Mesa-dev] [PATCH] radeon: Include radeon_elf_util.c in the list of LLVM_C_FILES

2014-03-07 Thread Tom Stellard
This fixes the a build breakage caused by 6974eb907600b9d0176d3158ff0fd30ac3e56a55 on build configurations where all the following are true: 1. radeonsi is not being built 2. r600g is being built 3. opencl is disabled 4. --enable-r600-llvm-compiler is not being used 5. libelf is not installed ---

[Mesa-dev] [PATCH] radeon: Include radeon_elf_util.c in the list of LLVM_C_FILES v2

2014-03-07 Thread Tom Stellard
This fixes the a build breakage caused by 6974eb907600b9d0176d3158ff0fd30ac3e56a55 on build configurations where all the following are true: 1. radeonsi is not being built 2. r600g is being built 3. opencl is disabled 4. --enable-r600-llvm-compiler is not being used 5. libelf is not installed v2:

Re: [Mesa-dev] Question on OpenCL Image Support for r600g/radeonsi

2014-03-10 Thread Tom Stellard
On Sun, Mar 09, 2014 at 12:28:01AM +0530, ANUJ SHARMA wrote: > Hello Sir , > I am Anuj Sharma from India. I am pursuing my M.Tech Degree at Indian > Institute of Technology, Kanpur, India. > Sir Where Can i get the more detail on what should we need to implement for > the "OpenCL Image Support".

Re: [Mesa-dev] [PATCH 1/3] r600g, radeonsi: use a fallback in dma_copy instead of failing

2014-03-11 Thread Tom Stellard
On Tue, Mar 11, 2014 at 12:37:15PM -0400, Jan Vesely wrote: > On Tue, 2014-03-11 at 11:37 -0400, Jan Vesely wrote: > > On Tue, 2014-03-11 at 15:09 +0100, Marek Olšák wrote: > > > From: Marek Olšák > > > > > > v2: - allow byte-aligned DMA buffer copies on Evergreen > > > - fix piglit/texsubima

[Mesa-dev] PATCH: R600/SI: Instruction verifier improvements

2014-03-12 Thread Tom Stellard
full run on my Boanire system without hangs, so I would feel better if someone else was able to test these. -Tom >From a31bd001e5b2705c32edce4950bb403c1dc1f010 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 11 Mar 2014 10:11:55 -0400 Subject: [PATCH 1/3] R600/SI: Add generic checks

Re: [Mesa-dev] Resetting Video card without rebooting?

2014-03-17 Thread Tom Stellard
On Mon, Mar 17, 2014 at 03:36:37PM +, Dorrington, Albert wrote: > I'm curious if there is any way to reset/restart the video card via Mesa or > the libdrm drivers? > > I'm currently doing development against the OpenCL drivers, and getting the > video card into a state where is will not resp

Re: [Mesa-dev] GSoC: OpenCL Image

2014-03-17 Thread Tom Stellard
On Sun, Mar 16, 2014 at 12:14:29AM +0100, Marek Skalický wrote: > Hi, > My name is Marek Skalický. I am 20 years old and I study Applied > informatics at Masaryk university in Brno. > And I am interested in GSoC project about implementing OpenCL Image > Support into r600g/radeonsi. > > I would lik

Re: [Mesa-dev] OpenCL Image Support

2014-03-18 Thread Tom Stellard
On Mon, Mar 17, 2014 at 10:50:18PM -0400, Aditya Avinash wrote: > Hi, > I am a student. I have experience in OpenCL for 3 years. I would like to > know what need to be done exactly. > Hi, The first thing you need to do is write a proposal. I would recommend writing a rough draft, uploading it to

Re: [Mesa-dev] OpenCL Image Support

2014-03-19 Thread Tom Stellard
ecific model numbers). Don't worry if you don't have a supported AMD GPU. If your proposal is accepted there will be plenty of time for you to get one and many of the older Evergreen GPUs can be obtained very inexpensively. -Tom > > On Tue, Mar 18, 2014 at 9:14 PM, Tom Stellard

Re: [Mesa-dev] [PATCH] Revert "build: llvm libs may not be in system search path, add rpath"

2014-03-19 Thread Tom Stellard
f the llvm path happens to be where other libs also reside. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76082 Reviewed-by: Tom Stellard > Signed-off-by: Ilia Mirkin > --- > configure.ac | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/configure.ac b/confi

Re: [Mesa-dev] Wrong colors in 3D apps on big-endian systems

2014-03-21 Thread Tom Stellard
On Fri, Mar 21, 2014 at 05:47:56PM +0100, Christian Zigotzky wrote: > Hi All, > > I have compiled LLVM 3.4 and Mesa 10.0.4 without any changes. > > Here is the result of this test. > > -> glxinfo | grep OpenGL > > terminate called after throwing an instance of 'std::bad_alloc' > what(): std:

Re: [Mesa-dev] OpenCL/clover buffers vs images

2014-03-24 Thread Tom Stellard
On Mon, Mar 24, 2014 at 02:35:04PM +, Dorrington, Albert wrote: > I have been experimenting with adding image support to the clover > implementation, and have been trying to understand the differences between > the existing buffer support and what would be required to support images. > > Fro

Re: [Mesa-dev] [PATCH 2/2] clover: clCompileProgram CL_INVALID_COMPILER_OPTIONS

2014-12-02 Thread Tom Stellard
On Mon, Nov 10, 2014 at 07:04:54PM +0200, Francisco Jerez wrote: > EdB writes: > > > clCompileProgram should return CL_INVALID_COMPILER_OPTIONS > > instead of CL_INVALID_BUILD_OPTIONS > > Looks good to me, > Reviewed-by: Francisco Jerez I've pushed this, thanks! -Tom > > > --- > > src/galli

Re: [Mesa-dev] [PATCH 1/1] r600, llvm: Fix mem leak

2014-12-02 Thread Tom Stellard
On Mon, Dec 01, 2014 at 06:33:10PM -0500, Jan Vesely wrote: > ping I've pushed this, thanks. -Tom > > On Mon, 2014-11-03 at 20:29 -0500, Jan Vesely wrote: > > Signed-off-by: Jan Vesely > > --- > > src/gallium/drivers/r600/r600_llvm.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --g

Re: [Mesa-dev] [PATCH 1/1] r600: upload implicit arguments even if there are no explicit args

2014-12-02 Thread Tom Stellard
On Mon, Nov 03, 2014 at 08:29:37PM -0500, Jan Vesely wrote: > Signed-off-by: Jan Vesely > --- > > moreover, the condition is never true now that clover appends dim info > > src/gallium/drivers/r600/evergreen_compute.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/src/gallium/driv

Re: [Mesa-dev] [PATCH 1/1] r600, llvm: Don't leak global symbol offsets

2014-12-02 Thread Tom Stellard
On Tue, Dec 02, 2014 at 02:47:53PM -0500, Jan Vesely wrote: > Signed-off-by: Jan Vesely I've pushed this, thanks! -Tom > --- > > You were right, this one was leaking too. > > src/gallium/drivers/r600/r600_llvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/drivers/r6

[Mesa-dev] [PATCH] gallivm: Fix build with LLVM 3.6

2014-12-02 Thread Tom Stellard
As of r223183 EngineBuilder::setMCJITMemoryManager() takes a unique_ptr. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index fe3c754..5c01f53

[Mesa-dev] [PATCH 2/2] radeonsi/compute: Clamp COMPUTE_TMPRING_SIZE.WAVES to: num_cu * 32

2014-12-05 Thread Tom Stellard
This is the maximum value allowed for this field. --- src/gallium/drivers/radeonsi/si_compute.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 6ddb478..bf935dc 100644 --- a/src/gallium/drivers/rade

[Mesa-dev] [PATCH 1/2] winsys/radeon: Always report at least 1 compute unit

2014-12-05 Thread Tom Stellard
All uses of this require that the value be at least one, so it's easier to report at least one than having to wrap all uses in MAX2(max_compute_units, 1). --- src/gallium/drivers/radeon/r600_pipe_common.c | 2 +- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 2 ++ 2 files changed, 3 inse

Re: [Mesa-dev] [PATCH] radeonsi: Don't modify PA_SC_RASTER_CONFIG register value if rb_mask == 0

2014-12-09 Thread Tom Stellard
his correctly and > would probably mangle the value badly. > Reviewed-by: Tom Stellard > Cc: "10.4 10.3" > Signed-off-by: Michel Dänzer > --- > src/gallium/drivers/radeonsi/si_state.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > >

Re: [Mesa-dev] [PATCH] clover: Fix build after llvm r223802

2014-12-09 Thread Tom Stellard
On Tue, Dec 09, 2014 at 05:42:42PM -0600, Aaron Watry wrote: > Signed-off-by: Aaron Watry Reviewed-by: Tom Stellard > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/gallium/state_trackers/clover/l

Re: [Mesa-dev] [PATCH 2/7] clover: Dump the OpenCL C code earlier

2014-12-19 Thread Tom Stellard
On Sun, Dec 14, 2014 at 11:31:22AM +0100, EdB wrote: > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp > b/src/gallium/state_trackers/clover/llvm/invoc

Re: [Mesa-dev] [PATCH 3/7] clover: split module::section::text

2014-12-19 Thread Tom Stellard
On Sun, Dec 14, 2014 at 11:31:23AM +0100, EdB wrote: > OpenCL 1.2 make distinction between 3 binaries kind: > executable as produce by clBuildProgram and clLinkProgam > compiled as produce by clCompileProgram > library as produce by clLinkProgam with -create-library option s/produce/produced/

Re: [Mesa-dev] [PATCH 2/7] clover: Dump the OpenCL C code earlier

2014-12-19 Thread Tom Stellard
On Fri, Dec 19, 2014 at 10:21:59PM +0100, EdB wrote: > On Friday, December 19, 2014 01:08:31 PM Tom Stellard wrote: > > On Sun, Dec 14, 2014 at 11:31:22AM +0100, EdB wrote: > > > --- > > > > > > src/gallium/state_trackers/clover/llvm/invocation.cpp | 6 +++---

[Mesa-dev] [PATCH 2/2] radeon/llvm: Use amdgcn triple for SI+ on LLVM >= 3.6

2014-12-23 Thread Tom Stellard
--- src/gallium/drivers/radeon/r600_pipe_common.c | 11 +-- src/gallium/drivers/radeon/radeon_llvm_emit.c | 21 ++--- src/gallium/drivers/radeon/radeon_llvm_emit.h | 2 +- src/gallium/drivers/radeonsi/si_pipe.c| 9 +++-- 4 files changed, 27 insertions(+), 16 d

[Mesa-dev] [PATCH 1/2] radeonsi: Cache LLVMTargetMachine object in si_screen

2014-12-23 Thread Tom Stellard
Rather than building a new one every compile. This should reduce some of the overhead of compiling shaders. One consequence of this change is that we lose the MachineInstrs dumps when dumping the shaders via R600_DEBUG. The LLVM IR and assembly is still dumped, and if you still want to see the M

Re: [Mesa-dev] [PATCH 1/2] radeonsi: Cache LLVMTargetMachine object in si_screen

2015-01-06 Thread Tom Stellard
On Wed, Dec 24, 2014 at 12:48:31PM +0900, Michel Dänzer wrote: > On 24.12.2014 02:49, Tom Stellard wrote: > > Rather than building a new one every compile. This should reduce some > > of the overhead of compiling shaders. > > Thanks, though unfortunately it doesn't se

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-06 Thread Tom Stellard
On Mon, Jan 05, 2015 at 12:18:43AM +0100, Marek Olšák wrote: > From: Marek Olšák > > --- > src/gallium/drivers/radeon/radeon_llvm_emit.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c > b/src/gallium/drivers/radeon/radeon_llvm_emit.c > in

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-06 Thread Tom Stellard
d forget to also remove this attribute. -Tom > Marek > > On Wed, Jan 7, 2015 at 12:51 AM, Tom Stellard wrote: > > On Mon, Jan 05, 2015 at 12:18:43AM +0100, Marek Olšák wrote: > >> From: Marek Olšák > >> > >> --- > >> src/gallium/driver

Re: [Mesa-dev] [PATCH 04/13] radeonsi: enable LLVM optimizations that assume no NaNs for non-compute shaders

2015-01-07 Thread Tom Stellard
On Wed, Jan 07, 2015 at 12:58:12PM +0100, Marek Olšák wrote: > How about the attached patch? > Looks good, thanks. Reviewed-by: Tom Stellard > Marek > > On Wed, Jan 7, 2015 at 1:23 AM, Tom Stellard wrote: > > On Wed, Jan 07, 2015 at 01:13:37AM +0100, Marek Olšák wrot

[Mesa-dev] [PATCH] radeonsi: Fix crash when destroying si_screen

2015-01-07 Thread Tom Stellard
We need to dispose the cached LLVMTargetMachine before calling r600_destory_common_screen(), because this function frees the si_screen object which invalidates LLVMTargetMachine pointer. https://bugs.freedesktop.org/show_bug.cgi?id=88170 --- src/gallium/drivers/radeonsi/si_pipe.c | 6 -- 1 fi

Re: [Mesa-dev] [PATCH 01/13] radeonsi: reduce the size of si_pm4_state

2015-01-07 Thread Tom Stellard
On Mon, Jan 05, 2015 at 12:18:40AM +0100, Marek Olšák wrote: > From: Marek Olšák > > - the relocs array is unused, remove it > - ndw is at most 115 (init), set 140 as the maximum > - compute needs 4 buffers per state, graphics only needs 1; set 4 as the > maximum The number of buffers per state

[Mesa-dev] [PATCH 1/4] radeon: Teach radeon_elf_read() how to parse reloc information

2015-01-07 Thread Tom Stellard
--- src/gallium/drivers/radeon/r600_pipe_common.h | 8 + src/gallium/drivers/radeon/radeon_elf_util.c | 44 +-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common

[Mesa-dev] [PATCH 4/4] radeonsi: Enable VGPR spilling for all shader types

2015-01-07 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 40 ++ src/gallium/drivers/radeonsi/si_shader.c| 69 - src/gallium/drivers/radeonsi/si_shader.h| 7 ++- src/gallium/drivers/radeonsi/si_state_shaders.c | 36 +++-- 4 files changed, 10

[Mesa-dev] [PATCH 3/4] radeonsi: Re-enable LLVM IR dumps

2015-01-07 Thread Tom Stellard
This was inadvertently disabled by 761e36b4caab4e8e09a4c2b1409a825902fc7d2c. --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index

[Mesa-dev] [PATCH 2/4] radeonsi/compute: Use relocs for scratch pointer rather than user sgprs

2015-01-07 Thread Tom Stellard
Instead of passing a pointer to the scratch buffer via user sgprs, we now patch the shader with the buffer address using reloc information from the LLVM generated ELF. --- src/gallium/drivers/radeonsi/si_compute.c | 46 --- 1 file changed, 42 insertions(+), 4 deletions(

Re: [Mesa-dev] [PATCH 4/4] radeonsi: Enable VGPR spilling for all shader types

2015-01-08 Thread Tom Stellard
On Thu, Jan 08, 2015 at 07:00:11PM +0100, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 10:03 PM, Tom Stellard wrote: > > --- > > src/gallium/drivers/radeonsi/si_compute.c | 40 ++ > > src/gallium/drivers/radeonsi/si_shader.c| 69 > > +++

Re: [Mesa-dev] [PATCH 4/4] radeonsi: Enable VGPR spilling for all shader types

2015-01-08 Thread Tom Stellard
On Thu, Jan 08, 2015 at 07:51:58PM +0100, Marek Olšák wrote: > On Thu, Jan 8, 2015 at 7:17 PM, Tom Stellard wrote: > > On Thu, Jan 08, 2015 at 07:00:11PM +0100, Marek Olšák wrote: > >> On Wed, Jan 7, 2015 at 10:03 PM, Tom Stellard > >> wrote: > >> > -

Re: [Mesa-dev] [PATCH 24/53] st/nine: Handle RSQ special cases

2015-01-12 Thread Tom Stellard
On Thu, Jan 08, 2015 at 01:46:32PM +0100, Marek Olšák wrote: > On Wed, Jan 7, 2015 at 7:09 PM, Ilia Mirkin wrote: > > On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy wrote: > >> We should use the absolute value of the input as input to ureg_RSQ. > >> > >> Moreover, an input of 0.0 should return FLT_MA

Re: [Mesa-dev] [PATCH 1/2] radeonsi: Cache LLVMTargetMachine object in si_screen

2015-01-13 Thread Tom Stellard
On Tue, Jan 13, 2015 at 06:47:00PM +0900, Michel Dänzer wrote: > On 07.01.2015 10:10, Michel Dänzer wrote: > > On 07.01.2015 06:33, Tom Stellard wrote: > >> On Wed, Dec 24, 2014 at 12:48:31PM +0900, Michel Dänzer wrote: > >>> On 24.12.2014 02:49, Tom Stellard wrote:

Re: [Mesa-dev] [PATCH] configure: Link against all LLVM targets when building clover

2015-01-15 Thread Tom Stellard
On Thu, Jan 15, 2015 at 07:25:56PM +0100, Niels Ole Salscheider wrote: > Since 8e7df519bd8556591794b2de08a833a67e34d526, we initialise all targets in > clover. This fixes bug 85189. > > Signed-off-by: Niels Ole Salscheider Reviewed-by: Tom Stellard > --- > configure.ac | 2 +-

[Mesa-dev] [PATCH 4/5] radeonsi: Re-enable LLVM IR dumps

2015-01-15 Thread Tom Stellard
This was inadvertently disabled by 761e36b4caab4e8e09a4c2b1409a825902fc7d2c. --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index

[Mesa-dev] [PATCH 1/5] radeon: Add a helper function for freeing members of radeon_shader_binary

2015-01-15 Thread Tom Stellard
--- src/gallium/drivers/radeon/radeon_elf_util.c | 6 ++ src/gallium/drivers/radeon/radeon_elf_util.h | 5 + src/gallium/drivers/radeonsi/si_compute.c| 4 +--- src/gallium/drivers/radeonsi/si_shader.c | 4 +--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/gal

[Mesa-dev] [PATCH 2/5] radeon: Teach radeon_elf_read() how to parse reloc information v2

2015-01-15 Thread Tom Stellard
v2: - Use strdup for copying reloc names. - Free reloc memory. --- src/gallium/drivers/radeon/r600_pipe_common.h | 8 src/gallium/drivers/radeon/radeon_elf_util.c | 53 +-- src/gallium/drivers/radeon/radeon_elf_util.h | 7 3 files changed, 65 insertions(+)

[Mesa-dev] [PATCH 5/5] radeonsi: Enable VGPR spilling for all shader types v2

2015-01-15 Thread Tom Stellard
v2: - Only emit write SPI_TMPRING_SIZE once per packet. - Use context global scratch buffers, one for each shader type. --- src/gallium/drivers/radeon/radeon_elf_util.c| 10 ++- src/gallium/drivers/radeon/radeon_elf_util.h| 5 +- src/gallium/drivers/radeonsi/si_compute.c | 46

[Mesa-dev] [PATCH 3/5] radeonsi/compute: Use relocs for scratch pointer rather than user sgprs v2

2015-01-15 Thread Tom Stellard
Instead of passing a pointer to the scratch buffer via user sgprs, we now patch the shader with the buffer address using reloc information from the LLVM generated ELF. v2: - Make sure not to break older LLVM. --- src/gallium/drivers/radeonsi/si_compute.c | 42 +++ 1

Re: [Mesa-dev] [PATCH 5/5] radeonsi: Enable VGPR spilling for all shader types v2

2015-01-16 Thread Tom Stellard
On Fri, Jan 16, 2015 at 11:44:36AM +0900, Michel Dänzer wrote: > On 16.01.2015 09:48, Tom Stellard wrote: > > - Use context global scratch buffers, one for each shader type. > > AFAICT the code actually uses a single buffer for all shader types. As > we discussed before, that

Re: [Mesa-dev] [PATCH 1/2] radeonsi: Cache LLVMTargetMachine object in si_screen

2015-01-16 Thread Tom Stellard
On Wed, Jan 14, 2015 at 11:06:50AM +0900, Michel Dänzer wrote: > On 14.01.2015 04:07, Tom Stellard wrote: > > On Tue, Jan 13, 2015 at 06:47:00PM +0900, Michel Dänzer wrote: > >> On 07.01.2015 10:10, Michel Dänzer wrote: > >>> On 07.01.2015 06:33, Tom Stellard wrote:

[Mesa-dev] [PATCH] radeonsi: Enable VGPR spilling for all shader types v3

2015-01-16 Thread Tom Stellard
v2: - Only emit write SPI_TMPRING_SIZE once per packet. - Use context global scratch buffer. v3: - Patch shaders using WRITE_DATA packet instead of map/unmap. - Emit ICACHE_FLUSH, CS_PARTIAL_FLUSH, PS_PARTIAL_FLUSH, and VS_PARTIAL_FLUSH when patching shaders. --- src/gallium/drivers/r

Re: [Mesa-dev] [PATCH] radeonsi: only use new versions of LLVM image and sample intrinsics

2015-09-02 Thread Tom Stellard
On Tue, Sep 01, 2015 at 11:18:15PM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > Just a cleanup I had made a long time ago and forgot about. > --- > src/gallium/drivers/radeonsi/si_shader.c | 468 > +-- >

Re: [Mesa-dev] [PATCH] llvmpipe: convert double to long long instead of unsigned long long

2015-09-03 Thread Tom Stellard
sing a wrong LLVM IR output. > > Signed-off-by: Oded Gabbay > CC: "10.6" > --- You should add 11.0 to the CC too. This patch is: Reviewed-by: Tom Stellard But I wonder why this function is being used for an integer value in the first place. -Tom > src/gallium/auxiliar

Re: [Mesa-dev] [PATCH] radeonsi: only use new versions of LLVM image and sample intrinsics

2015-09-03 Thread Tom Stellard
On Thu, Sep 03, 2015 at 06:28:07PM +0200, Marek Olšák wrote: > Sadly, this patch requires LLVM 3.5, which I didn't realize. Would it > be okay to remove LLVM 3.4.2 support? > Yes, that would be fine. -Tom > Marek > > On Wed, Sep 2, 2015 at 7:48 PM, Tom Stellard wr

Re: [Mesa-dev] [PATCH] Use IMP_LIB_EXT when checking for LLVM shared libraries

2015-09-08 Thread Tom Stellard
ve this circus of pain. > > Signed-off-by: Jon TURNEY Reviewed-by: Tom Stellard > --- > configure.ac | 33 +++-- > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 90ba4fe..9960dd0 100644 > ---

Re: [Mesa-dev] [PATCH] Use IMP_LIB_EXT when checking for LLVM shared libraries

2015-09-08 Thread Tom Stellard
On Mon, Sep 07, 2015 at 10:06:49AM +0100, Emil Velikov wrote: > Hi Jon, > > On 4 September 2015 at 14:00, Jon TURNEY wrote: > > When checking for LLVM shared libraries, use IMP_LIB_EXT for the extension > > for > > shared libraries appropriate to the target, rather than hardcoding '.so' > > > >

[Mesa-dev] XDC2015: Tentative schedule posted

2015-09-10 Thread Tom Stellard
Hi all, XDC2015, is less than a week a way! I have posted a tentative schedule on the wiki[1]. If you are a speaker and have questions about the schedule or want to request a new time slot, please let me know. I will do my best, but I may not be able to accommodate everyone's request. Each pre

[Mesa-dev] XDC 2015: Updated Schedule, Social Event, Video release form

2015-09-14 Thread Tom Stellard
Hi, I just wanted to pass along a few XDC updates: - I have made some changes to the schedule, but it should still be considered tentative. I will let announce once it has been finalized. - There is an informal get together planned for Tuesday night if you are in town early. Please sign up on

[Mesa-dev] [PATCH 2/2] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target

2015-09-24 Thread Tom Stellard
This fixes a race condition in the glx-multithreaded-shader-compile test. CC: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index

[Mesa-dev] [PATCH 1/2] gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets

2015-09-24 Thread Tom Stellard
Drivers and state trackers that use LLVM for generating code, must register the targets they use with LLVM's global TargetRegistry. The TargetRegistry is not thread-safe, so all targets must be added to the registry before it can be queried for target information. When drivers and state trackers i

Re: [Mesa-dev] [PATCH 2/2] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target

2015-09-25 Thread Tom Stellard
On Fri, Sep 25, 2015 at 02:19:53PM +0200, Marek Olšák wrote: > On Thu, Sep 24, 2015 at 6:32 PM, Tom Stellard wrote: > > This fixes a race condition in the glx-multithreaded-shader-compile > > test. > > > > CC: "10.6 11.0" > > --- > > src/gallium

Re: [Mesa-dev] [PATCH 1/2] gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets

2015-09-25 Thread Tom Stellard
On Thu, Sep 24, 2015 at 10:48:32PM +0100, Emil Velikov wrote: > Hi Tom, > > On 24 September 2015 at 17:31, Tom Stellard wrote: > > Drivers and state trackers that use LLVM for generating code, must > > register the targets they use with LLVM's global TargetRegistry. >

Re: [Mesa-dev] [PATCH] configure.ac: handle llvm built with cmake in one shared library.

2015-09-28 Thread Tom Stellard
On Sun, Sep 27, 2015 at 02:21:41PM +0200, Laurent Carlier wrote: > llvm can be built with cmake in a libray with the name libLLVM.so.$version > Hi, Thanks for working on this. > Signed-off-by: Laurent Carlier > --- > configure.ac | 18 +- > 1 file changed, 13 insertions(+), 5

Re: [Mesa-dev] [PATCH] configure.ac: handle llvm built with cmake in one shared library.

2015-09-28 Thread Tom Stellard
On Mon, Sep 28, 2015 at 03:15:27PM +0100, Emil Velikov wrote: > Hi Laurent, > > On 27 September 2015 at 13:21, Laurent Carlier wrote: > > llvm can be built with cmake in a libray with the name libLLVM.so.$version > > > Do you know if this is intentional and consistent (i.e. all the build > produc

[Mesa-dev] [PATCH 3/3] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2

2015-09-30 Thread Tom Stellard
This fixes a race condition in the glx-multithreaded-shader-compile test. v2: - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets(). CC: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers

[Mesa-dev] [PATCH 1/3] gallium/radeon: Use call_once() when initailizing LLVM targets

2015-09-30 Thread Tom Stellard
CC: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index 0002559..5d93a4d 100644 --- a/src/

[Mesa-dev] [PATCH 2/3] gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2

2015-09-30 Thread Tom Stellard
Drivers and state trackers that use LLVM for generating code, must register the targets they use with LLVM's global TargetRegistry. The TargetRegistry is not thread-safe, so all targets must be added to the registry before it can be queried for target information. When drivers and state trackers i

Re: [Mesa-dev] [PATCH 3/3] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2

2015-10-01 Thread Tom Stellard
On Thu, Oct 01, 2015 at 03:40:45PM +0100, Emil Velikov wrote: > On 30 September 2015 at 19:59, Tom Stellard wrote: > > This fixes a race condition in the glx-multithreaded-shader-compile > > test. > > > > v2: > > - Replace gallivm_init_llvm_{begin,end}() wi

Re: [Mesa-dev] [shader-db PATCH 1/5] run: create debug contexts

2016-01-04 Thread Tom Stellard
On Wed, Dec 30, 2015 at 09:32:38PM -0500, Nicolai Hähnle wrote: > For Gallium-based drivers, this is required for receiving shader information > via debug messages. Patches 2-5 are Acked-by: Tom Stellard > --- > run.c | 1 + > 1 file changed, 1 insertion(+) > > diff

[Mesa-dev] [PATCH shader-db] si-report: Track max waves per CU

2016-01-04 Thread Tom Stellard
--- si-report.py | 56 ++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/si-report.py b/si-report.py index ec88112..e717af0 100755 --- a/si-report.py +++ b/si-report.py @@ -65,6 +65,12 @@ def get_scratch_str(value, suffixes = Tr

Re: [Mesa-dev] [PATCH 00/23] RadeonSI: Restructuring shader code generation part 2

2016-01-06 Thread Tom Stellard
On Wed, Jan 06, 2016 at 01:41:22PM +0100, Marek Olšák wrote: > Hi, > > These boring patches focus on restructuring pixel shader output handling and > code around si_compile_llvm (config, dumping, etc.). They are mostly code > movements and dividing functions into smaller ones, so that they can b

Re: [Mesa-dev] [PATCH 4/4] radeonsi: change LLVM intrinsics for BREV, CLAMP, EX2

2016-01-22 Thread Tom Stellard
On Fri, Jan 22, 2016 at 03:18:13PM +0100, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > Requested by Matt Arsenault. > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >

Re: [Mesa-dev] [PATCH 3/4] radeonsi: add max waves / SIMD to shader stats (v2)

2016-01-25 Thread Tom Stellard
On Fri, Jan 22, 2016 at 03:18:12PM +0100, Marek Olšák wrote: > From: Marek Olšák > > v2: account for LDS usage in PS > the limit is per SIMD, not per CU > --- > src/gallium/drivers/radeonsi/si_shader.c | 54 > +--- > 1 file changed, 49 insertions(+), 5 deletions(

Re: [Mesa-dev] [Mesa-dev, v6, 1/3] clover: separate compile and link stages

2016-01-25 Thread Tom Stellard
Hi, >diff --git a/src/gallium/state_trackers/clover/api/program.cpp >b/src/gallium/state_trackers/clover/api/program.cpp >index 27ca2ef..f8d946e 100644 >--- a/src/gallium/state_trackers/clover/api/program.cpp >+++ b/src/gallium/state_trackers/clover/api/program.cpp >@@ -181,13 +181,20 @@ clBuildP

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Tom Stellard
On Thu, Feb 04, 2016 at 09:15:26AM +0100, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, > to allow diagnosing problems caused by optimization passes. > > Note that in order to compile the resulting IR with llc, you will f

[Mesa-dev] [PATCH 2/3] radeon/llvm: Set the target triple on the module

2016-02-04 Thread Tom Stellard
--- src/gallium/drivers/r600/r600_llvm.c| 2 +- src/gallium/drivers/radeon/radeon_llvm.h| 3 ++- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 9 - src/gallium/drivers/radeonsi/si_shader.c| 4 ++-- 4 files changed, 13 insertions(+), 5 deletio

[Mesa-dev] [PATCH 1/3] gallivm: Add helpers for creating and destroying TargetLibraryInfo

2016-02-04 Thread Tom Stellard
This functionality is not exposed via the LLVM C API. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 30 +++ src/gallium/auxiliary/gallivm/lp_bld_misc.h | 7 +++ 2 files changed, 37 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src

[Mesa-dev] [PATCH 3/3] radeon/llvm: Add TargetLibraryInfo to the pass manager

2016-02-04 Thread Tom Stellard
This will prevent optimization passes from introducing unsupported library calls. --- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/rad

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-05 Thread Tom Stellard
On Fri, Feb 05, 2016 at 08:55:17AM -0500, Nicolai Hähnle wrote: > On 04.02.2016 13:52, Tom Stellard wrote: > > On Thu, Feb 04, 2016 at 09:15:26AM +0100, Nicolai Hähnle wrote: > >> From: Nicolai Hähnle > >> > >> Set R600_DEBUG=preoptir to dump the LLVM IR befor

Re: [Mesa-dev] [PATCH 2/3] radeon/llvm: Set the target triple on the module

2016-02-05 Thread Tom Stellard
On Thu, Feb 04, 2016 at 02:42:15PM -0800, Matt Arsenault wrote: > > > On Feb 4, 2016, at 13:02, Tom Stellard wrote: > > > > + LLVMSetTarget(ctx->gallivm.module, > > + > > +#if HAVE_LLVM < 0x0306 > > + "r600--");

Re: [Mesa-dev] [PATCH] radeonsi: enable denorms for 64-bit and 16-bit floats

2016-02-08 Thread Tom Stellard
On Sat, Feb 06, 2016 at 01:15:42PM +0100, Marek Olšák wrote: > From: Marek Olšák > > This fixes FP16 conversion instructions for VI, which has 16-bit floats, > but not SI & CI, which can't disable denorms for those instructions. Do you know why this fixes FP16 conversions? What does the OpenGL

Re: [Mesa-dev] [PATCH] radeonsi: enable denorms for 64-bit and 16-bit floats

2016-02-09 Thread Tom Stellard
On Mon, Feb 08, 2016 at 09:38:32PM +0100, Marek Olšák wrote: > On Mon, Feb 8, 2016 at 5:08 PM, Tom Stellard wrote: > > On Sat, Feb 06, 2016 at 01:15:42PM +0100, Marek Olšák wrote: > >> From: Marek Olšák > >> > >> This fixes FP16 conversion instructions for V

Re: [Mesa-dev] issues with split llvm libraries and llvmpipe and failing to load library

2016-02-11 Thread Tom Stellard
On Thu, Feb 11, 2016 at 01:59:25PM +1000, Dave Airlie wrote: > Hey, > > So in Fedora rawhide we are now building llvm 3.7.1 into the lots of > little shared libraries format. > This configuration is only recommended for developers. See the documentation for BUILD_SHARED_LIBS:BOOL here: http://

Re: [Mesa-dev] [PATCH 01/20] radeonsi: set shader calling conventions

2016-04-04 Thread Tom Stellard
_llvm_calling_convention calling_conv; > This looks like you will get 'unused variable warnings' with this change. Probably this easiest thing to do is put (void)variable_name somewhere, but I'm not sure this is really a big deal. Either way: Reviewed-by: Tom Stellard &g

Re: [Mesa-dev] [PATCH] clover: Fix build against clang SVN >= r265359

2016-04-05 Thread Tom Stellard
On Tue, Apr 05, 2016 at 03:43:35PM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > Signed-off-by: Michel Dänzer I pushed this, thanks. -Tom > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/gallium/state_track

Re: [Mesa-dev] r600/compute: cleanup evergreen_compute.c

2016-04-06 Thread Tom Stellard
On Wed, Apr 06, 2016 at 10:40:50PM +0100, Dave Airlie wrote: > This probably should have been cleaned up before merging, but we > were a bit lax with it. This is a bunch of cleanups and changes, > that make adding ARB_compute_support less of a task. > Acked-by: Tom Stell

Re: [Mesa-dev] [PATCH] clover: Fix build against LLVM SVN >= r266163

2016-04-13 Thread Tom Stellard
On Wed, Apr 13, 2016 at 03:59:36PM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > createInternalizePass now takes a callback instead of a StringSet. > > Signed-off-by: Michel Dänzer Reviewed-by: Tom Stellard > --- > src/gallium/state_trackers/clover/llv

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

2016-04-15 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. --- src/gallium/drivers/radeonsi/si_shader.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader

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

2016-04-15 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_

Re: [Mesa-dev] [PATCH 8/9] llvmpipe: Test more vector lengths.

2016-04-18 Thread Tom Stellard
On Mon, Apr 18, 2016 at 10:14:35AM +0100, Jose Fonseca wrote: > All power of two of up native vector length. > > There is actually a bug in lp_build_round for v2, whereby it doesn't > round to nearest. Fixing is left to the future, but the test is now > able to expect it to fail. > --- > src/gal

[Mesa-dev] [PATCH 1/4] radeonsi: Create a helper function for computing the thread id

2016-04-19 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_shader.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index c26960b..3b6d6e9 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++

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