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

2017-03-15 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

[Mesa-dev] [PATCH 4/7] util/disk_cache: pass timestamps as a blob

2017-03-15 Thread Grazvydas Ignotas
We no longer need a string, so can just pass the timestamps as a blob to reduce amount of data that needs to be hashed into the keys. The argument is also renamed to version_blob because the cache doesn't really care if it's timestamps, build id or something else. Signed-off-by: Grazvyd

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

2017-03-15 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. v2: don't try to compute key (and crash) if cache is disabled Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/glsl_parser_extras.cpp

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

2017-03-15 Thread Grazvydas Ignotas
://bugs.freedesktop.org/show_bug.cgi?id=100091 Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/tests/cache_test.c | 10 ++--- src/util/disk_cache.c| 71 ++-- 2 files changed, 25 insertions(+), 56 deletions(-) diff --git a/src/compiler/glsl/tests/cache_test.c

[Mesa-dev] [PATCH 7/7] util/disk_cache: also write key_blob to cache entry

2017-03-15 Thread Grazvydas Ignotas
This can be used to deal with key hash collisions from different version (should we find that to actually happen) and to find which mesa version produced it the entry. Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 24 ++-- 1 file changed, 22 insertions(+), 2

Re: [Mesa-dev] [PATCH 7/7] util/disk_cache: also write key_blob to cache entry

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 16, 2017 at 3:28 AM, Timothy Arceri wrote: > On 16/03/17 10:09, Grazvydas Ignotas wrote: >> >> This can be used to deal with key hash collisions from different >> version (should we find that to actually happen) and to find >> which mesa version produced it

Re: [Mesa-dev] [PATCH 6/7] util/disk_cache: add a write helper

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 16, 2017 at 3:00 AM, Timothy Arceri wrote: > > > On 16/03/17 10:09, Grazvydas Ignotas wrote: >> >> Simplifies the write code a bit and handles EINTR. >> >> Signed-off-by: Grazvydas Ignotas >> --- >> src/util/disk_cache.c | 40 ++

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

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 16, 2017 at 2:49 AM, Timothy Arceri wrote: > > > On 16/03/17 10:09, Grazvydas Ignotas wrote: >> >> This allows to get rid of the arch and gpu name directories. >> Also, gpu_name is now optional. >> >> Signed-off-by: Grazvydas Ignotas >>

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

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 16, 2017 at 3:14 PM, Timothy Arceri wrote: > > > On 17/03/17 00:00, Grazvydas Ignotas wrote: >> >> On Thu, Mar 16, 2017 at 2:49 AM, Timothy Arceri >> wrote: >>> >>> >>> >>> On 16/03/17 10:09, Grazvydas Ignotas wrote:

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

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 16, 2017 at 7:36 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 strlen is skipped entirely if access time

Re: [Mesa-dev] [PATCH v2 24/25] intel/vulkan: Get rid of recursive make

2017-03-16 Thread Grazvydas Ignotas
On Thu, Mar 9, 2017 at 9:07 PM, Emil Velikov wrote: > From: Jason Ekstrand > > v2 [Emil Velikov] > - Various fixes and initial stab at the Android build. > - Keep the generation rules/EXTRA_DIST outside the conditional This has broken anv build for me, because I don't have vulkan.h anywhere in

[Mesa-dev] [PATCH] anv: add the main include directory back

2017-03-17 Thread Grazvydas Ignotas
or directory Fixes: ee8044fd "intel/vulkan: Get rid of recursive make" Cc: Emil Velikov Signed-off-by: Grazvydas Ignotas --- src/intel/Makefile.vulkan.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am index 1857802..e7c1

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

2017-03-17 Thread Grazvydas Ignotas
ly if access time is newer). > > v2: Update for empty cache dir detection changes > v3: Fix passing string length to predicate with the +1 for NULL > termination and also pass sb as pointer > v4: Missed ampersand for passing sb as pointer Rev

[Mesa-dev] [PATCH 1/2] util/disk_cache: delete .tmp if target exists

