Re: [Mesa-dev] [PATCH] glapi: Fix -Wduplicate-decl-specifier due to double-const

2017-06-24 Thread Kenneth Graunke
On Thursday, June 22, 2017 3:17:21 PM PDT Chad Versace wrote: > Fix all lines in src/mesa/main/marshal_generated.c that declare > double-const variables. Below is all such lines, with duplicates > removed: > >$ grep 'const const' marshal_generated.c | sort -u >const const GLboolean * point

[Mesa-dev] [PATCH 17/17] radeonsi: enable uniform packing

2017-06-24 Thread Timothy Arceri
--- src/gallium/drivers/radeonsi/si_shader.c | 4 ++-- src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 10 ++ src/mesa/state_tracker/st_context.c | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b

[Mesa-dev] [PATCH 12/17] mesa/st: make sure the const buffer is large enough for packed uniforms

2017-06-24 Thread Timothy Arceri
--- src/mesa/state_tracker/st_atom_constbuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 7f17546..eb8f6b3 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/me

[Mesa-dev] [PATCH 16/17] mesa/st: don't adjust indirect index for builtins

2017-06-24 Thread Timothy Arceri
These seems to be handled differently by the backend and are not packed with this series anyway. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi

[Mesa-dev] [PATCH 14/17] mesa/st: hack const index

2017-06-24 Thread Timothy Arceri
This is wrong fix me, just set to 4 to reduce piglit failures for now. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index e0f5718..111e5d2

[Mesa-dev] [PATCH 15/17] mesa/st: handle indirect indexing of asm programs for backends that pack uniforms

2017-06-24 Thread Timothy Arceri
Currently asm programs don't support packing and are always padded to 4. --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c ind

[Mesa-dev] [PATCH 07/17] mesa/st: allow for uniform packing when adding uniforms to param list

2017-06-24 Thread Timothy Arceri
--- src/mesa/program/ir_to_mesa.cpp| 45 +++--- src/mesa/program/ir_to_mesa.h | 3 +- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 4 files changed, 39 insertions(+), 13 deletions(-) diff -

[Mesa-dev] [PATCH 11/17] mesa/st: adjust packed const buffer index for indirect indexing

2017-06-24 Thread Timothy Arceri
The extra mul should end up const folded away in the backend. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 33 ++ 1 file changed, 33 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index dbb01b5..e

[Mesa-dev] [PATCH 02/17] mesa: rework _mesa_add_parameter() to only add a single param

2017-06-24 Thread Timothy Arceri
This is more inline with what the functions name suggests it should do, and makes the code much easier to follow. This will also make adding uniform packing support much simpler. --- src/compiler/glsl/shader_cache.cpp | 4 +-- src/mesa/program/ir_to_mesa.cpp| 19 ++--- src/mesa/progr

[Mesa-dev] [PATCH 06/17] mesa: add packing support for setting uniform handles

2017-06-24 Thread Timothy Arceri
--- src/mesa/main/uniform_query.cpp | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 0b22683..dadad87 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -

[Mesa-dev] [PATCH 13/17] gallivm: relax assert() to support uniform packing

2017-06-24 Thread Timothy Arceri
For uniform packing we multiply the const buffer index by its componets in the st rather than in the backend. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gal

[Mesa-dev] [PATCH 10/17] mesa/st: set correct constant buffer index when uniform packing enabled

2017-06-24 Thread Timothy Arceri
--- src/mesa/state_tracker/st_atifs_to_tgsi.c | 7 +-- src/mesa/state_tracker/st_atifs_to_tgsi.h | 1 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 13 - src/mesa/state_tracker/st_mesa_to_tgsi.c | 5 +++-- src/mesa/state_tracker/st_program.c| 2 +- 5 files changed,

[Mesa-dev] RFC uniform packing for gallium V2

2017-06-24 Thread Timothy Arceri
There are still a handful of piglit tests failing and I'm yet to test that there are no regressions in the non-packed path, but I'd really like some feedback on the approach as Dave has flagged it as a possible controversial tgsi change. In order to avoid complicated swizzling and array element ad

[Mesa-dev] [PATCH 08/17] mesa: add uniform packing support to _mesa_add_typed_unnamed_constant()

2017-06-24 Thread Timothy Arceri
--- src/mesa/program/prog_parameter.c | 53 +- src/mesa/program/prog_parameter.h | 14 +--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 5 +-- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/src/mesa/program/prog_parameter.c b/s

