[Mesa-dev] V2 ARB_arrays_of_arrays GLSL ES

2015-07-17 Thread Timothy Arceri
Hi all, The restrictions in ES make the extension easier to implement so I thought I'd try get this stuff reviewed an committed before finishing up the full extension. The bits that I'm still working on for the desktop version are AoA inputs outputs, and interface blocks. The only thing I know is

Re: [Mesa-dev] [PATCH 02/16] mesa: fix incorrect comment

2015-07-17 Thread Timothy Arceri
Yeah your right but its also used by _mesa_program_resource_prop I can move the comment but is it really adding any value anyway? On Fri, 2015-07-17 at 21:31 -0400, Ilia Mirkin wrote: > The comment is misplaced, but not entirely wrong. It should be on the > program_resource_location helper. That

[Mesa-dev] [PATCH 11/16] glsl: fix binding validation for interface blocks

2015-07-17 Thread Timothy Arceri
V2: rebase on SSBO changes --- src/glsl/ast_to_hir.cpp | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 1eafdc2..694f2fe 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2

Re: [Mesa-dev] [PATCH 11/16] glsl: fix binding validation for interface blocks

2015-07-17 Thread Timothy Arceri
On Sat, 2015-07-18 at 11:25 +1000, Timothy Arceri wrote: > --- > src/glsl/ast_to_hir.cpp | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp > index 1e3686c..341f9c4 100644 > --- a/src/glsl/ast_to_hir.c

Re: [Mesa-dev] [PATCH 02/16] mesa: fix incorrect comment

2015-07-17 Thread Ilia Mirkin
The comment is misplaced, but not entirely wrong. It should be on the program_resource_location helper. That helper is in fact used by the other 2 functions On Fri, Jul 17, 2015 at 9:25 PM, Timothy Arceri wrote: > --- > src/mesa/main/shader_query.cpp | 2 -- > 1 file changed, 2 deletions(-) > >

Re: [Mesa-dev] [PATCH 01/16] glsl: check for leading zeros in array index validation

2015-07-17 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Fri, Jul 17, 2015 at 9:25 PM, Timothy Arceri wrote: > --- > src/glsl/linker.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp > index b7a783c..cb679bd 100644 > --- a/src/glsl/linker.cpp > +++ b/src/glsl/linker.

[Mesa-dev] [PATCH 09/16] glsl: clean-up link uniform code

2015-07-17 Thread Timothy Arceri
--- src/glsl/link_uniforms.cpp | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 11ae06f..2d50b9b 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -71,6 +71,7 @@ void progr

[Mesa-dev] [PATCH 16/16] glsl: Allow arrays of arrays in GLSL ES 3.10 and GLSL 4.30

2015-07-17 Thread Timothy Arceri
V2: add missing 's' to the extension name in error messages and add decimal place in version string --- src/glsl/ast_to_hir.cpp | 13 - src/glsl/glsl_parser.yy | 22 ++ src/glsl/glsl_parser_extras.h | 5 + 3 files changed, 27 insertions(+), 13 dele

[Mesa-dev] [PATCH 15/16] glsl: remove dead code in a single pass

2015-07-17 Thread Timothy Arceri
Currently only one ir assignment is removed for each var in a single dead code optimisation pass. This means if a var has more than one assignment, then it requires all the glsl optimisations to be run again for each additional assignment to be removed. Another pass is also required to remove the v

[Mesa-dev] [PATCH 11/16] glsl: fix binding validation for interface blocks

2015-07-17 Thread Timothy Arceri
--- src/glsl/ast_to_hir.cpp | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 1e3686c..341f9c4 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2041,10 +2041,10 @@ validate_matri

[Mesa-dev] [PATCH 12/16] glsl: add helper for calculating size of AoA

