Re: [Mesa-dev] [PATCH 00/19] AMD support for NIR deref instructions.

2018-05-14 Thread Rob Clark
On Mon, May 14, 2018 at 8:07 PM, Dave Airlie wrote: > On 13 May 2018 at 10:19, Bas Nieuwenhuizen wrote: >> This implements support in radv and radeonsi for NIR deref >> instructions instead of deref chains. >> >> It contains 4 parts: >> - patch 1 is a fixup for the initial series by Jason >> - Ad

Re: [Mesa-dev] [PATCH 1/2] vc4: use util_copy_framebuffer_state

2018-05-14 Thread Rob Clark
On Mon, May 14, 2018 at 9:16 AM, Rob Clark wrote: > Signed-off-by: Rob Clark > --- > Just happened to notice that vc4/vc5 was open-coding > util_copy_framebuffer_state() and ofc if I actually managed to test-compile what I *thought* I was compiling, I would have noticed the missing

[Mesa-dev] [PATCH 2/2] vc5: use util_copy_framebuffer_state

2018-05-14 Thread Rob Clark
Signed-off-by: Rob Clark --- src/gallium/drivers/vc5/vc5_state.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 42ae64157c4..27c9f78a0e9 100644 --- a/src/gallium/drivers/vc5

[Mesa-dev] [PATCH 1/2] vc4: use util_copy_framebuffer_state

2018-05-14 Thread Rob Clark
Signed-off-by: Rob Clark --- Just happened to notice that vc4/vc5 was open-coding util_copy_framebuffer_state() src/gallium/drivers/vc4/vc4_state.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4

[Mesa-dev] [PATCH] etnaviv: remove pipe_fence_handle::ctx

2018-05-08 Thread Rob Clark
A fence can outlive the ctx it was created from (see glmark2).. etnaviv doesn't actually need fence->ctx so lets remove it before someone makes the mistake of assuming it is a valid pointer. Signed-off-by: Rob Clark --- I assume this was just copy-pasta from freedreno.. where since eed96

Re: [Mesa-dev] A question about nir_lower_wpos_ytransform

2018-05-07 Thread Rob Clark
On Mon, May 7, 2018 at 2:36 PM, Jason Ekstrand wrote: > On Mon, May 7, 2018 at 11:02 AM, Rob Clark wrote: >> >> On Mon, May 7, 2018 at 11:53 AM, Jason Ekstrand >> wrote: >> > On Mon, May 7, 2018 at 8:02 AM, Alejandro Piñeiro >> > wrote: >>

Re: [Mesa-dev] A question about nir_lower_wpos_ytransform

2018-05-07 Thread Rob Clark
On Mon, May 7, 2018 at 11:53 AM, Jason Ekstrand wrote: > On Mon, May 7, 2018 at 8:02 AM, Alejandro Piñeiro > wrote: >> >> Hi Jason, >> >> as part of the ARB_gl_spirv work, we are doing the linking based on the >> nir shader that comes from spirv_to_nir. On some cases, >> nir_lower_wpos_ytransform

Re: [Mesa-dev] Lowering viewport transformation in NIR

2018-05-03 Thread Rob Clark
On Thu, May 3, 2018 at 3:12 PM, Alyssa Rosenzweig wrote: > Hi all, > > Certain embedded GPUs do not implement coordinate transformation in > hardware. Instead, section 12.5 "Coordinate Transformation" of the ES > 3.2 specification is implemented in the vertex shader itself. Relevant > examples inc

[Mesa-dev] [PATCH] nir: add missing dependency in meson.build

2018-05-02 Thread Rob Clark
nir_builder_opcodes.h also depends on nir_intrinsics.py for generating the system-value builders. Reported-by: Christoph Haag Reported-by: Kenneth Graunke Signed-off-by: Rob Clark --- src/compiler/nir/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler

Re: [Mesa-dev] [RFC 3/3] clover+gallium+freedreno: caps to reduce kernel recompiles

2018-04-26 Thread Rob Clark
>> create the compute-state CSO. >> >> This way, if the kernel is compiled early for clGetKernelWorkGroupInfo() >> it doesn't end up getting compiled a second time when the kernel is >> launched for the first time (clEnqueueNDRangeKernel(), etc). >> >> Sign

Re: [Mesa-dev] [PATCH] gallium/util: Fix incorrect refcounting of separate stencil.

2018-04-25 Thread Rob Clark
ouble-free in KHR-GLES3.packed_depth_stencil.blit.depth32f_stencil8 > on vc5. > > Fixes: e94eb5e6000e ("gallium/util: add u_transfer_helper") oh, whoops Reviewed-by: Rob Clark > --- > src/gallium/auxiliary/util/u_transfer_helper.c | 3 +-- > 1 file changed, 1 inse

Re: [Mesa-dev] [PATCH 2/3] nir: print 8 and 16 bit constants correctly

