Re: [Mesa-dev] [PATCH 14/16] android: add inital NIR build

2015-03-28 Thread Kenneth Graunke
On Sunday, March 29, 2015 12:14:50 AM Emil Velikov wrote: > On 28 March 2015 at 20:54, Emil Velikov wrote: > > From: Mauro Rossi > > > > Required by the i965 driver. > > > > Cc: "10.5" > > [Emil Velikov: Split from a larger commit] > > Signed-off-by: Emil Velikov > > --- > > src/glsl/Android.g

Re: [Mesa-dev] [PATCH v2 06/15] st/mesa: implement GL_AMD_performance_monitor

2015-03-28 Thread Marek Olšák
On Sat, Mar 28, 2015 at 9:43 PM, Martin Peres wrote: > On 22/03/2015 17:35, Samuel Pitoiset wrote: >> >> From: Christoph Bumiller >> >> This is based on the original patch of Christoph Bumiller. >> (source: http://people.freedesktop.org/~chrisbmr/perfmon.diff) > > > It would be nice if you could

[Mesa-dev] [PATCH] osmesa: don't try to bundle osmesa.def SConscript

2015-03-28 Thread Emil Velikov
Both of which were removed with commit 69db422218b(scons: Don't build osmesa.) Cc: Jose Fonseca Signed-off-by: Emil Velikov --- src/mesa/drivers/osmesa/Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am ind

[Mesa-dev] [PATCH] nir: acknowledge the existence of nir_builder.h

2015-03-28 Thread Emil Velikov
The header was added with commit 2a135c470e3(nir: Add an ALU op builder kind of like ir_builder.h) but did not made it into to the sources list, and its dependency of nir_builder_opcodes.h was missing. Fortunately it remained unused until resent commit faf6106c6f6(nir: Implement a Mesa IR -> NIR t

Re: [Mesa-dev] [PATCH 2/2] configure.ac: error out if python/mako is not found when required

2015-03-28 Thread Bernd Kuhls
Hi, Emil Velikov wrote in news:1427132964-21468-2- git-send-email-emil.l.veli...@gmail.com: > In case of using a distribution tarball (or a dirty git tree) one can > have the generated sources locally. Make configure.ac error out > otherwise, to alert that about the unmet requirement(s) of pytho

Re: [Mesa-dev] [PATCH 14/16] android: add inital NIR build

2015-03-28 Thread Emil Velikov
On 28 March 2015 at 20:54, Emil Velikov wrote: > From: Mauro Rossi > > Required by the i965 driver. > > Cc: "10.5" > [Emil Velikov: Split from a larger commit] > Signed-off-by: Emil Velikov > --- > src/glsl/Android.gen.mk | 62 > +++-- > src/glsl/An

Re: [Mesa-dev] [Piglit] [PATCH] mesa/state_tracker: Fix draw-pixel-with-texture piglit test.

2015-03-28 Thread Emil Velikov
Hi Matthew I'm suspecting that this patch was meant for mesa-dev ? -Emil On 28/03/15 17:07, Matthew Dawson wrote: > When glDrawPixels was used with an external texture, the pixels passed in > were sampled instead of the texture. Change gallium to instead move the user > texture to a new sampler

Re: [Mesa-dev] [PATCH 8/9] nir: Implement a nir_sweep() pass.

2015-03-28 Thread Jason Ekstrand
Two comments at the moment. 1) s/sweep/steal/ 2) I think I'll have more comments and would like you to wait for me to get a chance to look through it before pushing. --Jason On Mar 28, 2015 4:29 PM, "Kenneth Graunke" wrote: > This pass performs a mark and sweep pass over a nir_shader's associate

[Mesa-dev] [Bug 81992] mapi_stub->name points to caller memory leads heap-use-after-free bug

2015-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=81992 Emil Velikov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 89680] Hard link exist in Mesa 10.5.1 sources

2015-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89680 Emil Velikov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 89328] python required to build Mesa release tarballs

2015-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89328 Emil Velikov changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [PATCH 5/9] nir: Allocate predecessor and dominance frontier sets from block itself.

2015-03-28 Thread Kenneth Graunke
These sets are part of the block, and their lifetime needs to match the block itself. So, allocate them using the block itself as the context. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir.c b/src/g

[Mesa-dev] [PATCH 9/9] [AUTONAK] i965/nir: Call nir_sweep().

2015-03-28 Thread Kenneth Graunke
Mostly a proof of concept that it works; we free the memory shortly afterwards anyway, so it's kind of dumb to do this. The plan is to instead build nir_shaders at link time, rather than when compiling each shader specialization, and delete the GLSL IR. Signed-off-by: Kenneth Graunke --- src/me