[Mesa-dev] [PATCH 04/17] mesa: create copy uniform to storage helpers

2017-06-24 Thread Timothy Arceri
These will be used in the following patch to allow copying directly to the param list when packing is enabled. --- src/mesa/main/uniform_query.cpp | 154 1 file changed, 91 insertions(+), 63 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/m

[Mesa-dev] [PATCH 09/17] mesa/st: get immediate size from param list

2017-06-24 Thread Timothy Arceri
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index cf58212..0535ae1 100644 --- a/src/

[Mesa-dev] [PATCH 05/17] mesa: add packing support for setting uniforms

2017-06-24 Thread Timothy Arceri
--- src/mesa/main/uniform_query.cpp | 73 ++--- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index b13f506..0b22683 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/m

[Mesa-dev] [PATCH 03/17] mesa: rework ParameterList to allow packing

2017-06-24 Thread Timothy Arceri
Currently everything is padded to 4 elements. Making the list more flexible will allow us to do uniform packing. This change requires us to remove the existing packing in _mesa_add_typed_unnamed_constant() in order to avoid regressions. This packing will no longer be required once we add full pack

[Mesa-dev] [PATCH 01/17] mesa: add PackedDriverUniformStorage const

2017-06-24 Thread Timothy Arceri
Will be used to determine whether to take packing code paths or not. --- src/mesa/main/mtypes.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0cb0024..49c8f63 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3980,20

Re: [Mesa-dev] [PATCH] mesa: skip FLUSH_VERTICES() if no samplers were changed

2017-06-24 Thread Timothy Arceri
On 24/06/17 11:45, Ian Romanick wrote: On 06/22/2017 03:56 PM, Timothy Arceri wrote: --- src/mesa/main/uniform_query.cpp | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 1570770..9683fa8 100644

Re: [Mesa-dev] [PATCH] mesa/marshal: add custom marshalling for glNamedBuffer(Sub)Data

2017-06-24 Thread Timothy Arceri
Please try the series from Marek which reduces the batch size [1], the reduced size helps reduce the impact of syncs. MARSHAL_MAX_CMD_SIZE is also greatly reduced to help reduce thrashing the cache so its possible this patch won't be as effective anymore. However you might not even need it. [

[Mesa-dev] [PATCH] i965: Move surface resolves back to draw/dispatch time

2017-06-24 Thread Jason Ekstrand
This is effectively a revert of 388f02729bbf88ba104f4f8ee1fdf005a240969c though much code has been added since. Kristian initially moved it to try and avoid locking problems with meta-based resolves. Now that meta is gone from the resolve path (for good this time, we hope), we can move it back.

[Mesa-dev] [PATCH 2/3] nv50/ir: adjust overlapping logic to take fileIndex-relative offsets

2017-06-24 Thread Ilia Mirkin
If the fileIndex is different, that means they are in logically different spaces. However if there's also a relative offset, then they could end up pointing at the same spot again. Also add a note about potential for multiple buffers to overlap even if they're at different file indexes. However th

[Mesa-dev] [PATCH 3/3] nv50/ir: fix combineLd/St to update existing records as necessary

2017-06-24 Thread Ilia Mirkin
Previously the logic would decide that the record is kept, which translates into keep = false in the caller, which meant that these passes did not run. While it's right that keep = false which means that a new record does not need to be added, we do still have to perform the usual list maintenance

[Mesa-dev] [PATCH 1/3] nv50/ir: VFETCH is also considered a load for MemoryOpt

2017-06-24 Thread Ilia Mirkin
This has no effect since in practice this will only play for memory-backed files, for which VFETCH will never happen. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/no

Re: [Mesa-dev] [PATCH] mesa/marshal: add custom marshalling for glNamedBuffer(Sub)Data

2017-06-24 Thread Matt Turner
On Sat, Jun 24, 2017 at 9:59 AM, Grigori Goronzy wrote: > These entry points are used by Alien Isolation and caused > synchronization with glthread. The async marshalling implementation > is similar to glBuffer(Sub)Data. > > Results in an approximately 6x drop in glthread synchronizations and a >

Re: [Mesa-dev] [PATCH 4/4] radv: handle primitive id input into fragment shader with no geom shader

