[Mesa-dev] [Bug 100073] Shader Disk Cache 32/64 bit detection has a flaw. Missed existence of x32 ABI

2017-03-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100073 --- Comment #35 from oia...@gmail.com --- (In reply to Marek Olšák from comment #34) > Your argument for keeping the GPU and build IDs out of the hash because of > the possibility of collisions has one flaw: The probability of a collision > doesn

Re: [Mesa-dev] [PATCH 4/4] util/disk_cache: use a thread queue to write to shader cache

2017-03-12 Thread Timothy Arceri
On 13/03/17 12:01, Timothy Arceri wrote: This should help reduce any overhead added by the shader cache when programs are not found in the cache. To avoid creating any special function just for the sake of the tests we add a one second delay whenever we call dick_cache_put() to give it time to

[Mesa-dev] [PATCH V3] glapi: Mark vertex attrib pointer functions as async.

2017-03-12 Thread Timothy Arceri
From: Eric Anholt These don't actually read data out of the pointers, they set the pointers (or offsets in a VBO) to be used in a later draw call. v2: Don't forget glVertexAttribIPointer, and don't bother with annotations on aliases. v3: Mark CompressedTexSubImage1D as sync also. --- src/ma

[Mesa-dev] Thread queue for shader cache compression/writes V2

2017-03-12 Thread Timothy Arceri
This series was created to attempt to address regressions in compile times cause by the shader cache when the cache is cold. However my testing has shown no noticable change either way in start-up times of Deus Ex on my Intel i5-6400 CPU. The reports were for slow compression times on an older AMD

[Mesa-dev] [PATCH 4/4] util/disk_cache: use a thread queue to write to shader cache

2017-03-12 Thread Timothy Arceri
This should help reduce any overhead added by the shader cache when programs are not found in the cache. To avoid creating any special function just for the sake of the tests we add a one second delay whenever we call dick_cache_put() to give it time to finish. --- src/compiler/glsl/tests/cache_t

[Mesa-dev] [PATCH 3/4] util/disk_cache: have disk_cache_put() optionally free memory

2017-03-12 Thread Timothy Arceri
The following patch will move disk_cache_put() into a thread queue so we need to be sure memory is not freed before the thread is completed. Here we move responsibility for releasing the memory onto the disk cache. We also make a copy of the data in radeonsi as we don't want to free the original.

[Mesa-dev] [PATCH 1/4] util/disk_cache: add thread queue to disk cache

2017-03-12 Thread Timothy Arceri
Reviewed-by: Marek Olšák --- src/util/disk_cache.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index facdcec..3b1cffc 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -34,39 +34,43 @@ #include

[Mesa-dev] [PATCH 2/4] util/disk_cache: add helpers for creating/destroying disk cache put jobs

2017-03-12 Thread Timothy Arceri
--- src/util/disk_cache.c | 48 1 file changed, 48 insertions(+) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 3b1cffc..160774a 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -71,20 +71,40 @@ struct disk_cache

Re: [Mesa-dev] [PATCH v2 04/25] radv/wsi: Don't include wayland headers

2017-03-12 Thread Dave Airlie
On 10 March 2017 at 05:06, Emil Velikov wrote: > From: Emil Velikov > > Unused and we'll rework the way wayland-drm-client-protocol.h is > generated with later commit. > > Signed-off-by: Emil Velikov Acked-by: Dave Airlie > --- > src/amd/vulkan/radv_wsi_wayland.c | 3 --- > 1 file changed, 3

Re: [Mesa-dev] [PATCH] radv: Store shaders in VRAM.

2017-03-12 Thread Dave Airlie
On 13 March 2017 at 00:29, Bas Nieuwenhuizen wrote: > Less IFETCH latency on misses. Shader code is write once read many, > so GTT doesn't make much sense anyway. > > If it turns out to fragment the CPU visible VRAM too much, we can upload with > SDMA. Reviewed-by:Dave Airlie __

[Mesa-dev] [PATCH] android: i965: generate code for OA counter queries