2017-03-18 Thread Grazvydas Ignotas
: Grazvydas Ignotas --- src/util/disk_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 6c91f23..f6768d5 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -841,12 +841,14 @@ cache_put(void *job, int

[Mesa-dev] [PATCH 2/2] util/disk_cache: check rename result

2017-03-18 Thread Grazvydas Ignotas
I haven't seen this causing problems in practice, but for correctness we should also check if rename succeeded to avoid breaking accounting and leaving a .tmp file behind. Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 8 ++-- 1 file changed, 6 insertions(+), 2 dele

[Mesa-dev] [PATCH] util/disk_cache: fix stored_keys index

2017-03-18 Thread Grazvydas Ignotas
16s - disk_cache_has_key() hit rate: ~50% -> ~96% Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 7d10ba2..b88ef52 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_c

Re: [Mesa-dev] [PATCH] anv: add the main include directory back

2017-03-19 Thread Grazvydas Ignotas
On Sun, Mar 19, 2017 at 3:03 PM, Emil Velikov wrote: > Hi Grazvydas, > > On 17 March 2017 at 22:05, Grazvydas Ignotas wrote: >> Fixes build without vulkan.h installed in system header locations: >> CC vulkan/vulkan_libvulkan_intel_la-anv_gem.lo >> I

Re: [Mesa-dev] [PATCH] anv: add the main include directory back

2017-03-19 Thread Grazvydas Ignotas
On Sun, Mar 19, 2017 at 9:30 PM, Jason Ekstrand wrote: > On March 19, 2017 9:33:02 AM Grazvydas Ignotas wrote: > >> On Sun, Mar 19, 2017 at 3:03 PM, Emil Velikov >> wrote: >>> >>> Hi Grazvydas, >>> >>> On 17 March 2017 at 22:05, Grazvydas

Re: [Mesa-dev] [PATCH] anv: add the main include directory back

2017-03-19 Thread Grazvydas Ignotas
On Sun, Mar 19, 2017 at 11:21 PM, Emil Velikov wrote: > On 19 March 2017 at 19:30, Jason Ekstrand wrote: >> On March 19, 2017 9:33:02 AM Grazvydas Ignotas wrote: >> >>> On Sun, Mar 19, 2017 at 3:03 PM, Emil Velikov >>> wrote: >>>> >>&

Re: [Mesa-dev] [PATCH] anv: add the main include directory back

2017-03-19 Thread Grazvydas Ignotas
On Sun, Mar 19, 2017 at 11:27 PM, Emil Velikov wrote: > On 19 March 2017 at 16:32, Grazvydas Ignotas wrote: > >> With that, it's picking the earlier installed >> /opt/xorg/include/vulkan/vulkan_intel.h instead of >> ../../include/vulkan/vulkan_intel.h , and that one

Re: [Mesa-dev] [RFC] glx: Prefer library path given by pkgconfig over the system

2017-03-20 Thread Grazvydas Ignotas
lly annoying, and using Emil's workarounds from bug 100259 is cumbersome. Tested-by: Grazvydas Ignotas > > It looks to me that in > > https://bugs.freedesktop.org/show_bug.cgi?id=100259 > > Emil et al are discussing similar case with gbm. > > CC: Matt Turner > CC

Re: [Mesa-dev] [RFC] glx: Prefer library path given by pkgconfig over the system

2017-03-20 Thread Grazvydas Ignotas
On Mon, Mar 20, 2017 at 9:43 PM, Pohjolainen, Topi wrote: > On Mon, Mar 20, 2017 at 04:45:22PM +, Emil Velikov wrote: >> On 20 March 2017 at 10:27, Grazvydas Ignotas wrote: >> > On Mon, Mar 20, 2017 at 11:28 AM, Topi Pohjolainen >> > wrote: >> >> Rec

Re: [Mesa-dev] [PATCH 1/2] anv: automake: use the local headers over any system provided ones

2017-03-20 Thread Grazvydas Ignotas
d (or at least not in the same directory as > vulkan_intel.h) the build will fail. > > In the future we might want to upstream the vulkan_intel.h within > vulkan.h, but in either case the more robust thing is to rely on our own > copy. > > Cc: Grazvydas Ignotas > Fixes: ee80

Re: [Mesa-dev] [v2] glx: Prefer library path given by pkgconfig over the system

2017-03-21 Thread Grazvydas Ignotas
ng libarary/dependency lists instead of >> introducing duplicates (GL_LIB_DEPS contains DRI_LIB_DEPS). >> >> CC: Matt Turner >> CC: Emil Velikov >> Tested-by: Grazvydas Ignotas (v1) >> Signed-off-by: Topi Pohjolainen >> --- >> src/glx/Makefile.am | 4

Re: [Mesa-dev] [RFC libdrm 0/2] Replace the build system with meson

2017-03-21 Thread Grazvydas Ignotas
It might make sense to give more attention to cmake just because many mesa-related projects are already using it: llvm, piglit, vulkan loader and demos, mesa-demos, etc. Not sure how well it supports BSDs and windows, but everyone building graphics stacks or contributing to mesa should already be c

Re: [Mesa-dev] [PATCH 2/3] util/rand_xor: add function to seed rand

2017-03-21 Thread Grazvydas Ignotas
On Tue, Mar 21, 2017 at 10:57 AM, Timothy Arceri wrote: > --- > src/gallium/drivers/radeon/r600_test_dma.c | 3 +- > src/util/rand_xor.c| 62 > -- > src/util/rand_xor.h| 6 ++- > 3 files changed, 64 insertions(+), 7 de

Re: [Mesa-dev] [PATCH 1/2] anv: automake: use the local headers over any system provided ones

2017-03-21 Thread Grazvydas Ignotas
On Tue, Mar 21, 2017 at 2:05 PM, Emil Velikov wrote: > On 20 March 2017 at 21:51, Jason Ekstrand wrote: >> On Mon, Mar 20, 2017 at 8:18 AM, Emil Velikov >> wrote: >>> diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am >>> index 185780246e2..7aacdf4e094 100644 >>> --- a/src/

Re: [Mesa-dev] [PATCH 000/140] RadeonSI: Initial Vega10 support

2017-03-21 Thread Grazvydas Ignotas
This doesn't build for me: make[4]: Entering directory '/home/notaz/src/radeon/mesa/src/gallium/winsys/amdgpu/drm' CC amdgpu_bo.lo amdgpu_bo.c: In function ‘amdgpu_buffer_get_metadata’: amdgpu_bo.c:615:53: error: ‘AMDGPU_TILING_SWIZZLE_MODE_SHIFT’ undeclared (first use in this function)

[Mesa-dev] [PATCH] util/sha1: harmonize _mesa_sha1_* wrappers

2017-03-21 Thread Grazvydas Ignotas
Rather than using 3 different ways to wrap _mesa_sha1_*() to SHA1*() functions (a macro, prototype with implementation in .c and an inline function), make all 3 inline functions. Signed-off-by: Grazvydas Ignotas --- src/util/mesa-sha1.c | 6 -- src/util/mesa-sha1.h | 13 ++--- 2

Re: [Mesa-dev] [PATCH V2 3/3] util/disk_cache: use rand_xorshift128plus() to get our random int

2017-03-21 Thread Grazvydas Ignotas
bably be good enough for dir selection purposes. For the series: Reviewed-by: Grazvydas Ignotas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH V3 3/3] util/disk_cache: write cache entry keys to file header