[Mesa-dev] [PATCH 1/9] nir: Combine remove_dead_local_vars() and remove_dead_global_vars().

2015-03-28 Thread Kenneth Graunke
We can just pass a pointer to the list of variables, and reuse the code. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_remove_dead_variables.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/glsl/nir/nir_remove_dead_variables.c b/src/glsl/nir/ni

[Mesa-dev] [PATCH 3/9] nir: Make nir_create_function() strdup the function name.

2015-03-28 Thread Kenneth Graunke
glsl_to_nir passes in the ir_function's name field; we were copying the pointer, but not duplicating the memory. We want to be able to free the linked GLSL IR program after translating to NIR, so we'll need to create a copy of the function name that the NIR shader actually owns. Signed-off-by: Ke

[Mesa-dev] [PATCH 8/9] nir: Implement a nir_sweep() pass.

2015-03-28 Thread Kenneth Graunke
This pass performs a mark and sweep pass over a nir_shader's associated memory - anything still connected to the program will be kept, and any dead memory we dropped on the floor will be freed. The expectation is that this will be called when finished building and optimizing the shader. However,

[Mesa-dev] [PATCH 6/9] nir: Allocate nir_tex_instr::sources out of the instruction itself.

2015-03-28 Thread Kenneth Graunke
The lifetime of the sources array needs to be match the nir_tex_instr itself. So, allocate it using the instruction itself as the context. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/

[Mesa-dev] [PATCH 7/9] ralloc: Implement a new ralloc_adopt() API.

2015-03-28 Thread Kenneth Graunke
ralloc_adopt() reparents all children from one context to another. Conceptually, ralloc_adopt(new_ctx, old_ctx) behaves like this pseudocode: foreach child of old_ctx: ralloc_steal(new_ctx, child) However, ralloc provides no way to iterate over a memory context's children, and ralloc_ado

[Mesa-dev] [PATCH 2/9] nir: Free dead variables when removing them.

2015-03-28 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_remove_dead_variables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_remove_dead_variables.c b/src/glsl/nir/nir_remove_dead_variables.c index baa321e..4417e2a 100644 --- a/src/glsl/nir/nir_remove_dead_

[Mesa-dev] [PATCH 4/9] nir: Allocate register fields out of the register itself.

2015-03-28 Thread Kenneth Graunke
The lifetime of each register's use/def/if_use sets needs to match the register itself. So, allocate them using the register itself as the context. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glsl/nir/nir.c

Re: [Mesa-dev] GL_TEXTURE_2D to wl_buffer

2015-03-28 Thread Jason Ekstrand
On Sat, Mar 28, 2015 at 6:57 AM, x414e54 wrote: > I am attempting to pass a GL_TEXTURE_2D directly to a Wayland compositor by > first converting it so an EGLImageKHR and then to a wl_buffer. > > eglCreateImageKHR appears to work fine but when calling > glCreateWaylandBufferFromImageWL I get EGL_BA

[Mesa-dev] [PATCH 10/16] android: add gallium dirs to more places in the tree

2015-03-28 Thread Emil Velikov
Similar to e8c5cbfd921(mesa: Add gallium include dirs to more parts of the tree.) Signed-off-by: Emil Velikov --- src/glsl/Android.mk| 8 ++-- src/mesa/Android.libmesa_dricore.mk| 1 + src/mesa/Android.libmesa_glsl_utils.mk | 8 ++-- src/mesa/drivers/dri/Android.m

[Mesa-dev] [PATCH 15/16] android: build the Mesa IR -> NIR translator

2015-03-28 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/mesa/program/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/Android.mk b/src/mesa/program/Android.mk index e957a8d..374fcbf 100644 --- a/src/mesa/program/Android.mk +++ b/src/mesa/program/Android.mk @@ -55,7 +5

[Mesa-dev] [PATCH 12/16] android: add $(mesa_top)/src/mesa/main to the includes list

2015-03-28 Thread Emil Velikov
Required by the format_{un,}pack rework. Otherwise the build will fail to locate the respective headers - format_{un,}pack.h Cc: "10.5" Signed-off-by: Emil Velikov --- src/mesa/Android.libmesa_dricore.mk | 1 + src/mesa/Android.libmesa_st_mesa.mk | 7 --- 2 files changed, 5 insertions(+), 3

[Mesa-dev] [PATCH 16/16] android: mesa: fix the path of the SSE4_1 optimisations

2015-03-28 Thread Emil Velikov
Commit dd6f641303c(mesa: Build with subdir-objects.) removed the SRCDIR variable, but forgot to update all references of it. Cc: "10.5" Signed-off-by: Emil Velikov --- src/mesa/Android.libmesa_dricore.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/Android.li

[Mesa-dev] [PATCH 14/16] android: add inital NIR build

