[Mesa-dev] [PATCH] radeon/llvm: Handle LLVM backend rename from R600 to AMDGPU

2015-06-11 Thread Tom Stellard
--- configure.ac | 13 - src/gallium/drivers/radeon/radeon_llvm_emit.c | 8 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index d32aa24..eda8d23 100644 --- a/configure.ac +++ b/configure.ac @@ -204

Re: [Mesa-dev] [PATCH] configure.ac: rename LLVM_VERSION_PATCH to avoid conflict with llvm-config.h

2015-06-15 Thread Tom Stellard
On Sat, Jun 13, 2015 at 08:16:23PM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 34d1ac9..e6d947e 100644 >

[Mesa-dev] [PATCH shader-db] si-report: Fix algorithm for determing difference in shader stats

2015-06-15 Thread Tom Stellard
--- si-report.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/si-report.py b/si-report.py index fbeed11..ec88112 100755 --- a/si-report.py +++ b/si-report.py @@ -145,7 +145,13 @@ class si_stats: self.__dict__[name] += 1 def is_empty(self): -

Re: [Mesa-dev] [PATCH] configure.ac: rename LLVM_VERSION_PATCH to avoid conflict with llvm-config.h

2015-06-16 Thread Tom Stellard
On Tue, Jun 16, 2015 at 08:07:57PM +0100, Emil Velikov wrote: > On 13 June 2015 at 19:16, Marek Olšák wrote: > > From: Marek Olšák > > > > --- > > configure.ac | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure.ac b/configure.ac > > index 34d1ac9..e6d947e 10

Re: [Mesa-dev] abundance of branches in mesa.git

2015-06-22 Thread Tom Stellard
On Mon, Jun 22, 2015 at 12:23:54PM +0200, Marek Olšák wrote: > On Mon, Jun 22, 2015 at 5:36 AM, Ilia Mirkin wrote: > > On Sun, Jun 21, 2015 at 11:33 PM, Michel Dänzer wrote: > >> On 22.06.2015 00:31, Ilia Mirkin wrote: > >>> On Sun, Jun 21, 2015 at 12:22 PM, Emil Velikov > >>> wrote: > On

Re: [Mesa-dev] [RFC shader-db] Add support for shadertoy tests

2015-06-23 Thread Tom Stellard
On Tue, Jun 23, 2015 at 08:18:45PM -0400, Rob Clark wrote: > On Tue, Jun 23, 2015 at 7:27 PM, Dylan Baker wrote: > > I have a couple of python pointers for you, feel free to take them or > > leave them. > > cool, thanks.. > > What do others think about including shadertoy in shader-db? If it is

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/6] clover: Call clBuildProgram() notification function when build completes v2

2015-06-25 Thread Tom Stellard
On Thu, Jun 25, 2015 at 03:19:40PM +0100, Emil Velikov wrote: > On 3 June 2015 at 14:27, Francisco Jerez wrote: > > Emil Velikov writes: > > > >> Hi Tom, > >> > >> On 31 March 2015 at 15:29, Francisco Jerez wrote: > >>> Tom Stellard writ

Re: [Mesa-dev] [PATCH 0/8] Render node only opencl and pipe-loader cleanups

2015-07-07 Thread Tom Stellard
On Tue, Jul 07, 2015 at 05:43:19PM +0100, Emil Velikov wrote: > On 30/06/15 16:09, Emil Velikov wrote: > > Hello all, > > > > As mentioned over IRC a few weeks back, here is a series that removes > > support for non-render node devices. > > > > The two main motivations being: > > - Currently we

[Mesa-dev] [PATCH] clover: Fix bug with computing hard_event status

2015-07-10 Thread Tom Stellard
pipe_context::flush() can return a NULL fence if the queue is already empty, so we should not assume that an event with a NULL fence has the status of CL_QUEUED. CC: 10.6 --- src/gallium/state_trackers/clover/core/event.cpp | 7 --- src/gallium/state_trackers/clover/core/event.hpp | 1 + 2 f

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

2015-07-10 Thread Tom Stellard
VENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 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

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

2015-07-10 Thread Tom Stellard
Events can be added to an OpenCL command queue concurrently from multiple threads, but pipe_context bjects are not threadsafe. The threadsafe wrappers protect all pipe_context function calls with a mutex, so we can safely use them with multiple threads. v2: - Don't use wrapper for pipe_screen.

Re: [Mesa-dev] [PATCH 1/6] radeonsi: remove redundant parameter in si_shader_binary_read

2015-07-16 Thread Tom Stellard
On Thu, Jul 16, 2015 at 06:55:26PM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeonsi/si_compute.c | 2 +- > src/gallium/drivers/radeonsi/si_shader.c | 8 +++- > src/gallium/drivers/radeonsi/si_shader.h

Re: [Mesa-dev] [PATCH 2/6] radeonsi: upload shader rodata after updating scratch relocations

