Re: [Mesa-dev] [Mesa-stable] [PATCH 2/3] i965/vec4: fix register width for DF VGRF and UNIFORM

2017-05-02 Thread Samuel Iglesias Gonsálvez
On Mon, 2017-05-01 at 14:55 +0200, Samuel Iglesias Gonsálvez wrote: > El Viernes, 28 de abril de 2017 16:27:56 Francisco Jerez escribió: > > Samuel Iglesias Gonsálvez writes: > > > On gen7, the swizzles used in DF align16 instructions works for > > > element > > > size of 32 bits, so we can addres

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Emil Velikov
Hi Rafael, On 2 May 2017 at 02:43, Rafael Antognolli wrote: > We need to use some enums inside genX_state_upload.c, but including the > whole header will cause several conflicts between things defined in this > header and the genxml auto-generated headers. > > So create a separate header that is

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 09:32, Emil Velikov wrote: > Hi Rafael, > > On 2 May 2017 at 02:43, Rafael Antognolli wrote: >> We need to use some enums inside genX_state_upload.c, but including the >> whole header will cause several conflicts between things defined in this >> header and the genxml auto-genera

Re: [Mesa-dev] [PATCH] radv/wsi: report presentation error per image request

2017-05-02 Thread Daniel Stone
On 2 May 2017 at 04:41, Dave Airlie wrote: > This ports > 0fcb92c17dee681bd39c08ddf0abc358a27337c7 > anv: wsi: report presentation error per image request > > This fixes: > dEQP-VK.wsi.xlib.incremental_present.scale_none.* Reviewed-by: Daniel Stone ___

Re: [Mesa-dev] [PATCH 1/3] mapi: replace mapi_table abstraction

2017-05-02 Thread Eric Engestrom
On Friday, 2017-04-28 13:15:19 +0100, Emil Velikov wrote: > From: Emil Velikov > > Replace all instances of mapi_table with the actual struct _glapi_table. > The former may have been needed when the OpenVG was around. But since > that one is long gone, there' no point in having the current confus

Re: [Mesa-dev] [PATCH 1/2] glapi: add KHR_no_error support to dispatch table generation

2017-05-02 Thread Timothy Arceri
Ping. Any thoughts/comments on this approach? On 27/04/17 15:33, Timothy Arceri wrote: This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. --- src/mapi/glapi/gen/gl_XML.py | 5 +

Re: [Mesa-dev] [PATCH] c11/threads: rework Windows thrd_current() comment

2017-05-02 Thread Eric Engestrom
On Saturday, 2017-04-29 14:51:15 +0100, Emil Velikov wrote: > From: Emil Velikov > > Drop the misleading "will not match the one returned by thread_create" > hunk and provide more clarity as to what/why GetCurrentThread() isn't > the solution we're looking for. > > Cc: José Fonseca > Signed-off

[Mesa-dev] [PATCH] mesa/vbo: reduce prim array size

2017-05-02 Thread Bartosz Tomczyk
We always use only single element. --- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 15382eaaae..cbef610d96 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_

Re: [Mesa-dev] [PATCH 1/2] glapi: add KHR_no_error support to dispatch table generation

2017-05-02 Thread Nicolai Hähnle
On 27.04.2017 07:33, Timothy Arceri wrote: This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. --- src/mapi/glapi/gen/gl_XML.py | 5 + src/mapi/glapi/gen/gl_genexec.py | 19 +++

Re: [Mesa-dev] [PATCH 2/2] mesa/varray: make use of dispatch KHR_no_error support

2017-05-02 Thread Nicolai Hähnle
I like it! Reviewed-by: Nicolai Hähnle On 27.04.2017 07:33, Timothy Arceri wrote: Make use of dispatch KHR_no_error support for varray functions. --- src/mapi/glapi/gen/ARB_vertex_attrib_64bit.xml | 2 +- src/mapi/glapi/gen/GL3x.xml| 3 +- src/mapi/glapi/gen/es_EXT.xml

Re: [Mesa-dev] [PATCH 06/17] st/mesa: unify TCS, TES, GS st_*_program structures

2017-05-02 Thread Emil Velikov
Hi Marek, Nice work. Small question - have you considered subclassing st_{vp,fp,cp}_program around st_common_program? It should allow us to remove even more code :-) -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedeskt

[Mesa-dev] [PATCH 1/4] common: Check for extensions before resolving symbols

2017-05-02 Thread Daniel Stone
eglGetProcAddress is allowed to return any old garbage for symbols it doesn't know about. To avoid any mishaps, check for the appropriate extension presence (split into EGL client extension, EGL display extension, and GL extension, checks) before we look up any symbols through it. The walk through

[Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Daniel Stone
... Signed-off-by: Daniel Stone --- drm-atomic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drm-atomic.c b/drm-atomic.c index 25e04b1..6fb40fd 100644 --- a/drm-atomic.c +++ b/drm-atomic.c @@ -368,6 +368,9 @@ const struct drm * init_drm_atomic(const char *device) drm.crtc = ca

[Mesa-dev] [PATCH 3/4] atomic: Duplicate fence before SwapBuffers

2017-05-02 Thread Daniel Stone
Duplicating the fence before we flush means that the implementation can know that the fence needs to be CPU-visible. After flush it may be too late. Signed-off-by: Daniel Stone --- drm-atomic.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drm-atomic.c b/drm-atomic.

[Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Daniel Stone
Atomic does not let us have multiple requests in flight at once; if we don't synchronise with the request completion on the CPU side, we can get -EBUSY from the atomic commit. We already have everything required to do this, namely the out-fence from the last commit. Block on that with a CPU-side w

[Mesa-dev] [PATCH 0/4] kmscube atomic fixups

2017-05-02 Thread Daniel Stone
Hi, These four patches get kmscube -A working for me on Skylake. Probably the kicker is #4, though #2 does seem to be necessary. I'm not sure if #3 is perfectly correct for all drivers; I think Intel will still work duplicating after the fence, at the cost of creating an extra batch to fence on. #

Re: [Mesa-dev] [PATCH 0/4] kmscube atomic fixups

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 11:52, Daniel Stone wrote: > These four patches get kmscube -A working for me on Skylake. Probably > the kicker is #4, though #2 does seem to be necessary. I'm not sure if > #3 is perfectly correct for all drivers; I think Intel will still work > duplicating after the fence,

Re: [Mesa-dev] [PATCH 3/3] ac: eliminate duplicated VS exports

2017-05-02 Thread Nicolai Hähnle
On 02.05.2017 08:18, Dave Airlie wrote: On 1 May 2017 at 22:43, Marek Olšák wrote: From: Marek Olšák Only very few shaders have them (from 48486 shaders): For the series: Reviewed-by: Dave Airlie (you might want to stop radeonsi running this pass on tess ctrl if you haven't already). T

Re: [Mesa-dev] [PATCH] mesa/vbo: reduce prim array size

2017-05-02 Thread Nicolai Hähnle
On 02.05.2017 12:37, Bartosz Tomczyk wrote: We always use only single element. Can you just change prim to not be an array at all in that case? Thanks, Nicolai --- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_ar

Re: [Mesa-dev] [PATCH] mesa/vbo: reduce prim array size

2017-05-02 Thread Bartosz Tomczyk
Sure, I will send updated patch soon. On 02.05.2017 13:03, Nicolai Hähnle wrote: On 02.05.2017 12:37, Bartosz Tomczyk wrote: We always use only single element. Can you just change prim to not be an array at all in that case? Thanks, Nicolai --- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 1

[Mesa-dev] [PATCH v2] mesa/vbo: reduce prim array size

2017-05-02 Thread Bartosz Tomczyk
We always use only single element. v2: Change signle element arrays to variables --- src/mesa/vbo/vbo_exec_array.c | 74 +-- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index

Re: [Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Chris Wilson
On Tue, May 02, 2017 at 11:52:07AM +0100, Daniel Stone wrote: > Atomic does not let us have multiple requests in flight at once; if we > don't synchronise with the request completion on the CPU side, we can > get -EBUSY from the atomic commit. > > We already have everything required to do this, na

Re: [Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 12:31, Chris Wilson wrote: > On Tue, May 02, 2017 at 11:52:07AM +0100, Daniel Stone wrote: >> + /* Wait on the CPU side for the _previous_ commit to >> + * complete before we post the flip through KMS, as >> + * at

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

2017-05-02 Thread Emil Velikov
On 1 May 2017 at 15:55, 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. >> >> Mauro >> >> >> 2017-01-20 20:17 GMT+01:00 Mauro Rossi

Re: [Mesa-dev] [PATCH 2/4] atomic: Use CPU-side KMS fence synchronisation

2017-05-02 Thread Chris Wilson
On Tue, May 02, 2017 at 12:34:44PM +0100, Daniel Stone wrote: > Hi, > > On 2 May 2017 at 12:31, Chris Wilson wrote: > > On Tue, May 02, 2017 at 11:52:07AM +0100, Daniel Stone wrote: > >> + /* Wait on the CPU side for the _previous_ commit to > >> + * compl

[Mesa-dev] [PATCH v2 1/2] dri_interface.h: define __DRI_ATTRIB_MAX

2017-05-02 Thread Emil Velikov
From: Emil Velikov Thus we can use the value to explicitly size arrays, instead of __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1. The latter seems magical and is error prone, as we add more dri attributes. v2: Fix off by one error (Tomasz) Cc: Tomasz Figa Signed-off-by: Emil Velikov --- Patch 2/

Re: [Mesa-dev] [PATCH 02/11] i965: Pass pointer and end of assembly to brw_validate_instructions

2017-05-02 Thread Iago Toral
On Mon, 2017-05-01 at 13:54 -0700, Matt Turner wrote: > This will allow us to more easily run brw_validate_instructions() on > shader programs we find in GPU hang error states. > --- >  src/intel/compiler/brw_eu.h   |  3 ++- >  src/intel/compiler/brw_eu_validate.c  | 10 -- >

Re: [Mesa-dev] [PATCH 06/17] st/mesa: unify TCS, TES, GS st_*_program structures

2017-05-02 Thread Gustaw Smolarczyk
2017-05-01 14:52 GMT+02:00 Marek Olšák : > From: Marek Olšák SNIP > > /** > * Derived from Mesa gl_program: > */ > -struct st_geometry_program > +struct st_common_program > { > struct gl_program Base; /**< The Mesa geometry program */ I think you should remove the word "geometry" fro

Re: [Mesa-dev] [PATCH 09/11] intel/tools: Refactor gen_disasm_disassemble() to use annotations

2017-05-02 Thread Iago Toral
On Mon, 2017-05-01 at 13:54 -0700, Matt Turner wrote: > Which will allow us to print validation errors found in shader > assembly > in GPU hang error states. > --- >  src/intel/tools/disasm.c | 71 +- > -- >  1 file changed, 43 insertions(+), 28 deletions(

Re: [Mesa-dev] [PATCH 00/11] i965: Shader programs in the error state

2017-05-02 Thread Iago Toral
I made a comment in patch 2 that I think needs to be fixed. With that fixed patches 2, 3 and 8 are: Reviewed-by: Iago Toral Quiroga I also dropped a comment in patch 9 mostly to double-check that there are no shenanigans with the annotation counts, in which case you can add my Rb to that as well

Re: [Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 11:52, Daniel Stone wrote: > ... > > Signed-off-by: Daniel Stone > --- > drm-atomic.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drm-atomic.c b/drm-atomic.c > index 25e04b1..6fb40fd 100644 > --- a/drm-atomic.c > +++ b/drm-atomic.c > @@ -368,6 +368,9 @@ const str

[Mesa-dev] [PATCH kmscube 2/2] gst-decoder.c: assert if GST_VIDEO_INFO_N_PLANES returns too many planes

2017-05-02 Thread Emil Velikov
From: Emil Velikov Assert in the very unlikely case when GST_VIDEO_INFO_N_PLANES returns more than MAX_NUM_PLANES. Otherwise we'll get random memory corruption. Signed-off-by: Emil Velikov --- gst-decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-decoder.c b/gst-decoder.c ind

[Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: set EGL_DMA_BUF attributes upon variable declaration

2017-05-02 Thread Emil Velikov
From: Emil Velikov Makes the code shorter and more explicit. Cc: Carlos Rafael Giani Signed-off-by: Emil Velikov --- Worth moving the plane[i] bits as well? The loop guard for the close() looks a big funky. Carlos, care to throw a comment why it's using nmem and not something else - say is_d

Re: [Mesa-dev] [PATCH v3 00/13] anv: Implement VK_KHX_multiview

2017-05-02 Thread Jason Ekstrand
Iago, I'm still missing reviews on one or two of the patches here. Mind giving them a quick look? --Jason On April 27, 2017 9:31:55 AM Jason Ekstrand wrote: This is mostly a re-send of my earlier patches but there are a few changes. I think, at this point, that I'm ready to merge it assu

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

2017-05-02 Thread Jason Ekstrand
Juan, Were you planning to review the rest of the series? Just wondering. --Jason On April 26, 2017 7:35:29 AM Jason Ekstrand wrote: This absurdly long series does something fairly simple: It pulls the block_pool into the state_pool and makes the state pool capable of allocating states la

Re: [Mesa-dev] [PATCH kmscube 3/4] atomic: Duplicate fence before SwapBuffers

2017-05-02 Thread Rob Clark
On Tue, May 2, 2017 at 6:52 AM, Daniel Stone wrote: > Duplicating the fence before we flush means that the implementation can > know that the fence needs to be CPU-visible. After flush it may be too > late. I think this is papering over an i965 bug.. in fact doing the DupNativeFenceFD could trigg

Re: [Mesa-dev] [PATCH kmscube 3/4] atomic: Duplicate fence before SwapBuffers

2017-05-02 Thread Daniel Stone
Hi, On 2 May 2017 at 14:49, Rob Clark wrote: > I think this is papering over an i965 bug.. in fact doing the > DupNativeFenceFD could trigger a flush which you don't actually want > on a tiler. Well, when it's immediately before SwapBuffers, I don't think it matters that much. :P > The correspo

Re: [Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: set EGL_DMA_BUF attributes upon variable declaration

2017-05-02 Thread Rob Clark
On Tue, May 2, 2017 at 9:32 AM, Emil Velikov wrote: > From: Emil Velikov > > Makes the code shorter and more explicit. > > Cc: Carlos Rafael Giani > Signed-off-by: Emil Velikov > --- > Worth moving the plane[i] bits as well? > > The loop guard for the close() looks a big funky. > > Carlos, care

Re: [Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Daniel Stone
Hey Emil, On 2 May 2017 at 14:24, Emil Velikov wrote: > Seems to be the correct place to handle here, despite that both are > already handled. Honestly, I wouldn't have written this patch if I knew that; Lucas's fix came in after the last time I'd pulled, and I didn't notice since I didn't hit a

[Mesa-dev] [PATCH kmscube] atomic: Use normal rendering loop for modeset

2017-05-02 Thread Daniel Stone
The initial pattern of: initial_modeset(); while (1) { pageflip(); } was relying on getting a buffer despite not having rendered anything. It would also show undefined content. Replace this with just using the pageflip loop for the initial modeset as well. Signed-off-by: Danie

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Rafael Antognolli
On Tue, May 02, 2017 at 09:38:53AM +0100, Emil Velikov wrote: > On 2 May 2017 at 09:32, Emil Velikov wrote: > > Hi Rafael, > > > > On 2 May 2017 at 02:43, Rafael Antognolli > > wrote: > >> We need to use some enums inside genX_state_upload.c, but including the > >> whole header will cause severa

[Mesa-dev] [PATCH 2/2] radeonsi/gfx9: fix gl_ViewportIndex

2017-05-02 Thread Marek Olšák
From: Marek Olšák Cc: 17.1 --- src/gallium/drivers/radeonsi/si_shader.c| 43 + src/gallium/drivers/radeonsi/si_state_shaders.c | 13 ++-- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/d

[Mesa-dev] [PATCH 1/2] radeonsi/gfx9: set VGT_REUSE_OFF = 0

2017-05-02 Thread Marek Olšák
From: Marek Olšák same as Vulkan --- src/gallium/drivers/radeonsi/si_state.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f50855d..00f1958 100644 --- a/src/gallium/drivers/r

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Jason Ekstrand
On Mon, May 1, 2017 at 6:43 PM, Rafael Antognolli < rafael.antogno...@intel.com> wrote: > We need to use some enums inside genX_state_upload.c, but including the > whole header will cause several conflicts between things defined in this > header and the genxml auto-generated headers. > > So create

Re: [Mesa-dev] [PATCH v2] mesa/vbo: reduce prim array size

2017-05-02 Thread Brian Paul
On 05/02/2017 05:19 AM, Bartosz Tomczyk wrote: We always use only single element. v2: Change signle element arrays to variables "single" Looks good. Reviewed-by: Brian Paul --- src/mesa/vbo/vbo_exec_array.c | 74 +-- 1 file changed, 37 insertion

Re: [Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: set EGL_DMA_BUF attributes upon variable declaration

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 14:58, Rob Clark wrote: > On Tue, May 2, 2017 at 9:32 AM, Emil Velikov wrote: >> From: Emil Velikov >> >> Makes the code shorter and more explicit. >> >> Cc: Carlos Rafael Giani >> Signed-off-by: Emil Velikov >> --- >> Worth moving the plane[i] bits as well? >> >> The loop gua

[Mesa-dev] [PATCH libdrm] header: update drm_fourcc.h

2017-05-02 Thread Lucas Stach
Mostly to pull in the Vivante tiling format modifiers, but some other little changes included. Signed-off-by: Lucas Stach --- include/drm/drm_fourcc.h | 81 1 file changed, 81 insertions(+) diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_

[Mesa-dev] [PATCH kmscube] drm-atomic: check for valid GBM BO

2017-05-02 Thread Lucas Stach
With the modifier support it is possible to force a modifier which isn't compatible with any of the GPU targets. In that case the EGL platform will be unable to allocate the back buffers. Provide an error message in that case, instead of crashing. Signed-off-by: Lucas Stach --- drm-atomic.c | 4

Re: [Mesa-dev] [PATCH 09/12] Android: push driver build details to driver makefiles

2017-05-02 Thread Rob Herring
On Mon, May 1, 2017 at 2:18 PM, Emil Velikov wrote: > Hi Rob, > > On 27 April 2017 at 20:43, Rob Herring wrote: [...] >> diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk >> index 7c6bda68d59f..d591aaf62e6a 100644 >> --- a/src/gallium/Android.mk >> +++ b/src/gallium/Android.mk >> @@

[Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-02 Thread Samuel Pitoiset
The TGSI DCE pass doesn't eliminate dead assignments like MOV TEMP[0], TEMP[1] in presence of loops because it assumes that the visitor doesn't emit dead code. This assumption is actually wrong and this situation happens. However, it appears that the merge_registers() pass accidentally takes care

Re: [Mesa-dev] [PATCH kmscube] drm-atomic: check for valid GBM BO

2017-05-02 Thread Daniel Stone
On 2 May 2017 at 15:39, Lucas Stach wrote: > With the modifier support it is possible to force a modifier which isn't > compatible with any of the GPU targets. In that case the EGL platform will > be unable to allocate the back buffers. > > Provide an error message in that case, instead of crashin

Re: [Mesa-dev] [PATCH 4/4] atomic: Initialise fence FD members

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 15:01, Daniel Stone wrote: > Hey Emil, > > On 2 May 2017 at 14:24, Emil Velikov wrote: >> Seems to be the correct place to handle here, despite that both are >> already handled. > > Honestly, I wouldn't have written this patch if I knew that; Lucas's > fix came in after the last

[Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in Wiki https://en.wikipedia.org/ wiki/YCbCr; There is minor error in the matrix constant: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. Note that conversion from a 0-255 byte number to 0-1.0 float is to divide by 255 instead of

Re: [Mesa-dev] [PATCH] i965: Don't allocate uniform space for samplers

2017-05-02 Thread Samuel Pitoiset
On 05/02/2017 12:12 AM, Timothy Arceri wrote: On 01/05/17 19:57, Samuel Pitoiset wrote: Thanks for fixing this. I guess "glsl: set vector_elements to 1 for samplers" can now be applied without breaking the world? :-) Yes you should be able to push it again (although wouldn't hurt to give it

Re: [Mesa-dev] [PATCH 1/4] common: Check for extensions before resolving symbols

2017-05-02 Thread Eric Engestrom
On Tuesday, 2017-05-02 11:52:06 +0100, Daniel Stone wrote: > eglGetProcAddress is allowed to return any old garbage for symbols it > doesn't know about. To avoid any mishaps, check for the appropriate > extension presence (split into EGL client extension, EGL display > extension, and GL extension,

Re: [Mesa-dev] [PATCH 09/12] Android: push driver build details to driver makefiles

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 15:41, Rob Herring wrote: > On Mon, May 1, 2017 at 2:18 PM, Emil Velikov wrote: >> Hi Rob, >> >> On 27 April 2017 at 20:43, Rob Herring wrote: > > [...] > >>> diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk >>> index 7c6bda68d59f..d591aaf62e6a 100644 >>> --- a/src/g

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Rafael Antognolli
On Tue, May 02, 2017 at 07:26:53AM -0700, Jason Ekstrand wrote: > On Mon, May 1, 2017 at 6:43 PM, Rafael Antognolli > > wrote: > > We need to use some enums inside genX_state_upload.c, but including the > whole header will cause several conflicts between things defined in this > head

Re: [Mesa-dev] [PATCH kmscube 1/2] gst-decoder.c: set EGL_DMA_BUF attributes upon variable declaration

2017-05-02 Thread Carlos Rafael Giani
On 2017-05-02 15:32, Emil Velikov wrote: Carlos, care to throw a comment why it's using nmem and not something else - say is_dmabuf_mem? Hm, I do see a potential problem now. The code that maps/unmaps the buffer and calls buf_to_fd() should also set nmems to 1. Then the close() loop is corre

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Jason Ekstrand
On Tue, May 2, 2017 at 8:28 AM, Rafael Antognolli < rafael.antogno...@intel.com> wrote: > On Tue, May 02, 2017 at 07:26:53AM -0700, Jason Ekstrand wrote: > > On Mon, May 1, 2017 at 6:43 PM, Rafael Antognolli < > rafael.antogno...@intel.com> > > wrote: > > > > We need to use some enums inside g

Re: [Mesa-dev] [PATCH v2] scons: update for LLVM 4.0

2017-05-02 Thread Jose Fonseca
On 29/04/17 14:24, Emil Velikov wrote: Hi Ben, On 27 April 2017 at 21:31, Ben Boeckel wrote: LLVMDemangle, LLVMGlobalISel, and LLVMDebugInfoMSF are new. Also update the comment to add irreader to the list of components. CC: Reviewed-by: Chuck Atkins Signed-off-by: Ben Boeckel Haven't tes

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Rafael Antognolli
On Tue, May 02, 2017 at 08:44:05AM -0700, Jason Ekstrand wrote: > On Tue, May 2, 2017 at 8:28 AM, Rafael Antognolli > > wrote: > > On Tue, May 02, 2017 at 07:26:53AM -0700, Jason Ekstrand wrote: > > On Mon, May 1, 2017 at 6:43 PM, Rafael Antognolli < > rafael.antogno...@intel.com> >

Re: [Mesa-dev] [PATCH v03 12/38] i965: Split out enum from brw_eu_defines.h

2017-05-02 Thread Jason Ekstrand
On Tue, May 2, 2017 at 8:55 AM, Rafael Antognolli < rafael.antogno...@intel.com> wrote: > On Tue, May 02, 2017 at 08:44:05AM -0700, Jason Ekstrand wrote: > > On Tue, May 2, 2017 at 8:28 AM, Rafael Antognolli < > rafael.antogno...@intel.com> > > wrote: > > > > On Tue, May 02, 2017 at 07:26:53AM

Re: [Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Jason Ekstrand
Please prefix with "nir/lower_tex:" How about nir/lower_tex: Fix minor error in YUV color conversion matrix On Tue, May 2, 2017 at 7:24 AM, Johnson Lin wrote: > The matrix used for YCbCr to RGB is listed in Wiki > https://en.wikipedia.org/ > wiki/YCbCr; There is minor error in the matrix const

Re: [Mesa-dev] [PATCH 09/12] Android: push driver build details to driver makefiles

2017-05-02 Thread Rob Herring
On Tue, May 2, 2017 at 10:14 AM, Emil Velikov wrote: > On 2 May 2017 at 15:41, Rob Herring wrote: >> On Mon, May 1, 2017 at 2:18 PM, Emil Velikov >> wrote: >>> Hi Rob, >>> >>> On 27 April 2017 at 20:43, Rob Herring wrote: >> >> [...] >> diff --git a/src/gallium/Android.mk b/src/gallium/An

Re: [Mesa-dev] [PATCH 3/4] gallium: remove pipe_index_buffer and set_index_buffer

2017-05-02 Thread Marek Olšák
Thanks. I'm amending this: diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 5dc24d6..f26552c 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -2913,6 +2913,7 @@ NineDevice9_DrawIndexedP

Re: [Mesa-dev] [PATCH 11/12] i965/cnl: Properly handle l3 configuration

2017-05-02 Thread Anuj Phogat
On Mon, Apr 24, 2017 at 9:15 PM, Ben Widawsky wrote: > On 17-04-18 18:18:39, Francisco Jerez wrote: > > Most, if not all of the unrelated changes that snuck in were due to rebase. > Anuj, would you mind fixing those? I tried my best to address the rest, > but I'm > admittedly stumbling my way thr

Re: [Mesa-dev] [PATCH] c11/threads: rework Windows thrd_current() comment

2017-05-02 Thread Jose Fonseca
On 29/04/17 14:51, Emil Velikov wrote: From: Emil Velikov Drop the misleading "will not match the one returned by thread_create" hunk and provide more clarity as to what/why GetCurrentThread() isn't the solution we're looking for. Cc: José Fonseca Signed-off-by: Emil Velikov --- include/c11

[Mesa-dev] [PATCH] i965: Move enums to brw_compiler.h.

2017-05-02 Thread Rafael Antognolli
These enums live inside struct brw_wm_prog_data, so it makes sense to keep them in the same header. It also allows to use them without including brw_eu_defines.h. Signed-off-by: Rafael Antognolli --- src/intel/compiler/brw_compiler.h | 21 + src/intel/compiler/brw_eu_define

Re: [Mesa-dev] [PATCH 08/17] st/mesa: simplify code due to unification to st_common_program

2017-05-02 Thread Marek Olšák
>> switch (shader->Stage) { >> case MESA_SHADER_VERTEX: >> stvp = (struct st_vertex_program *)prog; >> stvp->glsl_to_tgsi = v; >> break; >> case MESA_SHADER_FRAGMENT: >> stfp = (struct st_fragment_program *)prog; >> stfp->glsl_to_tgsi = v; >>

Re: [Mesa-dev] [PATCH 06/17] st/mesa: unify TCS, TES, GS st_*_program structures

2017-05-02 Thread Marek Olšák
On Tue, May 2, 2017 at 12:44 PM, Emil Velikov wrote: > Hi Marek, > > Nice work. > > Small question - have you considered subclassing st_{vp,fp,cp}_program > around st_common_program? > It should allow us to remove even more code :-) Yes, that would certainly be possible, though I'm not working on

Re: [Mesa-dev] [PATCH kmscube] atomic: Use normal rendering loop for modeset

2017-05-02 Thread Eric Engestrom
On Tuesday, 2017-05-02 15:04:08 +0100, Daniel Stone wrote: > The initial pattern of: > initial_modeset(); > while (1) { > pageflip(); > } > > was relying on getting a buffer despite not having rendered anything. It > would also show undefined content. Replace this with just usi

[Mesa-dev] [PATCH] anv: don't leak DRM devices

2017-05-02 Thread Grazvydas Ignotas
After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: b1fb6e8d "anv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas --- src/intel/vulkan/anv_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/v

[Mesa-dev] [PATCH] anv: fix possible stack corruption

2017-05-02 Thread Grazvydas Ignotas
drmGetDevices2 takes count and not size. Probably hasn't caused problems yet in practice and was missed as setups with more than 8 DRM devices are not very common. Fixes: b1fb6e8d "anv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas --- src/intel/vulkan/anv_device.c | 2 +-

[Mesa-dev] [PATCH] radv: don't leak DRM devices

2017-05-02 Thread Grazvydas Ignotas
After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: 743315f2 "radv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_devi

[Mesa-dev] [PATCH] radv: fix possible stack corruption

2017-05-02 Thread Grazvydas Ignotas
drmGetDevices2 takes count and not size. Probably hasn't caused problems yet in practice and was missed as setups with more than 8 DRM devices are not very common. Fixes: 743315f2 "radv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_device.c | 2 +-

Re: [Mesa-dev] [PATCH 08/17] st/mesa: simplify code due to unification to st_common_program

2017-05-02 Thread Brian Paul
On 05/02/2017 10:46 AM, Marek Olšák wrote: switch (shader->Stage) { case MESA_SHADER_VERTEX: stvp = (struct st_vertex_program *)prog; stvp->glsl_to_tgsi = v; break; case MESA_SHADER_FRAGMENT: stfp = (struct st_fragment_program *)prog;

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/3] i965/vec4: fix register width for DF VGRF and UNIFORM

2017-05-02 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > On Mon, 2017-05-01 at 14:55 +0200, Samuel Iglesias Gonsálvez wrote: >> El Viernes, 28 de abril de 2017 16:27:56 Francisco Jerez escribió: >> > Samuel Iglesias Gonsálvez writes: >> > > On gen7, the swizzles used in DF align16 instructions works for >> > > eleme

Re: [Mesa-dev] [PATCH] i965: Move enums to brw_compiler.h.

2017-05-02 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Tue, May 2, 2017 at 9:29 AM, Rafael Antognolli < rafael.antogno...@intel.com> wrote: > These enums live inside struct brw_wm_prog_data, so it makes sense to > keep them in the same header. It also allows to use them without > including brw_eu_defines.h. > > Signed-

Re: [Mesa-dev] [PATCH] i965: Move enums to brw_compiler.h.

2017-05-02 Thread Jason Ekstrand
While we're at it, we could make the fields in brw_wm_prog_data::computed_depth_mode use the actual enum type. On Tue, May 2, 2017 at 10:26 AM, Jason Ekstrand wrote: > Reviewed-by: Jason Ekstrand > > On Tue, May 2, 2017 at 9:29 AM, Rafael Antognolli < > rafael.antogno...@intel.com> wrote: > >>

[Mesa-dev] [PATCH 1/5] glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00.

2017-05-02 Thread Eric Anholt
From the spec, Arrays are allowed as arguments, but not as the return type. [...] The return type can also be a structure if the structure does not contain an array. Fixes DEQP shaders.functions.invalid.return_array_in_struct_fragment. --- src/compiler/glsl/ast_to_hir.cpp | 12 ++

[Mesa-dev] [PATCH 4/5] glsl: Don't allow redefining builtin functions on GLSL 1.00.

2017-05-02 Thread Eric Anholt
The spec text cited above says you can't, but only the GLSL 3.00 (redefine or overload) case was implemented. Fixes dEQP scoping.invalid.redefine_builtin_fragment/vertex. --- src/compiler/glsl/ast_to_hir.cpp | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 2/5] glsl: Ban #undefining __LINE__ and friends on GLES2.

2017-05-02 Thread Eric Anholt
Fixes deqp_gles2 undefine_invalid_object_* failures. --- src/compiler/glsl/glcpp/glcpp-parse.y | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y index e113253061f6..5cb2a380605b 100644 --- a/src

[Mesa-dev] [PATCH 0/5] misc dEQP fixes for vc4

2017-05-02 Thread Eric Anholt
Here's a little set of changes for dEQP fixes for GLES2 contexts. I haven't done a full run to confirm no regressions, as full runs on hardware take a day or so. I'm hoping the Intel CI system might be able to test these for me. Eric Anholt (5): glsl: Restrict functions to not return arrays or

[Mesa-dev] [PATCH 3/5] glsl: Restrict func redeclarations (not just redefinitions) on GLSL 1.00.

2017-05-02 Thread Eric Anholt
Fixes DEQP's scoping.invalid.redeclare_function_fragment/vertex. --- src/compiler/glsl/ast_to_hir.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 9e02529dffb9..58088cec0d3a 100644 --- a/src/compiler/glsl/

[Mesa-dev] [PATCH 5/5] mesa: Set new renderbuffers to RGBA4 on all GLES contexts.

2017-05-02 Thread Eric Anholt
Before we were doing RGBA4 on GLES3 only, but as of GLES2 2.0.22 it should be RGBA4 as well. Fixes DEQP functional.state_query.rbo.renderbuffer_internal_format. --- src/mesa/main/renderbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/renderbuffer.c b/src/

[Mesa-dev] [PATCH 1/2] anv: only init locale once

2017-05-02 Thread Grazvydas Ignotas
This follows the same pattern as in _mesa_initialize_context(), but uses pthread_once instead of a mutex. The goal is to avoid problems with multiple instances. Signed-off-by: Grazvydas Ignotas --- src/intel/vulkan/anv_device.c | 19 --- 1 file changed, 16 insertions(+), 3 deleti

[Mesa-dev] [PATCH 2/2] anv: release spirv_to_nir glsl_type allocations

2017-05-02 Thread Grazvydas Ignotas
Add a spirv_to_nir_fini() helper to clean up glsl_type allocations resulting from spirv_to_nir() calls and call it on exit. This resolves many reports from valgrind and should be helpful for application developers that use valgrind. Signed-off-by: Grazvydas Ignotas --- src/compiler/spirv/nir_spi

Re: [Mesa-dev] [PATCH 06/12] Android: rework libelf dependencies

2017-05-02 Thread Rob Herring
On Sun, Apr 30, 2017 at 4:52 AM, Emil Velikov wrote: > Hi Rob, > > On 27 April 2017 at 20:43, Rob Herring wrote: > >> --- a/src/gallium/targets/dri/Android.mk >> +++ b/src/gallium/targets/dri/Android.mk >> @@ -105,10 +105,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \ >> libmesa_util \ >>

[Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-02 Thread Rafael Antognolli
Since the enum is in the same header now, we can use it as the type of the field. Signed-off-by: Rafael Antognolli --- PS: We can merge this with the previous patch too if that's better. src/intel/compiler/brw_compiler.h | 2 +- src/intel/compiler/brw_fs.cpp | 2 +- 2 files changed, 2 inse

[Mesa-dev] [PATCH] glsl: destroy function and subroutine hash tables

2017-05-02 Thread Grazvydas Ignotas
Just like other type hash tables are destroyed in _mesa_glsl_release_types(), also destroy the ones for function and subroutine types. Signed-off-by: Grazvydas Ignotas --- src/compiler/glsl_types.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/glsl_types.cpp b/sr

Re: [Mesa-dev] [PATCH 1/4] common: Check for extensions before resolving symbols

2017-05-02 Thread Daniel Stone
Hi Eric, On 2 May 2017 at 16:05, Eric Engestrom wrote: > On Tuesday, 2017-05-02 11:52:06 +0100, Daniel Stone wrote: >> --- a/common.c >> +++ b/common.c >> @@ -1,5 +1,6 @@ >> /* >> * Copyright (c) 2017 Rob Clark >> + * Copyright © 2013 Intel Corporation > > 2013? Is that for the has_ext() code

Re: [Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Eric Anholt
"Kristian H. Kristensen" writes: > Johnson Lin writes: > >> The matrix used for YCbCr to RGB is listed in Wiki >> https://en.wikipedia.org/wiki/YCbCr; >> There is minor error in the matrix constant: 0.0625=16/256 should be >> 16.0/255, >> and 0.5=128.0/256 should be 128.0/255. >> Note that co

Re: [Mesa-dev] [PATCH 09/12] Android: push driver build details to driver makefiles

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 17:06, Rob Herring wrote: > On Tue, May 2, 2017 at 10:14 AM, Emil Velikov > wrote: >> On 2 May 2017 at 15:41, Rob Herring wrote: >>> On Mon, May 1, 2017 at 2:18 PM, Emil Velikov >>> wrote: Hi Rob, On 27 April 2017 at 20:43, Rob Herring wrote: >>> >>> [...] >>>

Re: [Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Matt Turner
On Tue, May 2, 2017 at 7:24 AM, Johnson Lin wrote: > The matrix used for YCbCr to RGB is listed in Wiki https://en.wikipedia.org/ > wiki/YCbCr; There is minor error in the matrix constant: 0.0625=16/256 should > be 16.0/255,and 0.5=128.0/256 should be 128.0/255. > Note that conversion from a 0-25

Re: [Mesa-dev] [PATCH 06/12] Android: rework libelf dependencies

2017-05-02 Thread Emil Velikov
On 2 May 2017 at 19:01, Rob Herring wrote: > On Sun, Apr 30, 2017 at 4:52 AM, Emil Velikov > wrote: >> Hi Rob, >> >> On 27 April 2017 at 20:43, Rob Herring wrote: >> >>> --- a/src/gallium/targets/dri/Android.mk >>> +++ b/src/gallium/targets/dri/Android.mk >>> @@ -105,10 +105,9 @@ LOCAL_WHOLE_ST

[Mesa-dev] [PATCH] gbm/dri: Fix sign-extension in modifier query

2017-05-02 Thread Daniel Stone
When we were assembling the unsigned 64-bit query return from its two signed 32-bit component parts, the lower half was getting sign-extended into the top half. Be more explicit about what we want to do. Fixes gbm_bo_get_modifier() returning ((1 << 64) - 1) rather than ((1 << 56) - 1), i.e. DRM_FO

Re: [Mesa-dev] [PATCH 11/12] i965/cnl: Properly handle l3 configuration

2017-05-02 Thread Francisco Jerez
Anuj Phogat writes: > On Mon, Apr 24, 2017 at 9:15 PM, Ben Widawsky wrote: > >> On 17-04-18 18:18:39, Francisco Jerez wrote: >> >> Most, if not all of the unrelated changes that snuck in were due to rebase. >> Anuj, would you mind fixing those? I tried my best to address the rest, >> but I'm >>

Re: [Mesa-dev] [PATCH 1/2] renderonly: close transfer prime_fd

2017-05-02 Thread Christian Gmeiner
2017-04-28 12:19 GMT+02:00 Emil Velikov : > On 27 April 2017 at 17:44, Philipp Zabel wrote: >> prime_fd is only used to transfer the scanout buffer to the GPU inside >> renderonly_create_kms_dumb_buffer_for_resource. It should be closed >> immediately to avoid leaking the DMA-BUF file handle. >> >

Re: [Mesa-dev] [PATCH 2/2] renderonly: drop resources on destroy

2017-05-02 Thread Christian Gmeiner
2017-04-28 12:19 GMT+02:00 Emil Velikov : > On 27 April 2017 at 17:44, Philipp Zabel wrote: >> The renderonly_scanout holds a reference on its prime pipe resource, >> which should be released when it is destroyed. If it was created by >> renderonly_create_kms_dumb_buffer_for_resource, the dumb BO

Re: [Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-05-02 Thread Christian Gmeiner
2017-04-28 13:11 GMT+02:00 Philipp Zabel : > To restart interrupted system calls, use drmIoctl. > > Suggested-by: Emil Velikov > Signed-off-by: Philipp Zabel Reviewed-by: Christian Gmeiner greets -- Christian Gmeiner, MSc https://www.youtube.com/user/AloryOFFICIAL https://soundcloud.com/christ

  1   2   3   >