[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

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

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

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 @@

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 <marek.ol...@amd.com> > Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > Requested by Matt Arsenault. > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 9 ++--- >

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

[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 =

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 <thomas.stell...@amd.com> > --- > run.c | 1 + > 1 file changed, 1 i

Re: [Mesa-dev] New stable-branch 11.0 candidate pushed

2015-12-07 Thread Tom Stellard
: Use __attribute__((destructor)) instead of atexit(3) > > Jonathan Gray (1): > configure: check for python2.7 for PYTHON2 > > Kenneth Graunke (2): > i965: Fix fragment shader struct inputs. > i965: Fix scalar vertex shader struct outputs. > > Marek Olšák (2): >

Re: [Mesa-dev] Mesa 11.1.0 release candidate 2

2015-11-30 Thread Tom Stellard
> Nicolai Hähnle (1): > radeon: only suspend queries on flush if they haven't been suspended yet > > Timothy Arceri (2): > Revert "mesa: return initial value for VALIDATE_STATUS if pipe not > bound" > glsl: implement recent spec update to SSO

[Mesa-dev] [PATCH] clover: Handle NULL pipe_loader_device returned by pipe_loader_probe()

2015-11-30 Thread Tom Stellard
pipe_loader_probe() may initalize an entry in the device list to NULL, while still counting this device in the number of devices that it returns, so we need to handle this situation. --- This is the most simple fix possible to get clover working again. We can discuss fixing the other issues in

Re: [Mesa-dev] [PATCH] clover: Handle NULL pipe_loader_device returned by pipe_loader_probe()

2015-11-30 Thread Tom Stellard
On Mon, Nov 30, 2015 at 07:57:32PM +0200, Francisco Jerez wrote: > Tom Stellard <thomas.stell...@amd.com> writes: > > > pipe_loader_probe() may initalize an entry in the device list to NULL, > > while still counting this device in the number of devices that it > >

[Mesa-dev] [PATCH] clover: Check the return value of pipe_loader_probe() when probing for devices v2

2015-11-30 Thread Tom Stellard
When probing for devices, clover will call pipe_loader_probe() twice. The first time to retrieve the number of devices, and then second time to retrieve the device structures. We currently assume that the return value of both calls will be the same, but this will not be the case if a device

[Mesa-dev] [PATCH] clover: Check the return value of pipe_loader_probe() when probing for devices

2015-11-27 Thread Tom Stellard
When probing for devices, clover will call pipe_loader_probe() twice. The first time to retrieve the number of devices, and then second time to retrieve the device structures. We currently assume that the return value of both calls will be the same, but this will not be the case if a device

Re: [Mesa-dev] [PATCH] pipe-loader: fix off-by one error

2015-11-23 Thread Tom Stellard
re comparing the index, now we're comparing the size. > > Fixes: ff9cd8a67ca "pipe-loader: directly use > pipe_loader_sw_probe_null() at probe time" > Cc: mesa-sta...@lists.freedesktop.org > Cc: Tom Stellard <thomas.stell...@amd.com> > Reported-by: Tom Stellard &

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values

2015-11-19 Thread Tom Stellard
On Wed, Nov 18, 2015 at 05:43:31PM +, Emil Velikov wrote: > Hi Tom, > > Please flip the order of the patches and drop the now patch 1/2 from > the stable queue. > I'm confused about why I need to flip the order of the patches. -Tom > On 16 November 2015 at 2

Re: [Mesa-dev] [PATCH] radeon/llvm: Use llvm.AMDIL.exp intrinsic again for now

2015-11-19 Thread Tom Stellard
On Thu, Nov 19, 2015 at 11:17:12AM +0100, Nicolai Hähnle wrote: > On 19.11.2015 03:55, Tom Stellard wrote: > >On Thu, Nov 19, 2015 at 11:31:55AM +0900, Michel Dänzer wrote: > >>From: Michel Dänzer <michel.daen...@amd.com> > >> > >>llvm.exp2.f32 doesn't

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

2015-11-18 Thread Tom Stellard
On Wed, Nov 18, 2015 at 03:53:37PM +0100, Hans de Goede wrote: > Hi, > > On 13-11-15 19:51, Tom Stellard wrote: > > 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 ba

Re: [Mesa-dev] [PATCH] radeon/llvm: Use llvm.AMDIL.exp intrinsic again for now

2015-11-18 Thread Tom Stellard
On Thu, Nov 19, 2015 at 11:31:55AM +0900, Michel Dänzer wrote: > From: Michel Dänzer > > llvm.exp2.f32 doesn't work in some cases yet. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92709 > Signed-off-by: Michel Dänzer > --- > > Once

[Mesa-dev] [PATCH 2/2] radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values

2015-11-16 Thread Tom Stellard
The compiler has more information and is able to optimize the bits it sets in these registers. CC: --- src/gallium/drivers/radeonsi/si_compute.c | 37 ++- src/gallium/drivers/radeonsi/si_shader.c | 2 ++ 2 files changed, 9

[Mesa-dev] [PATCH 1/2] radeonsi: Rename si_shader::ls_rsrc{1, 2} to si_shader::rsrc{1, 2}

2015-11-16 Thread Tom Stellard
In the future, these will be used by other shaders types. CC: --- src/gallium/drivers/radeonsi/si_shader.h| 4 ++-- src/gallium/drivers/radeonsi/si_state_draw.c| 4 ++-- src/gallium/drivers/radeonsi/si_state_shaders.c | 4 ++-- 3 files changed, 6

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

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

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 <marek.ol...@amd.com> > Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > No difference according to shader-db. > --- > src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 6

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 <marek.ol...@amd.com> > Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > No difference according to shader-db. (with the new S_ABS_I32 pattern) > --- > .../drivers/radeon/radeon_se

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 <marek.ol...@amd.com> > Reviewed-by: Tom Stellard <thomas.stell...@amd.comd@amd.com> > The increase in VGPRs in unfortunate, but the decrease in the scratch size > is always welcome. >

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 <marek.ol...@amd.com> > > This removes "v_mov v0, 0" which typically occurs before exports. > Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > Totals: > SGPRS: 34

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 <thomas.stell...@amd.com> wrote: > > This fixes a race condition in the glx-multithreaded-shader-compile > > test. > > > > v2: > >

[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

[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

[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

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.

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

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 <thomas.stell...@amd.com> wrote: > > Drivers and state trackers that use LLVM for generating code, must > > register the targets they use with L

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 <thomas.stell...@amd.com> wrote: > > This fixes a race condition in the glx-multithreaded-shader-compile > > test. > > > > CC: "10.6 11

[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

[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

[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] 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

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

2015-09-08 Thread Tom Stellard
rcus of pain. > > Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk> Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > --- > configure.ac | 33 +++-- > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/configure.ac b

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

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 <oded.gab...@gmail.com> > CC: "10.6" <mesa-sta...@lists.freedesktop.org> > --- You should add 11.0 to the CC too. This patch is: Reviewed-by: Tom Stellard <thomas.stell...@amd.com> But I wonder why

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 <t..

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 <marek.ol...@amd.com> > Reviewed-by: Tom Stellard <thomas.stell...@amd.com> > Just a cleanup I had made a long time ago and forgot about. > --- > src/gallium/drivers

[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

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

2015-08-04 Thread Tom Stellard
Reviewed-by: Tom Stellard thomas.stell...@amd.com but Tom should take a look as well. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ mesa-dev

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 edb+m...@sigluy.net 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

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

2015-07-31 Thread Tom Stellard
and llvm.floor.f64 for double. With that fixed, this is: Reviewed-by: Tom Stellard thomas.stell...@amd.com + emit_data-args[0], 1, + LLVMReadNoneAttribute); + emit_data-output[emit_data-chan

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 t...@stellard.net wrote: On Tue, Jul 28, 2015 at 12:05:43PM +0200, Marek Olšák wrote: From: Marek Olšák marek.ol...@amd.com There are 2 reasons for this: - LLVM optimization passes

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 removed from the disassemble() function, so we

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

2015-07-28 Thread Tom Stellard
Marek, This patch is: Reviewed-by: Tom Stellard thomas.stell...@amd.com 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

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 marek.ol...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com --- src/gallium/drivers/r600/r600_llvm.c | 152 - .../drivers/radeon/radeon_setup_tgsi_llvm.c

[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

[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

[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

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 marek.ol...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com --- src/gallium/drivers/radeonsi/si_compute.c | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 8 +++- src/gallium/drivers/radeonsi

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 marek.ol...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com Cc: 10.5 10.6 mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/radeonsi/si_shader.c| 49 ++--- src

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 thomas.stell...@amd.com 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. This seems

[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.

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

2015-07-10 Thread Tom Stellard
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 thomas.stell...@amd.com + * + */ + +#ifdef __cplusplus +extern C { +#endif + +struct

[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 mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/clover/core/event.cpp | 7 ---

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 force X/xcb

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 curroje...@riseup.net wrote: Emil Velikov emil.l.veli...@gmail.com writes: Hi Tom, On 31 March 2015 at 15:29, Francisco Jerez curroje...@riseup.net wrote: Tom Stellard thomas.stell

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 baker.dyla...@gmail.com 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

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 imir...@alum.mit.edu wrote: On Sun, Jun 21, 2015 at 11:33 PM, Michel Dänzer mic...@daenzer.net wrote: On 22.06.2015 00:31, Ilia Mirkin wrote: On Sun, Jun 21, 2015 at 12:22 PM, Emil

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 mar...@gmail.com wrote: From: Marek Olšák marek.ol...@amd.com --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index

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 marek.ol...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 34d1ac9..e6d947e

[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): -

[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 @@

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

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

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

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

[Mesa-dev] XDC2015: Call for papers

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

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

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

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

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

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

2015-05-12 Thread Tom Stellard
+ * 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: Tom Stellard thomas.stell

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

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

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

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

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

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

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

2015-05-07 Thread Tom Stellard
: Tom Stellard thomas.stell...@amd.com + * + */ + +#include stdio.h + +/** + * \file + * + * threadsafe_context is a wrapper around a pipe_context to make it thread + * safe. + */ + +#include os/os_thread.h +#include pipe/p_context.h +#include util/u_memory.h + +#include threadsafe.h + + + +struct

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

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

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

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

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

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

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

2015-05-06 Thread Tom Stellard
'r600_begin_query' should return a value [-Wreturn-type] return; ^ Signed-off-by: Vinson Lee v...@freedesktop.org Reviewed-by: Tom Stellard thomas.stell...@amd.com --- src/gallium/drivers/radeon/r600_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

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

2015-05-05 Thread Tom Stellard
On Tue, May 05, 2015 at 03:48:29PM +0100, Emil Velikov wrote: On 4 May 2015 at 18:11, Ilia Mirkin imir...@alum.mit.edu wrote: On Mon, May 4, 2015 at 12:47 PM, Tom Stellard t...@stellard.net wrote: On Mon, May 04, 2015 at 10:13:19AM -0400, Ilia Mirkin wrote: On Mon, May 4, 2015 at 10:04 AM

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

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

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

2015-05-04 Thread Tom Stellard
On Mon, May 04, 2015 at 10:13:19AM -0400, Ilia Mirkin wrote: On Mon, May 4, 2015 at 10:04 AM, Tom Stellard t...@stellard.net wrote: On Sat, May 02, 2015 at 01:31:41PM -0400, Ilia Mirkin wrote: On Sat, May 2, 2015 at 1:19 PM, EdB edb+m...@sigluy.net wrote: The standard ICD file path is /etc

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

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

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

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

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

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

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

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

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

2015-04-24 Thread Tom Stellard
On Fri, Apr 24, 2015 at 12:59:53PM +0200, EdB wrote: Since clover should compile use -std=c++11, compat classes are no longer neccessary Thank you for working on this, it is a nice improvement. I will try to review/test these early next week. Thanks, Tom EdB (4): clover: remove compat

Re: [Mesa-dev] [PATCH] gallium/radeon: don't crash when getting out-of-bounds TEMP references

2015-04-23 Thread Tom Stellard
On Sat, Apr 11, 2015 at 09:11:13PM +0200, Marek Olšák wrote: From: Marek Olšák marek.ol...@amd.com Reviewed-by: Tom Stellard thomas.stell...@amd.com --- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeon

Re: [Mesa-dev] [PATCH 2/2] clover: remove pre llvm 3.5.0 compatibility code

2015-04-20 Thread Tom Stellard
On Sun, Apr 19, 2015 at 10:50:19AM +0200, EdB wrote: --- Reviewed-by: Tom Stellard thomas.stell...@amd.com .../state_trackers/clover/llvm/invocation.cpp | 23 ++ 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm

Re: [Mesa-dev] [PATCH 1/2] clover: make llvm = 3.5.0 and c++11 mandatory

2015-04-20 Thread Tom Stellard
On Sun, Apr 19, 2015 at 10:50:18AM +0200, EdB wrote: Clover not longer compile with llvm = 3.5.0 since e1d363b3 e1d363b3 implies c++11 and llvm 3.5.0 CXXFLAGS provided it No one seems to have noticed it. It's now official. Thanks for working on this. --- configure.ac

[Mesa-dev] [PATCH 3/3] radeon/llvm: Improve codegen for KILL_IF

2015-04-13 Thread Tom Stellard
Rather than emitting one kill instruction per component of KILL_IF's src reg, we now or the components of the src register together and use the result as a condition for just one kill instruction. shader-db stats (bonaire): 979 shaders Totals: SGPRS: 34872 - 34848 (-0.07 %) VGPRS: 20696 - 20676

[Mesa-dev] [PATCH 2/3] radeon/llvm: Run LLVM's instruction combining pass

2015-04-13 Thread Tom Stellard
This should improve code quality in general and will help with some future changes to how we emit kill instructions. shader-db shows a few regressions, but these don't seem to be the result of deficiencies in instcombine. They're mostly caused by the scheduler making different decisions than

[Mesa-dev] [PATCH 1/3] radeonsi: Add header and footer to shader stat dump

2015-04-13 Thread Tom Stellard
This makes it easier to parse. --- src/gallium/drivers/radeonsi/si_shader.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b4709ac..89f02ab 100644 ---

[Mesa-dev] [PATCH shader-db 1/5] run.c: Use computed value of max_threads

2015-04-13 Thread Tom Stellard
--- run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.c b/run.c index 414f21d..a9d370d 100644 --- a/run.c +++ b/run.c @@ -477,7 +477,7 @@ main(int argc, char **argv) if (signal(SIGSEGV, abort_handler) == SIG_ERR) fprintf(stderr, WARNING: could not install

[Mesa-dev] [PATCH shader-db 3/5] run.c: Add -1 option for disabling multi-threading

2015-04-13 Thread Tom Stellard
--- run.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/run.c b/run.c index 3027004..8dc1be0 100644 --- a/run.c +++ b/run.c @@ -276,7 +276,9 @@ const struct platform platforms[] = { void print_usage(const char *prog_name) { fprintf(stderr, -

[Mesa-dev] [PATCH shader-db 4/5] Add si-report.py for parsing dumps from radeonsi

2015-04-13 Thread Tom Stellard
--- si-report.py | 324 +++ 1 file changed, 324 insertions(+) create mode 100755 si-report.py diff --git a/si-report.py b/si-report.py new file mode 100755 index 000..fbeed11 --- /dev/null +++ b/si-report.py @@ -0,0 +1,324 @@

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