2015-07-16 Thread Tom Stellard
On Thu, Jul 16, 2015 at 06:55:27PM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > Cc: 10.5 10.6 > --- > src/gallium/drivers/radeonsi/si_shader.c| 49 > ++--- > src/gallium/drivers/radeonsi/si_shader.h

Re: [Mesa-dev] [PATCH] clover: Fix bug with computing hard_event status

2015-07-16 Thread Tom Stellard
On Sat, Jul 11, 2015 at 02:35:53PM +0300, Francisco Jerez wrote: > Tom Stellard writes: > > > pipe_context::flush() can return a NULL fence if the queue is already > > empty, so we should not assume that an event with a NULL fence > > has the status of CL_QUEUED. > &

[Mesa-dev] [PATCH 1/3] gallivm: Don't use raw_debug_ostream for dissasembling

2015-07-20 Thread Tom Stellard
All LLVM API calls that require an ostream object have been removed from the disassemble() function, so we don't need to use this class to wrap _debug_printf() we can just call this function directly. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 27 +- 1 file change

[Mesa-dev] [PATCH 2/3] gallivm: Add ifdefs so raw_debug_stream is only defined when used

2015-07-20 Thread Tom Stellard
Its only use is to implement a custom version of LLVMDumpValue on some Windows and embedded platforms. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_deb

[Mesa-dev] [PATCH 3/3] gallivm: Initialize LLVM Modules's DataLayout to an empty string.

2015-07-20 Thread Tom Stellard
This fixes crashes in some piglit tests on radeonsi that use the draw module, and llvmpipe is likely completely broken without this on LLVM 3.8. This is just a temporary solution. The correct solution will require creating a TargetMachine during gallivm initialization and pulling the DataLayout f

Re: [Mesa-dev] [PATCH 03/10] radeonsi: initialize output, temp, and address registers to "undef"