2018-04-25 Thread Rob Clark
On Wed, Apr 25, 2018 at 5:14 AM, Karol Herbst wrote: > Signed-off-by: Karol Herbst Reviewed-by: Rob Clark > --- > src/compiler/nir/nir_print.c | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/src/compiler/nir/nir_print.c b/src/compil

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Rob Clark
On Tue, Apr 24, 2018 at 5:45 PM, Jason Ekstrand wrote: > On Tue, Apr 24, 2018 at 7:38 AM, Rob Clark wrote: >> >> side-note, not sure if it really effects what you are doing here, but >> karol ran into some cases, like 8bit signed imax, which needs to be >> "lowere

Re: [Mesa-dev] [PATCH 01/11] intel/compiler: lower 16-bit integer extended math instructions

2018-04-24 Thread Rob Clark
side-note, not sure if it really effects what you are doing here, but karol ran into some cases, like 8bit signed imax, which needs to be "lowered" to 16b (or 32b) and converted back for hw that doesn't support smaller than 16b (or 32b). I think I have the same case with ir3, which also has 16b bu

[Mesa-dev] [RFC 3/3] clover+gallium+freedreno: caps to reduce kernel recompiles

2018-04-24 Thread Rob Clark
clGetKernelWorkGroupInfo() it doesn't end up getting compiled a second time when the kernel is launched for the first time (clEnqueueNDRangeKernel(), etc). Signed-off-by: Rob Clark --- If we pre-compile the kernel then we pretty much end up compiling it at least twice, since we don't know the size of

[Mesa-dev] [RFC 2/3] freedreno/a5xx: update compute param handling

2018-04-24 Thread Rob Clark
Move to per-generation backend, since these are likely to be fairly generation specific, and that is nicer than having it split between freedreno_screen (for the global case) and fd5_compute (for the kernel-specific limits case) Signed-off-by: Rob Clark --- Not totally working yet, so there

[Mesa-dev] [PATCH 1/3] clover+gallium: support per-kernel limits

2018-04-24 Thread Rob Clark
compute-state CSO as an argument. Signed-off-by: Rob Clark --- src/gallium/include/pipe/p_defines.h | 2 +- src/gallium/include/pipe/p_screen.h | 22 ++- src/gallium/state_trackers/clover/api/kernel.cpp | 9 ++- src/gallium/state_trackers/clover/core/device.cpp | 10

Re: [Mesa-dev] NIR issue with SPIRV ops that have operands with different bit-size

2018-04-24 Thread Rob Clark
On Tue, Apr 24, 2018 at 4:24 AM, Samuel Iglesias Gonsálvez wrote: > Hello, > > Recently, we have found problems between some SPIRV opcodes and NIR. > > SPIR-V allows opcodes to mix different bit-sizes for their operands, such as > for some bitfield operations and other ops like bitwise shifts. >

[Mesa-dev] [PATCH] compiler: int8/uint8 fixes

2018-04-15 Thread Rob Clark
in get_scalar_type(). Signed-off-by: Rob Clark --- This was causing problems with cl cts vload_local (and probably others). Due to cast from N to as parameter to vloadN, the resulting spv would have OpInBoundsPtrAccessChain that deref'd .x component of the N. But due to this bug the array_

Re: [Mesa-dev] [PATCH v3 057/104] nir,spirv: Rework function calls

2018-04-10 Thread Rob Clark
On Tue, Apr 10, 2018 at 1:50 PM, Rob Clark wrote: > On Tue, Apr 10, 2018 at 1:17 PM, Jason Ekstrand wrote: >> On Tue, Apr 10, 2018 at 9:59 AM, Rob Clark wrote: >>> >>> On Tue, Apr 10, 2018 at 11:55 AM, Jason Ekstrand >>> wrote: >>> > O

Re: [Mesa-dev] [PATCH v3 057/104] nir,spirv: Rework function calls

2018-04-10 Thread Rob Clark
On Tue, Apr 10, 2018 at 1:17 PM, Jason Ekstrand wrote: > On Tue, Apr 10, 2018 at 9:59 AM, Rob Clark wrote: >> >> On Tue, Apr 10, 2018 at 11:55 AM, Jason Ekstrand >> wrote: >> > On Tue, Apr 10, 2018 at 8:17 AM, Rob Clark wrote: >> >> >> >

Re: [Mesa-dev] [PATCH v3 057/104] nir,spirv: Rework function calls

2018-04-10 Thread Rob Clark
On Tue, Apr 10, 2018 at 11:55 AM, Jason Ekstrand wrote: > On Tue, Apr 10, 2018 at 8:17 AM, Rob Clark wrote: >> >> On Tue, Apr 10, 2018 at 11:04 AM, Jason Ekstrand >> wrote: >> > On Tue, Apr 10, 2018 at 6:20 AM, Rob Clark wrote: >> >> >> &g