2015-03-28 Thread Emil Velikov
From: Mauro Rossi Required by the i965 driver. Cc: "10.5" [Emil Velikov: Split from a larger commit] Signed-off-by: Emil Velikov --- src/glsl/Android.gen.mk | 62 +++-- src/glsl/Android.mk | 3 +- src/mesa/drivers/dri/Android.mk | 1 +

[Mesa-dev] [PATCH 07/16] android: mesa: generate the format_{un, }pack.[ch] sources

2015-03-28 Thread Emil Velikov
From: Mauro Rossi Missed out with commit e1fdcddafe9(mesa: Autogenerate format_unpack.c) Cc: "10.5" [Emil Velikov: Split our from a larger commit.] Signed-off-by: Emil Velikov --- src/mesa/Android.gen.mk | 21 + 1 file changed, 21 insertions(+) diff --git a/src/mesa/Andro

[Mesa-dev] [PATCH 09/16] android: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_H

2015-03-28 Thread Emil Velikov
Otherwise we'll fail to find the drm.h header. Cc: "10.4 10.5" Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/common/Android.mk | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk index b95feb

[Mesa-dev] [PATCH 06/16] android: add $(mesa_top)/src include to the whole of mesa

2015-03-28 Thread Emil Velikov
Many parts of mesa already have the include with others depending on it but it's missing. Add it once at the top makefile and be done with it. Cc: "10.4 10.5" Signed-off-by: Emil Velikov --- Android.common.mk | 1 + src/gallium/auxiliary/Android.mk | 3 +-- src/glsl/A

[Mesa-dev] [PATCH 13/16] android: dri: link against libmesa_util

2015-03-28 Thread Emil Velikov
The dri modules depend on symbols provided by it. Cc: "10.5" Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk index 28a332b..64e237b 100644 ---

[Mesa-dev] [PATCH 04/16] util: android: optimize the rules to generate format_srgb.c

2015-03-28 Thread Emil Velikov
From: Chih-Wei Huang Signed-off-by: Chih-Wei Huang --- src/util/Android.mk | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/src/util/Android.mk b/src/util/Android.mk index 6b38cf9..2eb0ef7 100644 --- a/src/util/Android.mk +++ b/src/util/Andr

[Mesa-dev] [PATCH 05/16] android: use := operator for assigning MESA_VERSION

