Re: [Mesa-dev] [PATCH 2/7] glsl/glcpp: use ralloc_sprint_rewrite_tail to avoid slow vsprintf

2017-01-01 Thread Vladislav Egorov
01.01.2017 06:41, Kenneth Graunke пишет: On Sunday, January 1, 2017 1:34:27 AM PST Marek Olšák wrote: From: Marek Olšák This reduces compile times by 4.5% with the Gallium noop driver and gl_constants::GLSLOptimizeConservatively == true. Compile times of...what exactly? Do you have any sta

Re: [Mesa-dev] [PATCH 2/7] glsl/glcpp: use ralloc_sprint_rewrite_tail to avoid slow vsprintf

2017-01-01 Thread Marek Olšák
On Jan 1, 2017 4:41 AM, "Kenneth Graunke" wrote: On Sunday, January 1, 2017 1:34:27 AM PST Marek Olšák wrote: > From: Marek Olšák > > This reduces compile times by 4.5% with the Gallium noop driver and > gl_constants::GLSLOptimizeConservatively == true. Compile times of...what exactly? Do you

Re: [Mesa-dev] [PATCH 2/7] glsl/glcpp: use ralloc_sprint_rewrite_tail to avoid slow vsprintf

2017-01-01 Thread Marek Olšák
On Jan 1, 2017 11:55 AM, "Vladislav Egorov" wrote: 01.01.2017 06:41, Kenneth Graunke пишет: On Sunday, January 1, 2017 1:34:27 AM PST Marek Olšák wrote: > >> From: Marek Olšák >> >> This reduces compile times by 4.5% with the Gallium noop driver and >> gl_constants::GLSLOptimizeConservatively

[Mesa-dev] [Bug 99240] glxinfo reports different extensions for wayland vs xorg.

2017-01-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99240 Bug ID: 99240 Summary: glxinfo reports different extensions for wayland vs xorg. Product: Mesa Version: 13.0 Hardware: Other OS: All Status: NEW

[Mesa-dev] [Bug 99240] glxinfo reports different extensions for wayland vs xorg.

2017-01-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99240 --- Comment #1 from pandiculationfi...@gmail.com --- Created attachment 128705 --> https://bugs.freedesktop.org/attachment.cgi?id=128705&action=edit xorg glxinfo output -- You are receiving this mail because: You are the QA Contact for the bug

[Mesa-dev] [Bug 99240] glxinfo reports different extensions for wayland vs xorg.

2017-01-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99240 --- Comment #2 from pandiculationfi...@gmail.com --- diff of the first 50 or so lines of glxinfo. diff wayland-glxinfo.txt xorg-glxinfo.txt | head -50 7,8c7,9 < GLX_ARB_create_context, GLX_ARB_create_context_profile, < GLX_ARB_fbconfig_flo

[Mesa-dev] [PATCH 01/14] glsl: Don't rehash the values when copying to new table

2017-01-01 Thread Thomas Helland
Really, we should have some kind of function for copying the whole table, but this will work for now. --- src/compiler/glsl/opt_copy_propagation.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation.cpp b/src/compiler/glsl/opt_copy_pr

[Mesa-dev] [PATCH 00/14] [RFC] Optimizations on copy propagation

2017-01-01 Thread Thomas Helland
Hi all. This is a series I've put together to lower the overhead of the copy propagation pass in glsl. The series is not refined, so please treat it as a proof of concept / RFC. The first five patches might be merge-ready, but their benefit is quite low compared to the actual major change here.

[Mesa-dev] [PATCH 03/14] nir: Remove unused include of nir_array

2017-01-01 Thread Thomas Helland
--- src/compiler/nir/nir_lower_locals_to_regs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c index f1af237b5e..d0667bc504 100644 --- a/src/compiler/nir/nir_lower_locals_to_regs.c +++ b/src/compiler/nir

[Mesa-dev] [PATCH 02/14] glsl: Don't compute the hash when we already have it available

