[Mesa-dev] [PATCH 1/2] gallium/radeon: emit LLVM `ret void` before radeon_llvm_finalize_module

2016-02-04 Thread Nicolai Hähnle
From: Nicolai Hähnle This allows dumping a consumable LLVM module before the initial optimization passes are run. --- The missing `ret void` is why the IR would not be accepted. I suspect Marek has something similar for the concatenating shaders, but this is small enough that it should be easy t

[Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Nicolai Hähnle
From: Nicolai Hähnle Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, to allow diagnosing problems caused by optimization passes. Note that in order to compile the resulting IR with llc, you will first have to run at least the mem2reg pass, e.g. opt -mem2reg -S < shader.l

Re: [Mesa-dev] [PATCH] st/mesa: handle indirect samplers in arrays/structs properly (v2)

2016-02-04 Thread Timothy Arceri
On Thu, 2016-02-04 at 17:44 +1000, Dave Airlie wrote: > From: Dave Airlie > > The state tracker never handled this properly, and it finally > annoyed me for the second time so I decided to fix it properly. > > This is inspired by the NIR sampler lowering code and I only realised > NIR seems to d

[Mesa-dev] [PATCH] mesa: remove dead program parameter functions

2016-02-04 Thread Timothy Arceri
--- src/mesa/program/prog_parameter.c | 70 --- src/mesa/program/prog_parameter.h | 7 2 files changed, 77 deletions(-) diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c index e98946b..34183d4 100644 --- a/src/mesa/progra

[Mesa-dev] [Bug 27512] Illegal instruction _mesa_x86_64_transform_points4_general

2016-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27512 Timothy Arceri changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

Re: [Mesa-dev] [Mesa-stable] [PATCH] meta: Fix the pbo usage in meta for GLES{1, 2} contexts

2016-02-04 Thread Emil Velikov
Hi Anuj, On 24 December 2015 at 21:04, Anuj Phogat wrote: > OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both > ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). > So, handle it correctly by calling the _mesa_meta_begin() > before create_texture_for_pbo(). > > Cc: "11.1" >

[Mesa-dev] [Bug 12216] Mesa V7.0.1 on x86_64 crashes while rendering a NURBS surface

2016-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=12216 Timothy Arceri changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] glsl: Relax ir_quadop_bitfield_insert type restrictions.

2016-02-04 Thread Emil Velikov
Hi Ken, On 5 January 2016 at 13:34, Kenneth Graunke wrote: > While GLSL restricts bitfieldInsert's offset and bits parameters to > be scalars, we shouldn't require this in the IR. > > In particular, opt_vectorize() tries to combine > > result.x = bitfieldInsert(src0.x, src1.x, src2.x, src3.x); >

[Mesa-dev] [Bug 3165] texImage.IsCompressed and texImage.CompressedSize issues

2016-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=3165 Timothy Arceri changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Mesa-dev] [Bug 9922] Services for Unix compile

2016-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=9922 Timothy Arceri changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 8802] Mesa Segfaults on xmms OpenGL applications, compiz has become slow

2016-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=8802 Timothy Arceri changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

Re: [Mesa-dev] [PATCH] mesa: remove dead program parameter functions

2016-02-04 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Thu, 2016-02-04 at 21:55 +1100, Timothy Arceri wrote: > --- > src/mesa/program/prog_parameter.c | 70 > --- > src/mesa/program/prog_parameter.h | 7 > 2 files changed, 77 deletions(-) > > diff --git a/src/mesa/program

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák On Thu, Feb 4, 2016 at 9:15 AM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, > to allow diagnosing problems caused by optimization passes. > > Note that in order to compile the

Re: [Mesa-dev] [PATCH] glsl: simplify setting of image access qualifiers

2016-02-04 Thread Iago Toral
On Thu, 2016-02-04 at 12:03 +1100, Timothy Arceri wrote: > Cc: Francisco Jerez > --- > src/compiler/glsl/link_uniforms.cpp | 73 > - > 1 file changed, 16 insertions(+), 57 deletions(-) > > diff --git a/src/compiler/glsl/link_uniforms.cpp > b/src/compiler/gls

Re: [Mesa-dev] [PATCH] glsl: Ensure glsl/ exists before making the lexer/parser.

2016-02-04 Thread Iago Toral
Looks good to me, Reviewed-by: Iago Toral Quiroga On Wed, 2016-02-03 at 12:04 -0800, Matt Turner wrote: > Reported-by: Jan Ziak <0xe2.0x9a.0...@gmail.com> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93989 > --- > src/compiler/Makefile.am | 2 ++ > 1 file changed, 2 insertions(+) >

Re: [Mesa-dev] [PATCH 1/2] i965: in brw_link_shader() react to low memory