2015-10-15 Thread Tom Stellard
On Sun, Oct 11, 2015 at 03:29:43AM +0200, Marek Olšák wrote: > From: Marek Olšák > > This removes "v_mov v0, 0" which typically occurs before exports. > Reviewed-by: Tom Stellard > Totals: > SGPRS: 345216 -> 344552 (-0.19 %) > VGPRS: 197684 -> 197132 (-0.

Re: [Mesa-dev] [PATCH 04/10] radeonsi: don't emit AMDGPU intrinsics for EX2, ROUND, TRUNC

2015-10-15 Thread Tom Stellard
On Sun, Oct 11, 2015 at 03:29:44AM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > No difference according to shader-db. > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >

Re: [Mesa-dev] [PATCH 05/10] radeonsi: don't emit AMDGPU intrinsics for integer abs, min, max

2015-10-15 Thread Tom Stellard
On Sun, Oct 11, 2015 at 03:29:45AM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > No difference according to shader-db. (with the new S_ABS_I32 pattern) > --- > .../drivers/radeon/radeon_setup_tgsi_llvm.c| 60 > ++

Re: [Mesa-dev] [PATCH 07/10] radeonsi: don't use the AMDGPU intrinsic for CMP

2015-10-15 Thread Tom Stellard
On Sun, Oct 11, 2015 at 03:29:47AM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > The increase in VGPRs in unfortunate, but the decrease in the scratch size > is always welcome. > > Totals: > SGPRS: 344552 -> 344368 (-0.05 %) > VG

Re: [Mesa-dev] [PATCH 08/10] radeonsi: re-enable unsafe-fp-math for LLVM 3.8

2015-10-15 Thread Tom Stellard
On Sun, Oct 11, 2015 at 03:29:48AM +0200, Marek Olšák wrote: > From: Marek Olšák > I don't think we should globally enable this until we are sure it does not introduce any illegal transforms. > Required for 1/sqrt ==> rsq. I think the arcp fast-math flag for instruction is supposed to allow th

Re: [Mesa-dev] llvm TGSI backend (WIP) questions

2015-11-13 Thread Tom Stellard
On Fri, Nov 13, 2015 at 02:46:52PM +0100, Hans de Goede wrote: > Hi All, > > So as discussed I've started working on a TGSI backend for > llvm to use as a way to get compute going on nouveau (and other gpu-s). > > I'm still learning all the ins and outs of llvm so I do not have > much to show yet

Re: [Mesa-dev] [PATCH 1/2] r600g, radeonsi: Fix calculation of IR target cap string buffer size

2015-01-23 Thread Tom Stellard
Reviewed-by: Tom Stellard On Fri, Jan 23, 2015 at 10:01:56PM +0100, Marek Olšák wrote: > Reviewed-by: Marek Olšák > > Marek > > On Thu, Jan 22, 2015 at 4:41 AM, Michel Dänzer wrote: > > From: Michel Dänzer > > > > Fixes writing beyond the allocated buffer: &

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

2015-01-23 Thread Tom Stellard
what I've done wrong? Thanks, Tom >From ba673155672756fb0bf9873b2ae76c3f5ccd02e2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 10 Dec 2014 09:13:59 -0500 Subject: [PATCH] radeonsi: Enable VGPR spilling for all shader types v5 (WIP) v2: - Only emit write SPI_TMPRING_SIZE once p

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

2015-01-26 Thread Tom Stellard
On Sun, Jan 25, 2015 at 04:11:40PM -0500, Jan Vesely wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88783 > Signed-off-by: Jan Vesely Pushed, thanks! > --- > src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/

[Mesa-dev] [PATCH 1/5] radeonsi: Avoid leaking memory when rebuilding shader states

2015-01-27 Thread Tom Stellard
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_pm4.c | 12 src/gallium/drivers/radeonsi/si_pm4.h | 1 + src/gallium/drivers/radeonsi/si_state_shaders.c | 4 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi

[Mesa-dev] [PATCH 3/5] radeonsi: Add radeon_shader_binary member to struct si_shader

2015-01-27 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 11 +-- src/gallium/drivers/radeonsi/si_shader.h | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index ba63afd..840d21f 100644 ---

[Mesa-dev] [PATCH 4/5] radeonsi/compute: Allocate the scratch buffer during state creation

2015-01-27 Thread Tom Stellard
This moves scratch buffer allocation from si_launch_grid() to si_create_compute_state(). This helps to reduce the overhead of launching a kernel and also fixes a bug in the code that would cause the scratch buffer to be too small if a kernel with smaller scratch size was launched before a kernel w

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

2015-01-27 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. v4: - Code cleanups.

[Mesa-dev] [PATCH 2/5] radeonsi/compute: Rename si_compute::program to si_compute::shader

2015-01-27 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 4427d3b..ba63afd 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/sr

Re: [Mesa-dev] [PATCH] util: Predicate the fpclassify fallback on !defined(__cplusplus)

2015-01-28 Thread Tom Stellard
, we'll > just disable it until we actually have a C++ user. > Tested-by: Tom Stellard > Reported-by: Tom Stellard Should use my AMD email here too ^ or you can drop this line all together if you want. -Tom > --- > src/util/macros.h | 14 -- > 1 file c

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize multiplication by -1 into a negated MOV.

2015-02-12 Thread Tom Stellard
On Thu, Feb 12, 2015 at 03:36:37PM -0800, Matt Turner wrote: > instructions in affected programs: 968 -> 942 (-2.69%) > helped:4 > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 9 + > src/mesa/drivers/dri/i965/brw_vec4.cpp | 5 + > 2 files changed,

Re: [Mesa-dev] [PATCH v3] clover: Use Legacy PassManager for LLVM trunk (3.7)

2015-02-13 Thread Tom Stellard
On Fri, Feb 13, 2015 at 09:16:17PM -0500, Shawn Starr wrote: > v3: Fix my typo, 3rd time's a charm, right? > Pushed, thanks! -Tom > From 5712d95cb12d8e82d34fafe66bf827ee6726220e Mon Sep 17 00:00:00 2001 > From: Shawn Starr > Date: Fri, 13 Feb 2015 20:30:01 -0500 > Subject: [PATCH] clover: Use

Re: [Mesa-dev] [PATCH] Revert "radeon/llvm: enable unsafe math for graphics shaders"

2015-02-17 Thread Tom Stellard
On Tue, Feb 17, 2015 at 05:15:42PM +0900, Michel Dänzer wrote: > From: Michel Dänzer > Reviewed-by: Tom Stellard > This reverts commit 0e9cdedd2e3943bdb7f3543a3508b883b167e427. > > It caused the grass to disappear in The Talos Principle. > > Bugzilla: https:/

Re: [Mesa-dev] [PATCHv2] ra: Disable round-robin strategy for optimistically colorable nodes.

2015-02-17 Thread Tom Stellard
On Tue, Feb 17, 2015 at 03:23:05PM +0200, Francisco Jerez wrote: > The round-robin allocation strategy is expected to decrease the amount > of false dependencies created by the register allocator and give the > post-RA scheduling pass more freedom to move instructions around. On > the other hand i

Re: [Mesa-dev] [PATCHv2] ra: Disable round-robin strategy for optimistically colorable nodes.

2015-02-17 Thread Tom Stellard
On Tue, Feb 17, 2015 at 04:41:41PM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > On Tue, Feb 17, 2015 at 03:23:05PM +0200, Francisco Jerez wrote: > >> The round-robin allocation strategy is expected to decrease the amount > >> of false dependencies cre

Re: [Mesa-dev] [PATCH 2/2] radeon/compiler: include stdio.h

2015-02-26 Thread Tom Stellard
On Thu, Feb 26, 2015 at 12:34:56PM -0700, Brian Paul wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89343 Reviewed-by: Tom Stellard > --- > src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c | 1 > + > 1 file changed, 1 insertion(+) >

[Mesa-dev] [PATCH 1/3] clover: Don't unconditionally define cl_khr_fp64

2015-02-26 Thread Tom Stellard
This should be done by the frontend for devices that support this extension. --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp i

[Mesa-dev] [PATCH 2/3] clover: Enable cl_khr_fp64 for devices that support doubles v2

2015-02-26 Thread Tom Stellard
v2: - Report correct values for CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE and CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE. - Only define cl_khr_fp64 if the extension is supported. - Remove trailing space from extension string. - Rename device query function from cl_khr_fp64() to has_doubles(). -

[Mesa-dev] [PATCH 3/3] radeonsi/compute: Enable PIPE_SHADER_CAP_DOUBLES

2015-02-26 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_pipe.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 26182c2..c7a7622 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/driver

[Mesa-dev] [PATCH] radeonsi: Add additional information to shader dumps

2015-02-26 Thread Tom Stellard
This adds SGPR count, VGPR count, shader size, LDS size, and scratch usage to shader dumps. --- src/gallium/drivers/radeonsi/si_shader.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/

Re: [Mesa-dev] [PATCH 2/2] configure: Leverage gcc warn options to enable safe use of C99 features where possible.

2015-02-27 Thread Tom Stellard
Hi, This patch breaks the build for me: CFLAGS="-g" CXXFLAGS="$CFLAGS" CC="ccache gcc" CXX="ccache g++" ./autogen.sh \ --prefix=/usr/local \ --with-dri-drivers="no" \ --with-gallium-drivers="r600,radeonsi" \ --enable-glx-tls \ --enable-debug \ --enable-shared-glapi \ --with-egl-platforms=x11,drm

[Mesa-dev] [PATCH] egl: Report correct GBM formats

2015-03-02 Thread Tom Stellard
From: Daniel Stone This fixes almost all piglit regressions when running with PIGLIT_PLATFORM=gbm Tom Stellard: - Fix ARGB2101010 format Cc: "10.4 10.5" --- I'm not sure if the commit message makes sense, I'm open to suggestions. src/egl/drivers/dri2

[Mesa-dev] [PATCH] egl: Report correct GBM formats

2015-03-02 Thread Tom Stellard
From: Daniel Stone This fixes almost all piglit regressions when running with PIGLIT_PLATFORM=gbm Tom Stellard: - Fix ARGB2101010 format Cc: "10.4 10.5" --- I'm not sure if the commit message makes sense, I'm open to suggestions. src/egl/drivers/dri2

[Mesa-dev] [PATCH 2/2] clover: Enable cl_khr_fp64 for devices that support doubles v3

2015-03-02 Thread Tom Stellard
v2: - Report correct values for CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE and CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE. - Only define cl_khr_fp64 if the extension is supported. - Remove trailing space from extension string. - Rename device query function from cl_khr_fp86() to has_doubles(

[Mesa-dev] [PATCH 1/2] clover: Report a default value for CL_DEVICE_SINGLE_FP_CONFIG

2015-03-02 Thread Tom Stellard
--- src/gallium/state_trackers/clover/api/device.cpp | 3 +-- src/gallium/state_trackers/clover/core/device.cpp | 6 ++ src/gallium/state_trackers/clover/core/device.hpp | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/s

Re: [Mesa-dev] [PATCH 1/9] gallium/radeon: don't use LLVMReadOnlyAttribute for ALU

2015-03-02 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:15PM +0100, Marek Olšák wrote: > From: Marek Olšák > For some reason I thought doing this would require changes to LLVM, but I guess I was wrong. Reviewed-by: Tom Stellard > None of the instructions use a pointer argument. > (+ small cosm

Re: [Mesa-dev] [PATCH 2/9] radeonsi: use V_BFE for extracting a sample index

2015-03-02 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:16PM +0100, Marek Olšák wrote: > From: Marek Olšák > > --- > src/gallium/drivers/radeonsi/si_shader.c | 22 -- > 1 file changed, 16 insertions(+), 6 deletions(-) > > diff --git a/src/gallium/drivers/radeonsi/si_shader.c > b/src/gallium/drivers/

Re: [Mesa-dev] [PATCH 2/9] radeonsi: use V_BFE for extracting a sample index

2015-03-02 Thread Tom Stellard
On Mon, Mar 02, 2015 at 10:14:00PM +0100, Marek Olšák wrote: > On Mon, Mar 2, 2015 at 10:05 PM, Tom Stellard wrote: > > On Mon, Mar 02, 2015 at 12:54:16PM +0100, Marek Olšák wrote: > >> From: Marek Olšák > >> > >> --- > >>

Re: [Mesa-dev] [PATCH 1/2] r300g: Use PATH_MAX instead of limiting ourselves to 100 chars.

2015-03-03 Thread Tom Stellard
> Cc: 10.4, 10.5 > Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=540970 Both patches: Reviewed-by: Tom Stellard Thanks! > --- > src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/s

[Mesa-dev] [PATCH] clover: Enable cl_khr_fp64 for devices that support doubles v4

2015-03-04 Thread Tom Stellard
v2: - Report correct values for CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE and CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE. - Only define cl_khr_fp64 if the extension is supported. - Remove trailing space from extension string. - Rename device query function from cl_khr_fp86() to has_doubles(

Re: [Mesa-dev] [PATCH 2/9] radeonsi: use V_BFE for extracting a sample index

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 02:09:29PM -0800, Matt Arsenault wrote: > > > On Mar 2, 2015, at 1:19 PM, Tom Stellard wrote: > > > > On Mon, Mar 02, 2015 at 10:14:00PM +0100, Marek Olšák wrote: > >> On Mon, Mar 2, 2015 at 10:05 PM, Tom Stellard wrote: > >>>

Re: [Mesa-dev] [PATCH 6/9] radeonsi: add support for SQRT

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:20PM +0100, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 2 ++ > src/gallium/drivers/radeonsi/si_pipe.c | 2 +- > 2 files changed, 3 inserti

Re: [Mesa-dev] [PATCH 5/9] radeonsi: add support for FMA

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:19PM +0100, Marek Olšák wrote: > From: Marek Olšák Reviewed-by: Tom Stellard > > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 2 ++ > src/gallium/drivers/radeonsi/si_pipe.c | 3 ++- > 2 files changed, 4 inserti

Re: [Mesa-dev] [PATCH 3/9] radeonsi: use S_BFE/V_BFE for extracting bitfields from parameters

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:17PM +0100, Marek Olšák wrote: > From: Marek Olšák Reviewed-by: Tom Stellard > > And use AND/OR in special cases. > > This universal helper will be used a lot (especially by tessellation). > --- > src/gallium/drivers/rade

Re: [Mesa-dev] [PATCH 7/9] radeonsi: add support for easy opcodes from ARB_gpu_shader5

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:21PM +0100, Marek Olšák wrote: > From: Marek Olšák > I'm still unsure whether it's better to use intrinsics or LLVM IR to implement these. I will think about this some more. -Tom > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 8 > 1 file

[Mesa-dev] [PATCH] clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG

2015-03-05 Thread Tom Stellard
This means dropping CL_FP_DENORM from the current return value. --- src/gallium/state_trackers/clover/api/device.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index b1f

Re: [Mesa-dev] [PATCH 2/9] radeonsi: use V_BFE for extracting a sample index

2015-03-05 Thread Tom Stellard
On Thu, Mar 05, 2015 at 05:14:09PM +0100, Marek Olšák wrote: > Since you acked patch #3, which depends on this, I assume this has your Rb > too? > No, I still want to resolved with Matt what to do about intrinsics vs IR. -Tom > Marek > > On Mon, Mar 2, 2015 at 10:05 PM, T

Re: [Mesa-dev] [PATCH 7/9] radeonsi: add support for easy opcodes from ARB_gpu_shader5

2015-03-05 Thread Tom Stellard
On Mon, Mar 02, 2015 at 12:54:21PM +0100, Marek Olšák wrote: > From: Marek Olšák > Hi Marek, After discussing with Matt, I think we should use LLVM IR rather than intrinsics for IBFE and UBFE and then add patterns for them either in the TableGen Files or AMDGPUISelDAGToDAG.cpp. Using intrinsic

Re: [Mesa-dev] [PATCH] clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG

2015-03-06 Thread Tom Stellard
On Thu, Mar 05, 2015 at 08:42:25PM +0200, Francisco Jerez wrote: > Tom Stellard writes: > > > This means dropping CL_FP_DENORM from the current return value. > > --- > > src/gallium/state_trackers/clover/api/device.cpp | 4 +++- > > 1 file changed, 3 insertions(

[Mesa-dev] [PATCH 2/2] radeonsi/compute: Use value from compiler for COMPUTE_PGM_RSRC1.FLOAT_MODE

2015-03-06 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_compute.c | 3 ++- src/gallium/drivers/radeonsi/si_shader.c | 1 + src/gallium/drivers/radeonsi/si_shader.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_comput

[Mesa-dev] [PATCH 1/2] clover: Return the minimum required value for CL_DEVICE_SINGLE_FP_CONFIG v2

2015-03-06 Thread Tom Stellard
This means dropping CL_FP_DENORM from the current return value. v2: - Add comments about minimum values for OpenCL 1.2. --- src/gallium/state_trackers/clover/api/device.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/device.cpp

Re: [Mesa-dev] [PATCH 7/9] radeonsi: add support for easy opcodes from ARB_gpu_shader5

2015-03-10 Thread Tom Stellard
On Tue, Mar 10, 2015 at 12:42:38PM +0100, Marek Olšák wrote: > OK. What about patches 8 an 9? > I think the intrinsics in 9 are OK, but 8 should be using LLVM IR. -Tom > Marek > > On Thu, Mar 5, 2015 at 8:30 PM, Tom Stellard wrote: > > On Mon, Mar 02, 2015 at 12:54:21

Re: [Mesa-dev] [PATCH 7/9] radeonsi: add support for easy opcodes from ARB_gpu_shader5

2015-03-10 Thread Tom Stellard
bt it would be easy to > > recognize them and match them precisely. They are also very unlikely > > to appear open-coded in real applications, therefore, expanding them > > and then matching them again seems like a huge waste of time. Apps > > will likely just use LSHR+AND,

Re: [Mesa-dev] [PATCH 7/9] radeonsi: add support for easy opcodes from ARB_gpu_shader5

2015-03-10 Thread Tom Stellard
On Wed, Mar 11, 2015 at 01:27:32AM +0100, Marek Olšák wrote: > On Wed, Mar 11, 2015 at 12:09 AM, Tom Stellard wrote: > > On Tue, Mar 10, 2015 at 11:01:21PM +0100, Marek Olšák wrote: > >> I've looked into how to recognize BFM and BFI and discovered that if > >> T

[Mesa-dev] [PATCH 2/2] radeonsi: Use llvm.amdgcn.s.buffer.load instead of llvm.SI.load.const

2017-01-31 Thread Tom Stellard
Advantages of using llvm.amdgcn.s.buffer.load - We can use a real pointer type, which LLVM can better reason about and do alias analysis on. This will also ease the transition to using fat pointers and LLVM IR loads. - llvm.amdgcn.s.buffer.load is defined in IntrinsicsAMDGPU.td so passes can

[Mesa-dev] [PATCH 1/2] radeonsi: Use build_buffer_load helper function for geometry shaders

2017-01-31 Thread Tom Stellard
Also modify build_buffer_load to always pass soffset to an intrinsic if it is set. This is required to avoid failing buffer range checks in some cases. --- src/gallium/drivers/radeonsi/si_shader.c | 67 ++-- 1 file changed, 20 insertions(+), 47 deletions(-) diff --git

[Mesa-dev] [PATCH] radeonsi: Fix build on LLVM < 3.9

2017-01-31 Thread Tom Stellard
This was broken by: e0cc0a614c96011958bc3a1b84da9168e0e1ccbb --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgs

[Mesa-dev] [PATCH] radeonsi: Fix build on LLVM < 3.9 v2

2017-01-31 Thread Tom Stellard
This was broken by: e0cc0a614c96011958bc3a1b84da9168e0e1ccbb v2: - Use preprocessor macro --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/

Re: [Mesa-dev] [PATCH] radv/ac: enable loop unrolling.

2017-02-27 Thread Tom Stellard
On Fri, Feb 24, 2017 at 03:30:50PM -0800, Matt Arsenault wrote: > > > On Feb 24, 2017, at 14:39, Marek Olšák wrote: > > > > On Fri, Feb 24, 2017 at 7:20 PM, Matt Arsenault wrote: > >> > >> On Feb 24, 2017, at 01:45, Marek Olšák wrote: > >> > >> The main requirement is that if there is indire

Re: [Mesa-dev] [PATCH 07/18] gallium/radeon: re-enable unsafe math for graphics shaders

2015-07-28 Thread Tom Stellard
ee. > Hi Marek, This patch is: Reviewed-by: Tom Stellard Setting this fast-math flags on individual floating-point instructions may have an even bigger impact, because this function attribute is only used in a few places. Here is documentation for the fast-math flags: http://llvm.org/docs/La

Re: [Mesa-dev] [PATCH 05/18] gallium/radeon: move r600-specific code to r600g

2015-07-28 Thread Tom Stellard
On Tue, Jul 28, 2015 at 12:05:40PM +0200, Marek Olšák wrote: > From: Marek Olšák > Reviewed-by: Tom Stellard > --- > src/gallium/drivers/r600/r600_llvm.c | 152 > - > .../drivers/radeon/radeon_setup_tgsi_llvm.c| 150 -

Re: [Mesa-dev] [PATCH 1/3] gallivm: Don't use raw_debug_ostream for dissasembling

2015-07-29 Thread Tom Stellard
On Wed, Jul 29, 2015 at 09:54:05AM +0100, Jose Fonseca wrote: > On 23/07/15 17:06, Jose Fonseca wrote: > > On 20/07/15 21:39, Jose Fonseca wrote: > >> On 20/07/15 18:35, Tom Stellard wrote: > >>> All LLVM API calls that require an ostream object have been remo

Re: [Mesa-dev] [PATCH 08/18] radeonsi: don't use llvm.AMDIL.fraction for FRC and DFRAC

2015-07-31 Thread Tom Stellard
Ref floor = lp_build_intrinsic(builder, "floor", > emit_data->dst_type, The intrinsics name should be "llvm.floor.f32" for float and "llvm.floor.f64" for double. With that fixed, this is: Reviewed-by: Tom Stellard > +

Re: [Mesa-dev] [PATCH 08/18] radeonsi: don't use llvm.AMDIL.fraction for FRC and DFRAC

2015-07-31 Thread Tom Stellard
On Fri, Jul 31, 2015 at 04:59:19PM +0200, Marek Olšák wrote: > On Fri, Jul 31, 2015 at 4:18 PM, Tom Stellard wrote: > > On Tue, Jul 28, 2015 at 12:05:43PM +0200, Marek Olšák wrote: > >> From: Marek Olšák > >> > >> There are 2 reasons for this: > >> -

Re: [Mesa-dev] [PATCH] gallium/radeon: always use the llvm. prefix in intrinsic names

2015-08-04 Thread Tom Stellard
return; > > +} > > The code you're adding here uses spaces for indentation, whereas the > surrounding code seems to use tabs. With that fixed, > > Acked-by: Michel Dänzer > Reviewed-by: Tom Stellard > but Tom should take a look as well. > > > --

Re: [Mesa-dev] [PATCH] clover: clEnqueue* should block when asked for

2015-08-04 Thread Tom Stellard
On Mon, Aug 03, 2015 at 12:53:32PM +0300, Francisco Jerez wrote: > EdB writes: > > > As a side effect, this fix clRetain/ReleaseEvent Piglit test > > --- > > src/gallium/state_trackers/clover/api/transfer.cpp | 29 > > -- > > 1 file changed, 27 insertions(+), 2 deletions(-)

[Mesa-dev] [PATCH] clover: Properly initialize LLVM targets when linking with component libs

2015-08-07 Thread Tom Stellard
Calls to LLVMIntialize* fail when we are linking against individual component libraries rather than one large shared object, because we only include component libraries that are required by the drivers. We need to make sure to only initialize the targets that we need. CC: 10.6 --- configure.ac

[Mesa-dev] [PATCH 1/2] radeonsi/compute: Add some more debug printfs

2016-09-13 Thread Tom Stellard
--- 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 5041761..a79c224 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeon

[Mesa-dev] [PATCH 2/2] radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v2

2016-09-13 Thread Tom Stellard
This patch switches non-TGSI compute shaders over to using the HSA ABI described here: https://github.com/RadeonOpenCompute/ROCm-Docs/blob/master/AMDGPU-ABI.md The HSA ABI provides a much cleaner interface for compute shaders and allows us to share more code in the compiler with the HSA stack. T

[Mesa-dev] [PATCH 2/3] radeonsi: Add function for converting LLVM type to intrinsic string

2016-10-11 Thread Tom Stellard
The existing function only worked for integer types. --- src/gallium/drivers/radeonsi/si_shader.c | 42 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 8254cb

[Mesa-dev] [PATCH 3/3] radeonsi: Use the new image load/store intrinsic signatures

2016-10-11 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_shader.c | 59 +--- 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 4e07317..1f1fdf2 100644 --- a/src/gallium/drivers/radeonsi/

[Mesa-dev] [PATCH 1/3] radeonsi: Refactor image store/load intrinsic name creation

2016-10-11 Thread Tom Stellard
--- src/gallium/drivers/radeonsi/si_shader.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 49d4121..8254cb2 100644 --- a/src/gallium/drivers/radeonsi/si_

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Tom Stellard
On Tue, Oct 11, 2016 at 03:21:24PM +0200, Nicolai Hähnle wrote: > On 11.10.2016 07:36, Dave Airlie wrote: > > On 11 October 2016 at 12:13, Dave Airlie wrote: > >> On 11 October 2016 at 11:42, Dave Airlie wrote: > >>> On 11 October 2016 at 05:50, Dave Airlie wrote: > On 10 October 2016 at 21

[Mesa-dev] [PATCH 1/2] radv: Fix incorrect comment

2016-10-13 Thread Tom Stellard
--- src/amd/common/ac_nir_to_llvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index e6ff7c8..9c764c7 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2373,8 +2373,8

[Mesa-dev] [PATCH 2/2] radv: Use new image load/store intrinsic signatures

2016-10-13 Thread Tom Stellard
These were changed in LLVM r284024. --- src/amd/common/ac_nir_to_llvm.c | 131 1 file changed, 107 insertions(+), 24 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 9c764c7..4fba7d3 100644 --- a/src/amd/com

[Mesa-dev] [PATCH 1/2] radv: Fix incorrect comment

2016-10-13 Thread Tom Stellard
--- src/amd/common/ac_nir_to_llvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index e6ff7c8..9c764c7 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2373,8 +2373,8

Re: [Mesa-dev] [PATCH 2/2] radv: Use new image load/store intrinsic signatures

2016-10-13 Thread Tom Stellard
applies for me. I hope I didn't butcher anything inadvertently. > Hi, I just sent rebased patches. Can you try those. -Tom > Cheers, > Kai > > > Tom Stellard wrote on 13.10.2016 17:21: > > These were changed in LLVM r2840

[Mesa-dev] [PATCH 2/2] radv: Use new image load/store intrinsic signatures v2

2016-10-13 Thread Tom Stellard
These were changed in LLVM r284024. v2: - Only use float types for vdata of llvm.amdgcn.image.store. LLVM doesn't support integer types for this intrinsic. --- src/amd/common/ac_nir_to_llvm.c | 133 1 file changed, 108 insertions(+), 25 deletions(-)

Re: [Mesa-dev] [PATCH 08/19] gallium/radeon: clean up emit_declaration for temporaries

2016-08-10 Thread Tom Stellard
On Tue, Aug 09, 2016 at 12:36:37PM +0200, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > In the alloca'd array case, no longer create redundant and unused allocas > for the individual elements; create getelementptrs instead. Reviewed-by: Tom Stellard > --- &

Re: [Mesa-dev] [PATCH 09/19] gallium/radeon: simplify radeon_llvm_emit_fetch for direct array addressing

2016-08-10 Thread Tom Stellard
On Tue, Aug 09, 2016 at 12:36:38PM +0200, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > We can use the pointer stored in the temps array directly. Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 5 - > 1 file changed, 5 dele

Re: [Mesa-dev] [PATCH 10/19] gallium/radeon: simplify radeon_llvm_emit_store for direct array addressing

2016-08-10 Thread Tom Stellard
On Tue, Aug 09, 2016 at 12:36:39PM +0200, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > We can use the pointer stored in the temps array directly. Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 7 --- > 1 file changed, 7 dele

Re: [Mesa-dev] [PATCH 11/19] gallium/radeon: more descriptive names for LLVM temporaries in debug builds

2016-08-10 Thread Tom Stellard
On Tue, Aug 09, 2016 at 12:36:40PM +0200, Nicolai Hähnle wrote: > From: Nicolai Hähnle > This is a great idea. Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) >

Re: [Mesa-dev] [PATCH] radeonsi: initialize and finalize the LLVM function pass manager

2016-08-18 Thread Tom Stellard
On Fri, Aug 12, 2016 at 01:26:08AM +0200, Marek Olšák wrote: > From: Marek Olšák > > we should do that allegedly Reviewed-by: Tom Stellard > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sr

[Mesa-dev] [PATCH] radeonsi: Don't use global variables for tess lds

2016-08-26 Thread Tom Stellard
We were allocating global variables for the maximum LDS size which made the compiler think we were using all of LDS, which isn't the case. --- src/gallium/drivers/radeonsi/si_shader.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/s

Re: [Mesa-dev] nir/radv: workaround broken kilp support

2016-11-02 Thread Tom Stellard
On Wed, Nov 02, 2016 at 11:26:08AM +1000, Dave Airlie wrote: > So it appears at least the LLVM 3.9 backend can get confused > when it gets hit with if (cond) discard type constructs, and we > have a GLSL optimisation to convert this to discard_if, so I've > ported that to NIR, and enabled it for ra

[Mesa-dev] [PATCH] gallivm: Fix build after removal of deprecated attribute API

2016-11-07 Thread Tom Stellard
--- Build tested only so far. src/gallium/auxiliary/draw/draw_llvm.c| 6 +- src/gallium/auxiliary/gallivm/lp_bld_intr.c | 48 +++- src/gallium/auxiliary/gallivm/lp_bld_intr.h | 13 - src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 4 +- src/gallium/d

[Mesa-dev] [PATCH] gallivm: Fix build after removal of deprecated attribute API v2

2016-11-07 Thread Tom Stellard
v2: Fix adding parameter attributes with LLVM < 4.0. --- src/gallium/auxiliary/draw/draw_llvm.c| 6 +- src/gallium/auxiliary/gallivm/lp_bld_intr.c | 52 - src/gallium/auxiliary/gallivm/lp_bld_intr.h | 13 - src/gallium/auxiliary/gallivm/lp_bld_sample_

[Mesa-dev] [PATCH 2/2] llvmpipe: Fix build after removal of deprecated attribute API v2

2016-11-09 Thread Tom Stellard
From: Aaron Watry Applies on top of v3 of Tom's gallivm change. v2: - Tom Stellard: Use enums instread of strings. Signed-off-by: Aaron Watry CC: Tom Stellard CC: Jan Vesely --- src/gallium/drivers/llvmpipe/lp_state_fs.c| 2 +- src/gallium/drivers/llvmpipe/lp_state_setup.c | 3 +

  1   2   3   4   5   6   7   8   9   10   >