Re: [Mesa-dev] [RFCv0 2/8] gallium: refactor pipe_shader_state to support multiple IR's

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 4:24 PM, Roland Scheidegger wrote: > Am 19.10.2015 um 21:54 schrieb Rob Clark: >> The goal is to allow the pipe driver to request something other than >> TGSI, but detect whether what is getting is TGSI vs what it requested. >> The pipe drivers will a

Re: [Mesa-dev] [PATCH 2/3] st/mesa: decouple shaders from contexts if they are shareable

2015-10-19 Thread Rob Clark
On Sat, Oct 10, 2015 at 9:09 PM, Marek Olšák wrote: > From: Marek Olšák > > --- > src/mesa/state_tracker/st_atom_shader.c | 10 +- > src/mesa/state_tracker/st_cb_bitmap.c | 2 +- > src/mesa/state_tracker/st_cb_drawpixels.c | 2 +- > src/mesa/state_tracker/st_context.c | 3

Re: [Mesa-dev] [PATCH 1/3] gallium: add PIPE_CAP_SHAREABLE_SHADERS

2015-10-19 Thread Rob Clark
On Sat, Oct 10, 2015 at 9:09 PM, Marek Olšák wrote: > From: Marek Olšák > > I'll let drivers figure out how to do it. > --- > src/gallium/docs/source/screen.rst | 2 ++ > src/gallium/drivers/freedreno/freedreno_screen.c | 1 + > src/gallium/drivers/i915/i915_screen.c | 1

Re: [Mesa-dev] [PATCH 1/3] gallium: add PIPE_CAP_SHAREABLE_SHADERS

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 7:07 PM, Marek Olšák wrote: > On Mon, Oct 19, 2015 at 11:52 PM, Rob Clark wrote: >> On Sat, Oct 10, 2015 at 9:09 PM, Marek Olšák wrote: >>> From: Marek Olšák >>> >>> I'll let drivers figure out how to do it. >&g

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
er.c?id=de6a004035f3de5879648f8afb4670ae82f4ad02 > > It shouldn't take long. They are pretty simple. I would be more > worried about Draw, but if your driver isn't supposed to be > feature-complete with the compatibility profile, you may as well > ignore it. > > Marek >

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Rob Clark
On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: > On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: >> On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: >>> Yes, drivers need to "dup" tokens if they want to keep them. Their >>> lifetime is the create

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Rob Clark
On Tue, Oct 20, 2015 at 11:21 AM, Marek Olšák wrote: > On Tue, Oct 20, 2015 at 5:17 PM, Ilia Mirkin wrote: >> On Tue, Oct 20, 2015 at 9:10 AM, Marek Olšák wrote: >>> On Tue, Oct 20, 2015 at 2:37 PM, Rob Clark wrote: >>>> On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšá

[Mesa-dev] [PATCH 4/7] nir: add couple array length fields

2015-10-24 Thread Rob Clark
From: Rob Clark This will simplify things somewhat in clone. Signed-off-by: Rob Clark --- src/glsl/nir/glsl_to_nir.cpp | 6 ++ src/glsl/nir/nir.h | 11 +++ 2 files changed, 17 insertions(+) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index

[Mesa-dev] [PATCH 1/7] nir: add nir_var_all enum

2015-10-24 Thread Rob Clark
Otherwise, passing -1 gets you: error: invalid conversion from 'int' to 'nir_variable_mode' [-fpermissive] Signed-off-by: Rob Clark --- src/glsl/nir/nir.c | 4 src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_lower_io.c | 2 +-

[Mesa-dev] [PATCH 5/7] nir: support to clone shaders

2015-10-24 Thread Rob Clark
Signed-off-by: Rob Clark --- src/glsl/Makefile.sources |1 + src/glsl/nir/nir.c|8 + src/glsl/nir/nir.h|2 + src/glsl/nir/nir_clone.c | 1012 + 4 files changed, 1023 insertions(+) create mode 100644 src/glsl/nir

[Mesa-dev] [PATCH 0/7] nir_shader_clone() and few bits

2015-10-24 Thread Rob Clark
From: Rob Clark Mostly the implementation of nir_shader_clone() for copying a NIR shader IR, plus couple cleanups, reference counting, and helper macros. The reference counting will be useful for mesa-st (and perhaps other state trackers), since there are cases when both mesa-st and the driver

[Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-24 Thread Rob Clark
From: Rob Clark Convenient place to put in some extra sanity checking, without making things messy for the drivers running the passes. TODO: convert ir3/vc4.. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 33 ++ src/mesa/drivers/dri/i965/brw_nir.c | 126

[Mesa-dev] [PATCH 3/7] nir: export update_if_uses() and add_def_uses()

2015-10-24 Thread Rob Clark
From: Rob Clark Add it to the private interface, since we'll need it for nir_clone(). Signed-off-by: Rob Clark --- src/glsl/nir/nir.c | 13 +++-- src/glsl/nir/nir.h | 2 ++ src/glsl/nir/nir_control_flow.c | 6 +++--- src/gls

[Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-10-24 Thread Rob Clark
From: Rob Clark For gallium, at least, we'll need this to manage shader's lifetimes, since in some cases both the driver and the state tracker will need to hold on to a reference for variant managing. Use nir_shader_mutable() before doing any IR opt/lowering/etc, to ensure you are not

[Mesa-dev] [PATCH 2/7] nir: some small cleanups

2015-10-24 Thread Rob Clark
The various cf nodes all get allocated w/ shader as their ralloc_parent, so lets make this more explicit. Plus couple other corrections/ clarifications. Signed-off-by: Rob Clark --- src/glsl/nir/nir.c | 18 +- src/glsl/nir/nir.h | 10 +- 2 files changed, 14 insertions

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-25 Thread Rob Clark
On Sun, Oct 25, 2015 at 8:05 AM, Erik Faye-Lund wrote: > On Sat, Oct 24, 2015 at 7:08 PM, Rob Clark wrote: >> From: Rob Clark >> >> +#define NIR_PASS_PROGRESS(pass, nir, ...) ({ \ >> + assert(nir_shader_is_mutable(nir)); \ >

[Mesa-dev] [PATCH 5/7] nir: support to clone shaders (v2)

2015-10-26 Thread Rob Clark
Signed-off-by: Rob Clark --- src/glsl/Makefile.sources | 1 + src/glsl/nir/nir.c| 8 + src/glsl/nir/nir.h| 2 + src/glsl/nir/nir_clone.c | 949 ++ 4 files changed, 960 insertions(+) create mode 100644 src/glsl/nir/nir_clone.c

[Mesa-dev] [PATCH 4.5/7] nir: add list_head to nir_src::ssa

2015-10-26 Thread Rob Clark
From: Rob Clark This will be used by clone. Possibly useful elsewhere. The list link will only be valid in ssa case, it fits in the padding in the union left from the larger nir_reg_src. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes (v2)

2015-10-26 Thread Rob Clark
From: Rob Clark Convenient place to put in some extra sanity checking, without making things messy for the drivers running the passes. v2: don't use GNU C ({}) extension Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 38 +++ src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 5/7] nir: support to clone shaders (v2)

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 11:27 AM, Rob Clark wrote: > Signed-off-by: Rob Clark fyi, branch which is using this at: https://github.com/freedreno/mesa/commits/wip-nir At this point it seems to be surviving piglit runs w/ NIR_TEST_CLONE=1 w/ freedreno. I did briefly try piglit runs for i965,

Re: [Mesa-dev] [PATCH 4/7] nir: add couple array length fields

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 1:52 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >> From: Rob Clark >> >> This will simplify things somewhat in clone. >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/glsl_

Re: [Mesa-dev] [PATCH 1/7] nir: add nir_var_all enum

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 1:56 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >> Otherwise, passing -1 gets you: >> >> error: invalid conversion from 'int' to 'nir_variable_mode' [-fpermissive] > > Yeah, I've nev

Re: [Mesa-dev] [PATCH 4.5/7] nir: add list_head to nir_src::ssa

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 2:01 PM, Jason Ekstrand wrote: > On Mon, Oct 26, 2015 at 8:26 AM, Rob Clark wrote: >> From: Rob Clark >> >> This will be used by clone. Possibly useful elsewhere. The list link >> will only be valid in ssa case, it fits in the padding in

Re: [Mesa-dev] [PATCH 5/7] nir: support to clone shaders (v2)

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 2:44 PM, Jason Ekstrand wrote: > On Mon, Oct 26, 2015 at 8:27 AM, Rob Clark wrote: >> Signed-off-by: Rob Clark >> --- >> src/glsl/Makefile.sources | 1 + >> src/glsl/nir/nir.c| 8 + >> src/glsl/nir/nir.h| 2 + &g

Re: [Mesa-dev] [PATCH 5/7] nir: support to clone shaders (v2)

2015-10-26 Thread Rob Clark
On Mon, Oct 26, 2015 at 6:56 PM, Jason Ekstrand wrote: > On Mon, Oct 26, 2015 at 12:53 PM, Rob Clark wrote: >> On Mon, Oct 26, 2015 at 2:44 PM, Jason Ekstrand wrote: >>> On Mon, Oct 26, 2015 at 8:27 AM, Rob Clark wrote: >>>> >>>> +static void * >&

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >> From: Rob Clark >> >> Convenient place to put in some extra sanity checking, without making >> things messy for the drivers running the passes. > >

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 3:40 PM, Jason Ekstrand wrote: > On Wed, Oct 28, 2015 at 10:37 AM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand >> wrote: >>> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >>>> From: Rob Clark >&

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: > On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 12:09 PM, Jason Ekstrand >> wrote: >>> On Sat, Oct 24, 2015 at 10:08 AM, Rob Clark wrote: >>>> From: Rob Clark >>>

Re: [Mesa-dev] [PATCH 7/7] nir: add helper macros for running NIR passes

2015-10-28 Thread Rob Clark
On Wed, Oct 28, 2015 at 6:01 PM, Jason Ekstrand wrote: > On Wed, Oct 28, 2015 at 2:49 PM, Rob Clark wrote: >> On Wed, Oct 28, 2015 at 5:24 PM, Connor Abbott wrote: >>> On Wed, Oct 28, 2015 at 1:37 PM, Rob Clark wrote: >>>> On Wed, Oct 28, 2015 at 12:09 PM, Jason E

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-10-31 Thread Rob Clark
On Fri, Oct 30, 2015 at 6:42 PM, Jason Ekstrand wrote: > On Fri, Oct 30, 2015 at 2:12 PM, Ian Romanick wrote: >> On 10/28/2015 10:01 PM, Jason Ekstrand wrote: >>> >>> On Oct 28, 2015 9:12 PM, "Kenneth Graunke" >> > wrote: On Wednesday, October 28, 2015 02:5

Re: [Mesa-dev] [PATCH 1/2] freedreno_ir3: Use nir_foreach_variable

2015-10-31 Thread Rob Clark
On Sat, Oct 31, 2015 at 10:51 AM, Boyan Ding wrote: > Ping? oh, didn't see this earlier.. Reviewed-by: Rob Clark (I'll push it when I get a chance if someone doesn't beat me to it..) > 2015-10-16 15:15 GMT+08:00 Boyan Ding : >> Signed-off-by: Boyan Ding >

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-10-31 Thread Rob Clark
On Sat, Oct 31, 2015 at 11:31 AM, Connor Abbott wrote: > On Sat, Oct 31, 2015 at 10:55 AM, Rob Clark wrote: >> On Fri, Oct 30, 2015 at 6:42 PM, Jason Ekstrand wrote: >>> On Fri, Oct 30, 2015 at 2:12 PM, Ian Romanick wrote: >>>> On 10/28/2015 10:01 PM, Jason Ekst

Re: [Mesa-dev] [PATCH 00/11] nir: Add a pass management framework

2015-10-31 Thread Rob Clark
On Sat, Oct 31, 2015 at 2:26 PM, Connor Abbott wrote: > On Sat, Oct 31, 2015 at 1:38 PM, Rob Clark wrote: >> On Sat, Oct 31, 2015 at 11:31 AM, Connor Abbott wrote: >>> On Sat, Oct 31, 2015 at 10:55 AM, Rob Clark wrote: >>>> On Fri, Oct 30, 2015 at 6:42 PM, Jason E

Re: [Mesa-dev] [PATCH 1/8] i965/nir: Add OPT() and OPT_V() macros for invoking NIR passes.

2015-11-03 Thread Rob Clark
On Tue, Nov 3, 2015 at 3:31 AM, Kenneth Graunke wrote: > OPT() is the normal macro for passes that return booleans, while OPT_V() > is a variant that works for passes that don't properly report progress. > (Such passes should be fixed to return a boolean, eventually.) > > These macros take care of

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >> From: Rob Clark >> >> For gallium, at least, we'll need this to manage shader's lifetimes, >> since in some cases both the driver and the state

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 5:58 PM, Jason Ekstrand wrote: > On Thu, Nov 5, 2015 at 10:53 AM, Rob Clark wrote: >> On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: >>> On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >>>> From: Rob Clark >>>> >

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 7:24 PM, Kenneth Graunke wrote: > On Saturday, October 24, 2015 01:07:59 PM Rob Clark wrote: >> From: Rob Clark >> >> For gallium, at least, we'll need this to manage shader's lifetimes, >> since in some cases both the driver and the

[Mesa-dev] [PATCH 2/7] nir: remove nir_variable::max_ifc_array_access

2015-11-06 Thread Rob Clark
From: Rob Clark No users. Signed-off-by: Rob Clark --- src/glsl/nir/glsl_to_nir.cpp | 9 - src/glsl/nir/nir.h | 13 - 2 files changed, 22 deletions(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index 57aba5b..0854a52 100644 --- a

[Mesa-dev] [PATCH 4/7] nir/print: show shader name/label if set

2015-11-06 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index 30220c5..bde7535 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir/nir_print.c @@ -973,6 +973,12

[Mesa-dev] [PATCH 5/7] nir/print: show # of uniforms/inputs/outputs

2015-11-06 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index bde7535..a110945 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir/nir_print.c @@ -979,6 +979,10

[Mesa-dev] [PATCH 7/7] nir: add nir_ssa_for_alu_src()

2015-11-06 Thread Rob Clark
From: Rob Clark Using something like: numer = nir_ssa_for_src(bld, alu->src[0].src, nir_ssa_alu_instr_src_components(alu, 0)); for alu src's with swizzle, like: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform

[Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs

2015-11-06 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_clip.c| 2 ++ src/glsl/nir/nir_lower_two_sided_color.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/glsl/nir/nir_lower_clip.c b/src/glsl/nir/nir_lower_clip.c index 31ccfb2..4a91527 100644 --- a/src

[Mesa-dev] [PATCH 3/7] nir: add array length field

2015-11-06 Thread Rob Clark
From: Rob Clark This will simplify things somewhat in clone. Signed-off-by: Rob Clark --- src/glsl/nir/glsl_to_nir.cpp | 5 + src/glsl/nir/nir.h | 5 + 2 files changed, 10 insertions(+) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index 0854a52

[Mesa-dev] [PATCH 1/7] nir: add nir_var_all enum

2015-11-06 Thread Rob Clark
Otherwise, passing -1 gets you: error: invalid conversion from 'int' to 'nir_variable_mode' [-fpermissive] Signed-off-by: Rob Clark --- I was going to convert the enum values to bitmask/flags which could be OR'd, but that doesn't play nicely w/ nir_variable::

[Mesa-dev] [PATCH 0/7] nir: few small patches that I've been collecting..

2015-11-06 Thread Rob Clark
From: Rob Clark From my ongoing clone + gallium glsl_to_nir branch.. figured I should tidy them up and send to list. Rob Clark (7): nir: add nir_var_all enum nir: remove nir_variable::max_ifc_array_access nir: add array length field nir/print: show shader name/label if set nir/print

Re: [Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs

2015-11-06 Thread Rob Clark
On Fri, Nov 6, 2015 at 6:23 PM, Jason Ekstrand wrote: > On Fri, Nov 6, 2015 at 8:35 AM, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/nir_lower_clip.c| 2 ++ >> src/glsl/nir/nir_lower_two_side

Re: [Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs

2015-11-06 Thread Rob Clark
On Fri, Nov 6, 2015 at 6:39 PM, Rob Clark wrote: > On Fri, Nov 6, 2015 at 6:23 PM, Jason Ekstrand wrote: >> On Fri, Nov 6, 2015 at 8:35 AM, Rob Clark wrote: >>> From: Rob Clark >>> >>> Signed-off-by: Rob Clark >>> --- >>> src/glsl/ni

Re: [Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs

2015-11-07 Thread Rob Clark
On Fri, Nov 6, 2015 at 10:20 PM, Jason Ekstrand wrote: > On Fri, Nov 6, 2015 at 5:10 PM, Rob Clark wrote: >> On Fri, Nov 6, 2015 at 6:39 PM, Rob Clark wrote: >>> On Fri, Nov 6, 2015 at 6:23 PM, Jason Ekstrand wrote: >>>> On Fri, Nov 6, 2015 at 8:35 AM, Rob Clark

Re: [Mesa-dev] [PATCH 6/7] nir: fix missing increments of num_inputs/num_outputs

2015-11-07 Thread Rob Clark
On Sat, Nov 7, 2015 at 10:59 AM, Jason Ekstrand wrote: > On Sat, Nov 7, 2015 at 5:21 AM, Rob Clark wrote: >> On Fri, Nov 6, 2015 at 10:20 PM, Jason Ekstrand wrote: >>> On Fri, Nov 6, 2015 at 5:10 PM, Rob Clark wrote: >>>> On Fri, Nov 6, 2015 at 6:39 PM, Rob Cla

[Mesa-dev] [RFCv2 07/13] freedreno/ir3: add support for NIR as preferred IR

2015-11-08 Thread Rob Clark
For now under debug flag, since only suitable for debugging/testing. --- src/gallium/drivers/freedreno/freedreno_screen.c | 5 - src/gallium/drivers/freedreno/freedreno_util.h | 1 + src/gallium/drivers/freedreno/ir3/ir3_shader.c | 16 3 files changed, 17 insertions(+),

[Mesa-dev] [RFCv2 06/13] mesa/st: add support for NIR as possible driver IR

2015-11-08 Thread Rob Clark
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 410 - src/mesa/state_tracker/st_glsl_to_tgsi.h | 5 + src/mesa/state_tracker/st_program.c| 118 +++-- src/mesa/state_tracker/st_program.h| 6 + 4 files changed, 520 insertions(+), 19 deletions(-

[Mesa-dev] [RFCv2 10/13] freedreno/ir3: support load_front_face intrinsic

2015-11-08 Thread Rob Clark
From: Rob Clark With tgsi_to_nir we get this as a normal input with VARYING_SLOT_FACE. But glsl_to_nir plus nir_lower_system_values this becomes an intrinsic. --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff

[Mesa-dev] [RFCv2 02/13] gallium: add NIR as a possible IR

2015-11-08 Thread Rob Clark
--- src/gallium/include/pipe/p_defines.h | 1 + src/gallium/include/pipe/p_state.h | 7 +++ 2 files changed, 8 insertions(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 0a9d98d..572461f 100644 --- a/src/gallium/include/pipe/p_defines.h +++

[Mesa-dev] [RFCv2 00/13] gallium: add support for NIR as alternate IR

2015-11-08 Thread Rob Clark
From: Rob Clark Things have progressed somewhat since the initial RFC, to the point that all sorts of common things are working (glmark2, xonotic, stk, etc), and piglit is *mostly* working (~330 regressions or so).. (This is with both VS and FS converted, fwiw, compared to initial RFC which was

[Mesa-dev] [RFCv2 11/13] freedreno/ir3: handle tex instrs w/ const offset

2015-11-08 Thread Rob Clark
From: Rob Clark --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 2320464..e77afcc 100644 --- a/src

[Mesa-dev] [RFCv2 01/13] gallium: refactor pipe_shader_state to support multiple IR's

2015-11-08 Thread Rob Clark
The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI

[Mesa-dev] [RFCv2 03/13] nir: allow pre-resolved sampler uniform locations

2015-11-08 Thread Rob Clark
From: Rob Clark With TGSI, the ir_variable::data.location gets fixed up to be a stage local location (rather than program global). In this case we need to skip the UniformStorage[location] lookup. --- src/glsl/nir/nir_lower_samplers.c | 23 --- 1 file changed, 16 insertions

[Mesa-dev] [RFCv2 05/13] gallium/auxiliary: introduce nir_emulate

2015-11-08 Thread Rob Clark
From: Rob Clark NIR equivalent of tgsi_emulate --- src/gallium/auxiliary/Makefile.sources | 2 + src/gallium/auxiliary/nir/nir_emulate.c | 139 src/gallium/auxiliary/nir/nir_emulate.h | 34 3 files changed, 175 insertions(+) create mode 100644 src

[Mesa-dev] [RFCv2 09/13] freedreno/ir3: handle large inputs/outputs

2015-11-08 Thread Rob Clark
From: Rob Clark Internally split them into vec4's.. although perhaps it makes sense to have a generic nir pass which could do this after lower_io? --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 67 +++--- 1 file changed, 47 insertions(+), 20 deletions(-) diff --

[Mesa-dev] [RFCv2 13/13] HACK: freedreno/a4xx: workaround glsl_to_nir hang..

2015-11-08 Thread Rob Clark
From: Rob Clark was getting a hang w/ smaller compmask which happens now with glsl_to_nir since not everything is a vec4 anymore.. --- src/gallium/drivers/freedreno/a4xx/fd4_program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a4xx

[Mesa-dev] [RFCv2 12/13] freedreno/ir3: don't ignore local vars

2015-11-08 Thread Rob Clark
From: Rob Clark With glsl_to_nir we end up with local variables, instead of global, for arrays. Note that we'll eventually have to do something more clever, I think, when we support multiple functions, but that will probably take some work in a few places. --- src/gallium/drivers/freedren

[Mesa-dev] [RFCv2 08/13] freedreno/ir3: fix const_index handling for uniforms

2015-11-08 Thread Rob Clark
When coming directly from glsl_to_nir (rather than via TGSI where information about, for example, mat4's is lost), both const_index fields will be used (vs. tgsi_to_nir where the 2nd is always zero). For example: decl_var uniform INTERP_QUALIFIER_NONE mat4 ModelViewProjectionMatrix (0, 0) dec

[Mesa-dev] [RFCv2 04/13] nir: add lowering pass for y-transform

2015-11-08 Thread Rob Clark
From: Rob Clark --- src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 12 ++ src/glsl/nir/nir_lower_wpos_ytransform.c | 320 +++ 3 files changed, 333 insertions(+) create mode 100644 src/glsl/nir

Re: [Mesa-dev] [RFCv2 03/13] nir: allow pre-resolved sampler uniform locations

2015-11-09 Thread Rob Clark
On Sun, Nov 8, 2015 at 7:58 PM, Timothy Arceri wrote: > On Sun, 2015-11-08 at 15:12 -0500, Rob Clark wrote: >> From: Rob Clark >> >> With TGSI, the ir_variable::data.location gets fixed up to be a stage >> local location (rather than program global). In this

Re: [Mesa-dev] [RFC PATCH 00/40] Rework/consolidate the pipe-loader business

2015-11-09 Thread Rob Clark
On Mon, Nov 9, 2015 at 8:30 AM, Emil Velikov wrote: > On 30 October 2015 at 17:57, Emil Velikov wrote: >> On 19 October 2015 at 18:41, Emil Velikov wrote: >>> On 19 October 2015 at 17:07, Brian Paul wrote: >> I'm not too familiar with this code or these changes but I'm wondering how >

Re: [Mesa-dev] [RFCv2 01/13] gallium: refactor pipe_shader_state to support multiple IR's

2015-11-10 Thread Rob Clark
On Tue, Nov 10, 2015 at 7:24 AM, Marek Olšák wrote: >> +/** >> + * The 'ir' parameter identifies whether the shader state contains TGSI >> + * tokens, etc. If the driver returns 'PIPE_SHADER_IR_TGSI' for the >> + * 'PIPE_SHADER_CAP_PREFERRED_IR' shader param, the ir will *always* be >> + * 'PIPE_

Re: [Mesa-dev] [RFCv2 06/13] mesa/st: add support for NIR as possible driver IR

2015-11-10 Thread Rob Clark
On Tue, Nov 10, 2015 at 10:59 AM, Connor Abbott wrote: > On Sun, Nov 8, 2015 at 3:12 PM, Rob Clark wrote: >> --- >> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 410 >> - >> src/mesa/state_tracker/st_glsl_to_tgsi.h | 5 + >> sr

Re: [Mesa-dev] [RFCv2 06/13] mesa/st: add support for NIR as possible driver IR

2015-11-10 Thread Rob Clark
R On Tue, Nov 10, 2015 at 10:47 AM, Marek Olšák wrote: > In my opinion, glsl_to_nir should be in its own file and independent > of glsl_to_tgsi. > > Marek > > On Sun, Nov 8, 2015 at 9:12 PM, Rob Clark wrote: >> --- >> src/mesa/stat

Re: [Mesa-dev] [RFC PATCH 00/40] Rework/consolidate the pipe-loader business

2015-11-11 Thread Rob Clark
On Mon, Nov 9, 2015 at 8:39 AM, Rob Clark wrote: > On Mon, Nov 9, 2015 at 8:30 AM, Emil Velikov wrote: >> On 30 October 2015 at 17:57, Emil Velikov wrote: >>> On 19 October 2015 at 18:41, Emil Velikov wrote: >>>> On 19 October 2015 at 17:07, Brian Paul wrot

Re: [Mesa-dev] [PATCH 02/11] nir: add array length field

2015-11-14 Thread Rob Clark
, 2015 at 11:19 AM, Connor Abbott wrote: > I think it would be better if we kept track of the type of the > constant instead. That would also allow us to simplify the constant > construction code in, err, something else... > > On Wed, Nov 11, 2015 at 8:23 PM, Jason Ekstrand wrote: >

Re: [Mesa-dev] [PATCH 00/11] i965/nir: Do texture rectangle lowering in NIR

2015-11-14 Thread Rob Clark
did only with less hashing. >>> > >>> > Jason Ekstrand (7): >>> > nir: support to clone shaders >>> > i965/nir: Split shader optimization and lowering into three satages >>> > i965: Move postprocess_nir to codegen time >>> >

Re: [Mesa-dev] [PATCH] egl/dri2: implement platform_null.

2015-01-22 Thread Rob Clark
On Thu, Jan 22, 2015 at 4:36 PM, Emil Velikov wrote: >> +static const char* node_path_fmt_card = "/dev/dri/card%d"; > You can reuse the DRM_DIR_NAME + DRM_DEV_NAME macros (from xf86drm.h) > for this. > >> +static const char* node_path_fmt_render = "/dev/dri/renderD%d"; > There is no macro for the

[Mesa-dev] adding driver specific docs in src/gallium/docs?

2015-01-26 Thread Rob Clark
Btw, I had started putting together some docs for freedreno "ir3" compiler.. I was originally just going to use markdown, but the graphviz plugin for sphinx is actually a bit too useful for this sort of thing to ignore. Otoh setting up a whole doc tree for one page seems a bit overkill. I wonder

Re: [Mesa-dev] adding driver specific docs in src/gallium/docs?

2015-01-26 Thread Rob Clark
On Mon, Jan 26, 2015 at 2:19 PM, Brian Paul wrote: > On 01/26/2015 10:53 AM, Rob Clark wrote: >> >> Btw, I had started putting together some docs for freedreno "ir3" >> compiler.. I was originally just going to use markdown, but the >> graphviz plugin for sp

[Mesa-dev] [RFC] gallium/docs: add some freedreno compiler docs

2015-01-29 Thread Rob Clark
From: Rob Clark Enable the 'sphinx.ext.graphviz' extension, and add in a section for driver specific docs, with freedreno compiler docs beneath. The goal is for more complete compiler docs, and hopefully some docs about other parts of the driver (such as how tiling works, etc). Note

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 4:20 PM, Roland Scheidegger wrote: > Hi, > > the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes > that indirections can only be done through the address reg and has quite > some extra code to deal with this. Even though hardware and apis which > worked l

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 5:31 PM, Rob Clark wrote: > On Thu, Jan 29, 2015 at 4:20 PM, Roland Scheidegger > wrote: >> Hi, >> >> the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes >> that indirections can only be done through the address reg and h

Re: [Mesa-dev] killing off the address reg in tgsi

2015-01-29 Thread Rob Clark
On Thu, Jan 29, 2015 at 6:06 PM, Brian Paul wrote: > On 01/29/2015 02:20 PM, Roland Scheidegger wrote: >> >> Hi, >> >> the address reg in tgsi is quite a nuisance. glsl-to-tgsi code assumes >> that indirections can only be done through the address reg and has quite >> some extra code to deal with

[Mesa-dev] [RFC] loader: not having a pci-id should not be a warn

2015-02-21 Thread Rob Clark
From: Rob Clark Lower this to an info message, to avoid confusing users. Perhaps we should just drop this entirely. --- Anyone have any objection to this, or better suggestions? Users are getting confused by this warning messange, and we do actually have non-PCI drivers these days ;-) src

Re: [Mesa-dev] [RFC] loader: not having a pci-id should not be a warn

2015-02-21 Thread Rob Clark
On Sat, Feb 21, 2015 at 3:27 PM, Ilia Mirkin wrote: > On Sat, Feb 21, 2015 at 2:48 PM, Rob Clark wrote: >> From: Rob Clark >> >> Lower this to an info message, to avoid confusing users. Perhaps we >> should just drop this entirely. >> --- >> Anyon

[Mesa-dev] [PATCH] tgsi: don't forget interp for BCOLOR inputs

2015-02-27 Thread Rob Clark
From: Rob Clark To lower two sided color, tgsi_lowering creates additional BCOLOR inputs (matching up to the BCOLOR outputs on the vert shader). These inputs should copy the interpolation state of their matching COLOR input. Signed-off-by: Rob Clark --- src/gallium/auxiliary/tgsi

Re: [Mesa-dev] RFC: Prune stale components

2015-02-27 Thread Rob Clark
On Fri, Feb 27, 2015 at 10:16 AM, Jose Fonseca wrote: > - src/gallium/drivers/rbug: -- do people use it? does it work? it predates > apitrace GL + GUI, which sort of enables a lot of the same things, but > without the issue of having to hit moving target, which is what gallium > interfaces are A

Re: [Mesa-dev] RFC: Prune stale components

2015-02-27 Thread Rob Clark
On Fri, Feb 27, 2015 at 5:05 PM, Emil Velikov wrote: >> - src/gallium/drivers/rbug: -- do people use it? does it work? it >> predates apitrace GL + GUI, which sort of enables a lot of the same >> things, but without the issue of having to hit moving target, which is >> what gallium interfaces are

Re: [Mesa-dev] [PATCH 09/15] freedreno: implement pipe_screen::get_driver_query_group_info

2015-03-10 Thread Rob Clark
On Mon, Mar 9, 2015 at 5:09 PM, Samuel Pitoiset wrote: > This enables GL_AMD_performance_monitor for freedreno. > > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/freedreno/freedreno_query.c | 9 + > src/gallium/drivers/freedreno/freedreno_query.h | 1 + > 2 files changed, 10

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-02 Thread Rob Clark
On Thu, Feb 2, 2017 at 2:13 AM, Sivasubramanian Patchaiperumal wrote: > Hi, > I'm trying to port WPE on DB410c with Westeros compositor, but the > webprocess crashes due to null sharingcontext. Webprocess fails to create gl > context as eglChooseConfig fails when the surface type attribute is pbuf

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-02 Thread Rob Clark
nly, but the WPE code (at > https://github.com/Metrological/WebKitForWayland/) which uses pbuffer works > on HiKey and RPI as mentioned. > > On 2 February 2017 at 17:38, Rob Clark wrote: >> >> On Thu, Feb 2, 2017 at 2:13 AM, Sivasubramanian Patchaiperumal >> wrote:

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-02 Thread Rob Clark
pbuffer surfaces will crash I suspect. Is there is any simple egl > application that uses pixel buffer to verify and confirm? > > On 2 February 2017 at 19:00, Rob Clark wrote: >> >> hmm, ok, so it is a *client* process that is crashing? The wayland >> winsys (used by cli

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-02 Thread Rob Clark
so I think the answer is don't use pbuffers. BR, -R On Thu, Feb 2, 2017 at 9:50 AM, Rob Clark wrote: > hmm, tons of older stuff uses pbuffers w/ x11.. although a quick look > at mesa/demos.git and it doesn't look like any of them that build for > wayland do. I don't

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-02 Thread Rob Clark
after createWaylandContext() fails?? I suspect pbuffer is not the root problem, that looks like a fallback path that shouldn't be hit.. BR, -R On Thu, Feb 2, 2017 at 9:55 AM, Rob Clark wrote: > hmm, just looking at dri2_wl_display_vtbl: > >.create_pbuffer_surface = dri2_fallback_create_pbuffer

Re: [Mesa-dev] [Freedreno] WebProcess crash on DB410c

2017-02-03 Thread Rob Clark
; confirm the support with Mesa. Does it sounds correct or you have any >> suggestions? >> >> On 3 February 2017 at 02:06, Rob Clark wrote: >>> >>> btw, where exactly is it crashing? I grabbed the WebKitForWayland >>> tree.. if I'm looking at the

Re: [Mesa-dev] [PATCH 2/5] freedreno: add support for user index buffers

2017-02-17 Thread Rob Clark
; diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c > b/src/gallium/drivers/freedreno/freedreno_draw.c > index cfe13cd..cb4c063 100644 > --- a/src/gallium/drivers/freedreno/freedreno_draw.c > +++ b/src/gallium/drivers/freedreno/freedreno_draw.c > @@ -24,20

Re: [Mesa-dev] X test suite regression due to gallivm change

2017-02-24 Thread Rob Clark
On Fri, Feb 24, 2017 at 12:32 PM, Jose Fonseca wrote: > On 23/02/17 21:54, Adam Jackson wrote: >> >> On Thu, 2017-02-23 at 21:59 +0100, Roland Scheidegger wrote: >> >>> So, what does the failing test do? >> >> >> Not much, curiously. There are five that fail and they're all fairly >> trivial, alth

[Mesa-dev] PSA: kmscube moved to fd.o

2017-02-25 Thread Rob Clark
Anyone with mesa/libdrm push access should in theory be able to push directly. Not really any point to wait for me to have time to merge pullreqs on github ;-) I've spiffed it out slightly, so it supports both legacy pageflip mode and atomic/fence mode, etc. https://cgit.freedesktop.org/mesa/kms

Re: [Mesa-dev] Mesa 11.0.0 release plan

2015-07-29 Thread Rob Clark
On Wed, Jul 29, 2015 at 2:20 PM, Emil Velikov wrote: > Hi all, > > Below is the preliminary release schedule for Mesa 11.0.0 > > August 21st 2015 - Feature freeze/Release candidate 1 > August 28th 2015 - Release candidate 2 > September 04th 2015 - Release candidate 3 > September 11th 2015 - Releas

Re: [Mesa-dev] [Mesa-stable] [PATCH] xa: add xa_surface_from_handle2

2015-08-01 Thread Rob Clark
On Sat, Aug 1, 2015 at 1:16 PM, Emil Velikov wrote: > On 22 July 2015 at 00:00, Rob Clark wrote: >> From: Rob Clark >> >> Like xa_surface_from_handle(), but takes a handle type, rather than >> hard-coding 'shared' handle. This is needed to fix bugs seen wit

Re: [Mesa-dev] [PATCH 2/2] tgsi_to_nir: Convert to using VARYING_SLOT_* / FRAG_RESULT_*.

2015-08-04 Thread Rob Clark
On Tue, Aug 4, 2015 at 5:28 PM, Eric Anholt wrote: > This avoids exceeding the size of the .index bitfield since it got > truncated, and should make our NIR look more like the NIR that the rest of > the NIR developers are working on. > --- > The freedreno changes here are untested. > > src/galliu

Re: [Mesa-dev] [PATCH] nir: Use a single bit for the dual-source blend index

2015-08-04 Thread Rob Clark
On Sun, Aug 2, 2015 at 1:04 AM, Timothy Arceri wrote: > The only values allowed are 0 and 1, and the value is checked before > assigning. > > This is a copy of 8eeca7a56c that seems to have been made to the glsl > ir type after it was copied for use in nir but before nir landed. > --- > src/glsl/

Re: [Mesa-dev] [PATCH v2 2/2] mesa: _mesa_format_convert should be endian agnostic

2015-08-07 Thread Rob Clark
On Fri, Aug 7, 2015 at 8:11 PM, Jason Ekstrand wrote: > On Fri, Aug 7, 2015 at 12:24 PM, Oded Gabbay wrote: >> This patch fixes a bug that is manifested in the read path of mesa when >> running on big-endian machines. The effects can be seen when running >> piglit sanity test and/or taking a scre

Re: [Mesa-dev] [PATCH v2 2/2] mesa: _mesa_format_convert should be endian agnostic

2015-08-08 Thread Rob Clark
On Sat, Aug 8, 2015 at 4:26 PM, Jason Ekstrand wrote: > On Sat, Aug 8, 2015 at 1:01 PM, Oded Gabbay wrote: >> On Sat, Aug 8, 2015 at 7:34 PM, Jason Ekstrand wrote: >>> On Fri, Aug 7, 2015 at 10:38 PM, Oded Gabbay wrote: On Sat, Aug 8, 2015 at 3:11 AM, Jason Ekstrand wrote: > On

[Mesa-dev] [PATCH] mesa: add NV_read_{depth, stencil, depth_stencil} extensions

2015-08-10 Thread Rob Clark
From: Rob Clark These extensions allow reading depth/stencil for GLES contexts, which is useful for tools like apitrace. Signed-off-by: Rob Clark --- I have a patch, which I will send out after some cleanup, that makes apitrace able to dump depth/stencil buffers with GLES, thanks to this

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