2017-01-01 Thread Thomas Helland
We should really have a function to copy the table contents, but this will at least get us somewhere in the meantime. --- src/compiler/glsl/opt_copy_propagation_elements.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagation_elements.cp

[Mesa-dev] [PATCH 07/14] util: Add field for pointing to next data

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/util/non_replacing_hash_table.h b/src/util/non_replacing_hash_table.h index b35ee871bb..7550400539 100644 --- a/src/util/non_replacing_hash_table.h +++ b/src/util/non_replacing_hash_table.h @@ -42

[Mesa-dev] [PATCH 06/14] util: Make a copy of the existing hash table implementation

2017-01-01 Thread Thomas Helland
--- src/util/Makefile.sources | 2 + src/util/non_replacing_hash_table.c | 504 src/util/non_replacing_hash_table.h | 159 3 files changed, 665 insertions(+) create mode 100644 src/util/non_replacing_hash_table.c create mode 100644 sr

[Mesa-dev] [PATCH 05/14] glsl: Use dyn_array instead of the exec_list

2017-01-01 Thread Thomas Helland
This should give us lower memory consumption, allocation overhead, better cache locality, and all this nice stuff. --- src/compiler/glsl/opt_copy_propagation.cpp | 57 +- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/src/compiler/glsl/opt_copy_propagat

[Mesa-dev] [PATCH 04/14] nir: Move nir_array to util, and rename to dyn_array

2017-01-01 Thread Thomas Helland
-- We might want to merge u_vector and this array, or just replace this implementation completely. Having two separate implementations, where one of them has one sole user seems a bit wierd. --- src/compiler/Makefile.sources | 1 - src/compiler/spirv/vtn_cfg.c

[Mesa-dev] [PATCH 10/14] util: Add a comment about ordering of entries with matching keys

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_table.c index 33c93452c4..1128388ab8 100644 --- a/src/util/non_replacing_hash_table.c +++ b/src/util/non_replacing

[Mesa-dev] [PATCH 11/14] util: Implement returning the last added entry on search

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_table.c index 1128388ab8..48f42aa7c9 100644 --- a/src/util/non_replacing_hash_table.c +++ b/src/util/non

[Mesa-dev] [PATCH 13/14] util: Use hashing functions from hash_table.h

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 47 - src/util/non_replacing_hash_table.h | 35 +-- 2 files changed, 1 insertion(+), 81 deletions(-) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_table.c index

[Mesa-dev] [PATCH 08/14] util: Implement the insertion functionality

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 41 +++-- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_table.c index 1730b1ee0d..a4c57e9349 100644 --- a/src/util/non_replacing_hash_table.

[Mesa-dev] [PATCH 14/14] glsl: Restructure copy propagation to use the non replacing hash table

2017-01-01 Thread Thomas Helland
This way we can build one hash table in each direction. This allows us to move the algorithm from O(n^2) to O(2*n). The downside is an effective doubling of memory consumption --- src/compiler/glsl/opt_copy_propagation.cpp | 49 +++--- 1 file changed, 45 insertions(+), 4 de

[Mesa-dev] [PATCH 09/14] util: Implement deletion of entries

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_table.c index a4c57e9349..33c93452c4 100644 --- a/src/util/non_replacing_hash_table.c +++ b/src/util/non_replacing_hash_table.c @@ -1

[Mesa-dev] [PATCH 12/14] util: Rename functions and structs

2017-01-01 Thread Thomas Helland
--- src/util/non_replacing_hash_table.c | 112 +++- src/util/non_replacing_hash_table.h | 102 2 files changed, 111 insertions(+), 103 deletions(-) diff --git a/src/util/non_replacing_hash_table.c b/src/util/non_replacing_hash_tabl

Re: [Mesa-dev] [PATCH 00/14] [RFC] Optimizations on copy propagation

