Re: [Mesa-dev] [PATCH 04/11] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 3:18 AM, Iago Toral wrote: > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/nir_print.c | 73 >> ++-- &

Re: [Mesa-dev] [PATCH 03/11] glsl: shader-enum to name debug fxns

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 9:52 AM, Iago Toral wrote: > On Tue, 2015-09-15 at 08:07 -0400, Rob Clark wrote: >> On Tue, Sep 15, 2015 at 2:55 AM, Iago Toral wrote: >> > On Sun, 2015-09-13 at 11:51 -0400, Rob Clark wrote: >> >> From: Rob Clark >&g

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: > On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> The vertex shader lowering adds calculation for CLIPDIST, if ne

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 12:49 PM, Rob Clark wrote: > On Tue, Sep 15, 2015 at 12:39 PM, Erik Faye-Lund wrote: >> On Mon, Sep 14, 2015 at 11:53 AM, Erik Faye-Lund wrote: >>> On Sun, Sep 13, 2015 at 5:51 PM, Rob Clark wrote: >>>> From: Rob Clark >>>

Re: [Mesa-dev] [PATCH 09/11] nir: add lowering stage for user-clip-planes / clipdist

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 1:10 PM, Erik Faye-Lund wrote: >> I guess I'd care about it more once I supported MSAA ;-) >> >> (and tbh, all this effort was mostly just to get neverball to render >> correctly :-P) > > Oh, I just meant that it might be neat to add to the commit message. I > wouldn't go a

[Mesa-dev] [PATCH] nir: add lowering for ffract

2015-09-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h| 3 +++ src/glsl/nir/nir_opt_algebraic.py | 1 + 2 files changed, 4 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index f0acd75..284fccd 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir

[Mesa-dev] [PATCH 3/3] nir/print: print symbolic names from shader-enum

2015-09-15 Thread Rob Clark
From: Rob Clark v2: split out moving of FILE *fp into state structure into it's own (more complete patch) to reduce the noise in this one Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 45 ++--- 1 file changed, 42 insertions(+), 3 dele

[Mesa-dev] [PATCH 1/3] glsl: shader-enum to name debug fxns

2015-09-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/Makefile.am | 1 + src/glsl/shader_enums.c | 204 ++ src/glsl/shader_enums.h | 53 src/mesa/Makefile.sources | 4 +- 4 files changed, 261 insertions(+), 1 deletion

[Mesa-dev] [PATCH 0/3] shader-enum to name helpers

2015-09-15 Thread Rob Clark
From: Rob Clark Extracted out from previous patchset, rebased, and updated the nir-print to split out the print_state refactoring (which is now a bit more complete) from the use of shader_enum-to-name helpers. Rob Clark (3): glsl: shader-enum to name debug fxns nir/print: bit of state

[Mesa-dev] [PATCH 2/3] nir/print: bit of state refactoring

2015-09-15 Thread Rob Clark
From: Rob Clark Rename print_var_state to print_state, and stuff FILE ptr into the state object. This avoids passing around an extra parameter everywhere. Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 95 +++- 1 file changed, 54

Re: [Mesa-dev] [PATCH 2/3] nir/print: bit of state refactoring

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 8:48 PM, Connor Abbott wrote: > On Tue, Sep 15, 2015 at 7:33 PM, Rob Clark wrote: >> From: Rob Clark >> >> Rename print_var_state to print_state, and stuff FILE ptr into the state >> object. This avoids passing around an extra parameter ever

Re: [Mesa-dev] [PATCH 2/3] nir/print: bit of state refactoring

2015-09-15 Thread Rob Clark
On Tue, Sep 15, 2015 at 9:50 PM, Connor Abbott wrote: > On Tue, Sep 15, 2015 at 9:42 PM, Rob Clark wrote: >> On Tue, Sep 15, 2015 at 8:48 PM, Connor Abbott wrote: >>> On Tue, Sep 15, 2015 at 7:33 PM, Rob Clark wrote: >>>> From: Rob Clark >>>> >&

[Mesa-dev] [PATCH 2/3] nir/print: bit of state refactoring

2015-09-16 Thread Rob Clark
From: Rob Clark Rename print_var_state to print_state, and stuff FILE ptr into the state object. This avoids passing around an extra parameter everywhere. v2: even more extensive conversion.. use state *everywhere* instead of FILE ptr, and convert nir_print_instr() to use state as well Signed

Re: [Mesa-dev] [PATCH 1/3] glsl: shader-enum to name debug fxns