2015-07-17 Thread Timothy Arceri
--- src/glsl/glsl_types.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 93a1d25..87104cb 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -537,6 +537,25 @@ struct glsl_type { } /** +* Retu

[Mesa-dev] [PATCH 08/16] glsl: dont allow gl_PerVertex to be redeclared as an array of arrays

2015-07-17 Thread Timothy Arceri
V2: move single dimensionial array detection into a helper Signed-off-by: Timothy Arceri --- src/glsl/ast.h | 8 src/glsl/ast_to_hir.cpp | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast.h b/src/glsl/ast.h index ef74e51..3f67907 100644 --- a/s

[Mesa-dev] [PATCH 13/16] glsl: validate binding qualifier for AoA

2015-07-17 Thread Timothy Arceri
--- src/glsl/ast_to_hir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 341f9c4..0d0364b 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2056,7 +2056,7 @@ validate_binding_qualifier(struct _mesa_

[Mesa-dev] [PATCH 14/16] glsl: allow AoA to be sized by initializer or constructor

2015-07-17 Thread Timothy Arceri
From Section 4.1.9 of the GLSL ES 3.10 spec: "Arrays are sized either at compile-time or at run-time. To size an array at compile-time, either the size must be specified within the brackets as above or must be inferred from the type of the initializer." --- src/glsl/ast.h | 21 +++--

[Mesa-dev] [PATCH 05/16] glsl: set stage flag for structs and arrays in resource list

2015-07-17 Thread Timothy Arceri
This fixes the remaining failing tests in: ES31-CTS.program_interface_query.uniform-types --- src/glsl/linker.cpp | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index cb679bd..dc8c873 100644 --- a/src/glsl/linker.cpp

[Mesa-dev] [PATCH 04/16] mesa: remove now unused _mesa_get_uniform_location

2015-07-17 Thread Timothy Arceri
--- src/mesa/main/uniform_query.cpp | 75 - src/mesa/main/uniforms.h| 4 --- 2 files changed, 79 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index cab5083..680ba16 100644 --- a/src/mesa/main/uniform_q

[Mesa-dev] [PATCH 07/16] glsl: calculate component size for arrays of arrays when varying packing disabled

2015-07-17 Thread Timothy Arceri
Signed-off-by: Timothy Arceri Reviewed-by: Ilia Mirkin --- src/glsl/link_varyings.cpp | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 020842a..ca5f8d3 100644 --- a/src/glsl/link_varyings.cpp +++ b/

[Mesa-dev] [PATCH 10/16] glsl: Add support for linking uniform arrays of arrays

2015-07-17 Thread Timothy Arceri
V2: Handle arrays of arrays in the same way structures are handled The ARB_arrays_of_arrays spec doesn't give very many details on how AoA uniforms are intended to be implemented. However in the ARB_program_interface_query spec there are details that show AoA are intended to be handled in a simila

[Mesa-dev] [PATCH 06/16] mesa: fix active sampler conflict validation

2015-07-17 Thread Timothy Arceri
The type stored in gl_uniform_storage is the type of a single array element not the array type so size was always 1. V2: Dont validate sampler units pointing to 0 --- src/mesa/main/uniform_query.cpp | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 01/16] glsl: check for leading zeros in array index validation

2015-07-17 Thread Timothy Arceri
--- src/glsl/linker.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index b7a783c..cb679bd 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -462,6 +462,10 @@ parse_program_resource_name(const GLchar *name, if (array_index < 0)

[Mesa-dev] [PATCH 02/16] mesa: fix incorrect comment

2015-07-17 Thread Timothy Arceri
--- src/mesa/main/shader_query.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index a6246a3..0473c2e 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -787,8 +787,6 @@ program_resource_locat

[Mesa-dev] [PATCH 03/16] mesa: remove overlapping array index validation and extra uniform location lookup

2015-07-17 Thread Timothy Arceri
This change removes multiple functions designed to validate an array subscript and replaces them with a call to a single function. The change also means that validation is now only done once and the index is retrived at the same time, as a result the getUniformLocation code can be simplified savin

Re: [Mesa-dev] [PATCH 14/14] mesa: s/GLint/GLsizei/ for consistency

2015-07-17 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Wed, Jul 15, 2015 at 7:40 PM, Brian Paul wrote: > --- > src/mesa/main/dd.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h > index ae01770..87eb63e 100644 > --- a/src/mesa/main/dd.h > +++ b/src/mesa/mai

Re: [Mesa-dev] [PATCH 13/14] docs: document that GL_ARB_get_texture_sub_image is completed

2015-07-17 Thread Ilia Mirkin
On Wed, Jul 15, 2015 at 7:40 PM, Brian Paul wrote: > --- > docs/GL3.txt | 2 +- > docs/relnotes/10.7.0.html | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/docs/GL3.txt b/docs/GL3.txt > index 33a282e..2144257 100644 > --- a/docs/GL3.txt > +++ b/docs/GL3.txt

Re: [Mesa-dev] [PATCH 12/14] mesa: enable GL_ARB_get_texture_sub_image for all drivers

2015-07-17 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin As a comment, I thought about suggesting making this GLC since this is an extension of DSA and DSA is GLC. However DSA provides another method for existing functionality, while this enables new functionality, so I think it makes sense to expose this even in compat context

Re: [Mesa-dev] [PATCH 10/14] mesa: add new _mesa_Get[Compressed]TextureSubImage() functions

2015-07-17 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Wed, Jul 15, 2015 at 7:40 PM, Brian Paul wrote: > Simple implementations in terms of get_[compressed_]texture_image(). > --- > src/mesa/main/texgetimage.c | 62 > - > src/mesa/main/texgetimage.h | 15 +++ > 2 files

Re: [Mesa-dev] [PATCH 09/14] mesa: overhaul the glGetCompressedTexImage code

2015-07-17 Thread Ilia Mirkin
On Wed, Jul 15, 2015 at 7:40 PM, Brian Paul wrote: > Same idea as the previous patch. > --- > src/mesa/main/texgetimage.c | 345 > ++-- > 1 file changed, 203 insertions(+), 142 deletions(-) > > diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texge

[Mesa-dev] [PATCH 3/6] mesa: move check for no-op glShadeModel call earlier

2015-07-17 Thread Brian Paul
--- src/mesa/main/light.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 4021dbe..f215c93 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -44,14 +44,14 @@ _mesa_ShadeModel( GLenum mode ) if (MESA_V

[Mesa-dev] [PATCH 2/6] mesa: move check for no-op glAlphaFunc call earlier

2015-07-17 Thread Brian Paul
--- src/mesa/main/blend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index d365305..ee6e7d3 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -569,6 +569,9 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )

[Mesa-dev] [PATCH 1/6] mesa: move check for no-op glFrontFace call earlier

2015-07-17 Thread Brian Paul
If the new mode matches the current mode, there can be no error. --- src/mesa/main/polygon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index a1f0aa0..6be6f33 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/p

[Mesa-dev] [PATCH 6/6] mesa: check for identity matrix in _mesa_LoadMatrixf()

2015-07-17 Thread Brian Paul
Google Earth often calls glLoadMatrixf() with an identity matrix instead of glLoadIdentity() to set the modelview and texture matrices. In many cases, the matrix is already the identity so the calls are redundant. By being a bit smarter in _mesa_LoadMatrixf() we can avoid quite a few matrix-relat

[Mesa-dev] [PATCH 5/6] mesa: don't set dirty matrix flag if re-loading identity matrix

2015-07-17 Thread Brian Paul
--- src/mesa/main/matrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 80c8a24..5ac97f8 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -309,8 +309,10 @@ _mesa_LoadIdentity( void ) if (MESA_

[Mesa-dev] [PATCH 4/6] mesa: optimize _math_matrix_set_identity() and return a bool result

2015-07-17 Thread Brian Paul
Skip memcpy() calls, etc. if the matrix is already the identity. Return true/false to indicate if we're really changing the matrix or not. --- src/mesa/math/m_matrix.c | 23 +++ src/mesa/math/m_matrix.h | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/s

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-17 Thread Brian Paul
On 07/17/2015 02:11 PM, Ilia Mirkin wrote: You have logically moved the error checks before calling FLUSH_VERTICES(ctx, 0); whereas it used to get called before the error checks before. I don't know whether that's significant, but thought I'd mention it. In other parts of Mesa, we usually che

Re: [Mesa-dev] [PATCH 1/2] mesa: Detect and provide macros for function attributes pure and const.

2015-07-17 Thread Eric Anholt
Emil Velikov writes: > On 14/07/15 19:45, Eric Anholt wrote: >> These are really useful hints to the compiler in the absence of link-time >> optimization, and I'm going to use them in VC4. >> >> I've made the const attribute be ATTRIBUTE_CONST unlike other function >> attributes, because we have

Re: [Mesa-dev] [Mesa-stable] [PATCH 16/18] i965: Prevent coordinate overflow in intel_emit_linear_blit

2015-07-17 Thread Anuj Phogat
On Mon, Jul 6, 2015 at 3:33 AM, Chris Wilson wrote: > Fixes regression from > commit 8c17d53823c77ac1c56b0548e4e54f69a33285f1 > Author: Kenneth Graunke > Date: Wed Apr 15 03:04:33 2015 -0700 > > i965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions. > > which adjusted the co

[Mesa-dev] [PATCH] libdrm/amdgpu: Use private fd for amdgpu_device and winsys hash table to fix ZaphodHeads. (v2)

2015-07-17 Thread Mario Kleiner
The amdgpu_device for a device node needs its own dup'ed fd, instead of using the original fd passed in for a screen, to make multi-x-screen ZaphodHeads configurations work on amdgpu. The original fd's lifetime differs from that of the amdgpu_device, and from the one stored in the hash. The hash k

Re: [Mesa-dev] [PATCH 07/12] glsl: automake: remove custom AM_V_LEX/YACC

2015-07-17 Thread Timothy Arceri
On Fri, 2015-07-17 at 19:35 +0100, Emil Velikov wrote: > On 17 July 2015 at 19:02, Matt Turner wrote: > > On Fri, Jul 17, 2015 at 10:29 AM, Emil Velikov > > wrote: > > > We already use AM_V_GEN in src/mesa for lex/yacc. Plus we use the > > > generic macro for python generated sources as well. >

Re: [Mesa-dev] [PATCH] Revert "i965/gen9: Plugin the code for selecting YF/YS tiling on skl+"

2015-07-17 Thread Kenneth Graunke
On Friday, July 17, 2015 02:43:09 PM Anuj Phogat wrote: > Commit c9dbdc0 introduced some dead code which is supposed to be used > once we have Yf/Ys tiling working and performing better. Ken reported > the issue that static analysis tool now shows warnings due to the dead > code. To fix these warni

Re: [Mesa-dev] [PATCH 5/6 v4] i965: Upload binding tables in hw-generated binding table format.

2015-07-17 Thread Kenneth Graunke
On Friday, July 17, 2015 12:38:39 PM Abdiel Janulgue wrote: > When hardware-generated binding tables are enabled, use the hw-generated > binding table format when uploading binding table state. > > Normally, the CS will will just consume the binding table pointer commands > as pipelined state. Whe

Re: [Mesa-dev] [PATCH 01/14] meta: handle subimages in _mesa_meta_setup_texture_coords()

2015-07-17 Thread Anuj Phogat
On Wed, Jul 15, 2015 at 4:40 PM, Brian Paul wrote: > v2: fix depth, total_depth mix-up in meta.h, per Laura Ekstrand. > --- > src/mesa/drivers/common/meta.c | 88 > +- > src/mesa/drivers/common/meta.h | 6 +- > src/mesa/drivers/common/meta

[Mesa-dev] [PATCH] Revert "i965/gen9: Plugin the code for selecting YF/YS tiling on skl+"

2015-07-17 Thread Anuj Phogat
Commit c9dbdc0 introduced some dead code which is supposed to be used once we have Yf/Ys tiling working and performing better. Ken reported the issue that static analysis tool now shows warnings due to the dead code. To fix these warnings, this patch reverts the changes made in commit c9dbdc0. It'

Re: [Mesa-dev] [PATCH 1/2] i965/cs: Setup push constant data for uniforms

2015-07-17 Thread Jordan Justen
On 2015-07-09 17:15:14, Ben Widawsky wrote: > On Tue, Jun 16, 2015 at 02:21:39PM -0700, Jordan Justen wrote: > > +static void > > +gen7_upload_cs_push_constants(struct brw_context *brw) > > +{ > > + struct brw_stage_state *stage_state = &brw->cs.base; > > + > > + /* BRW_NEW_COMPUTE_PROGRAM */ >