2017-01-01 Thread Thomas Helland
Oh, and an important disclaimer. I have not ran this through picking, nor have I done a complete run of shader-db for performance comparisons on more realistic workloads. I'll see what time I can find this evening, or some time tomorrow. On Jan 1, 2017 19:38, "Thomas Helland" wrote: Hi all. Thi

Re: [Mesa-dev] Patch for freedreno features

2017-01-01 Thread Rob Clark
On Sat, Dec 31, 2016 at 1:31 PM, Romain Failliot wrote: > I tried to use git send-email but it doesn't seem to work (although > the output says otherwise). > > So eventually it's simpler to just copy/paste the patch generated by > git format-patch: well, I was trying to not loose authorship/etc f

[Mesa-dev] [PATCH] gallium/hud: add a path separator between dump directory and filename

2017-01-01 Thread Edmondo Tommasina
It's more user friendly and it avoids to write files in unexpected places. --- src/gallium/auxiliary/hud/hud_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 779c116..cccdb26 100

Re: [Mesa-dev] [PATCH 00/14] [RFC] Optimizations on copy propagation

2017-01-01 Thread Thomas Helland
Darn it. There appears to be a functional change with patch 14. My changes where meant to make no functional change, so something is fishy. An example from the public shader-db: cycles HURT: ./shaders/tesseract/205.shader_test VS vec4: 54 -> 100 (85.19%) I'll see if I can find some time to

Re: [Mesa-dev] [PATCH 20/27] i965: Pretend that CCS modified images are two planes

2017-01-01 Thread Ben Widawsky
On 16-12-10 16:05:12, Pohjolainen, Topi wrote: On Thu, Dec 01, 2016 at 02:10:01PM -0800, Ben Widawsky wrote: From: Ben Widawsky Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_screen.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/s

Re: [Mesa-dev] [PATCH 00/14] [RFC] Optimizations on copy propagation

2017-01-01 Thread Thomas Helland
So I've discovered the issue. I wasn't inserting into both tables. So we never did any copy propagation. So that was stupid. Now it assertion fails in _insert_pre_hashed as hashing the key does not return the same result as the supplied hash. I'll look more into this some time during the week. 201

Re: [Mesa-dev] Patch for freedreno features

2017-01-01 Thread Jan Vesely
On Sun, 2017-01-01 at 16:15 -0500, Rob Clark wrote: > On Sat, Dec 31, 2016 at 1:31 PM, Romain Failliot > wrote: > > I tried to use git send-email but it doesn't seem to work (although > > the output says otherwise). > > > > So eventually it's simpler to just copy/paste the patch generated by > >

Re: [Mesa-dev] [PATCH 00/14] [RFC] Optimizations on copy propagation

2017-01-01 Thread Thomas Helland
2017-01-01 23:20 GMT+01:00 Thomas Helland : > So I've discovered the issue. I wasn't inserting into both tables. > So we never did any copy propagation. So that was stupid. > Now it assertion fails in _insert_pre_hashed as hashing the > key does not return the same result as the supplied hash. > I'

Re: [Mesa-dev] [PATCH 25/27] i965: Use partial resolves for CCS buffers being scanned out

2017-01-01 Thread Ben Widawsky
On 16-12-10 16:24:46, Pohjolainen, Topi wrote: On Thu, Dec 01, 2016 at 02:10:06PM -0800, Ben Widawsky wrote: From: Ben Widawsky On Gen9 hardware, the display engine is able to scanout a compressed framebuffer by providing an offset to auxiliary compression information. Unfortunately, the hardw

Re: [Mesa-dev] [PATCH 26/27] i965: Remove scanout restriction from lossless compression