2017-03-22 Thread Grazvydas Ignotas
> v3: remove left over var from v1. Reviewed-by: Grazvydas Ignotas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] ac/nir: silence maybe-uninitialized warnings

2017-08-27 Thread Grazvydas Ignotas
These are likely false positives, but are also annoying because they show up on every "make install", which causes ac_nir_to_llvm to be rebuilt here. Initializing those variables to NULL should be harmless even when unnecessary. Signed-off-by: Grazvydas Ignotas --- src/

[Mesa-dev] [PATCH] radv: don't assert on empty hash table

2017-08-27 Thread Grazvydas Ignotas
nformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_pipeline_cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c index 99a614d..beed35b 100644 --- a/src/amd/vulkan/radv_p

[Mesa-dev] [PATCH] amd: add .editorconfig

2017-08-27 Thread Grazvydas Ignotas
amd/common/ and amd/vulkan/ are using tabs for indent, which doesn't match the settings in root .editorconfig, so let's override. Signed-off-by: Grazvydas Ignotas --- src/amd/common/.editorconfig | 3 +++ src/amd/vulkan/.editorconfig | 3 +++ 2 files changed, 6 insertions(+) create m

[Mesa-dev] [PATCH] radv: clear dynamic_shader_stages on create

2017-08-27 Thread Grazvydas Ignotas
Valgrind reports it's being used uninitialized. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_descriptor_set.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_descriptor_s

Re: [Mesa-dev] [PATCH] radv: initialize the trace BO to 0

2017-09-13 Thread Grazvydas Ignotas
Wouldn't it be better to set AMDGPU_GEM_CREATE_VRAM_CLEARED when creating the bo? That would need new RADEON_FLAG_* for winsys. If not, at least make 4096 a define to use for both ws->buffer_create() and memset. Gražvydas On Wed, Sep 13, 2017 at 12:26 PM, Samuel Pitoiset wrote: > To avoid rando

Re: [Mesa-dev] [PATCH 2/2] util/u_atomic: Add implementation of __sync_val_compare_and_swap_8

2017-09-15 Thread Grazvydas Ignotas
It was because on some platforms ./configure test looking for __atomic_* passes because it's a compile (not link) test, even when the compiler inserts library calls instead of actual implementation. It looks like the correct solution is to link against libatomic (which I was not aware of at that ti

Re: [Mesa-dev] [PATCH 2/2] util/u_atomic: Add implementation of __sync_val_compare_and_swap_8

2017-09-15 Thread Grazvydas Ignotas
On Fri, Sep 15, 2017 at 12:04 PM, Grazvydas Ignotas wrote: > It was because on some platforms ./configure test looking for > __atomic_* passes because it's a compile (not link) test, even when > the compiler inserts library calls instead of actual implementation. > It looks

Re: [Mesa-dev] [PATCH] radv: check return from mkdir

2018-10-05 Thread Grazvydas Ignotas
On Fri, Oct 5, 2018 at 3:38 AM Dave Airlie wrote: > > From: Dave Airlie > > There may be some security or sandbox reason this might fail, so > check and fail appropriately. > --- > src/amd/vulkan/radv_meta.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/amd/vulk

[Mesa-dev] [PATCH] radv: fix int-to-pointer-cast warnings on 32bit

2018-10-19 Thread Grazvydas Ignotas
Trivial. --- src/amd/vulkan/radv_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 08fc80c12ab..e81b9cccb57 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -320,11 +320,11

Re: [Mesa-dev] [PATCH 4/4] radv: implement VK_AMD_shader_core_properties

2018-04-06 Thread Grazvydas Ignotas
On Fri, Apr 6, 2018 at 3:28 PM, Samuel Pitoiset wrote: > Simple extension that only returns information for AMD hw. > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_device.c | 71 > +++ > src/amd/vulkan/radv_extensions.py | 1 + > 2 files

<    1   2   3   4