Re: [Mesa-dev] [PATCH 1/3] egl/dri2: Close file descriptor on error.

2015-07-17 Thread Emil Velikov
On 15/07/15 17:00, Matt Turner wrote: > --- > src/egl/drivers/dri2/platform_drm.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/egl/drivers/dri2/platform_drm.c > b/src/egl/drivers/dri2/platform_drm.c > index 0d1f4c6..a8c5401 100644 > --- a/src/egl/drivers/dri2

Re: [Mesa-dev] [PATCH 3/3] i965: Mark default case of type_sz() unreachable.

2015-07-17 Thread Emil Velikov
On 15/07/15 17:00, Matt Turner wrote: > Otherwise Coverity thinks we'll divide by zero. > --- > src/mesa/drivers/dri/i965/brw_reg.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_reg.h > b/src/mesa/drivers/dri/i965/brw_reg.h > index c8b1341

Re: [Mesa-dev] [PATCH] nouveau: use bool instead of boolean

2015-07-17 Thread Ilia Mirkin
On Fri, Jul 17, 2015 at 5:02 PM, Emil Velikov wrote: > On 16/07/15 22:39, Samuel Pitoiset wrote: >> Signed-off-by: Samuel Pitoiset >> --- >> src/gallium/drivers/nouveau/codegen/nv50_ir.h | 2 +- >> .../drivers/nouveau/codegen/nv50_ir_driver.h | 14 +-- >> .../drivers/nouveau/codege

