[Mesa-dev] [PATCH] amd/addrlib: fix optimized build warnings

2017-04-02 Thread Grazvydas Ignotas
All the -Wunused-but-set-variable ones. Found a way to do it with a oneliner. Signed-off-by: Grazvydas Ignotas --- no commit access (currently pending) src/amd/addrlib/core/addrcommon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/addrlib/core/addrcommon.h b/src

Re: [Mesa-dev] [PATCH 1/2] glsl/shader_cache: Fix memory leak

2017-04-02 Thread Grazvydas Ignotas
metadata->data) > + free(metadata->data); > Please add a space after 'if' to match the style of all other code or drop the NULL check altogether as free(NULL) is fine. With that: Reviewed-by: Grazvydas Ignotas for both patches.

Re: [Mesa-dev] [PATCH v4 2/2] anv/query: Busy-wait for available query entries

2017-04-05 Thread Grazvydas Ignotas
some scene of my choice: before: 32fps after: 36fps GL: 38fps Tested-by: Grazvydas Ignotas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 1/2] gallium: Enable ARM NEON/VFP CPU detection.

2017-04-14 Thread Grazvydas Ignotas
On Fri, Apr 14, 2017 at 12:08 AM, Eric Anholt wrote: > I wrote this code with reference to pixman, though I've only decided to > cover Linux (what I'm testing) and Android (seems obvious enough). Linux > has getauxval() as a cleaner interface to the /proc entry, but it's more > glibc-specific an

[Mesa-dev] [PATCH] radv: remove irrelevant comment

2017-04-14 Thread Grazvydas Ignotas
A leftover from anv. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 5f14394..7857e8f 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd

[Mesa-dev] [PATCH] radv: report timestampPeriod correctly

2017-04-14 Thread Grazvydas Ignotas
The kernel returns frequency in kHz, so to convert to nanosecond interval that Vulkan uses the dividend should be 100.0 and not 10.0. This fixes the GPU graph in DOOM and matches the amdgpu-pro blob. Signed-off-by: Grazvydas Ignotas Fixes: f4e499ec791 "radv: add initial non-confo

[Mesa-dev] [PATCH] radv: enable timestampComputeAndGraphics

2017-04-14 Thread Grazvydas Ignotas
ned-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 12040a0..dd401f4 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -650,

Re: [Mesa-dev] [PATCH v3 4/4] vc4: Only build the NEON code on arm32.

2017-04-15 Thread Grazvydas Ignotas
On Fri, Apr 14, 2017 at 8:47 PM, Eric Anholt wrote: > NEON is sufficiently different on arm64 that we can't just reuse this > code. Disable it on arm64 for now. > > Signed-off-by: Eric Anholt > --- > src/gallium/drivers/vc4/vc4_tiling_lt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletio

Re: [Mesa-dev] [PATCH v3 1/4] gallium: Enable ARM NEON CPU detection.

2017-04-15 Thread Grazvydas Ignotas
y (change by robher). Use > O_CLOEXEC. Break out of the loop when we find our feature. Only do > NEON detection, until someone actually wants VFP features. > Reviewed-by: Grazvydas Ignotas ___ mesa-dev mailing list mesa-dev@lists.fre

Re: [Mesa-dev] [PATCH] radv: add a workaround for DXVK hangs by setting amdgpu-skip-threshold

2018-06-08 Thread Grazvydas Ignotas
I haven't tried it, but maybe calling LLVMParseCommandLineOptions() second time would work (after creating the target machine, through call_once) to avoid all this code duplication? Gražvydas On Fri, Jun 8, 2018 at 12:38 PM, Samuel Pitoiset wrote: > Workaround for bug in llvm that causes the GPU

Re: [Mesa-dev] [PATCH 1/2] vkpipeline-db: add sType to pipeline info

2018-06-12 Thread Grazvydas Ignotas
On Tue, Jun 12, 2018 at 8:07 AM, Timothy Arceri wrote: > From: Timothy Arceri localhost.localdomain? > > This avoids hitting asserts in anv. > --- > run.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/run.c b/run.c > index eafbd7d..a962887 100644 > --- a/run.c > +++ b/run.c > @@ -

[Mesa-dev] [PATCH] radeonsi: use shifts for sign extension

2018-06-20 Thread Grazvydas Ignotas
Avoids a branch and reduces code size a tiny bit: text data bss dechex filename 10804563 398653 2070368 13273584 ca89f0 /tmp/radeonsi_dri.so.old 10804499 398653 2070368 13273520 ca89b0 /tmp/radeonsi_dri.so --- src/gallium/drivers/radeonsi/si_descriptors.c | 4 ++-- 1 file change