Re: [Mesa-dev] [PATCH v3 057/104] nir,spirv: Rework function calls

2018-04-10 Thread Rob Clark
On Tue, Apr 10, 2018 at 11:04 AM, Jason Ekstrand wrote: > On Tue, Apr 10, 2018 at 6:20 AM, Rob Clark wrote: >> >> On Mon, Apr 9, 2018 at 10:52 PM, Jason Ekstrand >> wrote: >> > + A bunch of potentially interested parties. >> > >> > On Mon, Apr 9,

Re: [Mesa-dev] [PATCH v3 057/104] nir,spirv: Rework function calls

2018-04-10 Thread Rob Clark
On Mon, Apr 9, 2018 at 10:52 PM, Jason Ekstrand wrote: > + A bunch of potentially interested parties. > > On Mon, Apr 9, 2018 at 4:25 PM, Caio Marcelo de Oliveira Filho > wrote: >> >> Hi, >> >> > typedef struct { >> > - nir_parameter_type param_type; >> > - const struct glsl_type *type; >> >

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-09 Thread Rob Clark
On Mon, Apr 9, 2018 at 1:35 AM, Jason Ekstrand wrote: > Rather lively discussion we've got going here... > > On Sun, Apr 8, 2018 at 3:23 PM, Rob Clark wrote: >> >> On Sun, Apr 8, 2018 at 5:54 PM, Bas Nieuwenhuizen >> wrote: >> > On Sun, Apr 8, 2018 at

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-09 Thread Rob Clark
On Mon, Apr 9, 2018 at 10:25 AM, Jason Ekstrand wrote: > On Mon, Apr 9, 2018 at 5:35 AM, Rob Clark wrote: >> >> On Mon, Apr 9, 2018 at 1:35 AM, Jason Ekstrand >> wrote: >> > Rather lively discussion we've got going here... >> > >>

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-09 Thread Rob Clark
On Mon, Apr 9, 2018 at 1:35 AM, Jason Ekstrand wrote: > Rather lively discussion we've got going here... > > On Sun, Apr 8, 2018 at 3:23 PM, Rob Clark wrote: >> >> On Sun, Apr 8, 2018 at 5:54 PM, Bas Nieuwenhuizen >> wrote: >> > On Sun, Apr 8, 2018 at

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-09 Thread Rob Clark
On Mon, Apr 9, 2018 at 1:35 AM, Jason Ekstrand wrote: > Rather lively discussion we've got going here... > > On Sun, Apr 8, 2018 at 3:23 PM, Rob Clark wrote: >> >> On Sun, Apr 8, 2018 at 5:54 PM, Bas Nieuwenhuizen >> wrote: >> > On Sun, Apr 8, 2018 at

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 5:54 PM, Bas Nieuwenhuizen wrote: > On Sun, Apr 8, 2018 at 11:40 PM, Rob Clark wrote: >> On Sun, Apr 8, 2018 at 5:20 PM, Bas Nieuwenhuizen >> wrote: >>>>>>>>>>> + >>>>>>>>>>> +

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 5:20 PM, Bas Nieuwenhuizen wrote: > + > + /** The mode of the underlying variable */ > + nir_variable_mode mode; In fact, it seems like deref->mode is unused outside of nir_print and nir_validate.. for logical addressing

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 4:26 PM, Bas Nieuwenhuizen wrote: > On Sun, Apr 8, 2018 at 6:06 PM, Rob Clark wrote: >> On Sun, Apr 8, 2018 at 11:15 AM, Bas Nieuwenhuizen >> wrote: >>> On Sun, Apr 8, 2018 at 3:29 PM, Rob Clark wrote: >>>> On Sun, Apr 8, 2018 at 8:

Re: [Mesa-dev] [PATCH v3 003/104] nir/builder: Add deref building helpers

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 7:21 AM, Rob Clark wrote: > On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: >> --- >> src/compiler/nir/nir_builder.h | 106 >> + >> 1 file changed, 106 insertions(+) >> >> diff --git

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 11:15 AM, Bas Nieuwenhuizen wrote: > On Sun, Apr 8, 2018 at 3:29 PM, Rob Clark wrote: >> On Sun, Apr 8, 2018 at 8:58 AM, Bas Nieuwenhuizen >> wrote: >>> On Sun, Apr 8, 2018 at 1:38 PM, Rob Clark wrote: >>>> On Tue, Apr 3, 2018 at

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 8:58 AM, Bas Nieuwenhuizen wrote: > On Sun, Apr 8, 2018 at 1:38 PM, Rob Clark wrote: >> On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: >>> This commit adds a new instruction type to NIR for handling derefs. >>> Nothing uses it yet but t

Re: [Mesa-dev] [PATCH v3 004/104] nir: Add _deref versions of all of the _var intrinsics

2018-04-08 Thread Rob Clark
On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: > --- > src/compiler/nir/nir.h | 2 +- > src/compiler/nir/nir_builder.h | 37 > src/compiler/nir/nir_intrinsics.py | 72 > ++ > src/compiler/nir/nir_validate.c| 34

Re: [Mesa-dev] [PATCH v3 002/104] nir: Add a deref instruction type

2018-04-08 Thread Rob Clark
On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: > This commit adds a new instruction type to NIR for handling derefs. > Nothing uses it yet but this adds the data structure as well as all of > the code to validate, print, clone, and [de]serialize them. > --- > src/compiler/nir/nir.c

Re: [Mesa-dev] [PATCH v3 003/104] nir/builder: Add deref building helpers

2018-04-08 Thread Rob Clark
On Sun, Apr 8, 2018 at 7:21 AM, Rob Clark wrote: > On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: >> --- >> src/compiler/nir/nir_builder.h | 106 >> + >> 1 file changed, 106 insertions(+) >> >> diff --git

Re: [Mesa-dev] [PATCH v3 003/104] nir/builder: Add deref building helpers

2018-04-08 Thread Rob Clark
On Tue, Apr 3, 2018 at 2:32 PM, Jason Ekstrand wrote: > --- > src/compiler/nir/nir_builder.h | 106 > + > 1 file changed, 106 insertions(+) > > diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h > index 8f7ddf1..69c7261 100644 > -

[Mesa-dev] [PATCH] nir+vtn: vec8+vec16 support

2018-04-07 Thread Rob Clark
instructions that take more than 4 srcs (ie vec8 and vec16), nir_build_alu() is has nir_build_alu_tail() split out and re-used by nir_build_alu2() (which is used for the > 4 src args case). Signed-off-by: Rob Clark --- src/compiler/nir/nir.h| 30 +- src/compiler/

Re: [Mesa-dev] [PATCH 06/16] nir/print: show deref instruction type

2018-04-07 Thread Rob Clark
full deref back to the > variable if possible. I'll give a go at that and send out a fixup. sgtm, feel free to squash this and some variation of 07/16 into your patch which intially adds deref instructions if you want BR, -R > > On Sat, Apr 7, 2018 at 9:13 AM, Rob Clark wrote

Re: [Mesa-dev] [PATCH 16/16] freedreno/ir3: convert to deref instructions

2018-04-07 Thread Rob Clark
On Sat, Apr 7, 2018 at 12:42 PM, Jason Ekstrand wrote: > On April 7, 2018 09:14:20 Rob Clark wrote: > > Signed-off-by: Rob Clark > --- > .../drivers/freedreno/ir3/ir3_compiler_nir.c | 46 > +++--- > src/gallium/drivers/freedreno/ir3/ir3_nir.c|

[Mesa-dev] [PATCH 15/16] nir: convert lower_samplers_as_deref to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- src/compiler/nir/nir_lower_samplers_as_deref.c | 167 - 1 file changed, 108 insertions(+), 59 deletions(-) diff --git a/src/compiler/nir/nir_lower_samplers_as_deref.c b/src/compiler/nir/nir_lower_samplers_as_deref.c index b1272e25a92

[Mesa-dev] [PATCH 16/16] freedreno/ir3: convert to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 46 +++--- src/gallium/drivers/freedreno/ir3/ir3_nir.c| 4 +- .../freedreno/ir3/ir3_nir_lower_tg4_to_tex.c | 4 +- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a

[Mesa-dev] [PATCH 11/16] mesa/st/nir: convert lower_builtins to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- src/mesa/state_tracker/st_nir_lower_builtin.c | 51 +++ 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/src/mesa/state_tracker/st_nir_lower_builtin.c b/src/mesa/state_tracker/st_nir_lower_builtin.c index 660fdf3f910

[Mesa-dev] [PATCH 09/16] RFC: nir: cleanup dead deref instructions

2018-04-07 Thread Rob Clark
--- src/compiler/nir/nir.h | 4 +++- src/compiler/nir/nir_deref.c| 22 -- src/compiler/nir/nir_validate.c | 5 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 4ec42b4406b..fe5a79d5f5a 100

[Mesa-dev] [PATCH 08/16] RFC: nir: typedef'ify nir_deref_path

2018-04-07 Thread Rob Clark
For better or worse, the rest of nir follows the typedef struct pattern. So I guess better to be consistent. Signed-off-by: Rob Clark --- src/compiler/nir/nir_deref.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_deref.h b/src/compiler/nir

[Mesa-dev] [PATCH 14/16] nir: convert lower_io_to_scalar to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- src/compiler/nir/nir_lower_io_to_scalar.c | 88 +++ 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c index 7774c2d2458..179eb42a4d0

[Mesa-dev] [PATCH 12/16] Revert "HACK! nir: Disable building a couple passes"

2018-04-07 Thread Rob Clark
This reverts commit 28847bbe8d6f65f1bba7197f80c58054183b1c8c. --- src/compiler/Makefile.sources | 3 +++ src/compiler/nir/meson.build | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources index fe328eef737..21b1f85

[Mesa-dev] [PATCH 13/16] nir: convert lower_io_arrays_to_elements to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- src/compiler/nir/nir_lower_io_arrays_to_elements.c | 149 ++--- 1 file changed, 73 insertions(+), 76 deletions(-) diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c index 9a5eec8f870

[Mesa-dev] [PATCH 07/16] nir/print: add type names for deref instr

2018-04-07 Thread Rob Clark
It was only shown in deref_cast instructions. But it makes things easier to follow to show the intermediate types in deref_array/ deref_struct instructions too. Signed-off-by: Rob Clark --- src/compiler/nir/nir_print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

[Mesa-dev] [PATCH 10/16] ttn: convert to deref instructions

2018-04-07 Thread Rob Clark
Signed-off-by: Rob Clark --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 52 + 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index b5b4869b04f..1b31b564246 100644

[Mesa-dev] [PATCH 06/16] nir/print: show deref instruction type

2018-04-07 Thread Rob Clark
Makes it more obvious what sort of deref instruction something is. Signed-off-by: Rob Clark --- src/compiler/nir/nir_print.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 6e6fd421c60..7d7542a4113

[Mesa-dev] [PATCH 04/16] mesa/st/nir: fix instruction removal

2018-04-07 Thread Rob Clark
At one point this kinda worked (or at least didn't cause problems). But with deref-instructions it results in dangling deref instructions not being properly removed. Signed-off-by: Rob Clark --- src/mesa/state_tracker/st_nir_lower_builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[Mesa-dev] [PATCH 01/16] fixup! nir: Remove old-school deref chain support

2018-04-07 Thread Rob Clark
--- src/amd/vulkan/radv_shader.c| 2 -- src/compiler/nir/nir.h | 3 --- src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 3 --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 -- 4 files changed, 10 deletions(-) diff --git a/src/amd/vulkan/radv_s

[Mesa-dev] [PATCH 00/16] nir+gallium: Move to using instructions for derefs

2018-04-07 Thread Rob Clark
shader-db yet. [1] https://lists.freedesktop.org/archives/mesa-dev/2018-April/190905.html [2] https://github.com/freedreno/mesa/commits/nir-deref-instr-v3 Rob Clark (16): fixup! nir: Remove old-school deref chain support nir: add comment about nir_src_copy() mesa/st/nir: fix naked lowering pass call mes

[Mesa-dev] [PATCH 02/16] nir: add comment about nir_src_copy()

2018-04-07 Thread Rob Clark
So it is more clear about when to use nir_instr_rewrite_src() Signed-off-by: Rob Clark --- An assert would be nice too, but wasn't sure how to differentiate between the parent_instr and parent_if case. src/compiler/nir/nir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com

[Mesa-dev] [PATCH 05/16] nir: promote intrinsic_get_var() to helper

2018-04-07 Thread Rob Clark
Useful in a few other places.. let's not copy-pasta Signed-off-by: Rob Clark --- src/compiler/nir/nir.h | 6 ++ src/compiler/nir/nir_propagate_invariant.c | 14 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compiler/nir/nir.h

[Mesa-dev] [PATCH 03/16] mesa/st/nir: fix naked lowering pass call

2018-04-07 Thread Rob Clark
Not using the macro means no nir_validate in debug builds, resulting in problems showing up only after later passes. Signed-off-by: Rob Clark --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker

Re: [Mesa-dev] [PATCH v3 000/104] nir: Move to using instructions for derefs

2018-04-06 Thread Rob Clark
nir-deref-instr-v3 (there was one unrelated patch to avoid rebasing jason's -v3 branch and one to make ir3_cmdline compiler work so I could test-drive nir_lower_samplers_as_deref) I've also not tried to make this bisectable yet. But I guess it should be enough for others to start t

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2018-04-06 Thread Rob Clark
On Fri, Apr 6, 2018 at 8:30 AM, Emil Velikov wrote: > On 6 April 2018 at 10:40, Daniel Stone wrote: >> Hi all, >> >> On 5 April 2018 at 23:55, Laura Ekstrand wrote: >>> So I spoke with Daniel Stone today about the infrastructure. He estimates >>> it will be ready to deploy the website in 2-3 we

Re: [Mesa-dev] [RFC PATCH] nir: extend nir_shader_compiler_options with is_scalar

2018-04-05 Thread Rob Clark
I'd vote for PIPE_CAP until there is any place inside nir passes were we'd want to do something differently. Since this is just a decision in mesa/st I think a cap makes sense.. On Thu, Apr 5, 2018 at 10:25 AM, Jason Ekstrand wrote: > I'm not sure if this should be a NIR compiler option or a PIP

Re: [Mesa-dev] [PATCH 1/2] compiler/nir: add nir_intrinsics.[ch] to .gitignore

2018-04-04 Thread Rob Clark
On Wed, Apr 4, 2018 at 3:25 AM, Alejandro Piñeiro wrote: > Generated since > 76dfed8ae2d5c6c509eb2661389be3c6a25077df > "nir: mako all the intrinsics" oh, people still do in-tree builds? I've been spoiled by meson forcing out-of-tree builds ;-) Reviewed-by: Rob Clark

Re: [Mesa-dev] 2018 Election voting OPEN

2018-04-02 Thread Rob Clark
ty to vote, we are extending the voting period by one week. The voting period will now remain open until 23:59 UTC on 12 April 2018. Rob Clark, on behalf of the X.Org elections committee On Wed, Mar 21, 2018 at 8:40 PM, Rob Clark wrote: > To all X.Org Foundation Members: > > The X.Or

Re: [Mesa-dev] 2018 Election voting OPEN

2018-04-02 Thread Rob Clark
On Wed, Mar 21, 2018 at 8:40 PM, Rob Clark wrote: > To all X.Org Foundation Members: > > The X.Org Foundation's annual election is now open and will remain > open until 23:59 UTC on 5 April 2018. Reminder that the elections are open until midnight on Thurs, so if you have

Re: [Mesa-dev] [PATCH kmscube 2/2] Use weak functions to handle lack of gbm modifiers

2018-04-02 Thread Rob Clark
o work if API is available. > > Cc: Christian Gmeiner > Cc: Rob Clark > Signed-off-by: Emil Velikov Reviewed-by: Rob Clark > --- > common.c | 32 +--- > common.h | 2 ++ > configure.ac | 16 > drm-common.c | 49 +++

Re: [Mesa-dev] [PATCH kmscube 1/2] Rework default modifier handling

2018-04-02 Thread Rob Clark
Simplify things to a) use MOD_LINEAR by default b) use the user modifier > - even if they request MOD_INVALID. > > Signed-off-by: Emil Velikov Reviewed-by: Rob Clark > --- > common.c | 23 ++- > kmscube.c | 2 +- > 2 files changed, 3 insertions(+), 22 de

Re: [Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-29 Thread Rob Clark
On Wed, Mar 28, 2018 at 9:41 PM, Jason Ekstrand wrote: > > On March 28, 2018 17:43:31 Rob Clark wrote: > > On Wed, Mar 28, 2018 at 8:16 PM, Jason Ekstrand > wrote: > On March 28, 2018 16:54:33 Rob Clark wrote: > > I had noticed the code to remove dead deref's in a

Re: [Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-28 Thread Rob Clark
On Wed, Mar 28, 2018 at 8:16 PM, Jason Ekstrand wrote: > On March 28, 2018 16:54:33 Rob Clark wrote: > > I had noticed the code to remove dead deref's in a few of the passes > (at least on your wip branch), and had wondered a bit about not just > requiring all the deref

Re: [Mesa-dev] [PATCH 00/61] nir: Move to using instructions for derefs

2018-03-28 Thread Rob Clark
emove anything until all of the other drivers are >> converted. However, this series should be a good basis for anyone wanting >> to work on converting another driver since almost all of the core NIR >> passes now work with both types of derefs so you can convert in whatever &

Re: [Mesa-dev] [PATCH 2/2 v2] nir: mako all the intrinsics

2018-03-28 Thread Rob Clark
On Wed, Mar 28, 2018 at 10:43 AM, Rob Herring wrote: > On Sun, Mar 25, 2018 at 1:10 PM, Rob Clark wrote: >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macro/#incl

[Mesa-dev] [PATCH] nir+drivers: add helpers to get # of src/dest components

2018-03-28 Thread Rob Clark
Add helpers to get the number of src/dest components for an intrinsic, and update spots that were open-coding this logic to use the helpers instead. Signed-off-by: Rob Clark --- src/compiler/nir/nir.h | 22 ++ src/compiler/nir

Re: [Mesa-dev] [PATCH] intel/fs: Don't emit a des copy for image ops with has_dest == false

2018-03-27 Thread Rob Clark
On Tue, Mar 27, 2018 at 7:35 PM, Ian Romanick wrote: > On 03/27/2018 04:29 PM, Jason Ekstrand wrote: >> This was causing us to walk dest_components times over a thing with no >> destination. This happened to work because all of the image intrinsics >> without a destination also happened to have d

Re: [Mesa-dev] [PATCH] nir/intrinsics: Don't report negative dest_components

2018-03-27 Thread Rob Clark
est_components but ignoring has_dest?? Still a bit curious about why I wasn't able to reproduce this, but it explains why my test code that compared old/new tables didn't flag it. Reviewed-by: Rob Clark > --- > src/compiler/nir/nir_intrinsics_c.py | 2 +- > 1 file ch

[Mesa-dev] [PATCH] nir: fix generated nir_intrinsics.c for MSVC

2018-03-27 Thread Rob Clark
Apparently it is not happy about things like: .foo = {} So skip over initializers for empty lists. Fixes: 76dfed8ae2d5c6c509eb2661389be3c6a25077df Reported-by: Roland Scheidegger Signed-off-by: Rob Clark --- src/compiler/nir/nir_intrinsics_c.py | 4 1 file changed, 4 insertions(+) diff

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-27 Thread Rob Clark
On Tue, Mar 27, 2018 at 2:40 PM, Emil Velikov wrote: > On 27 March 2018 at 00:08, Roland Scheidegger wrote: >> Am 27.03.2018 um 00:44 schrieb Rob Clark: >>> On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: >>>> On Mon, Mar 26, 2018 at 6:07 PM, Roland Sche

Re: [Mesa-dev] [PATCH v3 0/8] freedreno: a2xx improvements

2018-03-27 Thread Rob Clark
en't! > So the commit id in 1/8 was wrong all the time. > > Pushed as: b8fb7978e7ae106d0d11d0b238ab2ba2d4dd9d43. > >> Reviewed-by: Rob Clark > > Thanks! > > Regards, > Wladimir ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] glsl_types: fix build break with intel/msvc compiler

2018-03-26 Thread Rob Clark
. So let's do that instead. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105740 Fixes: f407edf3407396379e16b0be74b8d3b85d2ad7f0 Cc: Emil Velikov Cc: Timothy Arceri Cc: Roland Scheidegger Cc: Ian Romanick Signed-off-by: Rob Clark --- src/compiler/glsl_types.cpp

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
On Mon, Mar 26, 2018 at 6:38 PM, Rob Clark wrote: > On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger > wrote: >> Am 26.03.2018 um 23:01 schrieb Rob Clark: >>> correct me if I'm wrong, but I don't see how you could do the ## stuff >>> to construct the

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
On Mon, Mar 26, 2018 at 6:07 PM, Roland Scheidegger wrote: > Am 26.03.2018 um 23:01 schrieb Rob Clark: >> correct me if I'm wrong, but I don't see how you could do the ## stuff >> to construct the built-in type name with templates. So I think the >> options are to

Re: [Mesa-dev] [PATCH] glsl: remove GCC construct from VECN macro

2018-03-26 Thread Rob Clark
compilers such as the Intel one or MSVC. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105740 >> Fixes: f407edf3407396379e16b0be74b8d3b85d2ad7f0 >> Cc: Rob Clark >> Cc: Timothy Arceri >> Cc: Roland Scheidegger >> Signed-off-by: Emil Velikov

[Mesa-dev] [PATCH 1/2 v2] nir: fix per_vertex_output intrinsic

2018-03-25 Thread Rob Clark
This is supposed to have both BASE and COMPONENT but num_indices was inadvertantly set to 1. Cc: Signed-off-by: Rob Clark --- src/compiler/nir/nir_intrinsics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir

[Mesa-dev] [PATCH 2/2 v2] nir: mako all the intrinsics

2018-03-25 Thread Rob Clark
the old and new tables v3: misc comments, don't rely on capture=true for meson.build, get rid of system_values table to avoid return value of intrinsic() and *mostly* remove side-effects, add autotools build support Signed-off-by: Rob Clark --- So, new scheme is, I think, a reaso

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-25 Thread Rob Clark
On Sun, Mar 25, 2018 at 6:35 AM, Karol Herbst wrote: > On Sun, Mar 25, 2018 at 12:18 AM, Rob Clark wrote: >> On Fri, Mar 23, 2018 at 5:18 PM, Jason Ekstrand wrote: >>> On Fri, Mar 23, 2018 at 2:15 PM, Karol Herbst wrote: >>>> >>>> On Fri, Mar 23, 20

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-24 Thread Rob Clark
On Sat, Mar 24, 2018 at 8:12 PM, Jason Ekstrand wrote: > On March 24, 2018 16:24:57 Rob Clark wrote: > > On Fri, Mar 23, 2018 at 4:59 PM, Jason Ekstrand > wrote: > On Fri, Mar 23, 2018 at 1:35 PM, Karol Herbst wrote: > > On Fri, Mar 23, 2018 at 9:18 PM, Jason Ekstrand &

Re: [Mesa-dev] [PATCH v3 0/8] freedreno: a2xx improvements

2018-03-24 Thread Rob Clark
or old snadragon devices, so I think it is ok to ignore that. If the rnndb bits are merged already, then: Reviewed-by: Rob Clark (and if not ping me, I might have overlooked some patches..) > Wladimir J. van der Laan (8): > freedreno: a2xx: Update rnndb header for formats enumeration &g

Re: [Mesa-dev] [PATCH v3 15/19] nir: use load_local_group_size

2018-03-24 Thread Rob Clark
On Fri, Mar 23, 2018 at 4:59 PM, Jason Ekstrand wrote: > On Fri, Mar 23, 2018 at 1:35 PM, Karol Herbst wrote: >> >> On Fri, Mar 23, 2018 at 9:18 PM, Jason Ekstrand >> wrote: >> > On Fri, Mar 23, 2018 at 12:33 PM, Karol Herbst >> > wrote: >> >&g

Re: [Mesa-dev] [PATCH v3 06/19] RFC: nir/vtn: "raw" pointer support

2018-03-24 Thread Rob Clark
On Fri, Mar 23, 2018 at 5:18 PM, Jason Ekstrand wrote: > On Fri, Mar 23, 2018 at 2:15 PM, Karol Herbst wrote: >> >> On Fri, Mar 23, 2018 at 10:07 PM, Jason Ekstrand >> wrote: >> > +list >> > >> > On Fri, Mar 23, 2018 at 1:45 PM, Karol Herbst >> > wrote: >> >> >> >> On Fri, Mar 23, 2018 at 9:30

[Mesa-dev] 2018 Election voting OPEN

2018-03-21 Thread Rob Clark
valid, your votes will be recorded and the system will show you a notice that your votes were cast. Note that the election will close at 23:59 UTC on 5 April 2018. At that time, the election committee will count the votes and present the results to the current board for validation. After the curren

Re: [Mesa-dev] [PATCH kmscube] cube-tex: make use of modifiers

2018-03-20 Thread Rob Clark
On Tue, Mar 20, 2018 at 2:45 PM, Emil Velikov wrote: > On 20 March 2018 at 18:02, Christian Gmeiner > wrote: >> Fixes rendering issues with mode rgba on etnaviv. I have applied >> the same change for nv12 variants but they are not supported on >> etnaviv. >> >> Signed-off-by: Christian Gmeiner >

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-17 Thread Rob Clark
On Fri, Mar 16, 2018 at 2:28 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-15 18:43:28) >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macro/#include m

Re: [Mesa-dev] [FLAG-DAY-PREP 0/9] nir: accessors for deref vars

2018-03-16 Thread Rob Clark
w helpful this is. At least in all the places where > this series affects our drivers, more serious changes are needed. > > > On Fri, Mar 16, 2018 at 3:45 PM, Bas Nieuwenhuizen > wrote: >> >> FWIW >> >> Reviewed-by: Bas Nieuwenhuizen >> >> for

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-16 12:20:10) >> On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: >> > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: >> >> >> >> Quoting Jason Ekstrand (2018-03

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: >> >> Quoting Jason Ekstrand (2018-03-16 11:38:47) >> > On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker >> > wrote: >> > >> > intr_opcodes = { >> > 'nop': Intrinsic('nop', flag

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 2:28 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-15 18:43:28) >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macro/#include m

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 11:18 AM, Emil Velikov wrote: > On 16 March 2018 at 12:41, Rob Clark wrote: >> Ok, I came up with: >> >> https://hastebin.com/bulilojupo.cpp >> >> if you want to double check my methodology. >> >> It spotted a couple small

Re: [Mesa-dev] [PATCH 04/11] nir/spirv: add gl_spirv_validation method

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 7:48 AM, Alejandro Piñeiro wrote: > On 16/03/18 12:39, Rob Clark wrote: >> On Fri, Mar 16, 2018 at 7:27 AM, Alejandro Piñeiro >> wrote: >>> On 16/03/18 12:11, Rob Clark wrote: >>>> Just curious, how much different is this from what

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
ertex, offset }. const_index[] = { base } load("per_vertex_output", 2, [BASE], [CAN_ELIMINATE]) ? BR, -R On Fri, Mar 16, 2018 at 7:08 AM, Rob Clark wrote: > I haven't done anything to verify yet, but I was thinking along the > same lines of just hacking up a .c program to com

Re: [Mesa-dev] [PATCH 04/11] nir/spirv: add gl_spirv_validation method

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 7:27 AM, Alejandro Piñeiro wrote: > On 16/03/18 12:11, Rob Clark wrote: >> Just curious, how much different is this from what spirv-val does? > > Well, spirv-val does a full validation of the SPIR-V binary. Here we are > just doing the basic validati

Re: [Mesa-dev] [PATCH 04/11] nir/spirv: add gl_spirv_validation method

2018-03-16 Thread Rob Clark
Just curious, how much different is this from what spirv-val does? We are going to end up using spirv-tools from clover, so if all of this is just to avoid a dependency on spirv-tools, is it worth it? BR, -R On Thu, Mar 8, 2018 at 3:19 AM, Alejandro Piñeiro wrote: > ARB_gl_spirv adds the abilit

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
nsure > that the two generate the same thing. > > > > On March 15, 2018 18:43:59 Rob Clark wrote: > >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macr

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