Re: [Mesa-dev] [PATCH] nouveau: use bool instead of boolean

2015-07-17 Thread Emil Velikov
On 16/07/15 22:39, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/nouveau/codegen/nv50_ir.h | 2 +- > .../drivers/nouveau/codegen/nv50_ir_driver.h | 14 +-- > .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 8 +- > .../nouveau/codegen/nv50

Re: [Mesa-dev] [PATCH 1/7] configure.ac: null, android, gdi are not valid egl-platforms

2015-07-17 Thread Emil Velikov
Would anyone be interested is skimming over this trivial series ? Thanks Emil On 10/07/15 18:49, Emil Velikov wrote: > ... and update the documentation to reflect reality. > null and gdi are gone, and surfaceless is a recent addition. > > Signed-off-by: Emil Velikov > --- > configure.ac | 3 -

Re: [Mesa-dev] [PATCH 5/5] i965/miptree: Rewrite the miptree map logic

2015-07-17 Thread Ben Widawsky
On Thu, Jul 16, 2015 at 03:06:48PM -0700, Matt Turner wrote: > On Tue, Jul 14, 2015 at 9:56 AM, Ben Widawsky > wrote: > > This patch rewrites the logic for determining which method we using for > > mapping > > a miptree. It is my intention that that this patch, the required patches > > before >