2017-06-24 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for the series. On Tue, Jun 20, 2017 at 6:38 AM, Dave Airlie wrote: > From: Dave Airlie > > Fixes: > dEQP-VK.pipeline.framebuffer_attachment.no_attachments > dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms > > Signed-off-by: Dave Airlie > --- > src/am

Re: [Mesa-dev] [PATCH 2/4] radv: set prim_id for geometry shaders

2017-06-24 Thread Bas Nieuwenhuizen
On Tue, Jun 20, 2017 at 6:38 AM, Dave Airlie wrote: > From: Dave Airlie > > Noticed in passing. > > Signed-off-by: Dave Airlie > --- > src/amd/common/ac_nir_to_llvm.c | 5 +++-- > src/amd/common/ac_nir_to_llvm.h | 1 + > src/amd/vulkan/si_cmd_buffer.c | 6 ++ > 3 files changed, 10 insertio

[Mesa-dev] [PATCH] radv: Use correct image layout for blit based copies.

2017-06-24 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen Fixes: 0628580eff6 "radv: Specify semantics of HTILE layout helpers." --- src/amd/vulkan/radv_meta_blit2d.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/amd/vulkan/radv_meta_blit2d.c b/src/amd/vulkan/radv

[Mesa-dev] [PATCH] nv50, nvc0: remove IDX from bufctx immediately, to avoid conflicts with clear

2017-06-24 Thread Ilia Mirkin
The idxbuf could linger, and when a clear happened, which also uses the 3d bufctx, we could get an error trying to access it. This fixes spurious crashes/errors in CTS tests. Fixes: 61d8f3387d ("nv50,nvc0: clear index buffer bufctx bin unconditionally") Signed-off-by: Ilia Mirkin Cc: mesa-sta...

[Mesa-dev] [PATCH] mesa/marshal: add custom marshalling for glNamedBuffer(Sub)Data

2017-06-24 Thread Grigori Goronzy
These entry points are used by Alien Isolation and caused synchronization with glthread. The async marshalling implementation is similar to glBuffer(Sub)Data. Results in an approximately 6x drop in glthread synchronizations and a ~30% FPS jump in Alien Isolation (Medium preset, Athlon 860K, RX 480

[Mesa-dev] [PATCH] nv50/ir: fetch indirect sources BEFORE the op that uses them

2017-06-24 Thread Ilia Mirkin
All the BuildUtil helpers just insert the operation into the current BB. So we have to take care that any fetchSrc() operations happen before the operation whose setIndirect() it goes into. Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- I don't know how any of this really w

[Mesa-dev] [RFC PATCH 1/3] nv50/ir: use the image info in the instruction rather than decl

2017-06-24 Thread Ilia Mirkin
In preparation for bindless images, we have to retrieve the target/format info from the instruction directly, as there will be no declaration. Furthermore, for bound images, this information is still available in the instruction, so we can drop the declaration-based mechanism entirely. Signed-off-

[Mesa-dev] [RFC PATCH 2/3] nvc0: add support for bindless textures on kepler+

2017-06-24 Thread Ilia Mirkin
This keeps a list of resident textures (per context), and dumps that list into the active buffer list when submitting. We also treat bindless texture fetches slightly differently, wrt the meaning of indirect, and not requiring the SAMPLER file to be used. Signed-off-by: Ilia Mirkin --- src/galli

[Mesa-dev] [RFC PATCH 3/3] nvc0: add bindless image support for kepler

2017-06-24 Thread Ilia Mirkin
A part of the driver constbuf area is allocated for bindless images. Any update requires uploading to all driver constbufs. This also extends the driver constbuf to 64KB, up from 2KB. As a side-effect, this also fixes indirect image access, as fetchSrc() was done *after* the op was already created

[Mesa-dev] [RFC PATCH 0/3] ARB_bindless_texture support for Kepler

2017-06-24 Thread Ilia Mirkin
This is RFC because it doesn't work. All the piglits pass, but all the games hang with bindless enabled. I can't immediately think of what I've missed though. I also totally hate the way I implemented images. It should be possible to do it much better on Maxwell, since images are represented by T

Re: [Mesa-dev] [PATCH 2/3 v2] r600g: take into account offset to system inputs at tgsi_interp_egcm()

2017-06-24 Thread Constantine Kharlamov
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100785 v2: I was too much twiddling whether to initialize nsys_inputs at the beginning of shader initialization or for allocation of system values, and by the time I decided to go with the first one, I forgot to change it back. Signed-off-by:

[Mesa-dev] [PATCH 3/3] r600g: fix crash when file in R600_TRACE doesn't exist

2017-06-24 Thread Constantine Kharlamov
…and print error in such case. Which probably is not a rare event btw because fopen doesn't expand ~ to $HOME. Also get rid of unused "bool ret" variable. Signed-off-by: Constantine Kharlamov --- src/gallium/drivers/r600/r600_hw_context.c | 9 + 1 file changed, 5 insertions(+), 4 deleti

[Mesa-dev] [PATCH 2/3] r600g: take into account offset to system inputs at tgsi_interp_egcm()

2017-06-24 Thread Constantine Kharlamov
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100785 Signed-off-by: Constantine Kharlamov --- src/gallium/drivers/r600/r600_shader.c | 8 src/gallium/drivers/r600/r600_shader.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/r600/r600_

[Mesa-dev] [PATCH 0/3] r600g: small fixes

2017-06-24 Thread Constantine Kharlamov
Note, I didn't manage to piglit-test it because of a sporadic lockup. Funnily though, by sheer luck the test with fixes passed, but not the master. I tried fixing it, but stuck, and had to retreat to reporting a bug https://bugs.freedesktop.org/show_bug.cgi?id=101575 Anyway, the series is trivia,

[Mesa-dev] [PATCH 1/3] r600g: get rid of trailing whitespace

2017-06-24 Thread Constantine Kharlamov
Signed-off-by: Constantine Kharlamov --- src/gallium/drivers/r600/r600_shader.c | 44 +- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index bdaf28ced2..156dba085d 10

Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-24 Thread Marek Olšák
On Jun 24, 2017 12:01 PM, "Nicolai Hähnle" wrote: On 22.06.2017 17:10, Marek Olšák wrote: > From: Marek Olšák > > +2.3% better score on Fiji. It might be better without HBM. > Can this be a drirc option? The answer is the same as for: Can sisched be a flag defined in p_defines.h, drirc, and

[Mesa-dev] [Bug 99467] [radv] DOOM 2016 + wine. Green screen everywhere (but can be started)

2017-06-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99467 Grazvydas Ignotas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH 1/2] nv50/ir: move POW lowering into BuildUtil

