Re: [Mesa-dev] [PATCH] winsys/amdgpu: add a fast exit path into amdgpu_cs_add_buffer

2017-01-30 Thread Jan Ziak
Hello Just a note about the future of Mesa: It is likely that optimizing Mesa will lead you (Marek) to consider generative programming some years into the future: Optimal code is basically a form of efficient adaptation to current circumstances. Generating the optimal code by hand can be ineffic

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add a fast exit path into amdgpu_cs_add_buffer

2017-01-30 Thread Jan Ziak
On Mon, Jan 30, 2017 at 5:08 PM, Marek Olšák wrote: > On Mon, Jan 30, 2017 at 4:41 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Hello >> >> Just a note about the future of Mesa: >> >> It is likely that optimizing Mesa will lead you (Marek) to consid

Re: [Mesa-dev] Time to merge threaded GL dispatch? (aka glthread)

2017-02-06 Thread Jan Ziak
Hello Just some notes for mesa_glthread=true: - Shadow of Mordor benchmark: 30 FPS w/o glthread -> 20 FPS with glthread - fgl_glxgears: SIGSEGV with mesa_glthread=true (gdb) bt #0 dlist_alloc (ctx=ctx@entry=0x78b220, opcode=opcode@entry=OPCODE_CLEAR, bytes=bytes@entry=4, align8=false) at /v

Re: [Mesa-dev] Time to merge threaded GL dispatch? (aka glthread)

2017-02-06 Thread Jan Ziak
Hello I am against application profiles - in the form of "a community-maintained whitelist of apps" or in any other form explicitly associating the name/ID of an app with a Mesa variable which controls the behavior of Mesa. Application profiles would be a manifestation of poor algorithms in the O

Re: [Mesa-dev] Time to merge threaded GL dispatch? (aka glthread)

2017-02-07 Thread Jan Ziak
On Mon, Feb 6, 2017 at 11:48 PM, Marek Olšák wrote: > On Mon, Feb 6, 2017 at 9:27 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Hello >> >> I am against application profiles - in the form of "a >> community-maintained whitelist of apps" or in any ot

Re: [Mesa-dev] [PATCH 3/4] util: Change util/set to use quadratic probing

2017-02-09 Thread Jan Ziak
Hello IMPORTANT NOTE: Using the uint32_t data type, quad_hash*quad_hash will overflow as soon as the hash table has more than 2**16=65536=64K elements. To enable more than 64K elements in hash table, the data types need to be changed to uint64_t - unfortunately uint64_t arithmetic operations will

Re: [Mesa-dev] [PATCH 3/4] util: Change util/set to use quadratic probing

2017-02-10 Thread Jan Ziak
On Fri, Feb 10, 2017 at 7:03 AM, Connor Abbott wrote: > On Thu, Feb 9, 2017 at 4:16 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Hello >> >> IMPORTANT NOTE: Using the uint32_t data type, quad_hash*quad_hash will >> overflow as soon as the hash table has more

Re: [Mesa-dev] [PATCH] util/disk_cache: use stat() to check if entry is a directory

2017-02-10 Thread Jan Ziak
Hello Mesa should check that return value of stat() equals 0. if (stat_retval == 0 && !S_ISREG(sb.st_mode)) return false; ... if (stat_retval == 0 && !S_ISDIR(sb.st_mode)) return false; Jan ___ mesa-dev mailing list mesa-dev@lists.freed

[Mesa-dev] [PATCH] install: check for undefined symbols in shared libraries

2016-08-16 Thread Jan Ziak
install process performs the checks necessary for eventual replacement of all RTLD_NOW with RTLD_LAZY in Mesa source code. It is out of Mesa's scope of responsibility to ensure that later modifications to non-Mesa libs such as libLLVM*.so do not break OpenGL apps. Signed-off-by: Jan Ziak

[Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-17 Thread Jan Ziak
uced by about 10% - the number of calls to free() is reduced by about 30% [1] git://anongit.freedesktop.org/mesa/shader-db Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/compiler/glsl/ir_variable_refcount.cpp | 14 +-- src/compiler/glsl/ir_variable_refc

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
On Tue Oct 18 09:29:59 UTC 2016, Eero Tamminen wrote: > On 18.10.2016 01:07, Jan Ziak wrote: >> - The total number of executed instructions goes down from 64.184 to 63.797 >> giga-instructions when Mesa is compiled with "gcc -O0 ..." > >Please don't do perform

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
On Tue, Oct 18, 2016 at 3:12 PM, Nicolai Hähnle wrote: > On 18.10.2016 15:07, Jan Ziak wrote: >> >> On Tue Oct 18 09:29:59 UTC 2016, Eero Tamminen wrote: >>> >>> On 18.10.2016 01:07, Jan Ziak wrote: >>>> >>>> - The total number of e

[Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
uced by about 10% - the number of calls to free() is reduced by about 30% The layout of the source code in the new file fast_list.h has been formatted by NetBeans. [1] git://anongit.freedesktop.org/mesa/shader-db Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
On Tue, Oct 18, 2016 at 3:32 PM, Emil Velikov wrote: > On 17 October 2016 at 23:07, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > >> - exec_list assign_list; >> + arraylist assign_list; >> > Just an FYI - when people started using C++ for glsl there was an >

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
Hi Michael, thanks for the suggestions about code formatting. I formatted the whole fast_list.h file in the Netbeans editor and uploaded a new revision of the patch. Jan On Tue, Oct 18, 2016 at 1:42 PM, Michael Schellenberger Costa wrote: > Hi Jan, > > On 18.10.2016 00:07, Jan Z

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
> Regarding C++ templates, the compiler doesn't use them. If u_vector > (Dave Airlie?) provides the same functionality as your array, I > suggest we use u_vector instead. Let me repeat what you just wrote, because it is unbelievable: You are advising the use of non-templated collection types in C+

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
Perf stat results for shader-db: This is measured on an AMD Kaveri CPU. gcc-6.2.0 -fno-omit-frame-pointer -g -O2 Unpatched: $ cd shader-db $ ../run-upstream perfstat-u --repeat=5 -- ./run -1 shaders >/dev/null Performance counter stats for './run -1 shaders' (5 runs): 13689.962374

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-18 Thread Jan Ziak
On Tue, Oct 18, 2016 at 8:04 PM, Marek Olšák wrote: > On Tue, Oct 18, 2016 at 7:12 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> > wrote: > >> Regarding C++ templates, the compiler doesn't use them. If u_vector > >> (Dave Airlie?) provides the same functionality a

[Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
: +1.2 fps (+1%) Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/mesa/main/arrayobj.c | 26 +++--- src/mesa/main/bufferobj.c| 23 ++- src/mesa/main/framebuffer.c | 23 ++- src/mesa/main/pip

[Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
: +1.2 fps (+1%) v2: Remove shaderobj.c Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/mesa/main/arrayobj.c | 26 +++--- src/mesa/main/bufferobj.c| 23 ++- src/mesa/main/framebuffer.c | 23 ++---

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-19 Thread Jan Ziak
d via p_atomic*(). Because of this equivalence: If the new code contains a bug then the unpatched code must contain the same bug as well. On Wed, Oct 19, 2016 at 9:58 PM, Matt Turner wrote: > On Wed, Oct 19, 2016 at 12:06 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> This patch

Re: [Mesa-dev] [PATCH] mesa: avoid pthread_mutexes when adjusting object refcounts

2016-10-20 Thread Jan Ziak
On Thu, Oct 20, 2016 at 12:22 AM, Matt Turner wrote: > On Wed, Oct 19, 2016 at 1:58 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> The current git code and the patched code are fully equivalent to each >> other. In the unpatched code RefCount is always protected by a mute

[Mesa-dev] [PATCH] st/mesa: use u_bit_scan64() on 64-bit CPUs

2016-10-21 Thread Jan Ziak
st_validate_state() shows up in benchmarks. This patch makes it a little bit faster in 64-bit mode. Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/mesa/state_tracker/st_atom.c | 25 + 1 file changed, 13 insertions(+), 12 del

Re: [Mesa-dev] [PATCH] st/mesa: use u_bit_scan64() on 64-bit CPUs

2016-10-21 Thread Jan Ziak
On Fri, Oct 21, 2016 at 12:04 PM, Marek Olšák wrote: > This won't make it faster. Why? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/mesa: use u_bit_scan64() on 64-bit CPUs

2016-10-21 Thread Jan Ziak
On Fri, Oct 21, 2016 at 3:17 PM, Marek Olšák wrote: > On Oct 21, 2016 12:06 PM, "Jan Ziak" <0xe2.0x9a.0...@gmail.com> wrote: >> >> On Fri, Oct 21, 2016 at 12:04 PM, Marek Olšák wrote: >> > This won't make it faster. >> >> Why? > > It

Re: [Mesa-dev] [PATCH] glsl: optimize list handling in opt_dead_code

2016-10-28 Thread Jan Ziak
wrote: > On 10/18/2016 10:12 AM, Jan Ziak wrote: >>> Regarding C++ templates, the compiler doesn't use them. If u_vector >>> (Dave Airlie?) provides the same functionality as your array, I >>> suggest we use u_vector instead. >> >> Let me repeat what

Re: [Mesa-dev] [PATCH 00/20] RadeonSI: Optimized shader variants and other improvements

2016-11-17 Thread Jan Ziak
Marek Olsak wrote: > I've just realized I might have to limit the compilation of optimized shader > variants to only a limited number of threads, so that apps aren't slowed down > by this. As a temporary fix before using a thread pool, the threads can have a lower priority: $ man setpriority s

[Mesa-dev] [PATCH] configure: fix LLVM 4.0.0svn compilation, add libs for LLVM static linking

2016-07-26 Thread Jan Ziak
Signed-off-by: Jan Ziak (atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5c196a9..58c2db4 100644 --- a/configure.ac +++ b/configure.ac @@ -2187,6 +2187,7 @@ if t

[Mesa-dev] [PATCH] configure: add support for LLVM 4.0.0svn static libs

2016-07-27 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- configure.ac | 2 +- 1 file changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 5c196a9..58c2db4 100644 --- a/configure.ac +++ b/configure.ac @@ -2535,7 +2535,7 @@ if t

[Mesa-dev] [PATCH] configure: additional libs for LLVM static linking

2016-07-27 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 5c196a9..58c2db4 100644 --- a/configure.ac +++ b/configure.ac @@ -2194,6 +2194,7 @@ if t

[Mesa-dev] [PATCH] configure: additional libs for OpenCL with LLVM static linking

2016-07-27 Thread Jan Ziak
Mesa compilation fails when "--disable-llvm-shared-libs --enable-opencl" is passed to the configure script. Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- configure.ac | 1 + 1 file changed, 1 insertions(+), 0 deletions(-) diff --git

[Mesa-dev] [PATCH] glsl: fix uninitialized instance variable

2016-07-29 Thread Jan Ziak
Valgrind detected that variable ir_copy_propagation_visitor::killed_all is uninitialized. Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/compiler/glsl/opt_copy_propagation.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compile

[Mesa-dev] [PATCH] loader: fix memory leak in loader_dri3_open

2016-07-29 Thread Jan Ziak
Found via "valgrind --leak-check=full glxgears". Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/loader/loader_dri3_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper

[Mesa-dev] [PATCH] gallium/util: fix error detection in s3tc init

2016-07-30 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/gallium/auxiliary/util/u_format_s3tc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c

[Mesa-dev] [PATCH] egl/x11: avoid using freed memory if dri2 init fails

2016-07-31 Thread Jan Ziak
41==by 0x56B58C9: eglInitialize (eglapi.c:480) ==4841==by 0x4F537DC: _glfwInitEGL (in /usr/lib64/libglfw.so.3.2) ==4841==by 0x4F4BEFB: _glfwPlatformInit (in /usr/lib64/libglfw.so.3.2) ==4841==by 0x4F46F40: glfwInit (in /usr/lib64/libglfw.so.3.2) ==4841==by 0x402E59: main Signed-o

[Mesa-dev] [PATCH] dri: use 'bool' instead 'int' for boolean variables

2016-07-31 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.h| 19 ++- src/gallium/auxiliary/vl/vl_winsys_dri3.c | 2 +- src/glx/dri3_glx.c | 1 + src/glx/dri3_

[Mesa-dev] [PATCH] dri: use 'bool' instead 'int' for boolean variables

2016-08-01 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.h | 19 ++- src/gallium/auxiliary/vl/vl_winsys_dri3.c | 3 ++- src/glx/dri3_priv.h | 5 +++-- src/loader/lo

[Mesa-dev] [PATCH] vbo: fix debug message format string in case of 32-bit machines

2016-08-01 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 90f1321..fe74c73 100644 --- a/src/me

[Mesa-dev] [PATCH] vbo: fix format string compiler warning for 32-bit machines

2016-08-02 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/mesa/vbo/vbo_exec_array.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index f371890..ae6a3da 100644 --- a/sr

[Mesa-dev] [PATCH] dri: use 'bool' instead of 'int' for boolean variables

2016-08-02 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.h | 19 ++- src/egl/drivers/dri2/platform_drm.c | 6 +++--- src/egl/drivers/dri2/platform_wayland.c | 20 ++-- src/egl/driver

[Mesa-dev] [PATCH] dri: use 'bool' instead of 'int' for boolean variables

2016-08-03 Thread Jan Ziak
Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.h | 19 ++- src/egl/drivers/dri2/platform_drm.c | 6 +++--- src/egl/drivers/dri2/platform_wayland.c | 20 ++-- src/egl/driver

[Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread Jan Ziak
e the difference. Signed-off-by: Jan Ziak (http://atom-symbol.net) <0xe2.0x9a.0...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.c | 6 +++--- src/gbm/backends/dri/gbm_dri.c | 6 +++--- src/glx/apple/apple_cgl.c | 2 +- src/glx/dri_common.c| 10 +- 4 files changed, 12

[Mesa-dev] What is the equivalent to vblank_mode in Radeon Vulkan (radv)?

2017-06-04 Thread Jan Ziak
Hi Exists there an equivalent to vblank_mode in the radv implementation? Such as: $ vblank_mode=0 vulkan-demos/bin/computenbody -Jan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 5/9] radeonsi: don't wait for compute shaders in texture_barrier

2017-01-07 Thread Jan Ziak
Hello After updating to mesa-git today, I am getting completely blank (black) window/screen content in applications such as KDE Plasma Desktop and Google Chrome. GPU: R9 390. I am not sure about the cause of this, but it is something committed to mesa-git since 2017-Jan-05 22:32:26 CET. Jan