[Mesa-dev] [PATCH] radeonsi: add a debug flag to zero vram allocations

2018-06-20 Thread Grazvydas Ignotas
This allows to avoid having to see garbage in Dying Light loading screen at least, which probably expects Windows/NV behavior of all allocations being zeroed by default. Analogous to radv flag with the same name. --- src/gallium/drivers/radeonsi/si_pipe.c| 1 + src/gallium/drivers/radeons

Re: [Mesa-dev] [PATCH 2/3] nir: Add a discard optimization pass

2018-07-04 Thread Grazvydas Ignotas
On Wed, Jul 4, 2018 at 9:13 AM, Jason Ekstrand wrote: > Many fragment shaders do a discard using relatively little information > but still put the discard fairly far down in the shader for no good > reason. If the discard is moved higher up, we can possibly avoid doing > some or almost all of the

Re: [Mesa-dev] [PATCH] radv/winsys: allow to submit up to 4 IBs for chips without chaining

2018-04-20 Thread Grazvydas Ignotas
On Fri, Apr 20, 2018 at 3:21 PM, Samuel Pitoiset wrote: > The SI family doesn't support chaining which means the maximum > size in dwords per CS is limited. When that limit was reached > we failed to submit the CS and the application crashed. > > This patch allows to submit up to 4 IBs which is cu

Re: [Mesa-dev] [PATCH v2 1/3] mesa: actually support compat profile creation with MESA_GL_VERSION_OVERRIDE

2018-05-02 Thread Grazvydas Ignotas
On Wed, May 2, 2018 at 1:27 PM, Timothy Arceri wrote: > --- > src/mesa/drivers/dri/common/dri_util.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/drivers/dri/common/dri_util.c > b/src/mesa/drivers/dri/common/dri_util.c > index 7cb6248b130..d72f72d075

Re: [Mesa-dev] [PATCH v2 1/3] mesa: actually support compat profile creation with MESA_GL_VERSION_OVERRIDE

2018-05-02 Thread Grazvydas Ignotas
On Wed, May 2, 2018 at 3:38 PM, Timothy Arceri wrote: > On 02/05/18 22:36, Timothy Arceri wrote: >> >> On 02/05/18 21:48, Grazvydas Ignotas wrote: >>> >>> On Wed, May 2, 2018 at 1:27 PM, Timothy Arceri >>> wrote: >>>> >>>> --- &g

[Mesa-dev] [PATCH] radv: assorted typo fixes

2018-05-09 Thread Grazvydas Ignotas
Trivial. --- src/amd/vulkan/radv_cmd_buffer.c | 4 ++-- src/amd/vulkan/radv_descriptor_set.c | 2 +- src/amd/vulkan/radv_device.c | 6 +++--- src/amd/vulkan/radv_entrypoints_gen.py | 2 +- src/amd/vulkan/radv_image.c| 4 ++-- src/amd/vulkan/radv_nir_to_llvm.c | 4

Re: [Mesa-dev] [PATCH v2] st/mesa: only define GLSL 1.4 for compat if driver supports it