2017-01-01 Thread Ben Widawsky
On 16-12-11 10:05:25, Pohjolainen, Topi wrote: On Thu, Dec 01, 2016 at 02:10:07PM -0800, Ben Widawsky wrote: From: Ben Widawsky Cc: Topi Pohjolainen Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(

[Mesa-dev] [PATCH 1/2] i965: Replace bool aux disable with enum

2017-01-01 Thread Ben Widawsky
As CCS buffers are passed to KMS, it becomes useful to be able to determine exactly what type of aux buffers are disabled. This was previously not entirely needed (though the code was a little more confusing), however it becomes very desirable after a recent patch from Chad: commit 1c8be049bea786c

[Mesa-dev] [PATCH 2/2] i965/miptree: Create a disable CCS flag

2017-01-01 Thread Ben Widawsky
Cc: Topi Pohjolainen Cc: Chad Versace Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/brw_blorp.c | 2 +- src/mesa/drivers/dri/i965/brw_draw.c | 3 ++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 21 ++--- src/mesa/drivers/dri/i965/intel_mipmap_t

[Mesa-dev] [Bug 99244] hud_context.c:874:45: error: ‘W_OK’ undeclared

2017-01-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99244 Bug ID: 99244 Summary: hud_context.c:874:45: error: ‘W_OK’ undeclared Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Keyw

[Mesa-dev] [PATCH 1/7] glsl: avoid treating fb fetches as output reads to be lowered

2017-01-01 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/compiler/glsl/lower_output_reads.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp index 851078b..bd3accb 100644 --- a/src/compiler/glsl/lower_output_reads

[Mesa-dev] [PATCH 6/7] st/mesa: add support for advanced blend when fb can be fetched from

2017-01-01 Thread Ilia Mirkin
This implements support for emitting FBFETCH ops, using the existing lowering pass for advanced blend logic, and disabling hw blend when advanced blending is enabled. Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_atom_blend.c| 2 +- src/mesa/state_tracker/st_cb_texturebarrier

[Mesa-dev] [PATCH 5/7] gallium: add flags parameter to texture barrier

2017-01-01 Thread Ilia Mirkin
This is so that we can differentiate between flushing any framebuffer reading caches from regular sampler caches. Signed-off-by: Ilia Mirkin --- This felt too simple and silly to create an extra callback for, especially since the implementations that rely on texture sampling to retrieve fb conte

[Mesa-dev] [PATCH 2/7] mesa: allow BlendBarrier to be used without support for full fb fetch

2017-01-01 Thread Ilia Mirkin
The extension spec is not currently published, so it's a bit premature to require it for BlendBarrier usage. Signed-off-by: Ilia Mirkin --- src/mesa/main/barrier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/barrier.c b/src/mesa/main/barrier.c index 2f5b45

[Mesa-dev] [PATCH 4/7] gallium: add PIPE_CAP_TGSI_FS_FBFETCH

2017-01-01 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/docs/source/screen.rst | 2 ++ src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c

[Mesa-dev] [PATCH 3/7] gallium: add FBFETCH opcode to retrieve the current sample value

2017-01-01 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_info.c | 2 +- src/gallium/docs/source/tgsi.rst | 11 +++ src/gallium/include/pipe/p_shader_tokens.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.

[Mesa-dev] [PATCH 7/7] nvc0: enable FBFETCH with a special slot for color buffer 0

2017-01-01 Thread Ilia Mirkin
We don't need to support all the color buffers for advanced blend, just cb0. For Fermi, we use the special binding slots so that we don't overlap with user textures, while Kepler+ gets a dedicated position for the fb handle in the driver constbuf. This logic is only triggered when a FBREAD is actu

Re: [Mesa-dev] [PATCH 18/27] i965/miptree: Add a return for updating of winsys

2017-01-01 Thread Pohjolainen, Topi
On Sat, Dec 31, 2016 at 02:40:42PM -0800, Ben Widawsky wrote: > On 16-12-10 15:39:12, Pohjolainen, Topi wrote: > > On Thu, Dec 01, 2016 at 02:09:59PM -0800, Ben Widawsky wrote: > > > From: Ben Widawsky > > > > > > There is nothing particularly useful to do currently if the update > > > fails, but