2017-03-12 Thread Mauro Rossi
Automake generation rules are replicated for android. $* macro was expected to return "hsw" but instead gives "hsw.{h,c}" so $(basename $*) is used as a workaround to set the correct --chipset option for brw_oa.py script. Build tested with nougat-x86 Fixes: e565505 "i965: Add script to gen code f

Re: [Mesa-dev] [PATCH 1/7] util/mesa-sha1: add a context clone function

2017-03-12 Thread Timothy Arceri
On 13/03/17 09:47, Grazvydas Ignotas wrote: On Mon, Mar 13, 2017 at 12:31 AM, Timothy Arceri wrote: On 13/03/17 05:32, Grazvydas Ignotas wrote: This is useful when we need to compute many hashes which all have some common data hashed in. It works by first hashing the common data and keeping

Re: [Mesa-dev] [PATCH 1/7] util/mesa-sha1: add a context clone function

2017-03-12 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 12:31 AM, Timothy Arceri wrote: > On 13/03/17 05:32, Grazvydas Ignotas wrote: >> >> This is useful when we need to compute many hashes which all have some >> common data hashed in. It works by first hashing the common data and >> keeping the context, then for each hashing o

Re: [Mesa-dev] [PATCH 7/7] util/disk_cache: hash pointer size into cache keys

2017-03-12 Thread Timothy Arceri
On 13/03/17 09:34, Grazvydas Ignotas wrote: On Mon, Mar 13, 2017 at 12:20 AM, Timothy Arceri wrote: We don't need to hash the pointer size. You can just remove get_arch_bitness_str() and fix up the test. Timestamp should be enough on its own, even if the 64/32bit builds have the same timestam

Re: [Mesa-dev] [PATCH 7/7] util/disk_cache: hash pointer size into cache keys

2017-03-12 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 12:20 AM, Timothy Arceri wrote: > We don't need to hash the pointer size. You can just remove > get_arch_bitness_str() and fix up the test. Timestamp should be enough on > its own, even if the 64/32bit builds have the same timestamp that is fine > because the cache entries

Re: [Mesa-dev] [PATCH 1/7] util/mesa-sha1: add a context clone function

2017-03-12 Thread Timothy Arceri
On 13/03/17 05:32, Grazvydas Ignotas wrote: This is useful when we need to compute many hashes which all have some common data hashed in. It works by first hashing the common data and keeping the context, then for each hashing operation clone the common context and continue hashing from there.

Re: [Mesa-dev] [PATCH 6/7] util/disk_cache: hash timestamps into the cache keys

2017-03-12 Thread Timothy Arceri
We should get rid of the gpu id dir too as it will never get cleaned up should a user upgrade their gpu or copy their home dir to a new PC. We also need to write the timestamp and gpu id to the header of each cache entry (like we do with the filesize). This will be used for the collection and

Re: [Mesa-dev] [PATCH 7/7] util/disk_cache: hash pointer size into cache keys

2017-03-12 Thread Timothy Arceri
We don't need to hash the pointer size. You can just remove get_arch_bitness_str() and fix up the test. Timestamp should be enough on its own, even if the 64/32bit builds have the same timestamp that is fine because the cache entries are arch independent. The only reason for the arch dir was t

Re: [Mesa-dev] [PATCH 1/7] radeonsi: mark all bound shader buffer ranges as initialized

2017-03-12 Thread Samuel Pitoiset
Nice catch. Reviewed-by: Samuel Pitoiset On 03/12/2017 06:16 PM, Marek Olšák wrote: From: Marek Olšák This should prevent cases when a buffer was incorrectly mapped without synchronization just because this wasn't done. Cc: 13.0 17.0 --- src/gallium/drivers/radeonsi/si_descriptors.c | 3 +

Re: [Mesa-dev] [libdrm PATCH] intel: Make unsynchronized GTT mappings work on systems with snooping.

2017-03-12 Thread Kenneth Graunke
On Sunday, March 12, 2017 6:21:12 AM PDT Chris Wilson wrote: > On Fri, Mar 10, 2017 at 05:14:32PM -0800, Kenneth Graunke wrote: > > On systems without LLC, drm_intel_gem_bo_map_unsynchronized() has > > had the surprising behavior of doing a synchronized GTT mapping. > > This is obviously not what t