2018-05-16 Thread Grazvydas Ignotas
On Wed, May 16, 2018 at 5:02 PM, Christian Gmeiner wrote: > Currently GLSL 1.4 is defined for all gallium drivers even only > GLSL 1.2 is supported as seen on etnaviv. > > v1 -> v2: > - use _min(..) as suggested by Lucas Stach and Michel Dänzer > > Fixes 4560aad780b ("mesa: add GLSLVersionCompat

Re: [Mesa-dev] [PATCH 2/6] radeonsi: disable primitive binning for all blitter ops

2018-05-17 Thread Grazvydas Ignotas
On Thu, May 17, 2018 at 4:47 AM, Marek Olšák wrote: > From: Marek Olšák > > same as Vulkan. Ambiguous. Did you mean amdvlk? Gražvydas > --- > src/gallium/drivers/radeonsi/si_blit.c | 10 ++ > src/gallium/drivers/radeonsi/si_pipe.h | 2 +- > src/gallium/drivers/radeo

[Mesa-dev] [PATCH] llvmpipe: add cc clobber to inline asm

2018-08-20 Thread Grazvydas Ignotas
The bsr instruction modifies flags, so that needs to be indicated to the compiler. No effect on generated code, but still needed for correctness. --- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_se

[Mesa-dev] [PATCH 1/2] radv: place pointer length into cache uuid

2018-08-20 Thread Grazvydas Ignotas
Thanks to reproducible builds, binary file timestamps may be identical for both 32bit and 64bit packages when built from the same source. This means radv will use the same cache for both 32 and 64 bit processes, which leads to crashes. Conveniently there is a spare byte in cache_uuid, let's place

[Mesa-dev] [PATCH 2/2] radv: use different builtin shader cache for 32bit

2018-08-20 Thread Grazvydas Ignotas
Currently if 64bit and 32bit programs are used interchangeably, radv will keep overwriting the cache. Use separate cache files to avoid that. --- src/amd/vulkan/radv_meta.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vul

[Mesa-dev] [PATCH] vulkan/wsi: fix pointer-integer conversion warnings

2018-08-20 Thread Grazvydas Ignotas
For 32bit build. Trivial. --- src/vulkan/wsi/wsi_common_display.c | 4 ++-- src/vulkan/wsi/wsi_common_x11.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index e6cba188dfa..1e90bba460c 100644 --

Re: [Mesa-dev] [PATCH] vulkan/wsi: fix pointer-integer conversion warnings

2018-08-22 Thread Grazvydas Ignotas
On Tue, Aug 21, 2018 at 1:05 AM, Bas Nieuwenhuizen wrote: > Reviewed-by: Bas Nieuwenhuizen > > Did you have access to push? Yeah, just pushed everything. Gražvydas > > On Mon, Aug 20, 2018 at 11:40 PM, Grazvydas Ignotas wrote: >> For 32bit build. Trivial. >

Re: [Mesa-dev] [PATCH 1/3] vulkan/alloc: Add a vk_strdup helper

2018-08-23 Thread Grazvydas Ignotas
On Thu, Aug 23, 2018 at 6:13 PM, Jason Ekstrand wrote: > --- > src/vulkan/util/vk_alloc.h | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/src/vulkan/util/vk_alloc.h b/src/vulkan/util/vk_alloc.h > index f58a80625a8..bc2bb7509e4 100644 > --- a/src/vulkan/util/vk_alloc.h

Re: [Mesa-dev] [PATCH] radv: Really use correct HTILE expanded words.

2018-02-22 Thread Grazvydas Ignotas
Seems to fix dxvk, nice! Also tested DOOM which still works. Tested-by: Grazvydas Ignotas On Thu, Feb 22, 2018 at 6:57 PM, James Legg wrote: > When transitioning to an htile compressed depth format, Set the full > depth range, so later rasterization can pass HiZ. Previously, for depth

[Mesa-dev] [PATCH 1/2] radv: fix stale comment in generated vk_format_table.c

2018-03-10 Thread Grazvydas Ignotas
It seems to be a leftover from u_format_table.py. --- src/amd/vulkan/vk_format_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/vk_format_table.py b/src/amd/vulkan/vk_format_table.py index 36352b1..c33a4ce 100644 --- a/src/amd/vulkan/vk_format_table.py +

[Mesa-dev] [PATCH 2/2] radv: make vk_format_description structures static

2018-03-10 Thread Grazvydas Ignotas
No need to bother the linker about them. --- src/amd/vulkan/vk_format_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/vk_format_table.py b/src/amd/vulkan/vk_format_table.py index c33a4ce..cd1af62 100644 --- a/src/amd/vulkan/vk_format_table.py +++ b/src/

[Mesa-dev] [PATCH 1/2] svga: fix context alloc error handling

2018-01-22 Thread Grazvydas Ignotas
'cleanup' path is dereferencing 'svga' a lot, 'done' is a better choice. Found by Coccinelle. Signed-off-by: Grazvydas Ignotas --- src/gallium/drivers/svga/svga_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga

[Mesa-dev] [PATCH 2/2] winsys/svga: check correct member after create

2018-01-22 Thread Grazvydas Ignotas
.mob_fenced was already checked, probably a copy-paste bug. Found by Coccinelle. Signed-off-by: Grazvydas Ignotas --- src/gallium/winsys/svga/drm/vmw_screen_pools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/svga/drm/vmw_screen_pools.c b/src/gallium

[Mesa-dev] [PATCH] anv: correct a duplicate check in an assert

2018-01-22 Thread Grazvydas Ignotas
Looks like checking both sources was intended, instead of the first one twice. Found with Coccinelle, coccinellery/xand/xand.cocci semantic patch. Signed-off-by: Grazvydas Ignotas --- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Mesa-dev] [PATCH] radeonsi: set indent_size in .editorconfig

