Re: [Mesa-dev] [PATCH 2/2] anv: document that anv_gem_mmap returns MAP_FAILED on error

2017-05-05 Thread Samuel Iglesias Gonsálvez
Reviewed-by: Samuel Iglesias Gonsálvez On Thu, 2017-05-04 at 15:55 +0100, Emil Velikov wrote: > From: Emil Velikov > > Signed-off-by: Emil Velikov > --- >  src/intel/vulkan/anv_gem.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/intel/vulkan/anv_gem.c b/src/inte

[Mesa-dev] [PATCH] i965: avoid fence fd dup in EGL layer

2017-05-05 Thread Randy Xu
Follow up "i965: Solve Android native fence fd double close" The _EGLSync.SyncFd is not neccesary to keep after pass to dri driver. Test: Run Vulkan and GLES stress test and no crash. --- src/egl/drivers/dri2/egl_dri2.c | 10 ++ src/mesa/drivers/dri/i965/brw_sync.c | 2 +- 2 files c

Re: [Mesa-dev] [PATCH 1/9] i965/nir: Inline remap_vs_attrs

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > Now that we have nice block iterators, there's no good reason for this > to be off on it's own. While we're here, we convert to using the NIR > const index getters/setters instead of whacking const_index values > directly.

Re: [Mesa-dev] [PATCH] i965: avoid fence fd dup in EGL layer

2017-05-05 Thread Xu, Randy
Ping Chad & Emil & Tapani Please help to review it, I just verified it on Intel i965 driver. Thanks, Randy > -Original Message- > From: Xu, Randy > Sent: Friday, May 5, 2017 3:15 PM > To: mesa-dev@lists.freedesktop.org > Cc: Xu, Randy > Subject: [PATCH] i965: avoid fence fd dup in EGL

Re: [Mesa-dev] [PATCH 2/9] i965: Move multiply by 4 for VS ATTR setup into the scalar backend.

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > The vec4 backend will want to count in units of vec4s, not scalar > components. The simplest solution is to move the multiplication by 4 > into the scalar backend. This also improves consistency with how we > count varyin