2016-02-04 Thread Samuel Iglesias Gonsálvez
On Wed, 2016-02-03 at 10:56 +0200, Juha-Pekka Heikkila wrote: > Check _mesa_new_parameter_list() returned other than null. > > Signed-off-by: Juha-Pekka Heikkila > --- >  src/mesa/drivers/dri/i965/brw_link.cpp | 4 >  src/mesa/main/ff_fragment_shader.cpp   | 6 -- >  2 files changed, 8 ins

Re: [Mesa-dev] [PATCH 2/2] glsl: Check for null pointer at ir_variable_refcount_visitor()

2016-02-04 Thread Samuel Iglesias Gonsálvez
Reviewed-by: Samuel Iglesias Gonsálvez On Wed, 2016-02-03 at 10:56 +0200, Juha-Pekka Heikkila wrote: > Look after calloc give memory address. > > Signed-off-by: Juha-Pekka Heikkila > --- >  src/compiler/glsl/ir_variable_refcount.cpp | 7 +++ >  1 file changed, 7 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH 4/4] radeonsi: add placeholder MC and SRBM performance counter groups

2016-02-04 Thread Marek Olšák
For the series: Acked-by: Marek Olšák Marek On Wed, Feb 3, 2016 at 2:52 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Yet another change motivated by AMD GPUPerfStudio compatibility. These groups > are not directly accessible from userspace, and AMD GPUPerfStudio does not > actually qu

Re: [Mesa-dev] [PATCH v3] glx: update to updated version of EXT_create_context_es2_profile

2016-02-04 Thread Emil Velikov
Hi Ilia, On 3 February 2016 at 14:52, Ilia Mirkin wrote: > The EXT spec has been updated to: > - logically combine the es2_profile and es_profile exts > - allow any legal version to be requested > > dEQP tests request a specific ES version when using GLX, so this allows > dEQP upstream to run a

Re: [Mesa-dev] [PATCH 1/2] mesa: call build_program_resource_list inside Driver.LinkShader

2016-02-04 Thread Marek Olšák
Ping On Sat, Jan 30, 2016 at 3:48 PM, Marek Olšák wrote: > From: Marek Olšák > > to allow LinkShader to free the GLSL IR. > --- > src/compiler/glsl/program.h| 5 - > src/mesa/drivers/dri/i965/brw_link.cpp | 2 ++ > src/mesa/program/ir_to_mesa.cpp| 4 ++-- > s

Re: [Mesa-dev] [PATCH v3] glx: update to updated version of EXT_create_context_es2_profile

2016-02-04 Thread Ilia Mirkin
On Thu, Feb 4, 2016 at 10:50 AM, Emil Velikov wrote: > Hi Ilia, > > On 3 February 2016 at 14:52, Ilia Mirkin wrote: >> The EXT spec has been updated to: >> - logically combine the es2_profile and es_profile exts >> - allow any legal version to be requested >> >> dEQP tests request a specific ES

Re: [Mesa-dev] [PATCH] Fix locking of GLsync objects