Re: [Mesa-dev] [PATCH 1/2] mesa: Detect and provide macros for function attributes pure and const.

2015-07-17 Thread Emil Velikov
On 14/07/15 19:45, Eric Anholt wrote: > These are really useful hints to the compiler in the absence of link-time > optimization, and I'm going to use them in VC4. > > I've made the const attribute be ATTRIBUTE_CONST unlike other function > attributes, because we have other things in the tree #def

Re: [Mesa-dev] [PATCH 5/5] i965/miptree: Rewrite the miptree map logic

2015-07-17 Thread Ben Widawsky
On Thu, Jul 16, 2015 at 01:45:56PM -0700, Chad Versace wrote: > On Tue 14 Jul 2015, Ben Widawsky wrote: > > This patch rewrites the logic for determining which method we using for > > mapping > > a miptree. It is my intention that that this patch, the required patches > > before > > this do not c

Re: [Mesa-dev] [PATCH] svga: scons: remove unused HAVE_SYS_TYPES_H define

2015-07-17 Thread Emil Velikov
On 17 July 2015 at 20:22, Brian Paul wrote: > Can you elaborate in the commit message why this is being done or why the > HAVE_SYS_TYPES_H definition is not needed? That saves me time having to > research the issue myself. > I'm not sure I can elaborate more than "it's unused" without sounding to

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-17 Thread Ilia Mirkin
You have logically moved the error checks before calling FLUSH_VERTICES(ctx, 0); whereas it used to get called before the error checks before. I don't know whether that's significant, but thought I'd mention it. + for (i = 0; i < numFaces; i++) { + texImage = texObj->Image[firstFace + i]

Re: [Mesa-dev] [PATCH v3 5/6] i965: Upload binding tables in hw-generated binding table format.