Re: [Mesa-dev] [PATCH 7/7] gallium/radeon: disable the shader cache if dumping shaders

2017-03-12 Thread Timothy Arceri
Patches 2, 3 & 7 are: Reviewed-by: Timothy Arceri I'd need some more time to understand the others can take another look if no one else gets to it. On 13/03/17 04:16, Marek Olšák wrote: From: Marek Olšák otherwise, cached shaders aren't dumped. --- src/gallium/drivers/radeon/r600_pipe_co

Re: [Mesa-dev] [PATCH] util/disk_cache: pass predicate functions file stats directly

2017-03-12 Thread Grazvydas Ignotas
FWIW: Reviewed-by: Grazvydas Ignotas On Sun, Mar 12, 2017 at 5:03 PM, Alan Swanson wrote: > Since switching to LRU eviction the only user of these predicate > functions now resolves directory entry stats itself so pass them > directly saving calling fstat and strlen twice (and the expensive > st

Re: [Mesa-dev] [PATCH] st/mesa: disable the shader cache if dumping shaders

2017-03-12 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 13/03/17 04:16, Marek Olšák wrote: From: Marek Olšák otherwise, cached shaders aren't dumped. --- src/mesa/state_tracker/st_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/sta

[Mesa-dev] [Bug 100073] Shader Disk Cache 32/64 bit detection has a flaw. Missed existence of x32 ABI

2017-03-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100073 --- Comment #34 from Marek Olšák --- Your argument for keeping the GPU and build IDs out of the hash because of the possibility of collisions has one flaw: The probability of a collision doesn't grow when the cache is already full (if the number

[Mesa-dev] [PATCH 6/7] util/disk_cache: hash timestamps into the cache keys

2017-03-12 Thread Grazvydas Ignotas
Instead of using a directory, hash the timestamps into the cache keys themselves. Since there is no more timestamp directory, there is no more need for deleting the cache of other mesa versions and we rely on eviction to clean up the old cache entries. This solves the problem of using several incar

[Mesa-dev] [PATCH 7/7] util/disk_cache: hash pointer size into cache keys

2017-03-12 Thread Grazvydas Ignotas
This allows to get rid of the arch directory. It also hashes sizeof(long) just in case disk_cache ever ends being up used on Windows. Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/tests/cache_test.c | 13 ++--- src/util/disk_cache.c| 15 ++- src/util/

[Mesa-dev] [PATCH 1/7] util/mesa-sha1: add a context clone function

2017-03-12 Thread Grazvydas Ignotas
This is useful when we need to compute many hashes which all have some common data hashed in. It works by first hashing the common data and keeping the context, then for each hashing operation clone the common context and continue hashing from there. Signed-off-by: Grazvydas Ignotas --- src/util

[Mesa-dev] [PATCH 5/7] tests/cache_test: use the blob key's actual first byte

2017-03-12 Thread Grazvydas Ignotas
There is no need to hardcode it, we can just use blob_key[0]. This is needed because the next patches are going to change how cache keys are computed. Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/tests/cache_test.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --g

[Mesa-dev] [PATCH 4/7] util/disk_cache: base key hashes from initial context

2017-03-12 Thread Grazvydas Ignotas
To be used by subsequent patches, for now it's just the initial sha1 state. Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 7990afb..b639907

[Mesa-dev] [PATCH 0/7] timestamp/arch directory removal for disk_cache

2017-03-12 Thread Grazvydas Ignotas
This series removes arch and timestamp directories and instead hashes that information into the cache keys themselves. It still uses the timestamps, fixing that (replacing with build id?) is left for a later time. I've also left the gpu name dir as I kind of like it, but it's trivial to hash it in

[Mesa-dev] [PATCH 2/7] util/mesa-sha1: allow to finish without taking the result

2017-03-12 Thread Grazvydas Ignotas
Useful if we just want to free the context, in error paths for example. Signed-off-by: Grazvydas Ignotas --- src/util/mesa-sha1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/mesa-sha1.c b/src/util/mesa-sha1.c index 2c47465..66be707 100644 --- a/src/util/mesa-sh

[Mesa-dev] [PATCH 3/7] util/disk_cache: use a helper to compute cache keys

2017-03-12 Thread Grazvydas Ignotas
This will allow to hash additional data into the cache keys or even change the hashing algorithm easily, should we decide to do so. Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/glsl_parser_extras.cpp| 2 +- src/compiler/glsl/shader_cache.cpp | 2 +- src/compiler/

[Mesa-dev] [PATCH 7/7] gallium/radeon: disable the shader cache if dumping shaders

2017-03-12 Thread Marek Olšák
From: Marek Olšák otherwise, cached shaders aren't dumped. --- src/gallium/drivers/radeon/r600_pipe_common.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 7eb457f..b3b925e 100644 --- a

[Mesa-dev] [PATCH 5/7] gallium/radeon: formalize that create_query doesn't need pipe_context

2017-03-12 Thread Marek Olšák
From: Marek Olšák for threaded gallium --- src/gallium/drivers/radeon/r600_perfcounter.c | 4 +- src/gallium/drivers/radeon/r600_query.c | 56 +-- src/gallium/drivers/radeon/r600_query.h | 4 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git

[Mesa-dev] [PATCH 6/7] gallium/radeon: formalize that create_batch_query doesn't need pipe_context

2017-03-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_perfcounter.c | 12 ++-- src/gallium/drivers/radeon/r600_query.c | 9 - src/gallium/drivers/radeon/r600_query.h | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeo

[Mesa-dev] [PATCH 2/7] radeonsi: require that compiler threads are enabled

2017-03-12 Thread Marek Olšák
From: Marek Olšák threaded gallium can't use pipe_context's LLVM target machine, because create_shader_selector can be called from a non-driver thread. --- src/gallium/drivers/radeonsi/si_pipe.c | 21 - src/gallium/drivers/radeonsi/si_state_shaders.c | 3 +-- 2 file

[Mesa-dev] [PATCH 1/7] radeonsi: mark all bound shader buffer ranges as initialized

2017-03-12 Thread Marek Olšák
From: Marek Olšák This should prevent cases when a buffer was incorrectly mapped without synchronization just because this wasn't done. Cc: 13.0 17.0 --- src/gallium/drivers/radeonsi/si_descriptors.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_descrip

[Mesa-dev] [PATCH 4/7] gallium/radeon: reference pipe_resource in pipe_transfer

2017-03-12 Thread Marek Olšák
From: Marek Olšák for threaded gallium --- src/gallium/drivers/radeon/r600_buffer_common.c | 4 +++- src/gallium/drivers/radeon/r600_texture.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/rade

[Mesa-dev] [PATCH 3/7] radeonsi: compile all TGSI compute shaders asynchronously

2017-03-12 Thread Marek Olšák
From: Marek Olšák required by threaded gallium --- src/gallium/drivers/radeonsi/si_compute.c | 125 +++--- 1 file changed, 81 insertions(+), 44 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 5097c81.

[Mesa-dev] [PATCH] st/mesa: disable the shader cache if dumping shaders

2017-03-12 Thread Marek Olšák
From: Marek Olšák otherwise, cached shaders aren't dumped. --- src/mesa/state_tracker/st_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 5855258..a528f34 100644 --- a/src/mesa/s

[Mesa-dev] [PATCH 1/2] gallium/u_upload: make the first persistent mapping unsynchronized

2017-03-12 Thread Marek Olšák
From: Marek Olšák This is simpler for drivers. --- src/gallium/auxiliary/util/u_upload_mgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 7ef8208..32697b8 100644 --- a/src/gallium/auxiliary/util/u

[Mesa-dev] [PATCH 2/2] trace: remove leftover assertions after pipe_resource wrapping removal

2017-03-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/trace/tr_context.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 40a56df..81c1a46 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/driv

Re: [Mesa-dev] [PATCH] i965: Delete render ring prelude.

2017-03-12 Thread Grazvydas Ignotas
It seems this has not removed enough and introduced a warning: intel_batchbuffer.c: In function ‘intel_batchbuffer_require_space’: intel_batchbuffer.c:132:22: warning: unused variable ‘prev_ring’ [-Wunused-variable] enum brw_gpu_ring prev_ring = brw->batch.ring; Gražvydas On Wed, Mar 8, 2017

[Mesa-dev] [PATCH] util/disk_cache: pass predicate functions file stats directly

2017-03-12 Thread Alan Swanson
Since switching to LRU eviction the only user of these predicate functions now resolves directory entry stats itself so pass them directly saving calling fstat and strlen twice (and the expensive strlen is skipped entirely if access time is newer). --- Depends on "util/disc_cache: use LRU eviction

[Mesa-dev] [PATCH] radv: Store shaders in VRAM.

2017-03-12 Thread Bas Nieuwenhuizen
Less IFETCH latency on misses. Shader code is write once read many, so GTT doesn't make much sense anyway. If it turns out to fragment the CPU visible VRAM too much, we can upload with SDMA. Signed-off-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_pipeline.c | 2 +- src/amd/vulkan/radv_p

Re: [Mesa-dev] [PATCH] util/disk_cache: fix zlib linking with LTO build

2017-03-12 Thread Steven Newbury
On Sun, 2017-03-12 at 12:25 +, Mike Lothian wrote: > For what its worth I compile Mesa using LTO with the gold linker so I > don't need to specify -fuse-linker-plugin - everything works fine > here > > CFLAGS="-O3 -march=skylake -pipe -flto=8"  > CXXFLAGS="${CFLAGS}"  > LDFLAGS="-Wl,-O1 -Wl,--

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2017-03-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Vedran Miletić changed: What|Removed |Added Depends on||98693, 98795, 68527, 79417,

Re: [Mesa-dev] [libdrm PATCH] intel: Make unsynchronized GTT mappings work on systems with snooping.

2017-03-12 Thread Chris Wilson
On Fri, Mar 10, 2017 at 05:14:32PM -0800, Kenneth Graunke wrote: > On systems without LLC, drm_intel_gem_bo_map_unsynchronized() has > had the surprising behavior of doing a synchronized GTT mapping. > This is obviously not what the user of the API wanted. > > Eric left a comment indicating a vali

Re: [Mesa-dev] [PATCH] util/disk_cache: fix zlib linking with LTO build

2017-03-12 Thread Mike Lothian
For what its worth I compile Mesa using LTO with the gold linker so I don't need to specify -fuse-linker-plugin - everything works fine here CFLAGS="-O3 -march=skylake -pipe -flto=8" CXXFLAGS="${CFLAGS}" LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-flto=8" AR="gcc-ar" NM="gcc-nm" RA

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2017-03-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Vedran Miletić changed: What|Removed |Added CC||ved...@miletic.net -- You are receivin

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2017-03-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Vedran Miletić changed: What|Removed |Added Depends on||100166, 92755, 92999,

Re: [Mesa-dev] RFC Thread queue for shader cache compression/writes (real)

2017-03-12 Thread Marek Olšák
Patches 1, 2, 6: Reviewed-by: Marek Olšák I agree with Grazvydas that the queue jobs should not be exposed to users of disk_cache. Marek On Sun, Mar 12, 2017 at 2:58 AM, Timothy Arceri wrote: > > > On 12/03/17 11:34, Marek Olšák wrote: >> >> On Sun, Mar 12, 2017 at 1:31 AM, Marek Olšák wrot

Re: [Mesa-dev] [PATCH 13/25] mesa: Connect the generated GL command marshalling code to the build.

2017-03-12 Thread Marek Olšák
On Sun, Mar 12, 2017 at 8:04 AM, Timothy Arceri wrote: > On 10/03/17 21:51, Marek Olšák wrote: >> >> BTW I don't think that supporting GL compat contexts is worth it. > > > I'm happy to drop all the compat patches from this series. On the other hand > they are already done and since we are going t