2016-02-04 Thread Marek Olšák
On Tue, Feb 2, 2016 at 1:20 AM, Steinar H. Gunderson wrote: > On Mon, Feb 01, 2016 at 04:00:09PM +0100, Marek Olšák wrote: >> "sync" is undeclared here. It builds, because "sync" is also a >> function from unistd.h. This is wrong. > > Attaching new version, fixing this wrong use of “sync” (both pl

[Mesa-dev] [PATCH 1/4] main: Use _mesa_geometric_samples to calculate the value of GL_SAMPLES

2016-02-04 Thread Neil Roberts
Otherwise it won't take into account the default samples for framebuffers with no attachments. --- src/mesa/main/get.c | 4 src/mesa/main/get_hash_params.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 04348

[Mesa-dev] [PATCH 4/4] main: Use a derived value for the default sample count

2016-02-04 Thread Neil Roberts
Previously the framebuffer default sample count was taken directly from the value given by the application. On the i965 driver on HSW if the value wasn't one that is supported by the hardware it would hit an assert when it tried to program the state for it. This patch fixes it by adding a derived s

[Mesa-dev] [PATCH 3/4] program: Use _mesa_geometric_samples to calculate gl_NumSamples

2016-02-04 Thread Neil Roberts
Otherwise it won't take into account the default samples for framebuffers with no attachments. --- src/mesa/program/prog_statevars.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 12490d0..eed2412 1

[Mesa-dev] [PATCH 2/4] main: Use _mesa_geometric_samples to calculate GL_SAMPLE_BUFFERS

2016-02-04 Thread Neil Roberts
Otherwise it won't take into account the default samples for framebuffers with no attachments. --- src/mesa/main/get.c | 3 +++ src/mesa/main/get_hash_params.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 307059

[Mesa-dev] [PATCH] winsys/amdgpu: add an assertion to cik_get_num_tile_pipes (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák v2: print an error to stderr --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index d1ba259..2c4de75 100644 --

Re: [Mesa-dev] [PATCH 4/4] main: Use a derived value for the default sample count

2016-02-04 Thread Ilia Mirkin
On Thu, Feb 4, 2016 at 11:12 AM, Neil Roberts wrote: > Previously the framebuffer default sample count was taken directly > from the value given by the application. On the i965 driver on HSW if > the value wasn't one that is supported by the hardware it would hit an > assert when it tried to progr

Re: [Mesa-dev] [PATCH 3/5] mesa: implement GL_ATI_meminfo

2016-02-04 Thread Alan Swanson
On 2016-02-04 16:12, Alan Swanson wrote: On 2016-02-02 13:45, Marek Olšák wrote: From: Marek Olšák --- src/mapi/glapi/gen/gl_API.xml| 6 ++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 26 +- src/mesa/main/get_hash_params.py | 5

Re: [Mesa-dev] [PATCH 1/2] virgl: reuse screen when fd is already open

2016-02-04 Thread Rob Clark
On Wed, Feb 3, 2016 at 7:52 PM, Emil Velikov wrote: > On 2 February 2016 at 17:55, Rob Clark wrote: >> On Tue, Feb 2, 2016 at 12:13 PM, Emil Velikov >> wrote: >>> On 31 January 2016 at 19:40, Rob Clark wrote: On Sun, Jan 31, 2016 at 6:18 AM, Emil Velikov wrote: > Hi Rob, >

Re: [Mesa-dev] [PATCH 3/5] mesa: implement GL_ATI_meminfo

2016-02-04 Thread Alan Swanson
On 2016-02-02 13:45, Marek Olšák wrote: From: Marek Olšák --- src/mapi/glapi/gen/gl_API.xml| 6 ++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 26 +- src/mesa/main/get_hash_params.py | 5 + src/mesa/main/mtypes.h |

Re: [Mesa-dev] [PATCH v2 09/11] st/mesa: use the occlusion predicate query for GL_ANY_SAMPLES

2016-02-04 Thread Ilia Mirkin
On Wed, Feb 3, 2016 at 9:11 AM, Ilia Mirkin wrote: > On Wed, Feb 3, 2016 at 5:11 AM, Marek Olšák wrote: >> On Sun, Jan 31, 2016 at 9:56 PM, Ilia Mirkin wrote: >>> On Sun, Jan 31, 2016 at 3:32 PM, Ilia Mirkin wrote: This is supposed to return GL_TRUE or GL_FALSE, not the full counter v

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add an assertion to cik_get_num_tile_pipes (v2)

2016-02-04 Thread Alex Deucher
On Thu, Feb 4, 2016 at 11:15 AM, Marek Olšák wrote: > From: Marek Olšák > > v2: print an error to stderr Reviewed-by: Alex Deucher > --- > src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/winsys/amdgpu/drm/a

Re: [Mesa-dev] [Mesa-stable] [PATCH] meta: Fix the pbo usage in meta for GLES{1, 2} contexts

2016-02-04 Thread Anuj Phogat
On Thu, Feb 4, 2016 at 3:21 AM, Emil Velikov wrote: > Hi Anuj, > > On 24 December 2015 at 21:04, Anuj Phogat wrote: >> OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both >> ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). >> So, handle it correctly by calling the _mesa_meta

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Matt Arsenault
> On Feb 4, 2016, at 00:15, Nicolai Hähnle wrote: > > From: Nicolai Hähnle > > Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, > to allow diagnosing problems caused by optimization passes. > > Note that in order to compile the resulting IR with llc, you will first > ha

Re: [Mesa-dev] [PATCH 3/5] mesa: implement GL_ATI_meminfo

2016-02-04 Thread Alan Swanson
On 2016-02-04 16:20, Alan Swanson wrote: On 2016-02-04 16:12, Alan Swanson wrote: On 2016-02-02 13:45, Marek Olšák wrote: From: Marek Olšák --- src/mapi/glapi/gen/gl_API.xml| 6 ++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 26 +++

[Mesa-dev] [PATCH 0/3] add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Ilia Mirkin
Looks like a few drivers were missing out. I did a quick scan and found these. Untested. I'd like to start using the predicate in st/mesa to implement GL_ANY_SAMPLES calls. Ilia Mirkin (3): ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support nv30: add PIPE_QUERY_OCCLUSION_PREDICATE support nv50:

[Mesa-dev] [PATCH 1/3] ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/ilo/ilo_draw.c | 2 ++ src/gallium/drivers/ilo/ilo_query.c | 9 - src/gallium/drivers/ilo/ilo_render.c | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/ilo/ilo_draw.c b/src/gallium/drivers/ilo

[Mesa-dev] [PATCH 3/3] nv50: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c index cccd3b7..3727ac0 100644 --- a/src/gallium/drivers/nouve

[Mesa-dev] [PATCH 2/3] nv30: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nv30/nv30_query.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c index 3980be9..608df01 100644 --- a/src/gallium/drivers/nouveau/nv30/

Re: [Mesa-dev] [PATCH 1/2] virgl: reuse screen when fd is already open

2016-02-04 Thread Emil Velikov
On 4 February 2016 at 16:20, Rob Clark wrote: > On Wed, Feb 3, 2016 at 7:52 PM, Emil Velikov wrote: >> On 2 February 2016 at 17:55, Rob Clark wrote: >>> On Tue, Feb 2, 2016 at 12:13 PM, Emil Velikov >>> wrote: On 31 January 2016 at 19:40, Rob Clark wrote: > On Sun, Jan 31, 2016 at 6:

Re: [Mesa-dev] [PATCH 1/3] ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Ilia Mirkin
[+Chia-I Wu] I'd appreciate it if you could have a look and see if this looks reasonable. Not sure if you're still maintaining the driver or not. The story is that I want to use this query type for GL_ANY_SAMPLES* queries. Cheers, -ilia On Thu, Feb 4, 2016 at 12:52 PM, Ilia Mirkin wrote: > S

[Mesa-dev] [PATCH] i965/vec4: don't copy ATTR into 3src instructions with complex swizzles

2016-02-04 Thread Matt Turner
The vec4 backend, at the end, does this: if (inst->is_3src()) { for (int i = 0; i < 3; i++) { if (inst->src[i].vstride == BRW_VERTICAL_STRIDE_0) assert(brw_is_single_value_swizzle(inst->src[i].swizzle)); So make sure that we use the same conditions when trying to

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Tom Stellard
On Thu, Feb 04, 2016 at 09:15:26AM +0100, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, > to allow diagnosing problems caused by optimization passes. > > Note that in order to compile the resulting IR with llc, you will f

Re: [Mesa-dev] [PATCH] i965/vec4: don't copy ATTR into 3src instructions with complex swizzles

2016-02-04 Thread Ilia Mirkin
On Thu, Feb 4, 2016 at 1:47 PM, Matt Turner wrote: > The vec4 backend, at the end, does this: > > if (inst->is_3src()) { >for (int i = 0; i < 3; i++) { > if (inst->src[i].vstride == BRW_VERTICAL_STRIDE_0) > assert(brw_is_single_value_swizzle(inst->src[i].swizzle)

Re: [Mesa-dev] [Intel-gfx] [PATCH i-g-t] list-workarounds: Extend the script to Mesa

2016-02-04 Thread Kibey, Sameer
> -Original Message- > From: Jani Nikula [mailto:jani.nik...@linux.intel.com] > Sent: Thursday, February 04, 2016 10:37 AM > To: Kibey, Sameer; intel-...@lists.freedesktop.org; mesa- > d...@lists.freedesktop.org > Cc: Sharp, Sarah A; Kibey, Sameer; Widawsky, Benjamin > Subject: Re: [Intel-g

Re: [Mesa-dev] [PATCH V3 16/28] glsl: add packing rules for tessellation stages to the packing code

2016-02-04 Thread Anuj Phogat
On Thu, Jan 28, 2016 at 9:22 PM, Timothy Arceri wrote: > Following patches will allow packing of varyings with explicit locations > via the component layout qualifier. Adding the rules here will enable > us to call an alternate path for packing tessellation stages with > explicit locations. > > V3

Re: [Mesa-dev] [PATCH] i965/vec4: don't copy ATTR into 3src instructions with complex swizzles

2016-02-04 Thread Matt Turner
On Thu, Feb 4, 2016 at 10:55 AM, Ilia Mirkin wrote: > On Thu, Feb 4, 2016 at 1:47 PM, Matt Turner wrote: >> The vec4 backend, at the end, does this: >> >> if (inst->is_3src()) { >>for (int i = 0; i < 3; i++) { >> if (inst->src[i].vstride == BRW_VERTICAL_STRIDE_0) >>

Re: [Mesa-dev] [PATCH 4/4] main: Use a derived value for the default sample count

2016-02-04 Thread Ilia Mirkin
On Thu, Feb 4, 2016 at 11:17 AM, Ilia Mirkin wrote: > On Thu, Feb 4, 2016 at 11:12 AM, Neil Roberts wrote: >> Previously the framebuffer default sample count was taken directly >> from the value given by the application. On the i965 driver on HSW if >> the value wasn't one that is supported by th

Re: [Mesa-dev] [PATCH] util/ralloc: Remove double zero'ing of rzalloc buffers

2016-02-04 Thread Kenneth Graunke
On Monday, February 1, 2016 10:50:31 AM PST Juha-Pekka Heikkila wrote: > On 23.01.2016 01:22, Nicolai Hähnle wrote: > > On 22.01.2016 16:02, Kenneth Graunke wrote: > >> On Friday, January 22, 2016 12:09:18 PM PST Nicolai Hähnle wrote: > >>> On 22.01.2016 02:53, Jordan Justen wrote: > Juha-Pekk

Re: [Mesa-dev] [Intel-gfx] [PATCH i-g-t] list-workarounds: Extend the script to Mesa

2016-02-04 Thread Jani Nikula
On Thu, 04 Feb 2016, "Kibey, Sameer" wrote: > Thanks for the input. I changed the subject prefix for this thread, > let me know if you would like me to send a new email with "PATCH > i-g-t" instead. Not necessary; I meant to say, "for future reference". BR, Jani. -- Jani Nikula, Intel Open Sou

[Mesa-dev] [PATCH 5/5] gallium/radeon: implement query_memory_info (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák v2: don't use DIV_ROUND_UP (no so useful) also return eviction stats --- src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/radeon/r600_pipe_common.c | 37 +++ src/gallium/drivers/radeonsi/si_pipe.c| 2 +- 3 files cha

[Mesa-dev] [PATCH 1/5] gallium: add interface for querying memory usage and sizes (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák If you're worried about the duplication of some CAPs, we can remove them later. v2: add fields for memory eviction stats --- src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c

[Mesa-dev] [PATCH 2/5] mesa: implement GL_NVX_gpu_memory_info (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák v2: implement eviction queries properly add gl_memory_info structure --- src/mapi/glapi/gen/gl_API.xml| 8 src/mesa/main/dd.h | 8 src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 25 +

[Mesa-dev] [PATCH 4/5] st/mesa: implement and enable memory info extensions (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák v2: assert and return if query_memory_info is not set rebase --- src/mesa/state_tracker/st_context.c| 25 + src/mesa/state_tracker/st_extensions.c | 2 ++ 2 files changed, 27 insertions(+) diff --git a/src/mesa/state_tracker/st_context.c b/src

[Mesa-dev] [PATCH 0/5] Memory info extensions (v2)

2016-02-04 Thread Marek Olšák
Hi, This adds proper implementation of the memory eviction queries. Please review. Thanks, Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 3/5] mesa: implement GL_ATI_meminfo (v2)

2016-02-04 Thread Marek Olšák
From: Marek Olšák v2: rebase --- src/mapi/glapi/gen/gl_API.xml| 6 ++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 26 +- src/mesa/main/get_hash_params.py | 5 + src/mesa/main/mtypes.h | 1 + 5 files changed, 38 inse

Re: [Mesa-dev] [PATCH 4/5] st/mesa: implement and enable memory info extensions (v2)

2016-02-04 Thread Ilia Mirkin
Patches 1-4 are Reviewed-by: Ilia Mirkin On Thu, Feb 4, 2016 at 3:42 PM, Marek Olšák wrote: > From: Marek Olšák > > v2: assert and return if query_memory_info is not set > rebase > --- > src/mesa/state_tracker/st_context.c| 25 + > src/mesa/state_tracker/st_ext

Re: [Mesa-dev] [PATCH 5/5] gallium/radeon: implement query_memory_info (v2)

2016-02-04 Thread Alex Deucher
On Thu, Feb 4, 2016 at 3:42 PM, Marek Olšák wrote: > From: Marek Olšák > > v2: don't use DIV_ROUND_UP (no so useful) > also return eviction stats For the series: Reviewed-by: Alex Deucher > --- > src/gallium/drivers/r600/r600_pipe.c | 2 +- > src/gallium/drivers/radeon/r600_pipe

Re: [Mesa-dev] [PATCH 4/4] st/mesa: bail out of try_pbo_upload_common when constant upload fails

2016-02-04 Thread Alex Deucher
On Wed, Feb 3, 2016 at 12:09 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Also fixes a resource leak when an upload_mgr is used for constants. For the series: Reviewed-by: Alex Deucher > --- > src/mesa/state_tracker/st_cb_texture.c | 6 ++ > 1 file changed, 6 insertions(+) > > dif

[Mesa-dev] [PATCH 1/1] r600, compute: Use the BO format for RAT instead of hardwired R32_UINT

2016-02-04 Thread Jan Vesely
r600_compute_buffer_alloc_vram uses pipe_buffer_create, which sets format to PIPE_FORMAT_R8_UNORM Fixes assertion failure since 7dd31b81fee7fe40bd09cf3fbc324fcc32782479 gallium/radeon: support PIPE_CAP_SURFACE_REINTERPRET_BLOCKS while at it use rctx helper var where possible. Signed-off-by: Jan V

[Mesa-dev] [PATCH] workarounds: Update workaround names and platforms

2016-02-04 Thread Kibey, Sameer
Update the format in which workarounds are documented in the source code. This allows mesa to be parsed by the list-workarounds utility in intel-gpu-tools. Signed-off-by: Sameer Kibey --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 +- src/mesa/drivers/dri/i965/brw_blorp.cpp| 2 ++

[Mesa-dev] [PATCH] list-workarounds: Extend the script to Mesa

2016-02-04 Thread Kibey, Sameer
Updated the list-workarounds script so that it can parse Mesa directory if provided. Moved the common code to a separate function to allow reuse for both kernel and mesa. The new command line is: Usage: list-workarounds [options] path-to-kernel -k path-to-kernel -m path-to-mesa The legacy

Re: [Mesa-dev] [PATCH] glsl: Ensure glsl/ exists before making the lexer/parser.

2016-02-04 Thread
After applying the patch, I was able to build Mesa with flex-2.5.39. Thanks. On Thu, Feb 4, 2016 at 7:19 AM, Tapani Pälli wrote: > Reviewed-by: Tapani Pälli > > > On 02/03/2016 10:04 PM, Matt Turner wrote: > >> Reported-by: Jan Ziak <0xe2.0x9a.0...@gmail.com> >> Bugzilla: https://bugs.freedeskt

[Mesa-dev] [PATCH] tgsi: use TGSI_WRITEMASK_XYZW instead of hardcoding the mask

2016-02-04 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/tgsi/tgsi_transform.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h

Re: [Mesa-dev] [PATCH] tgsi: use TGSI_WRITEMASK_XYZW instead of hardcoding the mask

2016-02-04 Thread Serge Martin
On Thursday 04 February 2016 22:25:00 Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset Reviewed-by: Serge Martin > --- > src/gallium/auxiliary/tgsi/tgsi_transform.h | 2 +- > src/gallium/auxiliary/tgsi/tgsi_ureg.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >

Re: [Mesa-dev] [PATCH] Add (un)packHalf tests which don't fail on GCN

2016-02-04 Thread Roland Scheidegger
Would probably make more sense on the piglit ml... That said, the existing unpack works on llvmpipe just fine even if you enable that half cap bit (unpack is always exact). The only potential gotcha I see is with denorms - the result of course is never a fp32 denorm but I suppose depending on your

[Mesa-dev] MesaGL <-> non-Mesa OpenCL interop interface

2016-02-04 Thread Marek Olšák
Hi, I would like to start a discussion about an OpenGL-OpenCL interop interface where OpenCL is not part of Mesa. I think the only way to do this is to have Mesa export functions that convert Mesa OpenGL objects into DMABUF handles. Such functions can be exported by DRI driver modules or libGL &

[Mesa-dev] [PATCH 2/3] radeon/llvm: Set the target triple on the module

2016-02-04 Thread Tom Stellard
--- src/gallium/drivers/r600/r600_llvm.c| 2 +- src/gallium/drivers/radeon/radeon_llvm.h| 3 ++- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 9 - src/gallium/drivers/radeonsi/si_shader.c| 4 ++-- 4 files changed, 13 insertions(+), 5 deletio

[Mesa-dev] [PATCH 1/3] gallivm: Add helpers for creating and destroying TargetLibraryInfo

2016-02-04 Thread Tom Stellard
This functionality is not exposed via the LLVM C API. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 30 +++ src/gallium/auxiliary/gallivm/lp_bld_misc.h | 7 +++ 2 files changed, 37 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src

[Mesa-dev] [PATCH 3/3] radeon/llvm: Add TargetLibraryInfo to the pass manager

2016-02-04 Thread Tom Stellard
This will prevent optimization passes from introducing unsupported library calls. --- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/rad

Re: [Mesa-dev] [android-x86-devel] Re: About drm_hwcomposer (Was Re: About the PixelFormat mappings in drm_gralloc)

2016-02-04 Thread Rob Herring
On Wed, Feb 3, 2016 at 10:16 AM, Sean Paul wrote: > > > On Thu, Jan 21, 2016 at 10:00 AM, Sean Paul wrote: >> >> >> >> On Wed, Jan 20, 2016 at 8:49 PM, Chih-Wei Huang >> wrote: >>> >>> CC to the android-x86 devel list so more developers can follow. >>> >>> 2016-01-21 6:19 GMT+08:00 Rob Clark : >

Re: [Mesa-dev] [PATCH 2/3] radeon/llvm: Set the target triple on the module

2016-02-04 Thread Matt Arsenault
> On Feb 4, 2016, at 13:02, Tom Stellard wrote: > > + LLVMSetTarget(ctx->gallivm.module, > + > +#if HAVE_LLVM < 0x0306 > + "r600--"); > +#else > + triple); > +#endif This alone does not set the datalayout, which should also be set here. -Matt

Re: [Mesa-dev] [Intel-gfx] [PATCH] list-workarounds: Extend the script to Mesa

2016-02-04 Thread Jani Nikula
FYI, for IGT patches, please do as instructed in CONTRIBUTING: """ Please use --subject-prefix="PATCH i-g-t" so that i-g-t patches are easily identified in the massive amount mails on intel-gfx. To ensure this is always done just run git config format.subjectprefix "PATCH i-g-t" fro

Re: [Mesa-dev] [PATCH 1/1] r600, compute: Use the BO format for RAT instead of hardwired R32_UINT

2016-02-04 Thread Jan Vesely
On Thu, 2016-02-04 at 15:56 -0500, Jan Vesely wrote: > r600_compute_buffer_alloc_vram uses pipe_buffer_create, which sets > format to > PIPE_FORMAT_R8_UNORM RFC: Looks like more is needed to fix this. the code expects R32 format. Do we change the one used in pipe_buffer_create? or just remove the

Re: [Mesa-dev] [PATCH] Add (un)packHalf tests which don't fail on GCN

2016-02-04 Thread Matt Turner
On Thu, Feb 4, 2016 at 10:50 AM, Marek Olšák wrote: > From: Marek Olšák > > This is a subset of the generated tests which are known to fail > on everything except CPU emulation (AFAIK). > --- This is really awful. Committing a generated test, but with unknown bits chopped out is gross. If it we

Re: [Mesa-dev] [PATCH 2/2] radeonsi: Allow dumping LLVM IR before optimization passes

2016-02-04 Thread Michel Dänzer
On 05.02.2016 03:52, Tom Stellard wrote: > On Thu, Feb 04, 2016 at 09:15:26AM +0100, Nicolai Hähnle wrote: >> From: Nicolai Hähnle >> >> Set R600_DEBUG=preoptir to dump the LLVM IR before optimization passes, >> to allow diagnosing problems caused by optimization passes. >> >> Note that in order t

Re: [Mesa-dev] [Piglit] [PATCH] Add (un)packHalf tests which don't fail on GCN

2016-02-04 Thread Roland Scheidegger
Am 05.02.2016 um 01:55 schrieb Matt Turner: > On Thu, Feb 4, 2016 at 10:50 AM, Marek Olšák wrote: >> From: Marek Olšák >> >> This is a subset of the generated tests which are known to fail >> on everything except CPU emulation (AFAIK). >> --- > > This is really awful. Committing a generated test

[Mesa-dev] [PATCH 4/5] nir: Handle large unsigned values in opt_algebraic.

2016-02-04 Thread Matt Turner
The next patch adds an algebraic rule that uses the constant 0xff00ff00. Without this change, the build fails with return hex(struct.unpack('I', struct.pack('i', self.value))[0]) struct.error: 'i' format requires -2147483648 <= number <= 2147483647 The hex() function handles integers of an

[Mesa-dev] [PATCH 3/5] nir: Do opt_algebraic in reverse order.

2016-02-04 Thread Matt Turner
Walking the SSA definitions in order means that we consider the smallest algebraic optimizations before larger optimizations. So if a smaller rule is part of a larger rule, the smaller one will happen first, preventing the larger one from happening. instructions in affected programs: 32721 -> 3261

[Mesa-dev] [PATCH 5/5] nir: Recognize open-coded bitfield_reverse.

2016-02-04 Thread Matt Turner
Helps 11 shaders in UnrealEngine4 demos. I seriously hope they would have given us bitfieldReverse() if we exposed GL 4.0 (but we do expose ARB_gpu_shader5, so why not use that anyway?). instructions in affected programs: 4875 -> 4633 (-4.96%) cycles in affected programs: 270516 -> 244516 (-9.61%

[Mesa-dev] [PATCH 2/5] nir: Recognize sum of open-coded pow()s.

2016-02-04 Thread Matt Turner
Prevents regressions in the next commit. --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 60df69f..0a248a2 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/

[Mesa-dev] [PATCH 1/5] nir: Add opt_algebraic rules for xor with zero.

2016-02-04 Thread Matt Turner
instructions in affected programs: 668 -> 664 (-0.60%) helped: 4 --- src/compiler/nir/nir_opt_algebraic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index e7765fa..60df69f 100644 --- a/src/compiler/nir/nir_o

[Mesa-dev] [PATCH] glsl: validate arrays of arrays on empty type delclarations

2016-02-04 Thread Timothy Arceri
Fixes: dEQP-GLES31.functional.shaders.arrays_of_arrays.invalid.empty_declaration_without_var_name_fragment dEQP-GLES31.functional.shaders.arrays_of_arrays.invalid.empty_declaration_without_var_name_vertex Cc: Ilia Mirkin --- src/compiler/glsl/ast_to_hir.cpp | 63 -

Re: [Mesa-dev] [PATCH 3/3] radeon/llvm: Add TargetLibraryInfo to the pass manager

2016-02-04 Thread Michel Dänzer
On 05.02.2016 06:02, Tom Stellard wrote: > This will prevent optimization passes from introducing unsupported > library calls. This series fixes the WebGL demo from https://github.com/edankwan/The-Spirit for me with radeonsi, with no piglit regressions, so it's Tested-by: Michel Dänzer -- Ear

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add an assertion to cik_get_num_tile_pipes (v2)

2016-02-04 Thread Michel Dänzer
On 05.02.2016 01:15, Marek Olšák wrote: > From: Marek Olšák > > v2: print an error to stderr > --- > src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c > b/src/gallium/winsys/a

[Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Dave Airlie
From: Dave Airlie The state tracker never handled this properly, and it finally annoyed me for the second time so I decided to fix it properly. This is inspired by the NIR sampler lowering code and I only realised NIR seems to do its deref ordering different to GLSL at the last minute, once I go

[Mesa-dev] gallium AoA support and indirect sampler fixes

2016-02-04 Thread Dave Airlie
Hi, In fixing some indirect sampler issues with ARB_gpu_shader5, I realised AoA was mostly fixed as well by the same things. Ilia made me fix atomics as well. So thise patch set enables AoA support on all gallium drivers exposing GLSL 1.30. Dave. ___

[Mesa-dev] [PATCH 3/4] st/mesa: add atomic AoA support

2016-02-04 Thread Dave Airlie
reuse the sampler deref handling code to do the same thing for atomics. Signed-off-by: Dave Airlie --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_

[Mesa-dev] [PATCH 4/4] st/mesa: enable AoA for gallium drivers reporting GLSL 1.30

2016-02-04 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- docs/GL3.txt | 2 +- docs/relnotes/11.2.0.html | 1 + src/mesa/state_tracker/st_extensions.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 7623ada..44

[Mesa-dev] [PATCH 2/4] mesa: drop unused nonconst sampler functions.

2016-02-04 Thread Dave Airlie
Since we fixed the glsl->tgsi conversion we no longer need this function. Signed-off-by: Dave Airlie --- src/mesa/program/sampler.cpp | 10 -- src/mesa/program/sampler.h | 4 2 files changed, 14 deletions(-) diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cp

[Mesa-dev] [PATCH] nvc0/ir: fix converting between predicate and gpr

2016-02-04 Thread Ilia Mirkin
The spill logic will insert convert ops when moving between files. It seems like the emission logic wasn't quite ready for these converts. Tested on fermi, and visually looked at nvdisasm output for maxwell. Signed-off-by: Ilia Mirkin --- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 8

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Dave Airlie
> + > + *base = > this->shader_program->UniformStorage[location].opaque[shader].index; self-review: this needs to use UniformRemapTable here, so it picks up the correct uniforms (fixes fs-texelFetch-2D). Dave. ___ mesa-dev mailing list mesa-dev@lists

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Ilia Mirkin
On Thu, Feb 4, 2016 at 11:25 PM, Dave Airlie wrote: >> + >> + *base = >> this->shader_program->UniformStorage[location].opaque[shader].index; > > self-review: this needs to use UniformRemapTable here, so it picks up > the correct uniforms > (fixes fs-texelFetch-2D). So... _mesa_get_sampler_uni

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Dave Airlie
On 5 February 2016 at 14:28, Ilia Mirkin wrote: > On Thu, Feb 4, 2016 at 11:25 PM, Dave Airlie wrote: >>> + >>> + *base = >>> this->shader_program->UniformStorage[location].opaque[shader].index; >> >> self-review: this needs to use UniformRemapTable here, so it picks up >> the correct uniforms

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Timothy Arceri
On Fri, 2016-02-05 at 14:35 +1000, Dave Airlie wrote: > On 5 February 2016 at 14:28, Ilia Mirkin > wrote: > > On Thu, Feb 4, 2016 at 11:25 PM, Dave Airlie > > wrote: > > > > + > > > > +   *base = this->shader_program- > > > > >UniformStorage[location].opaque[shader].index; > > > > > > self-revie

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Timothy Arceri
On Fri, 2016-02-05 at 13:40 +1000, Dave Airlie wrote: > From: Dave Airlie > > The state tracker never handled this properly, and it finally > annoyed me for the second time so I decided to fix it properly. > > This is inspired by the NIR sampler lowering code and I only realised > NIR seems to d

Re: [Mesa-dev] [PATCH 1/3] ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Chia-I Wu
On Fri, Feb 5, 2016 at 2:36 AM, Ilia Mirkin wrote: > [+Chia-I Wu] > > I'd appreciate it if you could have a look and see if this looks > reasonable. Not sure if you're still maintaining the driver or not. > The story is that I want to use this query type for GL_ANY_SAMPLES* > queries. The change l

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-04 Thread Dave Airlie
On 5 February 2016 at 14:55, Timothy Arceri wrote: > On Fri, 2016-02-05 at 13:40 +1000, Dave Airlie wrote: >> From: Dave Airlie >> >> The state tracker never handled this properly, and it finally >> annoyed me for the second time so I decided to fix it properly. >> >> This is inspired by the NIR

[Mesa-dev] [PATCH 2/2] mesa: remove hack to fix up GL_ANY_SAMPLES_PASSED results

2016-02-04 Thread Ilia Mirkin
Both st/mesa and i965 should return a true/false result now, and the only other driver implementing queries (radeon) doesn't support ARB_occlusion_query2 which added that pname. Signed-off-by: Ilia Mirkin --- src/mesa/main/queryobj.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/me

  1   2   >