2015-07-17 Thread Kenneth Graunke
On Friday, July 17, 2015 09:22:26 AM Abdiel Janulgue wrote: > > On 07/17/2015 05:41 AM, Kenneth Graunke wrote: > > >> > >> +static uint32_t > >> +reserve_hw_bt_space(struct brw_context *brw, unsigned bytes) > >> +{ > >> + if (brw->hw_bt_pool.next_offset + bytes >= brw->hw_bt_pool.bo->size -

Re: [Mesa-dev] [PATCH] svga: scons: remove unused HAVE_SYS_TYPES_H define

2015-07-17 Thread Brian Paul
Can you elaborate in the commit message why this is being done or why the HAVE_SYS_TYPES_H definition is not needed? That saves me time having to research the issue myself. -Brian On 07/17/2015 11:18 AM, Emil Velikov wrote: Cc: Jose Fonseca Cc: Brian Paul Signed-off-by: Emil Velikov ---

Re: [Mesa-dev] [PATCH 00/12] bmake inspired fixes

2015-07-17 Thread Emil Velikov
On 17 July 2015 at 19:09, Matt Turner wrote: > On Fri, Jul 17, 2015 at 10:29 AM, Emil Velikov > wrote: >> Hello all, >> >> A few days ago I realised that BSD make (bmake) is available in the >> Archlinux repos, so I decided to give it a try for drm & mesa. >> >> While the former was working (min

Re: [Mesa-dev] [PATCH 07/12] glsl: automake: remove custom AM_V_LEX/YACC

2015-07-17 Thread Emil Velikov
On 17 July 2015 at 19:02, Matt Turner wrote: > On Fri, Jul 17, 2015 at 10:29 AM, Emil Velikov > wrote: >> We already use AM_V_GEN in src/mesa for lex/yacc. Plus we use the >> generic macro for python generated sources as well. > > I'm in favor of removing "extras" when they cause problems, but I

Re: [Mesa-dev] [PATCH 1/3] i965/fs: Fix stride for immediate registers.

2015-07-17 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > On Fri, 2015-07-17 at 16:33 +0300, Francisco Jerez wrote: >> Samuel Iglesias Gonsálvez writes: >> >> > On 16/07/15 17:33, Francisco Jerez wrote: >> >> When the width field was removed from fs_reg the BROADCAST handling >> >> code in opt_algebraic() started to

Re: [Mesa-dev] [PATCH 1/5] utils: automake: remove uncommon $()

2015-07-17 Thread Emil Velikov
On 17 July 2015 at 19:11, Ilia Mirkin wrote: > On Fri, Jul 17, 2015 at 2:11 PM, Eric Anholt wrote: >> Matt Turner writes: >> >>> On Fri, Jul 17, 2015 at 10:17 AM, Emil Velikov >>> wrote: Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/util/tests/hash_table/Makefile.a

Re: [Mesa-dev] [PATCH 1/5] utils: automake: remove uncommon $()

2015-07-17 Thread Ilia Mirkin
On Fri, Jul 17, 2015 at 2:11 PM, Eric Anholt wrote: > Matt Turner writes: > >> On Fri, Jul 17, 2015 at 10:17 AM, Emil Velikov >> wrote: >>> Cc: Eric Anholt >>> Signed-off-by: Emil Velikov >>> --- >>> src/util/tests/hash_table/Makefile.am | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletio

Re: [Mesa-dev] [PATCH 1/5] utils: automake: remove uncommon $()

2015-07-17 Thread Eric Anholt
Matt Turner writes: > On Fri, Jul 17, 2015 at 10:17 AM, Emil Velikov > wrote: >> Cc: Eric Anholt >> Signed-off-by: Emil Velikov >> --- >> src/util/tests/hash_table/Makefile.am | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/src/util/tests/hash_table/Makefile.am

Re: [Mesa-dev] [PATCH 00/12] bmake inspired fixes

2015-07-17 Thread Matt Turner
On Fri, Jul 17, 2015 at 10:29 AM, Emil Velikov wrote: > Hello all, > > A few days ago I realised that BSD make (bmake) is available in the > Archlinux repos, so I decided to give it a try for drm & mesa. > > While the former was working (minus a small patch) mesa is not so lucky. > > This series a

Re: [Mesa-dev] [PATCH 07/12] glsl: automake: remove custom AM_V_LEX/YACC

2015-07-17 Thread Matt Turner
On Fri, Jul 17, 2015 at 10:29 AM, Emil Velikov wrote: > We already use AM_V_GEN in src/mesa for lex/yacc. Plus we use the > generic macro for python generated sources as well. I'm in favor of removing "extras" when they cause problems, but I'm not aware of any -- most of the lines git blame to th

Re: [Mesa-dev] [PATCH v2 02/14] meta: Fix transfer operations check in meta pbo path for readpixels

2015-07-17 Thread Anuj Phogat
Iago, Jason: Patches 2 and 5 in this series depend on patches 1 and 4 respectively, Since you guys reviewed 2 and 5, would you also like to review 1, 4 and/or other patches in this series? Thanks -Anuj On Sun, Jun 28, 2015 at 11:29 PM, Iago Toral wrote: > Reviewed-by: Iago Toral Quiroga > > On

[Mesa-dev] [PATCH V2 12/14] meta: Fix reading luminance texture as rgba in _mesa_meta_pbo_GetTexSubImage()

2015-07-17 Thread Anuj Phogat
After recent addition of pbo testing in piglit test getteximage-luminance, it fails on i965. This patch makes a sub test pass. This patch adds a clear color operation to meta pbo path, which I think is better than falling back to software path. V2: Fix color mask for GL_LUMINANCE_ALPHA Signed-of

[Mesa-dev] [PATCH 06/12] mesa: automake: rework the source generation rules

2015-07-17 Thread Emil Velikov
Same logic as previous commit applies. Additionally remove the odd (set -e/mv/INDENT) from the rules. The last one is the only one we remotely care about, if reading the generated sources. Upcoming work from DylanB which will replace the existing python scripts with ones that produce more readabl

[Mesa-dev] [PATCH 11/12] glsl: build: remove bogus dependency

2015-07-17 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/glsl/Android.gen.mk | 3 +-- src/glsl/Makefile.am| 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk index 3098614..6898fb0 100644 --- a/src/glsl/Android.gen.mk +++ b/src/glsl/Android.gen.

[Mesa-dev] [PATCH 05/12] mapi: automake: rework the source generation rules

2015-07-17 Thread Emil Velikov
Same logic as previous commit applies. Also fix bogus MESA_MAPI_DIR - the sources are located in the source dir (duh). Signed-off-by: Emil Velikov --- src/mapi/glapi/gen/Makefile.am | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/m

[Mesa-dev] [PATCH 04/12] mapi: automake: rework the *api/glapi_mapi_tmp.h rules

2015-07-17 Thread Emil Velikov
Same logic as previous commit applies. Signed-off-by: Emil Velikov --- src/mapi/Makefile.am | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am index b30de64..307e05d 100644 --- a/src/mapi/Makefile.am +++ b/src/ma

[Mesa-dev] [PATCH 10/12] glsl: build: use makefile.sources variables when possible

2015-07-17 Thread Emil Velikov
Rather than folding one variable within the other only to unwrap them, just use the ones we needed. Signed-off-by: Emil Velikov --- src/glsl/Android.gen.mk | 21 ++--- src/glsl/Makefile.am | 7 +-- src/glsl/Makefile.sources | 3 +-- 3 files changed, 12 insertions(+),

[Mesa-dev] [PATCH 07/12] glsl: automake: remove custom AM_V_LEX/YACC

2015-07-17 Thread Emil Velikov
We already use AM_V_GEN in src/mesa for lex/yacc. Plus we use the generic macro for python generated sources as well. Cc: Matt Turner Signed-off-by: Emil Velikov --- src/glsl/Makefile.am | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/glsl/Makefile

[Mesa-dev] [PATCH 08/12] glsl: automake: rework the sources generation rules

2015-07-17 Thread Emil Velikov
The glsl equivalent of "mesa: automake: rework the source generation rules". Plus let's make things consistent and always explicitly provide the header name. Signed-off-by: Emil Velikov --- src/glsl/Makefile.am | 38 ++ 1 file changed, 22 insertions(+), 16 del

[Mesa-dev] [PATCH 09/12] glsl: automake: reuse $(NIR_GENERATED_FILES) where possible

2015-07-17 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/glsl/Makefile.am | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am index cef5e15..8aed5ac 100644 --- a/src/glsl/Makefile.am +++ b/src/glsl/Makefile.am @@ -213,11 +213,7 @@ BUILT_SOURCES =

[Mesa-dev] [PATCH 12/12] auxiliary: fix the generated sources rules

2015-07-17 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/gallium/auxiliary/Makefile.am | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am index 04f77d0..a728162 100644 --- a/src/gallium/auxiliary/Ma

[Mesa-dev] [PATCH 01/12] mapi: automake: inline glapi_gen_mapi define

2015-07-17 Thread Emil Velikov
The construct is GNU make specific thus the final Makefile will fail on systems that lack support for it - namely bmake. Cc: 10.6 Cc: Jonathan Gray Signed-off-by: Emil Velikov --- src/mapi/Makefile.am | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 03/12] util: automake: rework the format_srgb.c rule

2015-07-17 Thread Emil Velikov
A hardful of changes/cleanups paving the way to bmake support: - Don't bother with a $(srcdir) to the prereq list. - No space after the AM_V_GEN variable. - Using $< in a non-suffix rule is a GNU make idiom. - Use $(@D) over $(dir $@). The latter makes bmake unhappy. XXX: Many places from now

[Mesa-dev] [PATCH 02/12] xmlpool: remove LOCALEDIR variable/fix bmake

2015-07-17 Thread Emil Velikov
The constuct used is GNU make specific thus building with bmake would fail as below. With this change we can finally build mesa with bmake. Perhaps this will convince the BSD people to switch to the build upstream provides :) --- options.h --- LOCALEDIR := . sh: line 2: LOCALEDIR: command not foun

[Mesa-dev] [PATCH 00/12] bmake inspired fixes

2015-07-17 Thread Emil Velikov
Hello all, A few days ago I realised that BSD make (bmake) is available in the Archlinux repos, so I decided to give it a try for drm & mesa. While the former was working (minus a small patch) mesa is not so lucky. This series attempts to remove the GNU make idioms, with the first two being th

Re: [Mesa-dev] [PATCH 1/5] utils: automake: remove uncommon $()

2015-07-17 Thread Matt Turner
On Fri, Jul 17, 2015 at 10:17 AM, Emil Velikov wrote: > Cc: Eric Anholt > Signed-off-by: Emil Velikov > --- > src/util/tests/hash_table/Makefile.am | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/util/tests/hash_table/Makefile.am > b/src/util/tests/hash_table/Mak

[Mesa-dev] [PATCH] svga: scons: remove unused HAVE_SYS_TYPES_H define

2015-07-17 Thread Emil Velikov
Cc: Jose Fonseca Cc: Brian Paul Signed-off-by: Emil Velikov --- src/gallium/drivers/svga/SConscript| 1 - src/gallium/winsys/svga/drm/SConscript | 1 - 2 files changed, 2 deletions(-) diff --git a/src/gallium/drivers/svga/SConscript b/src/gallium/drivers/svga/SConscript index bb4d034..0ee

[Mesa-dev] [PATCH 1/5] utils: automake: remove uncommon $()

2015-07-17 Thread Emil Velikov
Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/util/tests/hash_table/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/tests/hash_table/Makefile.am b/src/util/tests/hash_table/Makefile.am index 04a77e3..0c99e7b 100644 --- a/src/util/tests/hash_table

[Mesa-dev] [PATCH 3/5] vc4: automake: remove uncommon $()

2015-07-17 Thread Emil Velikov
Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/gallium/drivers/vc4/Makefile.am | 3 +-- src/gallium/drivers/vc4/Makefile.sources | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/vc4/Makefile.am b/src/gallium/drivers/vc4/Makefile.am index 7744

[Mesa-dev] [PATCH 2/5] dri: automake: remove uncommon $()

2015-07-17 Thread Emil Velikov
Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/Makefile.am | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am index 08a8e64..7656261 100644 --- a/src/mesa/drivers/dri/Makefile.am +++

[Mesa-dev] [PATCH 4/5] vc4: automake: remove unused include

2015-07-17 Thread Emil Velikov
Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/gallium/drivers/vc4/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/vc4/Makefile.am b/src/gallium/drivers/vc4/Makefile.am index b91ec3e..a4a7f86 100644 --- a/src/gallium/drivers/vc4/Makefil

[Mesa-dev] [PATCH 5/5] vc4: add missing nir include, to fix the build

2015-07-17 Thread Emil Velikov
Cc: 10.6 Cc: Eric Anholt Signed-off-by: Emil Velikov --- src/gallium/drivers/vc4/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/vc4/Makefile.am b/src/gallium/drivers/vc4/Makefile.am index a4a7f86..3b78502 100644 --- a/src/gallium/drivers/vc4/Makefile.am +++

Re: [Mesa-dev] [PATCH 1/3] i965/fs: Fix stride for immediate registers.

2015-07-17 Thread Samuel Iglesias Gonsálvez
On Fri, 2015-07-17 at 16:33 +0300, Francisco Jerez wrote: > Samuel Iglesias Gonsálvez writes: > > > On 16/07/15 17:33, Francisco Jerez wrote: > >> When the width field was removed from fs_reg the BROADCAST handling > >> code in opt_algebraic() started to miss a number of trivial > >> optimization

Re: [Mesa-dev] [PATCH 3/3] nir: add the ability insert a CF node after an instruction

2015-07-17 Thread Connor Abbott
On Thu, Jul 16, 2015 at 3:18 PM, Kenneth Graunke wrote: > From: Connor Abbott > > This will split the block containing the instruction and put the CF node > in between. > > v2: (by Kenneth Graunke) > - Simplify split_block_after_instr()'s implementation by using > split_block_end() rather than

Re: [Mesa-dev] [PATCH] mesa: fix up some texture error checks

2015-07-17 Thread Roland Scheidegger
Am 17.07.2015 um 16:18 schrieb Brian Paul: > On 07/16/2015 03:15 PM, srol...@vmware.com wrote: >> From: Roland Scheidegger >> >> In particular, we were incorrectly accepting s3tc (and lots of others) >> for CompressedTexSubImage3D (but not CompressedTexImage3D) calls with 3d >> targets. At this ti

Re: [Mesa-dev] [PATCH] mesa: fix up some texture error checks

2015-07-17 Thread Roland Scheidegger
Am 17.07.2015 um 16:18 schrieb Brian Paul: > On 07/16/2015 03:15 PM, srol...@vmware.com wrote: >> From: Roland Scheidegger >> >> In particular, we were incorrectly accepting s3tc (and lots of others) >> for CompressedTexSubImage3D (but not CompressedTexImage3D) calls with 3d >> targets. At this ti

Re: [Mesa-dev] [PATCH] mesa: fix up some texture error checks

2015-07-17 Thread Brian Paul
On 07/16/2015 03:15 PM, srol...@vmware.com wrote: From: Roland Scheidegger In particular, we were incorrectly accepting s3tc (and lots of others) for CompressedTexSubImage3D (but not CompressedTexImage3D) calls with 3d targets. At this time, the only allowed formats for these calls are the bptc

Re: [Mesa-dev] [PATCH 1/3] i965/fs: Fix stride for immediate registers.

2015-07-17 Thread Francisco Jerez
Samuel Iglesias Gonsálvez writes: > On 16/07/15 17:33, Francisco Jerez wrote: >> When the width field was removed from fs_reg the BROADCAST handling >> code in opt_algebraic() started to miss a number of trivial >> optimization cases resulting in the ugly indirect-addressing sequence >> to be emi

[Mesa-dev] [PATCH 5/6 v4] i965: Upload binding tables in hw-generated binding table format.

2015-07-17 Thread Abdiel Janulgue
When hardware-generated binding tables are enabled, use the hw-generated binding table format when uploading binding table state. Normally, the CS will will just consume the binding table pointer commands as pipelined state. When the RS is enabled however, the RS flushes whatever edited surface st

Re: [Mesa-dev] [PATCH 1/6] radeonsi: remove redundant parameter in si_shader_binary_read

2015-07-17 Thread Michel Dänzer
On 17.07.2015 01:55, Marek Olšák wrote: > From: Marek Olšák The series is Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer __

Re: [Mesa-dev] [PATCH] radeonsi: don't return NULL fence if no fence is available

2015-07-17 Thread Michel Dänzer
On 17.07.2015 06:03, Marek Olšák wrote: > From: Marek Olšák > > An alternative (and ugly) solution to the current clover issue. How about something like this instead? (Compile tested only) diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c

Re: [Mesa-dev] [PATCH v5 3/6] i965: Enable hardware-generated binding tables on render path.

2015-07-17 Thread Abdiel Janulgue
On 07/17/2015 05:26 AM, Kenneth Graunke wrote: > On Tuesday, July 07, 2015 11:50:21 AM Abdiel Janulgue wrote: >> +void >> +gen7_disable_hw_binding_tables(struct brw_context *brw) >> +{ >> + if (!brw->use_resource_streamer) >> + return; >> + >> + int pkt_len = brw->gen >= 8 ? 4 : 3; >> +