2017-06-24 Thread Pierre Moreau
Reviewed-by: Pierre Moreau On 09:28 pm - Jun 22 2017, Karol Herbst wrote: > It's the same for all supported chipsets. > > Signed-off-by: Karol Herbst > --- > .../drivers/nouveau/codegen/nv50_ir_build_util.cpp| 16 > .../drivers/nouveau/codegen/nv50_ir_build_util.h |

Re: [Mesa-dev] [PATCH] radeonsi: enable LLVM sisched for Unigine Superposition

2017-06-24 Thread Nicolai Hähnle
On 22.06.2017 17:10, Marek Olšák wrote: From: Marek Olšák +2.3% better score on Fiji. It might be better without HBM. Can this be a drirc option? --- src/gallium/drivers/radeonsi/si_pipe.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c

Re: [Mesa-dev] [PATCH 4/4] mesa: only flush vertices when the viewport is different

2017-06-24 Thread Nicolai Hähnle
Patches 3 & 4: Reviewed-by: Nicolai Hähnle On 22.06.2017 16:35, Samuel Pitoiset wrote: This prevents glViewport() and friends to always flush and trigger _NEW_VIEWPORT. Signed-off-by: Samuel Pitoiset --- src/mesa/main/viewport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [Mesa-dev] [PATCH 1/2] radeonsi/gfx9: don't overallocate shader binaries

2017-06-24 Thread Nicolai Hähnle
On 22.06.2017 14:34, Marek Olšák wrote: From: Marek Olšák It's not needed. The hw doesn't fetch ahead over page boundaries. Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_

Re: [Mesa-dev] [PATCH 2/4] etnaviv: add support for swizzled texture formats

2017-06-24 Thread Christian Gmeiner
Hi 2017-06-22 14:39 GMT+02:00 Wladimir J. van der Laan : > On Wed, Jun 21, 2017 at 10:36:46PM +0200, Christian Gmeiner wrote: >> Passes all ext_texture_swizzle piglits. > > You seem to have dropped the check in etnaviv_screen.c for HALTI0 when texture > formats have implicit non-identity swizzle.