2015-09-16 Thread Rob Clark
On Wed, Sep 16, 2015 at 11:22 AM, Emil Velikov wrote: > Hi Rob, > > On 16 September 2015 at 00:33, Rob Clark wrote: > >> diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources >> index ed9848c..2a719a0 100644 >> --- a/src/mesa/Makefile.sources >

[Mesa-dev] [PATCH 4/4] freedreno/ir3: lower txp/clamp in NIR

2015-09-16 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 53 -- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3

[Mesa-dev] [PATCH 1/4] nir/lower_tex_proj: split out project_src() helper

2015-09-16 Thread Rob Clark
From: Rob Clark Split this out to reduce noise in later patches. Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_tex_projector.c | 146 + 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/src/glsl/nir/nir_lower_tex_projector.c b/src/glsl/nir

[Mesa-dev] [PATCH 3/4] nir/lower_tex_proj: add support to clamp texture coords

2015-09-16 Thread Rob Clark
From: Rob Clark Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in the case of projected coords, the clamping needs to happen *after* projection. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h

[Mesa-dev] [PATCH 2/4] nir/lower_tex_proj: add support projector lowering per sampler type

2015-09-16 Thread Rob Clark
From: Rob Clark Some hardware, such as adreno a3xx, supports txp on some but not all sampler types. In this case we want more fine grained control over which texture projectors get lowered. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 2 +- src/glsl/nir

Re: [Mesa-dev] [PATCH 3/4] nir/lower_tex_proj: add support to clamp texture coords

2015-09-16 Thread Rob Clark
On Wed, Sep 16, 2015 at 2:07 PM, Rob Clark wrote: > From: Rob Clark > > Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the > shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in > the case of projected coords, the clamping needs to happen *afte

Re: [Mesa-dev] [PATCH 2/4] nir/lower_tex_proj: add support projector lowering per sampler type

2015-09-16 Thread Rob Clark
On Wed, Sep 16, 2015 at 2:11 PM, Ilia Mirkin wrote: > On Wed, Sep 16, 2015 at 2:07 PM, Rob Clark wrote: >> From: Rob Clark >> >> Some hardware, such as adreno a3xx, supports txp on some but not all >> sampler types. In this case we want more fine grained co

Re: [Mesa-dev] [PATCH 06/11] glsl: add SYSTEM_VALUE_VERTEX_CNT

2015-09-16 Thread Rob Clark
On Sun, Sep 13, 2015 at 11:51 AM, Rob Clark wrote: > From: Rob Clark > > Used internally in freedreno/ir3 to calc stream-out position. Seems > like a generic enough way to implement stream-out (using str instrs), > plus it avoids compiler warnings by sneaking in a non-enum va

Re: [Mesa-dev] [PATCH 06/11] glsl: add SYSTEM_VALUE_VERTEX_CNT

2015-09-16 Thread Rob Clark
On Wed, Sep 16, 2015 at 7:34 PM, Ilia Mirkin wrote: > On Wed, Sep 16, 2015 at 7:30 PM, Rob Clark wrote: >> On Sun, Sep 13, 2015 at 11:51 AM, Rob Clark wrote: >>> From: Rob Clark >>> >>> Used internally in freedreno/ir3 to calc stream-out position. Se

[Mesa-dev] [PATCH 6/6] freedreno/ir3: lower txp/clamp in NIR

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 8 +++- src/gallium/drivers/freedreno/a4xx/fd4_texture.c | 8 +++- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 56 -- 3 files changed, 44 insertions(+), 28

[Mesa-dev] [PATCH 4/6] nir/lower_tex: support for lowering RECT textures

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 7 + src/glsl/nir/nir_lower_tex.c | 66 ++-- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 04dfc97..a40dbae

[Mesa-dev] [PATCH 0/6] Updated nir texture lowering