2018-02-03 Thread Grazvydas Ignotas
At least with vim, this is needed to actually get tab instead of 3 spaces after hitting the tab key. --- src/gallium/drivers/radeonsi/.editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/.editorconfig b/src/gallium/drivers/radeonsi/.editorconfig index cc8

[Mesa-dev] [PATCH] intel/compiler: fix 64bit value prints on 32bit

2018-02-03 Thread Grazvydas Ignotas
Fix the following: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t {aka long long unsigned int}. --- src/intel/compiler/brw_disasm.c | 4 ++-- src/intel/compiler/brw_nir_analyze_ubo_ranges.c | 2 +- 2 files changed, 3 insertions

[Mesa-dev] [PATCH] radeonsi: avoid int-to-pointer-cast warnings on 32bit

2018-02-03 Thread Grazvydas Ignotas
I hope the actual dropping of MSB is ok, but that's what's already happened before this change. --- src/gallium/drivers/radeonsi/si_descriptors.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/dri

[Mesa-dev] [PATCH] gallium/hud: update some query functions

2018-02-03 Thread Grazvydas Ignotas
It seems these were missed when struct pipe_context * argument was added to hud_graph::query_new_value. Fixes: 3132afdf4c "gallium/hud: pass pipe_context explicitly to most functions" --- src/gallium/auxiliary/hud/hud_cpufreq.c | 2 +- src/gallium/auxiliary/hud/hud_diskstat.c | 2 +- src

Re: [Mesa-dev] [PATCH] radeonsi: set indent_size in .editorconfig

2018-02-06 Thread Grazvydas Ignotas
On Tue, Feb 6, 2018 at 1:37 PM, Eric Engestrom wrote: > On Sunday, 2018-02-04 00:19:33 +0200, Grazvydas Ignotas wrote: >> At least with vim, this is needed to actually get tab instead of >> 3 spaces after hitting the tab key. > > Are you sure? For my copy of vim (7.4.168

Re: [Mesa-dev] [PATCH] i965: perf: ensure reading config IDs from sysfs isn't interrupted

2018-02-09 Thread Grazvydas Ignotas
Is this really sufficient? From what I read in the manpage, you can get an incomplete read instead when a signal arrives. Gražvydas On Fri, Feb 9, 2018 at 12:03 PM, Lionel Landwerlin wrote: > Fixes: 458468c136e "i965: Expose OA counters via INTEL_performance_query" > Signed-off-by: Lionel Landwe

Re: [Mesa-dev] [PATCH] intel/compiler: fix 64bit value prints on 32bit

2018-02-09 Thread Grazvydas Ignotas
ping On Sun, Feb 4, 2018 at 12:19 AM, Grazvydas Ignotas wrote: > Fix the following: > warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but > argument 3 has type ‘uint64_t {aka long long unsigned int}. > --- > src/intel/compiler/brw_disasm.c

Re: [Mesa-dev] [PATCH 1/4] util/disk_cache: add support for detecting corrupt cache entries

2017-03-01 Thread Grazvydas Ignotas
On Wed, Mar 1, 2017 at 7:25 AM, Timothy Arceri wrote: > --- > src/util/disk_cache.c | 37 ++--- > 1 file changed, 34 insertions(+), 3 deletions(-) > > diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c > index f5e1145..2a0edca 100644 > --- a/src/util/disk_c

Re: [Mesa-dev] [PATCH 2/4] util/disk_cache: compress individual cache entries

2017-03-01 Thread Grazvydas Ignotas
On Wed, Mar 1, 2017 at 7:25 AM, Timothy Arceri wrote: > ... > diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c > index 2a0edca..03aae02 100644 > --- a/src/util/disk_cache.c > +++ b/src/util/disk_cache.c > @@ -30,20 +30,21 @@ > #include > #include > #include > #include > #include

Re: [Mesa-dev] [PATCH 1/2] util/disk_cache: support caches for multiple architectures

2017-03-02 Thread Grazvydas Ignotas
On Thu, Mar 2, 2017 at 8:36 AM, Timothy Arceri wrote: > > > On 02/03/17 17:17, Ilia Mirkin wrote: >> >> On Thu, Mar 2, 2017 at 1:08 AM, Timothy Arceri >> wrote: >>> >>> Previously we were deleting the entire cache if a user switched >>> between 32 and 64 bit applications. >>> --- >>> src/util/di

[Mesa-dev] [PATCH] tgsi/ureg: return correct token count in ureg_get_tokens

2017-03-02 Thread Grazvydas Ignotas
regressions elsewhere because the only ureg_get_tokens() user that cares about token count is the shader cache. Cc: Timothy Arceri Signed-off-by: Grazvydas Ignotas --- no commit access src/gallium/auxiliary/tgsi/tgsi_ureg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH] glsl/blob: clear padding bytes