2015-03-28 Thread Emil Velikov
Signed-off-by: Emil Velikov --- Android.common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android.common.mk b/Android.common.mk index 3e6d4c3..e34f206 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -33,7 +33,7 @@ endif LOCAL_C_INCLUDES += \ $(MESA_T

[Mesa-dev] [PATCH 11/16] android: add HAVE__BUILTIN_* and HAVE_FUNC_ATTRIBUTE_* defines

2015-03-28 Thread Emil Velikov
All of those are available on gcc 4.5 and later with the current android build using gcc 4.7. Cc: "10.4 10.5" Signed-off-by: Emil Velikov --- Android.common.mk | 13 + 1 file changed, 13 insertions(+) diff --git a/Android.common.mk b/Android.common.mk index f473a4b..a4ee181 100644

[Mesa-dev] [PATCH 03/16] android: simplify the subdirs including rules

2015-03-28 Thread Emil Velikov
From: Chih-Wei Huang Use the macro defined in the Android build system. Signed-off-by: Chih-Wei Huang --- Android.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index e190f74..87ed464 100644 --- a/Android.mk +++ b/Android.mk @@ -94,7 +94,6 @@ i

[Mesa-dev] [PATCH 08/16] android: egl: add libsync_cflags to the build

2015-03-28 Thread Emil Velikov
... via local_shared_libraries. Otherwise the sync/sync.h header won't be found. Note: 10.5 and earlier will need similar change in st/egl. Cc: "10.4 10.5" Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/Android.mk | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/egl/drivers/

[Mesa-dev] [PATCH 00/16] Assorted Android patches

2015-03-28 Thread Emil Velikov
Hi all, With a GSoC student interesting in going through and exploding the freedreno driver (amongst others) I've decided that it's a nice idea to double check how chaotic things are wrt the Android build. Long story short - it's bad. The good news is that a couple of the Android-x86 guys (Chi

[Mesa-dev] [PATCH 01/16] ilo: remove unused include from Android.mk

2015-03-28 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/gallium/drivers/ilo/Android.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/ilo/Android.mk b/src/gallium/drivers/ilo/Android.mk index 39de3a6..4204134 100644 --- a/src/gallium/drivers/ilo/Android.mk +++ b/src/gallium/drivers/ilo/An

[Mesa-dev] [PATCH 02/16] android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERS

2015-03-28 Thread Emil Velikov
... to manage the LIBDRM*_CFLAGS. The former is the recommended approach by the Android build system developers while the latter has been depreciated for quite some time. Cc: "10.4 10.5" Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/Android.mk | 2 +- src/gallium/drivers/free

Re: [Mesa-dev] [PATCH v2 06/15] st/mesa: implement GL_AMD_performance_monitor

2015-03-28 Thread Martin Peres
On 22/03/2015 17:35, Samuel Pitoiset wrote: From: Christoph Bumiller This is based on the original patch of Christoph Bumiller. (source: http://people.freedesktop.org/~chrisbmr/perfmon.diff) It would be nice if you could add "v2: Samuel Pitoiset" and tell what you changed. Christoph may dele

[Mesa-dev] [PATCH] gallivm: simplify sampler interface

2015-03-28 Thread sroland
From: Roland Scheidegger This has got a bit out of control with more and more parameters added. Worse, whenever something in there changes all callees have to be updated for that, even though they don't really do much with any parameter in there except pass it on to the actual sampling function.

[Mesa-dev] Mesa 10.5.2

2015-03-28 Thread Emil Velikov
Mesa 10.5.2 is now available. This release addresses bugs in the common glsl code-base, the libGL and glapi libraries, and the dri modules. The tarball no longer contains hardlinks and has all the haiku files. With this release one can build mesa without the need of python and mako. Anuj Phoga

Re: [Mesa-dev] [PATCH 3/3] glsl: Reassociate multiplication of mat*mat*vec.

2015-03-28 Thread Jason Ekstrand
On Fri, Mar 27, 2015 at 9:22 PM, Matt Turner wrote: > The typical case of mat4*mat4*vec4 is 80 scalar multiplications, but > mat4*(mat4*vec4) is only 32. > > On HSW (with vec4 vertex shaders): > instructions in affected programs: 4420 -> 3194 (-27.74%) > > On BDW (with scalar vertex shaders):

[Mesa-dev] [PATCH] mesa/state_tracker: Fix draw-pixel-with-texture piglit test.

2015-03-28 Thread Matthew Dawson
When glDrawPixels was used with an external texture, the pixels passed in were sampled instead of the texture. Change gallium to instead move the user texture to a new sampler below the glDrawPixels samplers and use the texture coordinates from the raster position. This uses a uniform for the tex

Re: [Mesa-dev] [PATCH 14/23] main: Refactor MapBuffer[Range].

2015-03-28 Thread Ilia Mirkin
On Wed, Feb 11, 2015 at 9:05 PM, Laura Ekstrand wrote: > if (offset + length > bufObj->Size) { >_mesa_error(ctx, GL_INVALID_VALUE, > - "glMapBufferRange(offset + length > size)"); > + "%s(offset %d + length %d > buffer_size %d)", func, > +

Re: [Mesa-dev] GL_TEXTURE_2D to wl_buffer

2015-03-28 Thread Axel Davy
GL_RGBA should corresponds to ABGR. Try GL_BGRA, which is ARGB. Note: Actually it is possible intel vs gallium drivers GL_RGBA and GL_BGRA have different argb ordering. So perhaps try both so that all drivers are happy. Le 28/03/2015 14:57, x414e54 a écrit : I am attempting to pass a

[Mesa-dev] GL_TEXTURE_2D to wl_buffer

2015-03-28 Thread x414e54
I am attempting to pass a GL_TEXTURE_2D directly to a Wayland compositor by first converting it so an EGLImageKHR and then to a wl_buffer. eglCreateImageKHR appears to work fine but when calling glCreateWaylandBufferFromImageWL I get EGL_BAD_MATCH "unsupported image format". The GL_TEXTURE_2D is

Re: [Mesa-dev] [PATCH] nir: Fix copy and pasted error message in nir_validate.

2015-03-28 Thread Jason Ekstrand
On Mar 27, 2015 11:34 PM, "Ilia Mirkin" wrote: > > On Sat, Mar 28, 2015 at 12:23 AM, Kenneth Graunke wrote: > > These are nir_cf_nodes, not ALU instructions. > > Also, use unreachable() to preempt said review feedback. > > > > Signed-off-by: Kenneth Graunke > > --- > > src/glsl/nir/nir_validate

Re: [Mesa-dev] [PATCH 3/3] glsl: Reassociate multiplication of mat*mat*vec.

2015-03-28 Thread Chris Forbes
For the series: Reviewed-by: Chris Forbes On Sat, Mar 28, 2015 at 5:22 PM, Matt Turner wrote: > The typical case of mat4*mat4*vec4 is 80 scalar multiplications, but > mat4*(mat4*vec4) is only 32. > > On HSW (with vec4 vertex shaders): > instructions in affected programs: 4420 -> 3194 (-27.7