2015-09-17 Thread Rob Clark
From: Rob Clark Update of the patchset sent yesterday: 1) rename to nir_lower_tex since it is no longer just lowering projector 2) split configuration options out into nir_lower_tex_options 3) add RECT lowering (also needed to get coord clamp working properly for RECT textures Rob Clark

[Mesa-dev] [PATCH 3/6] nir/lower_tex: add support projector lowering per sampler type

2015-09-17 Thread Rob Clark
From: Rob Clark Some hardware, such as adreno a3xx, supports txp on some but not all sampler types. In this case we want more fine grained control over which texture projectors get lowered. v2: split out nir_lower_tex_options struct to make it easier to add the additional parameters coming in

[Mesa-dev] [PATCH 1/6] nir: rename nir_lower_tex_projector

2015-09-17 Thread Rob Clark
From: Rob Clark Since the following patches will add additional tex-lowering related functionality, which doesn't make sense to split out into a separate pass (as they would require duplication of the projector lowering logic), let's give this pass a more generic name. Signed-off-by:

[Mesa-dev] [PATCH 5/6] nir/lower_tex: add support to clamp texture coords

2015-09-17 Thread Rob Clark
From: Rob Clark Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in the case of projected coords, the clamping needs to happen *after* projection. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h

[Mesa-dev] [PATCH 2/6] nir/lower_tex: split out project_src() helper

2015-09-17 Thread Rob Clark
From: Rob Clark Split this out to reduce noise in later patches. Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_tex.c | 146 +++ 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/src/glsl/nir/nir_lower_tex.c b/src/glsl/nir

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 9:27 AM, Emil Velikov wrote: > Hi Gottfried, > > On 17 September 2015 at 13:42, Gottfried Haider > wrote: >> I am getting this error on 7e286506 - comping mesa used to work fine >> on this system a couple of weeks ago >> >> CXXnir/nir_lower_samplers.lo >> CC ni

Re: [Mesa-dev] [PATCH 0/6] Updated nir texture lowering

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 3:15 PM, Eric Anholt wrote: > Rob Clark writes: > >> From: Rob Clark >> >> Update of the patchset sent yesterday: >> 1) rename to nir_lower_tex since it is no longer just lowering >>projector >> 2) split configuration option

[Mesa-dev] [PATCH 1/2] nir: add two-sided-color lowering pass

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_two_sided_color.c | 209 +++ 3 files changed, 212 insertions(+) create mode 100644 src/glsl/nir

[Mesa-dev] [PATCH 2/2] freedreno/ir3: use nir two-sided-color lowering

2015-09-17 Thread Rob Clark
From: Rob Clark With this, we completely switch over to nir lowering passes instead of tgsi_lowering. So one step closer to supporting direct glsl or spirv to nir support for freedreno a3xx/a4xx. Signed-off-by: Rob Clark --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 24

[Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 297858a..9d8c3f4 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1451,13 +1451,13 @@ typedef

[Mesa-dev] [PATCH 2/2] nir/print: print variable names

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index ca8059f..6e86140 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri wrote: > On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/nir.h | 10 +- >> 1 file changed, 5 insertions(+), 5 deletions(-

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:35 PM, Dieter Nützel wrote: > Am 18.09.2015 02:27, schrieb Rob Clark: >> >> On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri >> wrote: >>> >>> On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: >>>> >&

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:57 PM, Ilia Mirkin wrote: > On Thu, Sep 17, 2015 at 8:48 PM, Rob Clark wrote: >> On Thu, Sep 17, 2015 at 8:35 PM, Dieter Nützel wrote: >>> Am 18.09.2015 02:27, schrieb Rob Clark: >>>> >>>> On Thu, Sep 17, 2015 at 8:03 PM, Timo

[Mesa-dev] [PATCH 0/6] nir texture lowering

2015-09-18 Thread Rob Clark
From: Rob Clark Few cleanups in RECT and clamp lowering, in particular clamping for RECT textures happens in the texture's native dimensions rather than forcing RECT->2D lowering. Rob Clark (6): nir: rename nir_lower_tex_projector nir/lower_tex: split out project_src() help

[Mesa-dev] [PATCH 4/6] nir/lower_tex: support for lowering RECT textures

2015-09-18 Thread Rob Clark
From: Rob Clark v2: comments/suggestions from Ilia and Eric, split out get_texture_size() helper so we can use it in the next commit for clamping RECT textures. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 7 + src/glsl/nir/nir_lower_tex.c | 62

[Mesa-dev] [PATCH 5/6] nir/lower_tex: add support to clamp texture coords

2015-09-18 Thread Rob Clark
From: Rob Clark Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in the case of projected coords, the clamping needs to happen *after* projection. v2: comments/suggestions from Ilia and Eric, use txs to get

[Mesa-dev] [PATCH 3/6] nir/lower_tex: support projector lowering per sampler type

2015-09-18 Thread Rob Clark
From: Rob Clark Some hardware, such as adreno a3xx, supports txp on some but not all sampler types. In this case we want more fine grained control over which texture projectors get lowered. v2: split out nir_lower_tex_options struct to make it easier to add the additional parameters coming in

[Mesa-dev] [PATCH 1/6] nir: rename nir_lower_tex_projector

2015-09-18 Thread Rob Clark
From: Rob Clark Since the following patches will add additional tex-lowering related functionality, which doesn't make sense to split out into a separate pass (as they would require duplication of the projector lowering logic), let's give this pass a more generic name. Signed-off-by:

[Mesa-dev] [PATCH 2/6] nir/lower_tex: split out project_src() helper

2015-09-18 Thread Rob Clark
From: Rob Clark Split this out to reduce noise in later patches. Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_tex.c | 146 +++ 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/src/glsl/nir/nir_lower_tex.c b/src/glsl/nir

[Mesa-dev] [PATCH 6/6] freedreno/ir3: lower txp/clamp in NIR

2015-09-18 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 56 -- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3

Re: [Mesa-dev] [PATCH 5/6] nir/lower_tex: add support to clamp texture coords

2015-09-18 Thread Rob Clark
On Fri, Sep 18, 2015 at 11:55 AM, Kenneth Graunke wrote: > On Friday, September 18, 2015 10:55:08 AM Rob Clark wrote: >> From: Rob Clark >> >> Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the >> shader to emulate GL_CLAMP. This is added to lowe

Re: [Mesa-dev] [PATCH 4/6] nir/lower_tex: support for lowering RECT textures

2015-09-18 Thread Rob Clark
On Fri, Sep 18, 2015 at 11:22 AM, Kenneth Graunke wrote: > On Friday, September 18, 2015 10:55:07 AM Rob Clark wrote: >> From: Rob Clark >> >> v2: comments/suggestions from Ilia and Eric, split out get_texture_size() >> helper so we can use it in the next commit

[Mesa-dev] [PATCH] nir/build: add nir_vec() helper

2015-09-18 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_builder.h| 18 ++ src/glsl/nir/nir_lower_load_const_to_scalar.c | 15 +-- src/glsl/nir/nir_lower_tex.c | 18 +- 3 files changed, 20 insertions(+), 31

Re: [Mesa-dev] [PATCH 1/2] nir: add two-sided-color lowering pass

2015-09-18 Thread Rob Clark
On Fri, Sep 18, 2015 at 10:29 AM, Eric Anholt wrote: > Rob Clark writes: > >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- > >> +static bool >> +nir_lower_two_sided_color_block(nir_block *block, void *void_state) >> +{ >> +

Re: [Mesa-dev] Pending issues of lollipop-x86

2015-09-25 Thread Rob Clark
On Fri, Sep 25, 2015 at 11:43 AM, Chih-Wei Huang wrote: > CC to mesa-dev for help. > > 2015-09-25 22:12 GMT+08:00 Chih-Wei Huang : >> 2015-09-25 16:21 GMT+08:00 Chih-Wei Huang : >>> Actually I'm testing your mesa 11.0 branch >>> to see if it is acceptable. >>> The major issue I found is the >>> Ca

Re: [Mesa-dev] Question: st/mesa and context-shareable shaders

2015-09-28 Thread Rob Clark
On Mon, Sep 28, 2015 at 8:55 AM, Jose Fonseca wrote: > > >> I see only 2 options out of this: >> >> 1) Removing the context pointer from the shader keys. If drivers need >> this, they should handle it by themselves. This will simplify st/mesa, >> because TCS, TES, GS won't need the variant-trackin

Re: [Mesa-dev] Pending issues of lollipop-x86

2015-09-29 Thread Rob Clark
btw, on the topic of lollipop issues, I don't suppose anyone reported yet (or started to debug) this issue: http://git.android-x86.org/?p=platform/frameworks/base.git;a=commitdiff;h=a0571d1e73a34251bf86de5ee85ac2c306c40ea3 I don't have the setup with me today, but I was still seeing a crash in me

[Mesa-dev] [RFC] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-09-30 Thread Rob Clark
From: Rob Clark Not actually working yet, ie. doesn't even compile yet, but an idea. Initial motivation was for drm_gralloc/pipe, which is essentially a sort of mini state-tracker, that needs to be able to share pipe_screen with libGL linked into the same process (to ensure we didn

Re: [Mesa-dev] [RFC] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-01 Thread Rob Clark
On Wed, Sep 30, 2015 at 7:37 PM, Marek Olšák wrote: > On Wed, Sep 30, 2015 at 10:43 PM, Rob Clark wrote: >> From: Rob Clark >> >> Not actually working yet, ie. doesn't even compile yet, but an idea. >> >> Initial motivation was for drm_gralloc/pipe, which

Re: [Mesa-dev] [RFC] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-01 Thread Rob Clark
ments > inline. > > On 30 September 2015 at 21:43, Rob Clark wrote: >> From: Rob Clark >> >> Not actually working yet, ie. doesn't even compile yet, but an idea. >> >> Initial motivation was for drm_gralloc/pipe, which is essentially a sort >> of mini sta

[Mesa-dev] [PATCH] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- Drop the idea of more ambitious re-arrangement if libs, but keep the pipe-loader refactoring. With this at least drm_gralloc could still dlopen() gallium_dri.so and then use the pipe-loader API to figure out which pipe driver to load and hand back a

Re: [Mesa-dev] [PATCH] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-02 Thread Rob Clark
On Fri, Oct 2, 2015 at 11:49 AM, Emil Velikov wrote: > On 1 October 2015 at 20:44, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> Drop the idea of more ambitious re-arrangement if libs, but keep the >> pipe-loader refactoring

Re: [Mesa-dev] [PATCH] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-02 Thread Rob Clark
On Fri, Oct 2, 2015 at 1:46 PM, Emil Velikov wrote: > On 2 October 2015 at 17:11, Rob Clark wrote: >> On Fri, Oct 2, 2015 at 11:49 AM, Emil Velikov >> wrote: >>> On 1 October 2015 at 20:44, Rob Clark wrote: >>>> From: Rob Clark >>>> >>&g

Re: [Mesa-dev] [PATCH] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-02 Thread Rob Clark
On Fri, Oct 2, 2015 at 2:41 PM, Emil Velikov wrote: > On 2 October 2015 at 19:02, Rob Clark wrote: >> On Fri, Oct 2, 2015 at 1:46 PM, Emil Velikov >> wrote: >>> On 2 October 2015 at 17:11, Rob Clark wrote: >>>> On Fri, Oct 2, 2015 at 11:49 AM, Emil Veli

[Mesa-dev] [PATCH] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-10-06 Thread Rob Clark
From: Rob Clark v2: now building both _static and _dynamic variants of libpipe_loader, targets can link appropriate version depending on whether they want to statically link or dynamically load pipe drivers. TODO probably we should just move inline_{drm,sw}_helper.h into pipe- loader but there

Re: [Mesa-dev] make distclean failing

2015-10-08 Thread Rob Clark
On Wed, Oct 7, 2015 at 6:00 PM, Andy Furniss wrote: > Noticed recently that make distclean is failing for me - > > Making distclean in mesa > make[2]: Entering directory '/mnt/sdb1/Src64/Mesa-git/mesa/src/mesa' > Makefile:2486: ../glsl/.deps/shader_enums.Plo: No such file or directory > make[2]: *

Re: [Mesa-dev] make distclean failing

2015-10-08 Thread Rob Clark
On Thu, Oct 8, 2015 at 11:39 AM, Emil Velikov wrote: > On 8 October 2015 at 16:12, Matt Turner wrote: >> On Thu, Oct 8, 2015 at 6:56 AM, Rob Clark wrote: >>> On Wed, Oct 7, 2015 at 6:00 PM, Andy Furniss wrote: >>>> Noticed recently that make distclean is fai

[Mesa-dev] [PATCH] glsl: move shader_enums into nir

2015-10-08 Thread Rob Clark
From: Rob Clark First step towards inverting the dependency between glsl and nir (so nir can be used without glsl). Also solves this issue with 'make distclean' Making distclean in mesa make[2]: Entering directory '/mnt/sdb1/Src64/Mesa-git/mesa/src/mesa' Makefile

Re: [Mesa-dev] [PATCH 1/7] glsl: move gl_shader_stage_name() definition to shader_enums.h

2015-10-08 Thread Rob Clark
On Thu, Oct 8, 2015 at 6:29 PM, Ilia Mirkin wrote: > On Thu, Oct 8, 2015 at 3:57 PM, Emil Velikov wrote: >> On 8 October 2015 at 19:38, Ilia Mirkin wrote: >>> On Thu, Oct 8, 2015 at 2:34 PM, Emil Velikov >>> wrote: On 8 October 2015 at 19:32, Ilia Mirkin wrote: > On Thu, Oct 8, 2015

Re: [Mesa-dev] [PATCH 1/7] glsl: move gl_shader_stage_name() definition to shader_enums.h

2015-10-08 Thread Rob Clark
On Thu, Oct 8, 2015 at 1:52 PM, Emil Velikov wrote: > On 8 October 2015 at 18:08, Ilia Mirkin wrote: >> On Thu, Oct 8, 2015 at 1:09 PM, Emil Velikov >> wrote: >>> This is a trivial enough function that can live in the header. While >>> we're here, add a STATIC_ASSERT for good measure. >>> >>> S

Re: [Mesa-dev] [PATCH] glsl: move shader_enums into nir

2015-10-09 Thread Rob Clark
On Fri, Oct 9, 2015 at 4:55 AM, Emil Velikov wrote: > On 8 October 2015 at 23:25, Rob Clark wrote: >> From: Rob Clark >> >> First step towards inverting the dependency between glsl and nir (so nir >> can be used without glsl). Also solves this issue with 

[Mesa-dev] [PATCH] glsl: couple shader_enums cleanups

2015-10-09 Thread Rob Clark
From: Rob Clark Add missing enum to gl_system_value_name() and move VARYING_SLOT_MAX / FRAG_RESULT_MAX / etc into shader_enums.h as suggested by Emil. Reported-by: Emil Velikov Signed-off-by: Rob Clark --- Note: punted on the STATIC_ASSERT() thing for now.. kinda wanted some- think more like

Re: [Mesa-dev] [PATCH] glsl: couple shader_enums cleanups

2015-10-09 Thread Rob Clark
On Fri, Oct 9, 2015 at 5:57 PM, Emil Velikov wrote: > On 9 October 2015 at 21:31, Rob Clark wrote: >> From: Rob Clark >> >> Add missing enum to gl_system_value_name() and move VARYING_SLOT_MAX / >> FRAG_RESULT_MAX / etc into shader_enums.h as suggested by Emil. >

Re: [Mesa-dev] [PATCH] glsl: couple shader_enums cleanups

2015-10-09 Thread Rob Clark
On Fri, Oct 9, 2015 at 8:07 PM, Emil Velikov wrote: > On 9 October 2015 at 23:27, Rob Clark wrote: >> On Fri, Oct 9, 2015 at 5:57 PM, Emil Velikov >> wrote: >>> On 9 October 2015 at 21:31, Rob Clark wrote: >>>> From: Rob Clark >>>> >>

[Mesa-dev] [PATCH 1/6] glsl: couple shader_enums cleanups

2015-10-10 Thread Rob Clark
From: Rob Clark Add missing enum to gl_system_value_name() and move VARYING_SLOT_MAX / FRAG_RESULT_MAX / etc into shader_enums.h as suggested by Emil. v2: add STATIC_ASSERT()'s Reported-by: Emil Velikov Signed-off-by: Rob Clark --- src/glsl/nir/shader_enums.c | 8 src/gls

[Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-10 Thread Rob Clark
From: Rob Clark Needed in NIR too, so move out of mesa/main/imports.c Signed-off-by: Rob Clark --- src/glsl/Makefile.am | 1 + src/mesa/main/imports.c | 148 -- src/mesa/main/imports.h | 38 -- src/util/Makefile.sources | 2 + src/util

[Mesa-dev] [PATCH 2/6] glsl: move builtin types to glsl_types.cpp

2015-10-10 Thread Rob Clark
From: Rob Clark First step at untangling NIR's dependency on glsl_types without bringing in the dependency on glsl_symbol_table. The builtin types are now in glsl_types (which will end up in NIR), but adding them to the symbol- table stays in builtin_types.cpp (which will not be part o

[Mesa-dev] [PATCH 0/6] Remove NIR dependency on GLSL

2015-10-10 Thread Rob Clark
From: Rob Clark This patchset removes the NIR dependency on GLSL (and includes resend of shader_enums cleanups w/ addition of STATIC_ASSERT()'s) Split up glsl_types so the builtin-types go w/ glsl_types but the parts that add them to glsl_symbol_table stay with glsl. This way we can

[Mesa-dev] [PATCH 6/6] glsl: (mostly) remove libglsl_util

2015-10-10 Thread Rob Clark
From: Rob Clark Now that NIR does not depend on glsl, we can (mostly[*]) get rid of the libglsl_util hack. [*] glsl_compiler is the one remaining user of libglsl_util Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/Makefile.am | 3 +-- src/gallium/targets/d3dadapter9/Makefile.am

[Mesa-dev] [PATCH 4/6] nir: use util/convert.h

2015-10-10 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_constant_expressions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py index 8fd9b10..ba28c0e 100644 --- a/src/glsl/nir

Re: [Mesa-dev] [PATCH 0/6] Remove NIR dependency on GLSL

2015-10-10 Thread Rob Clark
On Sat, Oct 10, 2015 at 2:47 PM, Rob Clark wrote: > From: Rob Clark > > This patchset removes the NIR dependency on GLSL (and includes resend > of shader_enums cleanups w/ addition of STATIC_ASSERT()'s) > > Split up glsl_types so the builtin-types go w/ glsl_types but th

Re: [Mesa-dev] [PATCH 3/6] glsl: move half<->float convertion to util

2015-10-10 Thread Rob Clark
On Sat, Oct 10, 2015 at 3:09 PM, Matt Turner wrote: > On Sat, Oct 10, 2015 at 11:47 AM, Rob Clark wrote: >> From: Rob Clark >> >> Needed in NIR too, so move out of mesa/main/imports.c >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/Makefil

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand wrote: > > > On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: >> >> On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand >> wrote: >> > >> > >> > On Mon, Dec 28, 2015 at 9:37 AM, Connor Abbott &g

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 1:58 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: >>> On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: >>>> On Tue, Dec 22, 2015 at 10:11 PM, Connor

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Mon, Dec 28, 2015 at 3:51 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 3:31 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 1:58 PM, Connor Abbott wrote: >>> On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: >>>> On Mon, Dec 28, 2015 at 12:37 PM, Connor

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Mon, Dec 28, 2015 at 4:23 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand wrote: >>> >>> >>> On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: >>>> >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Tue, Dec 29, 2015 at 12:36 PM, Jason Ekstrand wrote: > > > On Tue, Dec 29, 2015 at 7:32 AM, Rob Clark wrote: >> >> On Mon, Dec 28, 2015 at 4:23 PM, Connor Abbott >> wrote: >> > On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: >> >>> >&

[Mesa-dev] [PATCH] nir: extract out helper macros for running passes

2015-12-30 Thread Rob Clark
From: Rob Clark Note these are a bit uglier, due to avoidance of GNU C extensions. But drivers which do not need to be built with compilers that don't support the extension can wrap these macros with their own. Signed-off-by: Rob Clark --- So I can re-use in ir3. src/glsl/nir/

Re: [Mesa-dev] [PATCH] nir: extract out helper macros for running passes

2015-12-30 Thread Rob Clark
On Wed, Dec 30, 2015 at 10:32 AM, Rob Clark wrote: > diff --git a/src/mesa/drivers/dri/i965/brw_nir.c > b/src/mesa/drivers/dri/i965/brw_nir.c > index e031173..a8bed70 100644 > --- a/src/mesa/drivers/dri/i965/brw_nir.c > +++ b/src/mesa/drivers/dri/i965/brw_nir.c >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-31 Thread Rob Clark
On Tue, Dec 29, 2015 at 10:32 AM, Rob Clark wrote: >>>> If you do this, you'll be back to always needing a mutable copy. Most >>>> lowering and optimization passes die the moment they see a register. >>>> You'll >>>> either h

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-31 Thread Rob Clark
On Thu, Dec 31, 2015 at 12:05 PM, Connor Abbott wrote: > On Thu, Dec 31, 2015 at 10:16 AM, Rob Clark wrote: >> On Tue, Dec 29, 2015 at 10:32 AM, Rob Clark wrote: >>>>>> If you do this, you'll be back to always needing a mutable copy. Most >>>>>&g

Re: [Mesa-dev] [PATCH 1/8] tgsi: add ureg support for image decls

2016-01-04 Thread Rob Clark
On Sat, Jan 2, 2016 at 11:37 PM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > src/gallium/auxiliary/tgsi/tgsi_build.c| 62 + > src/gallium/auxiliary/tgsi/tgsi_dump.c | 10 +-- > src/gallium/auxiliary/tgsi/tgsi_parse.c| 4 +- > src/g

Re: [Mesa-dev] [PATCH 1/8] tgsi: add ureg support for image decls

2016-01-04 Thread Rob Clark
On Mon, Jan 4, 2016 at 11:03 AM, Ilia Mirkin wrote: > On Mon, Jan 4, 2016 at 10:30 AM, Rob Clark wrote: >> On Sat, Jan 2, 2016 at 11:37 PM, Ilia Mirkin wrote: >>> Signed-off-by: Ilia Mirkin >>> --- >>> src/gallium/auxiliary/tgsi/tgsi_build.c| 6

[Mesa-dev] [PATCH] nir: few missing struct names

2016-01-04 Thread Rob Clark
From: Rob Clark nir.h is a bit inconsistent about 'typedef struct {} nir_foo' vs 'typedef struct nir_foo {} nir_foo'. But missing struct name tags is inconvenient when you need a fwd declaration without pulling in all of nir. So add missing struct name tag for nir_variable

Re: [Mesa-dev] [PATCH 0/8] gl_FragCoord and gl_FrontFacing as system values

2016-01-08 Thread Rob Clark
On Fri, Jan 8, 2016 at 5:59 PM, Ian Romanick wrote: > On 01/08/2016 07:39 AM, Brian Paul wrote: >> On 01/07/2016 06:29 PM, Marek Olšák wrote: >>> Hi, >>> >>> This series adds the possibility for drivers to get gl_FragCoord and >>> gl_FrontFacing as system values. When FACE is a system value, it al

[Mesa-dev] [PATCH] nir: special hack for TGSI vs indirect inputs

2016-01-11 Thread Rob Clark
From: Rob Clark TGSI doesn't know about array input (or output[*]) variables. If the INPUT file is addressed indirectly, we must treat the entire INPUT "register file" as one contiguous array. However tgsi_to_nir cannot declare all the inputs as a single array var, as this woul

Re: [Mesa-dev] NIR, SCons, and Gallium

2016-01-11 Thread Rob Clark
On Mon, Jan 11, 2016 at 9:21 AM, Jose Fonseca wrote: > FWIW, I updated SCons to build NIR, both with GCC and MSVC: > > http://cgit.freedesktop.org/~jrfonseca/mesa/log/?h=scons-nir > > It was actually simpler than I anticipated. > > But I hit a wall -- there's actually no way to get NIR used with

Re: [Mesa-dev] [PATCH] nir: special hack for TGSI vs indirect inputs

2016-01-11 Thread Rob Clark
re you looking for PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE perchance? > > On Mon, Jan 11, 2016 at 11:44 AM, Rob Clark wrote: >> From: Rob Clark >> >> TGSI doesn't know about array input (or output[*]) variables. If the >> INPUT file is addressed indirectly, we must treat

Re: [Mesa-dev] [PATCH] nir: special hack for TGSI vs indirect inputs

2016-01-11 Thread Rob Clark
On Mon, Jan 11, 2016 at 1:52 PM, Marek Olšák wrote: > On Mon, Jan 11, 2016 at 6:07 PM, Rob Clark wrote: >> Quite possibly I am.. although wouldn't I still have the same issue >> with other state trackers? So in that case I'd have to detect >> indirect access, b

Re: [Mesa-dev] NIR, SCons, and Gallium

2016-01-11 Thread Rob Clark
On Mon, Jan 11, 2016 at 6:33 PM, Dave Airlie wrote: > On 12 January 2016 at 03:04, Rob Clark wrote: >> On Mon, Jan 11, 2016 at 9:21 AM, Jose Fonseca wrote: >>> FWIW, I updated SCons to build NIR, both with GCC and MSVC: >>> >>> http://cgit.freedesktop.

Re: [Mesa-dev] NIR, SCons, and Gallium

2016-01-11 Thread Rob Clark
On Mon, Jan 11, 2016 at 7:40 PM, Ilia Mirkin wrote: > On Mon, Jan 11, 2016 at 7:11 PM, Ian Romanick wrote: >> On 01/11/2016 06:21 AM, Jose Fonseca wrote: >>> FWIW, I updated SCons to build NIR, both with GCC and MSVC: >>> >>> http://cgit.freedesktop.org/~jrfonseca/mesa/log/?h=scons-nir >>> >>>

Re: [Mesa-dev] [android-x86-devel] Re: need-help: how to change to newest mesa in android-x86?

2016-01-13 Thread Rob Clark
On Wed, Jan 13, 2016 at 12:54 PM, Rob Herring wrote: > On Tue, Jan 12, 2016 at 8:06 PM, Chih-Wei Huang > wrote: >> 2016-01-13 6:29 GMT+08:00 Rob Herring : >>> On Tue, Jan 12, 2016 at 7:05 AM, Chih-Wei Huang >>> wrote: 2016-01-12 19:55 GMT+08:00 陈渝 : > hi, Rob, Dave, Zhiwei: > Tha

[Mesa-dev] [PATCH] ttn: use writemask for store_var

2016-01-13 Thread Rob Clark
From: Rob Clark Only user is freedreno, and after array-rework it can cope. Avoids generating loads for a store. Signed-off-by: Rob Clark --- Note: I need to finish some array re-work in ir3 in order to be able to deal w/ the writemasks, so I intend to push this as part of that series once

[Mesa-dev] [PATCH] ttn: add missing writemask on store_output

2016-01-13 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 46c9297..e127174 100644 --- a/src/gallium/auxiliary/nir

[Mesa-dev] [RFC] nir: const_index sanity

2016-01-13 Thread Rob Clark
From: Rob Clark --- An idea for how to bring some sanity to the wild-west of intrinsic const_index[] usage. Also w/ nir_print support, which could be split into other patch, but makes the nir_print output a bit nicer: intrinsic store_output (ssa_210, ssa_66) () (0, 15) /* base=0 wrmask=xyzw

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