Re: [Mesa-dev] [PATCH 3/9] i965/vs: Set uses_vertexid and friends from brw_compile_vs

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > --- > src/intel/compiler/brw_fs_visitor.cpp | 6 -- > src/intel/compiler/brw_vec4.cpp| 17 + > src/intel/compiler/brw_vec4_vs_visitor.cpp | 5 - > 3 files changed, 17 insertions(+

Re: [Mesa-dev] [PATCH 4/9] i965/fs: Lower gl_VertexID and friends to inputs at the NIR level

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > NIR calls these system values but they come in from the VF unit as > vertex data. It's terribly convenient to just be able to treat them as > such in the back-end. > --- > src/intel/compiler/brw_fs.h | 1 - > s

Re: [Mesa-dev] [PATCH 5/9] intel/compiler/vs: Move inputs_read handling to generic code

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > --- > src/intel/compiler/brw_vec4.cpp| 7 +++ > src/intel/vulkan/anv_pipeline.c| 3 --- > src/mesa/drivers/dri/i965/brw_vs.c | 7 --- > 3 files changed, 7 insertions(+), 10 deletions(-) > > diff --git a/src

[Mesa-dev] [PATCH v4 21/31] glsl: allow bindless samplers/images to be l-values

2017-05-05 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers can be used as l-values, so can be assigned into and used as "out" and "inout" function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images can be used as l-values, so can be assigned into and used

Re: [Mesa-dev] [PATCH v3 04/32] glsl: make component_slots() returns 2 for samplers/images

2017-05-05 Thread Samuel Pitoiset
On 05/05/2017 02:18 AM, Timothy Arceri wrote: What happened with my suggestion [1]? Was there a problem? IMO this patch just hacks around the problem and as mentioned previously will result in extra unused uniform storage being allocated. Can we just move on and fix the extra unused uniform

Re: [Mesa-dev] [PATCH 6/9] i965/vec4: Use NIR remapping for VS attributes

2017-05-05 Thread Alejandro Piñeiro
On 05/05/17 04:11, Jason Ekstrand wrote: > We have to pass inputs_read through from prog_data because we may add an > edge flag on old platforms. Well, the previous code was using nir->info->inputs_read. So perhaps this explanation should explicitly point that prog_data->inputs_read and nir->info-

Re: [Mesa-dev] [PATCH 7/9] i965/nir: Inline remap_inputs_with_vue_map

2017-05-05 Thread Alejandro Piñeiro
Reviewed-by: Alejandro Piñeiro On 05/05/17 04:11, Jason Ekstrand wrote: > --- > src/intel/compiler/brw_nir.c | 49 > > 1 file changed, 22 insertions(+), 27 deletions(-) > > diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c > in

Re: [Mesa-dev] [PATCH 9/9] i965/vec4: Use NIR to do GS input remapping

2017-05-05 Thread Alejandro Piñeiro
On 05/05/17 04:11, Jason Ekstrand wrote: > We're already doing this in the FS back-end. This just does the same > thing in the vec4 back-end. > --- > src/intel/compiler/brw_nir.c | 3 -- > src/intel/compiler/brw_vec4.cpp| 44 --- > src/intel/compiler/brw

Re: [Mesa-dev] [PATCH 2/2] nir: add pass to lower atomic counters to SSBO

2017-05-05 Thread Andres Gomez
Rob, I believe this is causing a linking failure in the Windows scons build: https://ci.appveyor.com/project/AndresGomez/mesa/build/321    Creating library build\windows-x86-debug\gallium\targets\osmesa\osmesa.lib and object build\windows-x86-debug\gallium\targets\osmesa\osmesa.exp nir.lib(nir_lo

Re: [Mesa-dev] [PATCH v2 6/7] docs/releasing: added relevant people for build/check with Android

2017-05-05 Thread Mauro Rossi
2017-05-04 17:09 GMT+02:00 Emil Velikov : > On 3 May 2017 at 19:16, Andres Gomez wrote: > > v2: Tapani as main contact and Mauro just for help with > > debugging/building (Mauro). > I would prefer the following: Mauro is collaborating with android-x86 and may provide feedbacks about the bui

Re: [Mesa-dev] [PATCH v3 04/32] glsl: make component_slots() returns 2 for samplers/images

2017-05-05 Thread Timothy Arceri
On 05/05/17 17:37, Samuel Pitoiset wrote: On 05/05/2017 02:18 AM, Timothy Arceri wrote: What happened with my suggestion [1]? Was there a problem? IMO this patch just hacks around the problem and as mentioned previously will result in extra unused uniform storage being allocated. Can we just

Re: [Mesa-dev] [PATCH v3 04/32] glsl: make component_slots() returns 2 for samplers/images

2017-05-05 Thread Samuel Pitoiset
On 05/05/2017 10:29 AM, Timothy Arceri wrote: On 05/05/17 17:37, Samuel Pitoiset wrote: On 05/05/2017 02:18 AM, Timothy Arceri wrote: What happened with my suggestion [1]? Was there a problem? IMO this patch just hacks around the problem and as mentioned previously will result in extra unus

Re: [Mesa-dev] [PATCH 10/11] intel/aubinator_error_decode: Stop decoding after MI_BATCH_BUFFER_END

2017-05-05 Thread Pohjolainen, Topi
On Mon, May 01, 2017 at 01:54:54PM -0700, Matt Turner wrote: > --- > src/intel/tools/aubinator_error_decode.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Topi Pohjolainen > > diff --git a/src/intel/tools/aubinator_error_decode.c > b/src/intel/tools/aubinator_error_decode.c > index

Re: [Mesa-dev] [PATCH 3/3] i965: Drop BRW_NEW_BLORP from 3DSTATE_VF atom.

2017-05-05 Thread Pohjolainen, Topi
On Thu, May 04, 2017 at 08:13:07AM -0700, Kenneth Graunke wrote: > BLORP doesn't program 3DSTATE_VF, since it doesn't use index buffers, > making the setting irrelevant. So there's no need to re-emit it after > a BLORP operation - the old setting will still be in place. Reviewed-by: Topi Pohjolai

[Mesa-dev] [PATCH] st/glsl_to_tgsi: don't use rzalloc_array() when it's unnecessary

2017-05-05 Thread Samuel Pitoiset
When the arrays are initialized later on with -1, that's useless to use rzalloc_array(). Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/sr

[Mesa-dev] [PATCH v3 6/7] docs/releasing: added relevant people for build/check with Android

2017-05-05 Thread Andres Gomez
v2: Tapani as main contact and Mauro just for help with debugging/building (Mauro). v3: Mauro my provide feedback for android-x86 only (Mauro). Signed-off-by: Andres Gomez Cc: Emil Velikov Cc: Tapani Pälli Cc: Mauro Rossi Acked-by: Tapani Pälli --- docs/releasing.html | 6 ++ 1 file

Re: [Mesa-dev] [PATCH v2 12/27] auxiliary/vl: use vl_*_screen_create stubs when building w/o platform

2017-05-05 Thread Christian König
Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other headers. In order to avoid build and link-time issues, we remove the HAVE_DRI3 guards in the

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: don't use rzalloc_array() when it's unnecessary

2017-05-05 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 05/05/17 19:01, Samuel Pitoiset wrote: When the arrays are initialized later on with -1, that's useless to use rzalloc_array(). Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6

[Mesa-dev] [PATCH 1/3] i965/vec4/gs: restore the uniform values which was overwritten by failed vec4_gs_visitor execution

2017-05-05 Thread Samuel Iglesias Gonsálvez
We are going to add a packing feature to reduce the usage of the push constant buffer. One of the consequences is that 'nr_params' would be modified by vec4_visitor's run call, so we need to restore it if one of them failed before executing the fallback ones. Same thing happens to the uniforms valu

[Mesa-dev] [PATCH 2/3] i965/vec4: fix swizzle and writemask when loading an uniform with constant offset

2017-05-05 Thread Samuel Iglesias Gonsálvez
It was setting XYWZ swizzle and writemask to all uniforms, no matter if they were a vector or scalar, so this can lead to problems when loading them to the push constant buffer. Moreover, 'shift' calculation was designed to calculate the offset in DWORDS, but it doesn't take into account DFs, so t

[Mesa-dev] [PATCH 3/3] i965/vec4: load dvec3/4 uniforms first in the push constant buffer

2017-05-05 Thread Samuel Iglesias Gonsálvez
Reorder the uniforms to load first the dvec4-aligned variables in the push constant buffer and then push the vec4-aligned ones. It takes into account that the relocated uniforms should be aligned to their channel size. This fixes a bug were the dvec3/4 might be loaded one part on a GRF and the res

Re: [Mesa-dev] [PATCH v3 04/32] glsl: make component_slots() returns 2 for samplers/images

2017-05-05 Thread Timothy Arceri
On 05/05/17 18:41, Samuel Pitoiset wrote: On 05/05/2017 10:29 AM, Timothy Arceri wrote: On 05/05/17 17:37, Samuel Pitoiset wrote: On 05/05/2017 02:18 AM, Timothy Arceri wrote: What happened with my suggestion [1]? Was there a problem? IMO this patch just hacks around the problem and as me

[Mesa-dev] [PATCH] i965: make emit_dwords non-static and reuse it in blorp

2017-05-05 Thread Emil Velikov
From: Emil Velikov Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/genX_blorp_exec.c | 6 + src/mesa/drivers/dri/i965/genX_state_upload.c | 32 +-- 3 files changed, 18 insertions(+), 21 deletions(-)

Re: [Mesa-dev] [PATCH 2/3] i965: Port 3DSTATE_VF to genxml and simplify the implementation.

2017-05-05 Thread Emil Velikov
On 4 May 2017 at 18:51, Kenneth Graunke wrote: > On Thursday, May 4, 2017 8:51:43 AM PDT Emil Velikov wrote: >> Hi Ken, >> >> On 4 May 2017 at 16:13, Kenneth Graunke wrote: >> >> > +#if GEN_IS_HASWELL || GEN_GEN >= 8 >> > +static void >> > +genX(upload_cut_index)(struct brw_context *brw) >> > +{

Re: [Mesa-dev] [PATCH 2/2] nir: add pass to lower atomic counters to SSBO

2017-05-05 Thread Rob Clark
On Fri, May 5, 2017 at 4:22 AM, Andres Gomez wrote: > Rob, I believe this is causing a linking failure in the Windows scons > build: > https://ci.appveyor.com/project/AndresGomez/mesa/build/321 > >Creating library build\windows-x86-debug\gallium\targets\osmesa\osmesa.lib > and object build\wi

[Mesa-dev] [Bug 100227] gl_marshal.py: generating duplicate declaration specifiers

2017-05-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100227 --- Comment #3 from Bartosz Tomczyk --- I agree with Gustaw, that it should be changed to "const GLvoid *const". Something like that should work(not tested): --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -1

Re: [Mesa-dev] [PATCH v2 12/27] auxiliary/vl: use vl_*_screen_create stubs when building w/o platform

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 10:30, Christian König wrote: > Am 04.05.2017 um 18:33 schrieb Emil Velikov: >> >> From: Emil Velikov >> >> Provide a dummy stub when the user has opted w/o said platform, thus >> we can build the binaries without unnecessarily requiring X11/other >> headers. >> >> In order to av

Re: [Mesa-dev] [PATCH v2 13/27] st/va: move variable declaration to where its used

2017-05-05 Thread Christian König
Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov ... and make it const, since we shouldn't tinker with it. Signed-off-by: Emil Velikov Reviewed-by: Nayan Deshmukh Patches #13 - #17 are Reviewed-by: Christian König , but I need to take a closer look at the rest. BTW: Can y

[Mesa-dev] [Bug 99116] Wine program showing only a blackscreen when using mesa

2017-05-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99116 --- Comment #10 from JL --- I tried to replay attachment in first post with mesa 17.0.5 (archlinux) and R9 285 and it shows only black unless I run it with "apitrace replay --sb wine.trace" which shows animation but in very fast speed. -- You a

[Mesa-dev] [PATCH] anv: Always set the reloc value to match the presumed_offset

2017-05-05 Thread Chris Wilson
It is a requirement, not just of using the NO_RELOC mode, that all relocation values in the execobjects match their reloc.presumed_offset, as the kernel will skip performing *any* relocation if the presumed_offset matches the target object. As anv is setting unknown relocations to -1 irrespective o

Re: [Mesa-dev] [PATCH v2 12/27] auxiliary/vl: use vl_*_screen_create stubs when building w/o platform

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 12:37, Christian König wrote: > Am 05.05.2017 um 13:23 schrieb Emil Velikov: >> >> On 5 May 2017 at 10:30, Christian König wrote: >>> >>> Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Provide a dummy stub when the user has opted w/o said pla

Re: [Mesa-dev] [PATCH v2 12/27] auxiliary/vl: use vl_*_screen_create stubs when building w/o platform

2017-05-05 Thread Christian König
Am 05.05.2017 um 13:23 schrieb Emil Velikov: On 5 May 2017 at 10:30, Christian König wrote: Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other

[Mesa-dev] [PATCH] radeonsi: fix build with GCC 4.8

2017-05-05 Thread Samuel Pitoiset
Fixes: 7088b655e8 ("radeonsi: constify a bunch of the perfcounter structs.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100937 Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeonsi/si_perfcounter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/galli

Re: [Mesa-dev] [PATCH v2 20/27] st/omx: add DRI3 support

2017-05-05 Thread Christian König
Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Cc: Christian König Signed-off-by: Emil Velikov --- UNTESTED. Looks sane to me, but what bothers me a bit is that it is untested. Leo do we (or QA) have a system somewhere where we could trow such things at and give them a tr

Re: [Mesa-dev] [PATCH v2 12/27] auxiliary/vl: use vl_*_screen_create stubs when building w/o platform

2017-05-05 Thread Christian König
Am 05.05.2017 um 14:11 schrieb Emil Velikov: On 5 May 2017 at 12:37, Christian König wrote: Am 05.05.2017 um 13:23 schrieb Emil Velikov: On 5 May 2017 at 10:30, Christian König wrote: Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Provide a dummy stub when the user has op

Re: [Mesa-dev] [PATCH 00/18] anv: Rework the allocation data structures

2017-05-05 Thread Mike Lothian
I'm seeing the following failure with GCC 7.1: /var/tmp/portage/media-libs/mesa-/work/mesa-/src/intel/vulkan/anv_allocator.c: In function ‘anv_state_stream_alloc’: /var/tmp/portage/media-libs/mesa-/work/mesa-/src/intel/vulkan/anv_allocator.c:930:28: error: ‘struct anv_state_stream_

Re: [Mesa-dev] [PATCH 2/7] egl: fold Android logger into main/

2017-05-05 Thread Emil Velikov
On 4 May 2017 at 20:17, Rob Herring wrote: > On Thu, May 4, 2017 at 1:46 PM, Emil Velikov wrote: >> From: Emil Velikov >> >> Will allow us to greatly simplify a lot of the code in egllog.c > > Okay, because on its own, this is not an improvement. > >> >> Signed-off-by: Emil Velikov >> --- >> s

[Mesa-dev] [PATCH 0/2] bin: honor editorconfig formatting

2017-05-05 Thread Andres Gomez
Just a series to correct the formating under bin/* Andres Gomez (2): bin/*sh: honor editorconfig formatting bin/*py: honor editorconfig formatting bin/bugzilla_mesa.sh | 14 - bin/get-extra-pick-list.sh | 48 ++-- bin/get-fixes-pick-list.sh | 78

[Mesa-dev] [PATCH 1/2] bin/*sh: honor editorconfig formatting

2017-05-05 Thread Andres Gomez
Signed-off-by: Andres Gomez --- bin/bugzilla_mesa.sh | 14 - bin/get-extra-pick-list.sh | 48 ++-- bin/get-fixes-pick-list.sh | 78 +++--- bin/get-pick-list.sh | 32 +-- bin/get-typod-pick-list.sh

[Mesa-dev] [PATCH 2/2] bin/*py: honor editorconfig formatting

2017-05-05 Thread Andres Gomez
Signed-off-by: Andres Gomez --- bin/perf-annotate-jit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/perf-annotate-jit.py b/bin/perf-annotate-jit.py index 746434008f..4f05585bd4 100755 --- a/bin/perf-annotate-jit.py +++ b/bin/perf-annotate-jit.py @@ -133,7 +133,7 @

[Mesa-dev] [PATCH] st/glsl_to_tgsi: make sure resource file for samplers is PROGRAM_SAMPLER

2017-05-05 Thread Samuel Pitoiset
Similar to how image resources are handled. That way we are sure that inst->resource.file is PROGRAM_SAMPLER for "bound" samplers. Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/

Re: [Mesa-dev] [PATCH 1/2] bin/*sh: honor editorconfig formatting

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 14:09, Andres Gomez wrote: > Signed-off-by: Andres Gomez > --- > bin/bugzilla_mesa.sh | 14 - > bin/get-extra-pick-list.sh | 48 ++-- > bin/get-fixes-pick-list.sh | 78 > +++--- > bin/get-pick-list.sh

[Mesa-dev] [PATCH RFC 0/4] Don't lose speed with dri3 on virtual drivers

2017-05-05 Thread Thomas Hellstrom
With dri3 and certain levels of dri2, the glx-dri layer automatically turn on some GLX extensions whose functionality is mostly emulated on virtual drivers. This causes a performance loss and increased latency. Two such examples are GLX_EXT_buffer_age and GLX_OML_sync_control. We'd like the ability

[Mesa-dev] [PATCH RFC 1/4] st/dri: Allow dri users to query also driver options

2017-05-05 Thread Thomas Hellstrom
There will be situations where we want to control, for example, the GLX behaviour based on applications and drivers. So allow DRI users access to the driver options. Signed-off-by: Thomas Hellstrom --- src/gallium/state_trackers/dri/dri2.c | 65 ++- 1 file changed

[Mesa-dev] [PATCH RFC 4/4] dri: Turn of a couple of glx extensions for gnome-shell on vmwgfx.

2017-05-05 Thread Thomas Hellstrom
Increases performance on vmwgfx since we're avoiding full buffer damage and since we can't sync to vertical retrace anyway. Signed-off-by: Thomas Hellstrom --- src/mesa/drivers/dri/common/drirc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/common/drirc b/src/me

[Mesa-dev] [PATCH RFC 3/4] st/dri: Allow gallium drivers to turn off two GLX extensions

2017-05-05 Thread Thomas Hellstrom
Allow gallium drivers to turn off GLX_EXT_buffer_age and GLX_OML_sync_control if needed, using driconf. Signed-off-by: Thomas Hellstrom --- include/GL/internal/dri_interface.h | 4 +++- src/gallium/state_trackers/dri/dri_screen.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) d

[Mesa-dev] [PATCH RFC 2/4] dri: Optionally turn off a couple of GLX extensions based on driconf options

2017-05-05 Thread Thomas Hellstrom
With GLX_EXT_buffer_age turned on, gnome-shell will use full-screen damage with GLX, which severely hurts performance with architectures that emulate page-flips with copies. Like vmware. We would like to be able to turn off that extension. Similarly, typically the GLX_OML_sync_control doesn't make

Re: [Mesa-dev] [PATCH 6/7] egl: drop unneeded sentinel from level_strings[]

2017-05-05 Thread Eric Engestrom
On 4 May 2017 22:26:28 BST, Bartosz Tomczyk wrote: >It should be: > >i < ARRAY_SIZE(level_strings) > Indeed :) With this, the series is Reviewed-by: Eric Engestrom Cheers, Eric > >On 04.05.2017 20:47, Emil Velikov wrote: >> From: Emil Velikov >> >> The array is local so we already know i

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: make sure resource file for samplers is PROGRAM_SAMPLER

2017-05-05 Thread Ilia Mirkin
On May 5, 2017 9:36 AM, "Samuel Pitoiset" wrote: Similar to how image resources are handled. That way we are sure that inst->resource.file is PROGRAM_SAMPLER for "bound" samplers. Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 +- 1 file chan

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: make sure resource file for samplers is PROGRAM_SAMPLER

2017-05-05 Thread Samuel Pitoiset
On 05/05/2017 04:35 PM, Ilia Mirkin wrote: On May 5, 2017 9:36 AM, "Samuel Pitoiset" > wrote: Similar to how image resources are handled. That way we are sure that inst->resource.file is PROGRAM_SAMPLER for "bound" samplers. Signed-off-by: Samu

Re: [Mesa-dev] [PATCH RFC 3/4] st/dri: Allow gallium drivers to turn off two GLX extensions

2017-05-05 Thread Thomas Hellstrom
On 05/05/2017 04:02 PM, Thomas Hellstrom wrote: > Allow gallium drivers to turn off GLX_EXT_buffer_age and > GLX_OML_sync_control if needed, using driconf. > > Signed-off-by: Thomas Hellstrom > --- > include/GL/internal/dri_interface.h | 4 +++- > src/gallium/state_trackers/dri/dri_screen

[Mesa-dev] [PATCH v2 1/2] bin: use tabs for coding style on *.sh files

2017-05-05 Thread Andres Gomez
v2: Instead of changing *.sh, adapt the editorconfig file (Emil). Signed-off-by: Andres Gomez --- bin/.editorconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/.editorconfig b/bin/.editorconfig index b9a948f405..ef92655823 100644 --- a/bin/.editorconfig +++ b/bin/.e

[Mesa-dev] [PATCH] radeonsi: apply the tess+GS hang workaround to Polaris12 as well

2017-05-05 Thread Marek Olšák
From: Marek Olšák Cc: 17.1 --- src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index e6a9ee0..5f1371a 100644 --- a/src/gallium/drivers/

Re: [Mesa-dev] [PATCH] gallivm: Make sure module has the correct data layout when pass manager runs

2017-05-05 Thread Roland Scheidegger
Makes sense to me. Reviewed-by: Roland Scheidegger Am 05.05.2017 um 03:25 schrieb Tom Stellard: > The datalayout for modules was purposely not being set in order to work around > the fact that the ExecutionEngine requires that the module's datalayout > matches the datalayout of the TargetMachine

Re: [Mesa-dev] [PATCH] gallivm: Make sure module has the correct data layout when pass manager runs

2017-05-05 Thread Jose Fonseca
Same here. Reviewed-by: Jose Fonseca On 05/05/17 16:16, Roland Scheidegger wrote: Makes sense to me. Reviewed-by: Roland Scheidegger Am 05.05.2017 um 03:25 schrieb Tom Stellard: The datalayout for modules was purposely not being set in order to work around the fact that the ExecutionEngine

Re: [Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-05-05 Thread Emil Velikov
On 4 May 2017 at 17:27, Kristian Høgsberg wrote: > On Thu, May 4, 2017 at 7:26 AM, Emil Velikov wrote: >> On 27 April 2017 at 16:20, Eric Anholt wrote: >>> Emil Velikov writes: >>> On 25 April 2017 at 23:56, Lionel Landwerlin wrote: > Hi, > > While working with changes th

Re: [Mesa-dev] [PATCH 2/2] nir: add pass to lower atomic counters to SSBO

2017-05-05 Thread Jose Fonseca
On 05/05/17 12:07, Rob Clark wrote: On Fri, May 5, 2017 at 4:22 AM, Andres Gomez wrote: Rob, I believe this is causing a linking failure in the Windows scons build: https://ci.appveyor.com/project/AndresGomez/mesa/build/321 Creating library build\windows-x86-debug\gallium\targets\osmesa\osm

Re: [Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-05-05 Thread Emil Velikov
On 4 May 2017 at 21:56, Jason Ekstrand wrote: > On Thu, May 4, 2017 at 12:21 PM, Kristian Høgsberg > wrote: >> >> On Thu, May 4, 2017 at 11:43 AM, Lionel Landwerlin >> wrote: >> > On 04/05/17 07:52, Emil Velikov wrote: >> >> >> >> On 4 May 2017 at 14:46, Daniel Vetter wrote: >> >>> >> >>> On Th

[Mesa-dev] [PATCH v3 1/4] dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety

2017-05-05 Thread Gregory Hainaut
DRI-drivers could call Xlib functions, for example to allocate a new back buffer. When glthread is enabled, the driver runs mostly on a separate thread. Therefore we need to guarantee the thread safety between libX11 calls from the applications (not aware of the extra thread) and the ones from the

[Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread Gregory Hainaut
Hello Mesa developers, Following the discussion from https://lists.freedesktop.org/archives/mesa-dev/2017-April/153137.html A check was added to ensure that X11 display can be locked. It should be enough to ensure thread safety between X11 and glthread. I also did the check on DRI3 as I'm not 10

[Mesa-dev] [PATCH v3 4/4] glthread/gallium: require safe_glthread to start glthread

2017-05-05 Thread Gregory Hainaut
Print an error message for the user if the requirement isn't met, or we're not thread safe. v2: based on Nicolai feedbacks Check the DRI extension version v3: based on Emil feedbacks improve commit and error messages. use backgroundCallable variable to improve readability Signed-off-by: Gregory H

[Mesa-dev] [PATCH v3 3/4] egl: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-05 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Include X11/Xlibint.h protected by ifdef Signed-off-by: Gregory Hainaut --- src/egl/drivers/dri2/egl_dri2.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/egl/drive

[Mesa-dev] [PATCH v3 2/4] glx: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-05 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Signed-off-by: Gregory Hainaut --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 15 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx

Re: [Mesa-dev] [PATCH] radeonsi: apply the tess+GS hang workaround to Polaris12 as well

2017-05-05 Thread Alex Deucher
On Fri, May 5, 2017 at 11:14 AM, Marek Olšák wrote: > From: Marek Olšák > > Cc: 17.1 Reviewed-by: Alex Deucher > --- > src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c > b/src

Re: [Mesa-dev] [PATCH] radeonsi: fix build with GCC 4.8

2017-05-05 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, May 5, 2017 at 2:15 PM, Samuel Pitoiset wrote: > Fixes: 7088b655e8 ("radeonsi: constify a bunch of the perfcounter structs.") > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100937 > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/rad

Re: [Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

2017-05-05 Thread Emil Velikov
On 4 May 2017 at 19:43, Lionel Landwerlin wrote: > On 04/05/17 07:52, Emil Velikov wrote: >> >> On 4 May 2017 at 14:46, Daniel Vetter wrote: >>> >>> On Thu, Apr 27, 2017 at 10:58:42AM -0700, Lionel Landwerlin wrote: On 27/04/17 08:20, Eric Anholt wrote: > > Emil Velikov writes:

Re: [Mesa-dev] [PATCH v03 35/38] i965: Port gen4+ emit vertices code to genxml.

2017-05-05 Thread Rafael Antognolli
On Fri, May 05, 2017 at 08:38:53AM +0300, Pohjolainen, Topi wrote: > On Thu, May 04, 2017 at 12:16:53PM -0700, Rafael Antognolli wrote: > > On Thu, May 04, 2017 at 11:19:24AM +0300, Pohjolainen, Topi wrote: > > > On Mon, May 01, 2017 at 06:43:23PM -0700, Rafael Antognolli wrote: > > > > Some code t

Re: [Mesa-dev] [PATCH] i965: make emit_dwords non-static and reuse it in blorp

2017-05-05 Thread Rafael Antognolli
On Fri, May 05, 2017 at 11:47:09AM +0100, Emil Velikov wrote: > From: Emil Velikov > > Signed-off-by: Emil Velikov > --- > src/mesa/drivers/dri/i965/brw_state.h | 1 + > src/mesa/drivers/dri/i965/genX_blorp_exec.c | 6 + > src/mesa/drivers/dri/i965/genX_state_upload.c | 32 > ++

[Mesa-dev] [Bug 100928] exported opengl function in generated dll was mangled when building with msvc 2015 Update 3

2017-05-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100928 --- Comment #2 from George Kyriazis --- There seems to be multiple issues here. First of all, swr driver is not buildable with machine=x86 (only compile with 64-bit builds). I don't understand how you managed to build a 32-bit swr driver. Sec

[Mesa-dev] [PATCH] Revert "mesa: Require mipmap completeness for glCopyImageSubData(), sometimes."

2017-05-05 Thread Kenneth Graunke
This reverts commit c5bf7cb52942cb7df9f5d73746ffbf3c102d12cc. This broke rendering in "Total War: WARHAMMER", which uses a single level RGBA_UINT32 texture and the default filter modes of GL_LINEAR and GL_NEAREST_MIPMAP_LINEAR. However, the texture max level is 0, so it is actually mipmap complet

Re: [Mesa-dev] [PATCH v4 21/31] glsl: allow bindless samplers/images to be l-values

2017-05-05 Thread Nicolai Hähnle
On 05.05.2017 09:34, Samuel Pitoiset wrote: From section 4.1.7 of the ARB_bindless_texture spec: "Samplers can be used as l-values, so can be assigned into and used as "out" and "inout" function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images can be used as l

Re: [Mesa-dev] [PATCH v2 1/2] i965: Use helper function for modifier -> tiling

2017-05-05 Thread Daniel Stone
Hi Emil, On 4 May 2017 at 15:14, Emil Velikov wrote: > On 4 May 2017 at 14:43, Daniel Stone wrote: >> IOW, there is no change as far as I can see, but perhaps for the >> meantime, we could use an unreachable() at the bottom of >> modifier_to_tiling(). Would that help? >> > Yes the default statem

[Mesa-dev] [AppVeyor] mesa master #4271 failed

2017-05-05 Thread AppVeyor
Build mesa 4271 failed Commit 8b8af19065 by Daniel Stone on 5/3/2017 8:38 AM: i965: Set modifier for imported and duplicated images\n\nWhen a buffer is being created from FD or GEM flink import, the current\nAPI makes no provision for passing modifier informati

Re: [Mesa-dev] [PATCH] radeonsi: apply the tess+GS hang workaround to Polaris12 as well

2017-05-05 Thread Nicolai Hähnle
On 05.05.2017 17:14, Marek Olšák wrote: From: Marek Olšák Cc: 17.1 Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeo

Re: [Mesa-dev] [PATCH 4/4] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-05 Thread Daniel Stone
Hi Emil, On 4 May 2017 at 13:21, Emil Velikov wrote: >> + struct wl_drm * drm_wrapper; >> > Based on a quick skim 3/4 aligns with commit > 36b9976e1f99e8070c67cb8a255793939db77d02. > At the same time we don't seem to have a drm_wrapper in egl/wayland - > is that int

[Mesa-dev] [Bug 100690] [Regression, bisected] TotalWar: Warhammer corrupted graphics

2017-05-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100690 Kenneth Graunke changed: What|Removed |Added Assignee|mesa-dev@lists.freedesktop. |kenn...@whitecape.org

[Mesa-dev] [PATCH v2 1/6] vulkan: Fix Wayland uninitialised registry

2017-05-05 Thread Daniel Stone
Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_common_wayland.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vu

[Mesa-dev] [PATCH v2 4/6] vulkan/wsi/wayland: Use proxy wrappers for swapchain

2017-05-05 Thread Daniel Stone
Though most swapchain operations used a queue, they were racy in that the object was created with the queue only set later, meaning that its event could potentially be dispatched from the default queue in between these two steps. Use proxy wrappers to avoid this race, also assigning wl_buffers cre

[Mesa-dev] [PATCH v2 2/6] vulkan/wsi/wayland: Remove roundtrip when creating image

2017-05-05 Thread Daniel Stone
There's no need to call wl_display_roundtrip() after trying to create a buffer through wl_drm; if it succeeds then everything is fine, and if it fails, then we get a fatal protocol error so can't recover anyway. Additionally, doing a roundtrip on the default / main application queue, is destructiv

[Mesa-dev] [PATCH v2 3/6] vulkan/wsi/wayland: Use per-display event queue

2017-05-05 Thread Daniel Stone
Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.org --- src/vulkan/wsi/wsi_

[Mesa-dev] [PATCH v2 6/6] egl/wayland: Use per-surface event queues

2017-05-05 Thread Daniel Stone
During display initialisation, we need a separate event queue to handle the registry events, which is correctly handled. But we also need separate per-surface event queues to handle swapchain-related events, such as surface frame events and buffer release events. This avoids two surfaces from the s

[Mesa-dev] [PATCH v2 5/6] egl/wayland: Don't open-code roundtrip

2017-05-05 Thread Daniel Stone
wl_display_roundtrip_queue() exists and can replace roundtrip(). Signed-off-by: Daniel Stone Cc: mesa-sta...@lists.freedesktop.lrg --- src/egl/drivers/dri2/platform_wayland.c | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/egl/drivers/dri2/platf

[Mesa-dev] [PATCH v2 0/6] Wayland proxy wrapper fixes

2017-05-05 Thread Daniel Stone
Hi, This series uses proxy wrappers and separate event queues through the Wayland WSI and EGL implementations. EGL already had a partial fix in that it had a per-display event queue, but this was not enough to protect multiple surfaces on a single display being used simultaneously. WSI had a per-sw

Re: [Mesa-dev] [AppVeyor] mesa master #4271 failed

2017-05-05 Thread Daniel Stone
Hi, On 5 May 2017 at 17:38, AppVeyor wrote: > Build mesa 4271 failed > > Commit 8b8af19065 by Daniel Stone on 5/3/2017 8:38 AM: > i965: Set modifier for imported and duplicated images [...] I was worried I'd broken the build, but I'm going to claim this isn't my fault: Linking build\windows-x86-

Re: [Mesa-dev] [AppVeyor] mesa master #4271 failed

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 17:51, Daniel Stone wrote: > Hi, > > On 5 May 2017 at 17:38, AppVeyor wrote: >> Build mesa 4271 failed >> >> Commit 8b8af19065 by Daniel Stone on 5/3/2017 8:38 AM: >> i965: Set modifier for imported and duplicated images [...] > > I was worried I'd broken the build, but I'm going

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
On Fri, 5 May 2017 17:45:01 +0200 Axel Davy wrote: > Hi, > > There should be very few X11 calls while rendering (basically only at > the beginning or end of a frame). > > Why not just always run these calls in the main thread (and wait for > glthread work to finish) ? > > That's basically wh

Re: [Mesa-dev] [PATCH v2 20/27] st/omx: add DRI3 support

2017-05-05 Thread Leo Liu
On 05/05/2017 07:45 AM, Christian König wrote: Am 04.05.2017 um 18:33 schrieb Emil Velikov: From: Emil Velikov Cc: Christian König Signed-off-by: Emil Velikov --- UNTESTED. Looks sane to me, but what bothers me a bit is that it is untested. Leo do we (or QA) have a system somewhere wher

Re: [Mesa-dev] [PATCH 1/3] mesa: Simplify _mesa_primitive_restart_index().

2017-05-05 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, May 4, 2017 at 5:13 PM, Kenneth Graunke wrote: > We can use a simple shift equation rather than a switch statement. > --- > src/mesa/main/varray.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/src/mesa/main/varray.

Re: [Mesa-dev] [PATCH 1/3] mesa: Simplify _mesa_primitive_restart_index().

2017-05-05 Thread Marek Olšák
Since the function is so small, perhaps it would make sense to move it into a header file. Marek On Fri, May 5, 2017 at 7:06 PM, Marek Olšák wrote: > Reviewed-by: Marek Olšák > > Marek > > On Thu, May 4, 2017 at 5:13 PM, Kenneth Graunke wrote: >> We can use a simple shift equation rather than

Re: [Mesa-dev] [PATCH] i965: make emit_dwords non-static and reuse it in blorp

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 17:20, Rafael Antognolli wrote: > On Fri, May 05, 2017 at 11:47:09AM +0100, Emil Velikov wrote: >> From: Emil Velikov >> >> Signed-off-by: Emil Velikov >> --- >> src/mesa/drivers/dri/i965/brw_state.h | 1 + >> src/mesa/drivers/dri/i965/genX_blorp_exec.c | 6 + >>

Re: [Mesa-dev] [PATCH 7/8] android: support creating texture from gralloc buffer

2017-05-05 Thread Rob Herring
On Mon, May 1, 2017 at 9:55 AM, Tomasz Figa wrote: > On Mon, May 1, 2017 at 11:17 PM, Mauro Rossi wrote: >> Hi all, >> >> another try to merge android swrast patches in mesa 17.1 or mesa-dev >> if they are somehow considered useful for android. I would really like to, but all my attempts at gett

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 17:58, gregory hainaut wrote: > On Fri, 5 May 2017 17:45:01 +0200 > Axel Davy wrote: > >> Hi, >> >> There should be very few X11 calls while rendering (basically only at >> the beginning or end of a frame). >> >> Why not just always run these calls in the main thread (and wait fo

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
On Fri, 5 May 2017 18:17:22 +0100 Emil Velikov wrote: > On 5 May 2017 at 17:58, gregory hainaut wrote: > > On Fri, 5 May 2017 17:45:01 +0200 > > Axel Davy wrote: > > > [...] > > > > Hello Axel, > > > > Yes it is another possibility. It would requires to track gl calls that end > > up in X

Re: [Mesa-dev] [PATCH 2/2] radeonsi: get rid of secondary input/output word

2017-05-05 Thread Marek Olšák
Hi Nicolai, This might break Nine, because it uses GENERIC indices greater than 31. The idea is that we support 32, but allow indices up to 60 as long as the number of declared varyings is <= 32. Axel can probably answer which maximum GENERIC index we can normally expect. Marek On Wed, May 3, 2

Re: [Mesa-dev] [PATCH 1/2] radeonsi: split per-patch from per-vertex indices

2017-05-05 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Wed, May 3, 2017 at 3:54 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > Make it a bit clearer that the index spaces are logically seperate by > having them defined in different functions. > --- > src/gallium/drivers/radeonsi/si_shader.c| 56 > +

  1   2   >