2017-03-02 Thread Grazvydas Ignotas
Since blob is intended for serializing data, it's not a good idea to leave padding holes with uninitialized data, which may leak heap contents and hurt compression if the blob is later compressed, like done by shader cache. Clear it. Signed-off-by: Grazvydas Ignotas --- I don't kno

Re: [Mesa-dev] [PATCH V2] util/disk_cache: support caches for multiple architectures

2017-03-03 Thread Grazvydas Ignotas
On Fri, Mar 3, 2017 at 5:27 AM, Timothy Arceri wrote: > Previously we were deleting the entire cache if a user switched > between 32 and 64 bit applications. > > V2: make the check more generic, it should now work with any > platform we are likely to support. > --- > src/util/disk_cache.c | 19 ++

[Mesa-dev] [PATCH] ralloc: don't leave out the alignment factor

2017-03-03 Thread Grazvydas Ignotas
lways specify a suitable alignment factor. Cc: Jonas Pfeil Fixes: cd2b55e5 "ralloc: Make sure ralloc() allocations match malloc()'s alignment." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100049 Signed-off-by: Grazvydas Ignotas --- no commit access src/util/ralloc.c | 4

Re: [Mesa-dev] [PATCH V2] util/disk_cache: support caches for multiple architectures

2017-03-04 Thread Grazvydas Ignotas
On Sat, Mar 4, 2017 at 4:44 PM, Emil Velikov wrote: > On 3 March 2017 at 23:37, Timothy Arceri wrote: >> >> I'm tempted to just push this: >> https://patchwork.freedesktop.org/patch/141891/ >> >> And worry about issues later if that's not good enough. >> > Can we use anything like the following a

Re: [Mesa-dev] [PATCH V3] util/disk_cache: support caches for multiple architectures

2017-03-04 Thread Grazvydas Ignotas
ggestion from Emil to make even more generic/fix issue > with __ILP32__ not being declared on gcc for regular 32-bit builds. Now it works, launching steam (32bit) no longer wipes all cache from 64bit games, everything works as expected. Tested-by: Grazv

[Mesa-dev] [PATCH] i965: don't require 64bit cmpxchg

2017-03-05 Thread Grazvydas Ignotas
ly by multiple threads that somehow manage to change the environment variable without affecting each other, so just provide a thread-unsafe fallback. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93089 Signed-off-by: Grazvydas Ignotas --- no commit access src/intel/common/gen_debug.

[Mesa-dev] [PATCH] util/disk_cache: don't require 64bit atomic operations

2017-03-05 Thread Grazvydas Ignotas
zilla: https://bugs.freedesktop.org/show_bug.cgi?id=93089 Signed-off-by: Grazvydas Ignotas --- no commit access src/util/disk_cache.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 4a8ee21..daa5c7b 100644 ---

[Mesa-dev] [PATCH] util/disk_cache: mark read-only arguments const

2017-03-05 Thread Grazvydas Ignotas
No functional changes. Signed-off-by: Grazvydas Ignotas --- no commit access src/util/disk_cache.c | 35 ++- src/util/disk_cache.h | 20 ++-- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/util/disk_cache.c b/src/util

[Mesa-dev] [PATCH 1/4] radv: avoid casting warnings on 32bit

2017-03-05 Thread Grazvydas Ignotas
Use the same helpers as for other handle<->pointer conversions. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_device.c | 5 ++--- src/amd/vulkan/radv_private.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/

[Mesa-dev] [PATCH 0/4] Make radv warning-free again

2017-03-05 Thread Grazvydas Ignotas
Please push if these are ok. Grazvydas Ignotas (4): radv: avoid casting warnings on 32bit radv: don't use uninitialized value on failure radv: check for upload alloc failure radv: use VK_NULL_HANDLE for handles src/amd/vulkan/radv_cmd_buffer.c | 7 --- src/amd/v

