[Mesa-dev] [PATCH 0/5] GL_OES_required_internalformat

2017-05-02 Thread Eric Anholt
This series came out of fixing dEQP failures on vc4's GLES2 context. Mesa was allowing RGB565 textures, which is only valid with GL_OES_required_internalformat. Rather than disable RGB565, I decided the extension was easy enough to support. I've sent one piglit test for renderbuffer sizing, and

[Mesa-dev] [PATCH 3/5] vc4: Add support for 5551 textures.

2017-05-02 Thread Eric Anholt
This keeps us from promoting them up to , at the cost of not being color-renderable. --- src/gallium/drivers/vc4/vc4_formats.c | 5 ++--- src/gallium/drivers/vc4/vc4_uniforms.c | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/vc4/vc4_formats.c

[Mesa-dev] [PATCH 5/5] mesa: Expose GL_OES_required_internalformat on GLES contexts.

2017-05-02 Thread Eric Anholt
This extension is effectively a backport of GLES3's internalformat handling to GLES 1/2. It guarantees that sized internalformats specified for textures and renderbuffers have at least the specified size stored. That's a pretty minimal requirement, so I think it can be dummy_true and exposed as a

[Mesa-dev] [PATCH 2/5] gallium: Add support for 5551 with the 1-bit field in the low bit.

2017-05-02 Thread Eric Anholt
--- Do I have the swizzles right here? It's a bit complicated because I have a reswizzle in vc4, so I may have just massaged things to work out in my case. I tried a lot of combinations trying to specify BE swizzles in a way that wouldn't assertion fail in the python script, with no luck.

[Mesa-dev] [PATCH 4/5] mesa: Only expose GLES's EXT_texture_type_2_10_10_10_REV if supported in HW.

2017-05-02 Thread Eric Anholt
Previously, we were downconverting to automatically if the hardware didn't suport it. However, with the advent of GL_OES_required_internalformat, we have to actually store the internalformats we advertise support for. And, it seems rather disingenuous to advertise the extension if we don't

[Mesa-dev] [PATCH 1/5] mesa: Add X1B5G5R5 along with A1B5G5R5.

2017-05-02 Thread Eric Anholt
For supporting RGB5 in hardware with A in the low bit (vc4), we need this format as well. --- src/mesa/main/formats.c | 2 ++ src/mesa/main/formats.csv| 1 + src/mesa/main/formats.h | 1 + src/mesa/main/texformat.c| 1 + src/mesa/swrast/s_texfetch.c | 1 + 5 files changed, 6

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

2017-05-02 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > El Viernes, 28 de abril de 2017 16:08:35 Francisco Jerez escribió: >> Samuel Iglesias Gonsálvez writes: >> > It was setting XYWZ swizzle and writemask to all uniforms, no matter if >> > they were a vector or scalar,

Re: [Mesa-dev] [PATCH 1/2] draw: fix max_index initializer in draw_pipeline_run()

2017-05-02 Thread Brian Paul
On 05/02/2017 01:26 PM, Grazvydas Ignotas wrote: On Tue, May 2, 2017 at 10:21 PM, Brian Paul > wrote: Note, this is just some debug code. --- src/gallium/auxiliary/draw/draw_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Mesa-dev] [PATCH 2/2] mesa: add const qualifier on _mesa_valid_to_render()

2017-05-02 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Tue, May 2, 2017 at 9:21 PM, Brian Paul wrote: > --- > src/mesa/main/api_validate.c | 2 +- > src/mesa/main/api_validate.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH 1/2] draw: fix max_index initializer in draw_pipeline_run()

2017-05-02 Thread Grazvydas Ignotas
On Tue, May 2, 2017 at 10:21 PM, Brian Paul wrote: > Note, this is just some debug code. > --- > src/gallium/auxiliary/draw/draw_pipe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/draw/draw_pipe.c >

[Mesa-dev] [PATCH 2/2] mesa: add const qualifier on _mesa_valid_to_render()

2017-05-02 Thread Brian Paul
--- src/mesa/main/api_validate.c | 2 +- src/mesa/main/api_validate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index bddde29..4694c36 100644 --- a/src/mesa/main/api_validate.c +++

[Mesa-dev] [PATCH 1/2] draw: fix max_index initializer in draw_pipeline_run()

2017-05-02 Thread Brian Paul
Note, this is just some debug code. --- src/gallium/auxiliary/draw/draw_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c index 27a3762..3581698 100644 ---

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

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

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

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

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

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

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

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:

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

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

[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

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

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

[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

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

[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

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

[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

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

[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

[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

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

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

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

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;

[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

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

[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

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

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

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

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

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

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

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

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

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

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

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

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

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:

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

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

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

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

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

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

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

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

[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

[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

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

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

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

[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

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

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

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

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

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

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

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

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

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

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

[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

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

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

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

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

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

[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

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

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

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

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,

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

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

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

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 >

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

[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

[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

[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

<    1   2   3   >