[Mesa-dev] [PATCH 3/4] radv: check for upload alloc failure

2017-03-05 Thread Grazvydas Ignotas
Mainly to avoid gcc's complains about uninitialized ptr and offset use later in that code. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_cmd_buffer.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/v

[Mesa-dev] [PATCH 2/4] radv: don't use uninitialized value on failure

2017-03-05 Thread Grazvydas Ignotas
Mainly to avoid a warning. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_descriptor_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index ca5b280..7dade3e 100644 --- a/src/amd

[Mesa-dev] [PATCH 4/4] radv: use VK_NULL_HANDLE for handles

2017-03-05 Thread Grazvydas Ignotas
Avoids warnings on 32bit. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_meta_bufimage.c | 8 src/amd/vulkan/radv_wsi.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_meta_bufimage.c b/src/amd/vulkan/radv_meta_bufimage.c

[Mesa-dev] [PATCH v2] i965: don't require 64bit cmpxchg

2017-03-05 Thread Grazvydas Ignotas
e, as suggested by Matt Turner Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93089 Signed-off-by: Grazvydas Ignotas --- no commit access src/intel/common/gen_debug.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/intel/common/gen_debug.c b/src/

Re: [Mesa-dev] [PATCH] util/disk_cache: don't require 64bit atomic operations

2017-03-05 Thread Grazvydas Ignotas
On Sun, Mar 5, 2017 at 10:29 PM, Matt Turner wrote: > On Sun, Mar 5, 2017 at 11:14 AM, Grazvydas Ignotas wrote: >> There are still some distributions trying to support unfortunate people >> with old or exotic CPUs that don't have 64bit atomic operations. Missing >&g

Re: [Mesa-dev] [PATCH 3/4] radv: check for upload alloc failure

2017-03-05 Thread Grazvydas Ignotas
On Mon, Mar 6, 2017 at 12:05 AM, Bas Nieuwenhuizen wrote: > On Sun, Mar 5, 2017 at 10:04 PM, Grazvydas Ignotas wrote: >> Mainly to avoid gcc's complains about uninitialized ptr and offset use >> later in that code. >> >> Signed-off-by: Grazvydas Ig

Re: [Mesa-dev] [PATCH 1/3] util/disc_cache: use LRU eviction rather than random eviction

2017-03-06 Thread Grazvydas Ignotas
; > - > - count++; > + if (fstatat(dirfd(dir), entry->d_name, &sb, 0) == 0) { > + if (!lru_atime || (sb.st_atime < lru_atime)) { > +tmp = realloc(lru_name, strlen(entry->d_name) + 1); > +if (tmp) { > + lru_name = tmp; > +

Re: [Mesa-dev] [PATCH 2/3] util/disk_cache: actually enforce cache size

2017-03-06 Thread Grazvydas Ignotas
This seems to break "make check", so needs to update tests I guess. Gražvydas On Mon, Mar 6, 2017 at 6:17 PM, Alan Swanson wrote: > Currently only a one in one out eviction so if at max_size and > cache files were to constantly increase in size then so would the > cache. Restrict to limit of 8 e

[Mesa-dev] [PATCH] glx: allow 0 for glXSwapIntervalSGI

2017-03-07 Thread Grazvydas Ignotas
Makes vsync option work in The Talos Principle. Signed-off-by: Grazvydas Ignotas --- no commit access perhaps this is stable worthy? src/glx/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 53c9f9c..7be4e73 100644 --- a

Re: [Mesa-dev] [PATCH] glx: allow 0 for glXSwapIntervalSGI

2017-03-08 Thread Grazvydas Ignotas
On Wed, Mar 8, 2017 at 4:37 AM, Ian Romanick wrote: > On 03/07/2017 05:09 PM, Grazvydas Ignotas wrote: >> Makes vsync option work in The Talos Principle. > > NAK. The GLX_SGI_swap_control spec says: > > glXSwapIntervalSGI returns GLX_BAD_VALUE if parameter is >

Re: [Mesa-dev] [PATCH] glsl/blob: clear padding bytes

2017-03-08 Thread Grazvydas Ignotas
(CCing some people who touched or reviewed blob) Ping. I think writing stale heap contents to cache should be avoided and this patch is an improvement. Gražvydas On Fri, Mar 3, 2017 at 1:59 AM, Grazvydas Ignotas wrote: > Since blob is intended for serializing data, it's not a good

[Mesa-dev] [PATCH 2/2] util/disk_cache: fix size subtraction on 32bit

2017-03-08 Thread Grazvydas Ignotas
Negating size_t on 32bit produces a 32bit result. This was effectively adding values close to UINT_MAX to the cache size (the files are usually small) instead of intended subtraction. Fixes 'make check' disk_cache failures on 32bit. Signed-off-by: Grazvydas Ignotas --- src/util/disk_c

[Mesa-dev] [PATCH 1/2] util/disk_cache: fix compressed size calculation

2017-03-08 Thread Grazvydas Ignotas
It incorrectly doubles the size on each iteration. Fixes: 85a9b1b5 "util/disk_cache: compress individual cache entries" Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/di

Re: [Mesa-dev] [PATCH 1/3] util/disk_cache: use LRU eviction rather than random eviction (v2)

2017-03-10 Thread Grazvydas Ignotas
On Fri, Mar 10, 2017 at 6:23 AM, Timothy Arceri wrote: > On 07/03/17 12:25, Alan Swanson wrote: >> >> Still using random selection of two-character subdirectory in which >> to check cache files rather than scanning entire cache. >> >> v2: Factor out double strlen call >> --- >> src/util/disk_cach

Re: [Mesa-dev] [PATCH 4/8] util/disk_cache: make disk_cache_put() compatible with u_queue

2017-03-10 Thread Grazvydas Ignotas
On Fri, Mar 10, 2017 at 4:28 AM, Timothy Arceri wrote: > --- > src/compiler/glsl/shader_cache.cpp | 5 - > src/compiler/glsl/tests/cache_test.c| 29 > - > src/gallium/drivers/radeonsi/si_state_shaders.c | 9 ++-- > src/mesa/state_tracker

Re: [Mesa-dev] [PATCH] anv: Stall before fast-clear operations

2017-03-11 Thread Grazvydas Ignotas
On Sat, Mar 11, 2017 at 9:04 AM, Jason Ekstrand wrote: > During initial CCS bring-up, I discovered that you have to do a full CS > stall prior to doing a CCS resolve as well as afterwards. It appears > that the same is needed for fast-clears as well. This fixes rendering > corruptions on The Tal

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 0/7] timestamp/arch directory removal for disk_cache

2017-03-12 Thread Grazvydas Ignotas
hash it in too, if it's how others want it to be. This series should also solve bug 100091. Grazvydas Ignotas (7): util/mesa-sha1: add a context clone function util/mesa-sha1: allow to finish without taking the result util/disk_cache: use a helper to compute cache keys util/disk_

[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

[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 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 79

[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

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

2017-03-12 Thread Grazvydas Ignotas
incarnations of disk_cache at the same time, where one deletes a directory belonging to the other, like when both OpenGL and gallium nine are used simultaneously (or several different mesa installations). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100091 Signed-off-by: Grazvydas Ignotas

[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

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

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 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 con

Re: [Mesa-dev] MESA and KOTOR

2017-03-13 Thread Grazvydas Ignotas
On Sat, Mar 11, 2017 at 1:51 PM, Federico Dossena wrote: > This issue is not new: a guy named Miklós Máté, here in the Mesa mailing > list somehow managed to fix it in Mesa 11, but his patches do not seem to > work anymore > (https://lists.freedesktop.org/archives/mesa-dev/2016-February/106695.htm

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

2017-03-13 Thread Grazvydas Ignotas
ax_size; > > + /* A limit of 32 jobs was choosen as observations of Deus Ex start-up > times > +* showed that we reached at most 11 jobs on an Intel i5-6400 CPU@2.70GHz > +* (a fairly modist desktop CPU). 1 thread was choosen because we don't modest, chosen? with that, FWIW: Reviewed-by: Grazvydas Ignotas Gražvydas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

2017-03-13 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 3:01 AM, Timothy Arceri wrote: > 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. I think this is a f

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

2017-03-13 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 3:01 AM, 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(

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

2017-03-13 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 3:01 AM, Timothy Arceri wrote: > --- > 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

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

2017-03-13 Thread Grazvydas Ignotas
On Mon, Mar 13, 2017 at 1:17 PM, Emil Velikov wrote: > On 12 March 2017 at 18: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 c

Re: [Mesa-dev] [PATCH v2 3/3] util/sha1: drop _mesa_sha1_{update, format} return type

2017-03-13 Thread Grazvydas Ignotas
s an inline function. Maybe make all 3 inlines instead, so the names appear in debug stack dumps? In either case: 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 2/4] util/disk_cache: add helpers for creating/destroying disk cache put jobs

2017-03-13 Thread Grazvydas Ignotas
On Tue, Mar 14, 2017 at 12:06 AM, Timothy Arceri wrote: > On 13/03/17 22:55, Grazvydas Ignotas wrote: >> >> On Mon, Mar 13, 2017 at 3:01 AM, Timothy Arceri >> wrote: >>> >>> --- >>> src/util/disk_cache.c | 48 >>> +++

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

2017-03-13 Thread Grazvydas Ignotas
On Tue, Mar 14, 2017 at 12:20 AM, Timothy Arceri wrote: > > > On 13/03/17 22:53, Grazvydas Ignotas wrote: >> >> On Mon, Mar 13, 2017 at 3:01 AM, Timothy Arceri >> wrote: >>> >>> This should help reduce any overhead added by the shader cache

Re: [Mesa-dev] [PATCH v2 3/3] util/sha1: drop _mesa_sha1_{update, format} return type

2017-03-13 Thread Grazvydas Ignotas
On Tue, Mar 14, 2017 at 2:28 AM, Emil Velikov wrote: > On 13 March 2017 at 22:38, Grazvydas Ignotas wrote: >> On Mon, Mar 13, 2017 at 6:52 PM, Emil Velikov >> wrote: >>> ... >>> diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h >>> index f927d5

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

2017-03-14 Thread Grazvydas Ignotas
or this test, we force this signature to land in the same > * directory as the original blob first written to the cache. > */ > _mesa_sha1_compute(one_KB, 1024, one_KB_key); > one_KB_key[0] = blob_key_byte_zero; > > disk_cache_put(cache, one_KB_key, one_K

Re: [Mesa-dev] [PATCH 1/5] util/disk_cache: seed rand

2017-03-14 Thread Grazvydas Ignotas
It's not a good practice to srand() in libraries [1]. Not sure what to suggest though, maybe rand_r() but "POSIX.1-2008 marks rand_r() as obsolete". Maybe somebody else (Emil?) has some ideas? [1] http://stackoverflow.com/questions/14883035/problems-of-using-srand-in-libraries Gražvydas On Tue

Re: [Mesa-dev] [PATCH 4/5] util/disk_cache: actually enforce cache size

2017-03-14 Thread Grazvydas Ignotas
- /* Ensure eviction happened by checking that only one of the two > -* previously-added items can still be fetched. > + /* Ensure eviction happened by checking that both of the previous > +* cache itesm were evicted. items for patches 2-5: Reviewed-by: Grazv

[Mesa-dev] [PATCH] util/disk_cache: do eviction before creating .tmp

2017-03-15 Thread Grazvydas Ignotas
uot; mount option, which is the default). So when cache is small, if random doesn't hit another dir LRU keeps selecting the same dir with just the .tmp and not deleting anything. To fix this (and the tests), do eviction earlier. Signed-off-by: Grazvydas Ignotas --- src/util/di

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

2017-03-15 Thread Grazvydas Ignotas
On Wed, Mar 15, 2017 at 3:01 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 1/5] util/disk_cache: seed rand

2017-03-15 Thread Grazvydas Ignotas
On Wed, Mar 15, 2017 at 8:47 PM, Bas Nieuwenhuizen wrote: > I thought rand() was not thread safe anyway, and hence we can't use it > in mesa as we don't know what application threads call it too? My manpage says "MT-Safe". > > On Tue, Mar 14, 2017 at 3:08 AM, Timothy Arceri wrote: >> Otherwise

[Mesa-dev] [PATCH v2 0/7] timestamp/arch/gpu dir removal for disk_cache

2017-03-15 Thread Grazvydas Ignotas
This is version 2 of the series that removes extra cache directories and hashes that information into cache keys instead. v1: https://lists.freedesktop.org/archives/mesa-dev/2017-March/147632.html Grazvydas Ignotas (7): util/disk_cache: use a helper to compute cache keys tests/cache_test: use

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

2017-03-15 Thread Grazvydas Ignotas
Simplifies the write code a bit and handles EINTR. Signed-off-by: Grazvydas Ignotas --- src/util/disk_cache.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 904aa66..ad591be

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

2017-03-15 Thread Grazvydas Ignotas
This allows to get rid of the arch and gpu name directories. Also, gpu_name is now optional. Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl/tests/cache_test.c | 13 ++ src/util/disk_cache.c| 47 +++- src/util/disk_cache.h

<    1   2   3   4   >