Re: [Mesa-dev] Statically linking libstdc++ and libgcc

2015-03-11 Thread Vivek Dasmohapatra
Here's a version of the mesa build patches rolled into one patch, and driven by a configure argument --enable-static-libstdc++ which defaults to being off.From 2e967e89fefc2a107c29c6581c9885475a7b7a84 Mon Sep 17 00:00:00 2001 From: vivek Date: Thu, 12 Mar 2015 01:30:19 + Subject: [PATCH 1/2]

Re: [Mesa-dev] [PATCH 1/2] glsl: Expose built-in packing functions under GLSL 4.2.

2015-03-11 Thread Carl Worth
> ARB_shading_language_packing is part of GLSL 4.2, not 4.0 as I > mistakenly believed. The following functions are available only with > ARB_shading_language_packing, GLSL 4.2 (not GLSL 4.0), or ES 3.0: I'll trust you that you're correct on the specification version, so: Reviewed-by: Carl Worth

Re: [Mesa-dev] [PATCH 5/9] i965: Implement NIR intrinsics for loading VS system values.

2015-03-11 Thread Jason Ekstrand
On Wed, Mar 11, 2015 at 5:13 PM, Kenneth Graunke wrote: > On Wednesday, March 11, 2015 03:33:24 PM Jason Ekstrand wrote: > > I'm not terribly happy with how this worked out, I'm not going to NAK it > as > > I think it's the best we can do at the moment. > > > > The reason why Connor (and others)

[Mesa-dev] [PATCH 2/2] docs: List ARB_shading_language_packing/EXT_shader_integer_mix.

2015-03-11 Thread Matt Turner
--- docs/GL3.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/GL3.txt b/docs/GL3.txt index 43bbf85..289dd36 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -142,6 +142,7 @@ GL 4.2, GLSL 4.20: GL_ARB_shader_image_load_store in progress (curro) GL_ARB_conse

[Mesa-dev] [PATCH 1/2] glsl: Expose built-in packing functions under GLSL 4.2.

2015-03-11 Thread Matt Turner
ARB_shading_language_packing is part of GLSL 4.2, not 4.0 as I mistakenly believed. The following functions are available only with ARB_shading_language_packing, GLSL 4.2 (not GLSL 4.0), or ES 3.0: - packSnorm2x16 - unpackSnorm2x16 - packHalf2x16 - unpackHalf2x16 --- src/glsl/builtin_

Re: [Mesa-dev] [PATCH 2/2] tnl: HAVE_LE32_VERTS is never defined, remove associated code

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 6:29 PM, Brian Paul wrote: > --- > src/mesa/tnl_dd/t_dd_triemit.h | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/src/mesa/tnl_dd/t_dd_triemit.h b/src/mesa/tnl_dd/t_dd_triemit.h > index 39c9d26..082e83f 100644 > --- a/src/mesa/tnl_dd/t_dd_triemit.h > +++ b/s

[Mesa-dev] [PATCH 1/2] mesa: move LONGSTRING into generated enums.c

2015-03-11 Thread Brian Paul
enums.c is the only place this directive is needed. --- src/mapi/glapi/gen/gl_enums.py | 6 ++ src/mesa/main/compiler.h | 9 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py index d61618f..f45782d 100

[Mesa-dev] [PATCH 2/2] tnl: HAVE_LE32_VERTS is never defined, remove associated code

2015-03-11 Thread Brian Paul
--- src/mesa/tnl_dd/t_dd_triemit.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/mesa/tnl_dd/t_dd_triemit.h b/src/mesa/tnl_dd/t_dd_triemit.h index 39c9d26..082e83f 100644 --- a/src/mesa/tnl_dd/t_dd_triemit.h +++ b/src/mesa/tnl_dd/t_dd_triemit.h @@ -16,13 +16,6 @@ do {

Re: [Mesa-dev] GL/GLSL tests for GL 4.0 and newer

2015-03-11 Thread Marek Olšák
ARB_tessellation_shader We have some tests, but it's not enough to say that it works. Marek On Wed, Mar 11, 2015 at 11:25 PM, Ilia Mirkin wrote: > On Wed, Mar 11, 2015 at 6:17 PM, Dave Airlie wrote: >> On 12 March 2015 at 08:07, Ian Romanick wrote: >>> On 03/09/2015 12:18 AM, Ishara Abeyseker

Re: [Mesa-dev] [PATCH 6/6] i965: Allow Y-tiled allocations for large surfaces

2015-03-11 Thread Ben Widawsky
On Tue, Mar 10, 2015 at 05:39:24PM +, Neil Roberts wrote: > Ben Widawsky writes: > > > This patch will use a new calculation to determine if a surface can be > > blitted > > from or to. Previously, the "total_height" member was used. Total_height in > > the > > case of 2d, 3d, and cube map

Re: [Mesa-dev] [PATCH 5/9] i965: Implement NIR intrinsics for loading VS system values.

2015-03-11 Thread Kenneth Graunke
On Wednesday, March 11, 2015 03:33:24 PM Jason Ekstrand wrote: > I'm not terribly happy with how this worked out, I'm not going to NAK it as > I think it's the best we can do at the moment. > > The reason why Connor (and others) have chosen to emit these things at the > top of the shader is becaus

Re: [Mesa-dev] [PATCH 1/6] c11: add c11 compatibility wrapper around stdlib.h

2015-03-11 Thread Emil Velikov
On 9 March 2015 at 11:54, Jose Fonseca wrote: > On 07/03/15 19:38, Emil Velikov wrote: >> >> On 07/03/15 07:23, Jose Fonseca wrote: >> ... >>> >>> we still >>> didn't eliminate the use of non-portable _MTX_INITIALIZER_NP from Mesa >>> tree gave me pause. >>> >> The only way I can think about resol

Re: [Mesa-dev] [PATCH 4/4 v2] mesa: Check for valid PBO access in gl(Compressed)Tex(Sub)Image calls

2015-03-11 Thread Laura Ekstrand
On Tue, Mar 10, 2015 at 11:36 AM, Eduardo Lima Mitev wrote: > This patch adds two types of checks to the gl(Compressed)Tex(Sub)Imgage > family > of functions when a pixel buffer object is bound to GL_PIXEL_UNPACK_BUFFER: > > - That the buffer is not mapped. > - The total data size is within the b

Re: [Mesa-dev] [PATCH 3/5] i965/fs: Handle CMP.nz ... 0 and AND.nz ... 1 similarly in cmod propagation

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 1:44 PM, Ian Romanick wrote: > From: Ian Romanick > > Espically on platforms that do not natively generate 0u and ~0u for > Boolean results, we generate a lot of sequences where a CMP is > followed by an AND with 1. emit_bool_to_cond_code does this, for > example. On ILK

Re: [Mesa-dev] [PATCH 3/4 v2] mesa: Separate PBO validation checks from buffer mapping, to allow reuse

2015-03-11 Thread Laura Ekstrand
On Tue, Mar 10, 2015 at 11:34 AM, Eduardo Lima Mitev wrote: > Internal PBO functions such as _mesa_map_validate_pbo_source() and > _mesa_validate_pbo_compressed_teximage() perform validation and buffer > mapping > within the same call. > > This patch takes out the validation into separate functio

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 7:06 PM, Matt Turner wrote: > On Wed, Mar 11, 2015 at 4:04 PM, Ilia Mirkin wrote: >> On Wed, Mar 11, 2015 at 6:51 PM, Matt Turner wrote: >>> On Wed, Mar 11, 2015 at 3:13 PM, Ilia Mirkin wrote: On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner wrote: > glibc uses rou

Re: [Mesa-dev] [PATCH 5/5] i965/fs: Apply gl_FrontFacing ? -1 : 1 optimization only for floats

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 1:44 PM, Ian Romanick wrote: > From: Ian Romanick > > At the very least, unreal4/sun-temple/102.shader_test uses this pattern > for a signed integer result. However, that shader did not hit the > optimization in the first place because it uses !gl_FronFacing. I > changed

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 4:04 PM, Ilia Mirkin wrote: > On Wed, Mar 11, 2015 at 6:51 PM, Matt Turner wrote: >> On Wed, Mar 11, 2015 at 3:13 PM, Ilia Mirkin wrote: >>> On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner wrote: glibc uses roundsd/roundss in rint/f guarded by a runtime check. The

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 6:51 PM, Matt Turner wrote: > On Wed, Mar 11, 2015 at 3:13 PM, Ilia Mirkin wrote: >> On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner wrote: >>> glibc uses roundsd/roundss in rint/f guarded by a runtime check. The >>> SSE code here just allows those instructions to be inlined

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 3:13 PM, Ilia Mirkin wrote: > On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner wrote: >> glibc uses roundsd/roundss in rint/f guarded by a runtime check. The >> SSE code here just allows those instructions to be inlined. > > OK, as long as glibc would end up using the same rou

Re: [Mesa-dev] [PATCH 7/9] i965/fs: Handle VS inputs in the NIR backend.

2015-03-11 Thread Connor Abbott
On Wed, Mar 11, 2015 at 6:28 PM, Jason Ekstrand wrote: > I think I mentioned this at least once before, but I don't think that this > is a good long-term solution. The nir_lower_io function does two things > primarily. 1) It assigns each variable a "device location" and 2) changes > the variable

[Mesa-dev] [PATCH 1/2] main: Clean up a strange construction in use_shader_program().

2015-03-11 Thread Jordan Justen
From: Paul Berry Reviewed-by: Jordan Justen --- Two patches found in Paul's cs branch... src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 5731d58..872b559 100644 --- a/src/mesa/main/shader

[Mesa-dev] [PATCH 2/2] main: Change the type argument of use_shader_program() to gl_shader_stage.

2015-03-11 Thread Jordan Justen
From: Paul Berry This allows it to be called from a loop. Reviewed-by: Jordan Justen --- src/mesa/main/shaderapi.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 872b559..9409536 100644 -

Re: [Mesa-dev] [PATCH] loader: include for non-sysfs builds

2015-03-11 Thread Emil Velikov
On 11 March 2015 at 22:18, Ian Romanick wrote: > On 03/11/2015 02:44 PM, Emil Velikov wrote: >> On 11 March 2015 at 20:50, Ian Romanick wrote: >>> On 03/11/2015 12:12 PM, Emil Velikov wrote: Required by fstat(), otherwise we'll error out due to implicit function declaration. >>> >>> Alt

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Carl Worth
On Wed, Mar 11 2015, Matt Turner wrote: > Eric's initial patch adding constant expression evaluation for > ir_unop_round_even used nearbyint... Hi Matt, It's great to see this commit, (and with such a detailed message). Rounding is one of those things that can be surprisingly difficult to get cor

Re: [Mesa-dev] [PATCH 1/9] i965/fs: Store a pointer to brw_sampler_prog_key_data in the visitor.

2015-03-11 Thread Jason Ekstrand
I'll second Topi's comment. Other than that, not much jumpped out at me. I did make a comment on 7 which also applies (somewhat) to 8 and I made another comment on 5. However, none of this is blockers so this series is Reviewed-by: Jason Ekstrand On Wed, Mar 11, 2015 at 11:59 AM, Kenneth Graun

Re: [Mesa-dev] [PATCH 3/9] i965/nir: Lower to registers a bit later.

2015-03-11 Thread Ian Romanick
On 03/11/2015 12:01 PM, Kenneth Graunke wrote: > On Wednesday, March 11, 2015 10:29:02 AM Ian Romanick wrote: >> On 03/09/2015 01:58 AM, Kenneth Graunke wrote: >>> We can't safely call nir_optimize() with register present, since several >>> passes called in the loop can't handle registers, and will

Re: [Mesa-dev] [PATCH 5/9] i965: Implement NIR intrinsics for loading VS system values.

2015-03-11 Thread Jason Ekstrand
I'm not terribly happy with how this worked out, I'm not going to NAK it as I think it's the best we can do at the moment. The reason why Connor (and others) have chosen to emit these things at the top of the shader is because they frequently require some computation and we don't want to duplicate

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Francisco Jerez
Matt Turner writes: > On Wed, Mar 11, 2015 at 2:29 PM, Francisco Jerez > wrote: >> Matt Turner writes: >>> commit 4c4934636cb286e7d7836afc26e9d392e2f0f155 >>> Author: Paul Berry >>> Date: Tue Sep 24 15:18:52 2013 -0700 >>> >>> i965/blorp: retype destination register for texture SEND ins

Re: [Mesa-dev] [PATCH 7/9] i965/fs: Handle VS inputs in the NIR backend.

2015-03-11 Thread Jason Ekstrand
I think I mentioned this at least once before, but I don't think that this is a good long-term solution. The nir_lower_io function does two things primarily. 1) It assigns each variable a "device location" and 2) changes the variable loads to loads with an offset. In the long-term, I think we wa

Re: [Mesa-dev] GL/GLSL tests for GL 4.0 and newer

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 6:17 PM, Dave Airlie wrote: > On 12 March 2015 at 08:07, Ian Romanick wrote: >> On 03/09/2015 12:18 AM, Ishara Abeysekera wrote: >>> /I am interested on write tests for OpenGL 4.0 /GLSL 4.00 . >>> / >>> /But can you be more specify what areas you are expecting to be tested

Re: [Mesa-dev] [PATCH] loader: include for non-sysfs builds

2015-03-11 Thread Ian Romanick
On 03/11/2015 02:44 PM, Emil Velikov wrote: > On 11 March 2015 at 20:50, Ian Romanick wrote: >> On 03/11/2015 12:12 PM, Emil Velikov wrote: >>> Required by fstat(), otherwise we'll error out due to implicit function >>> declaration. >> >> Alternate suggestion... include unistd.h unconditionally.

Re: [Mesa-dev] GL/GLSL tests for GL 4.0 and newer

2015-03-11 Thread Dave Airlie
On 12 March 2015 at 08:07, Ian Romanick wrote: > On 03/09/2015 12:18 AM, Ishara Abeysekera wrote: >> /I am interested on write tests for OpenGL 4.0 /GLSL 4.00 . >> / >> /But can you be more specify what areas you are expecting to be tested, > > I haven't examined the API side very closely, but I k

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner wrote: > On Wed, Mar 11, 2015 at 3:04 PM, Ilia Mirkin wrote: >> While I'm not opposed to this style of implementation, do note that >> 99.738% of users will end up with distro-compiled packages >> targeting generic x86_64 and thus won't use the SSE

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 3:04 PM, Ilia Mirkin wrote: > While I'm not opposed to this style of implementation, do note that > 99.738% of users will end up with distro-compiled packages > targeting generic x86_64 and thus won't use the SSE variant. If it's > really better, might make sense to do

Re: [Mesa-dev] [PATCH 2/2] nir: Optimize a + neg(a)

2015-03-11 Thread Ian Romanick
On 03/10/2015 05:05 PM, Jason Ekstrand wrote: > > > On Tue, Mar 10, 2015 at 4:50 PM, Matt Turner > wrote: > > On Tue, Mar 10, 2015 at 4:20 PM, Ian Romanick > wrote: > > On 02/28/2015 12:19 PM, Matt Turner wrote: > >> On Sa

Re: [Mesa-dev] GL/GLSL tests for GL 4.0 and newer

2015-03-11 Thread Ian Romanick
On 03/09/2015 12:18 AM, Ishara Abeysekera wrote: > /I am interested on write tests for OpenGL 4.0 /GLSL 4.00 . > / > /But can you be more specify what areas you are expecting to be tested, I haven't examined the API side very closely, but I know of a few things in the shading language that need t

Re: [Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 5:52 PM, Matt Turner wrote: > +static inline float > +roundevenf(float x) > +{ > + float ret; > +#ifdef __SSE4_1__ > + __m128 m = _mm_load_ss(&x); > + m = _mm_round_ss(m, m, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC); > + _mm_store_ss(&ret, m); > +#else > + /*

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 2:29 PM, Francisco Jerez wrote: > Matt Turner writes: >> commit 4c4934636cb286e7d7836afc26e9d392e2f0f155 >> Author: Paul Berry >> Date: Tue Sep 24 15:18:52 2013 -0700 >> >> i965/blorp: retype destination register for texture SEND instruction to >> UW. >> >> The res

[Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

2015-03-11 Thread Matt Turner
Eric's initial patch adding constant expression evaluation for ir_unop_round_even used nearbyint. The open-coded _mesa_round_to_even implementation came about without much explanation after a reviewer asked whether nearbyint depended on the application not modifying the rounding mode. Of course (as

Re: [Mesa-dev] [PATCH] loader: include for non-sysfs builds

2015-03-11 Thread Emil Velikov
On 11 March 2015 at 20:50, Ian Romanick wrote: > On 03/11/2015 12:12 PM, Emil Velikov wrote: >> Required by fstat(), otherwise we'll error out due to implicit function >> declaration. > > Alternate suggestion... include unistd.h unconditionally. I see that's > already in the #ifdef HAVE_LIBUDEV p

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Francisco Jerez
Matt Turner writes: > On Wed, Mar 11, 2015 at 1:07 PM, Kenneth Graunke > wrote: >> On Wednesday, March 11, 2015 07:25:14 PM Francisco Jerez wrote: >>> "Pohjolainen, Topi" writes: >>> > On Fri, Feb 27, 2015 at 05:34:44PM +0200, Francisco Jerez wrote: >>> >> @@ -1218,17 +1198,6 @@ >>> >> fs_gen

Re: [Mesa-dev] [PATCH ] i965/aa: fixing anti-aliasing bug for thinnest width lines.

2015-03-11 Thread Ilia Mirkin
On Wed, Mar 11, 2015 at 5:57 PM, wrote: > From: Marius Predut Set your email from name correctly in git and then you won't have this line in your git send-email results. > > On SNB and IVB hw, for 1 pixel line thickness or less, > the general anti-aliasing algorithm give up - garbage line is g

[Mesa-dev] [PATCH ] i965/aa: fixing anti-aliasing bug for thinnest width lines.

2015-03-11 Thread marius . predut
From: Marius Predut On SNB and IVB hw, for 1 pixel line thickness or less, the general anti-aliasing algorithm give up - garbage line is generated. Setting a Line Width of 0.0 specifies the rasterization of the “thinnest” (one-pixel-wide), non-antialiased lines. Lines rendered with zero Line Widt

Re: [Mesa-dev] [PATCH v4] mesa: improve ARB_copy_image internal format compat check

2015-03-11 Thread Jason Ekstrand
Sean, Sorry it's taken so long for me to get to this, but I went to test/push this today and it doesn't apply against current mesa master. Can you please either rebase on master and re-send or give me the SHA1 hash of the commit this one is based on. (Not the SHA1 of this commit but the previous

Re: [Mesa-dev] [PATCH] loader: include for non-sysfs builds

2015-03-11 Thread Ian Romanick
On 03/11/2015 12:12 PM, Emil Velikov wrote: > Required by fstat(), otherwise we'll error out due to implicit function > declaration. Alternate suggestion... include unistd.h unconditionally. I see that's already in the #ifdef HAVE_LIBUDEV path. Does that work too? > Cc: "10.4 10.5" > Bugzilla:

[Mesa-dev] [PATCH 3/5] i965/fs: Handle CMP.nz ... 0 and AND.nz ... 1 similarly in cmod propagation

2015-03-11 Thread Ian Romanick
From: Ian Romanick Espically on platforms that do not natively generate 0u and ~0u for Boolean results, we generate a lot of sequences where a CMP is followed by an AND with 1. emit_bool_to_cond_code does this, for example. On ILK, this results in a sequence like: add(8) g3<1>F

[Mesa-dev] [PATCH 2/5] i965/fs: Emit better b2f of an expression on GEN4 and GEN5

2015-03-11 Thread Ian Romanick
From: Ian Romanick On platforms that do not natively generate 0u and ~0u for Boolean results, b2f expressions that look like f = b2f(expr cmp 0) will generate better code by pretending the expression is f = ir_triop_sel(0.0, 1.0, expr cmp 0) This is because the last instruction of "exp

[Mesa-dev] [PATCH 4/5] i965/fs: Change try_opt_frontfacing_ternary to eliminate asserts

2015-03-11 Thread Ian Romanick
From: Ian Romanick If we check for the case that is actually necessary, the asserts become superfluous. Signed-off-by: Ian Romanick Cc: Matt Turner --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 5/5] i965/fs: Apply gl_FrontFacing ? -1 : 1 optimization only for floats

2015-03-11 Thread Ian Romanick
From: Ian Romanick At the very least, unreal4/sun-temple/102.shader_test uses this pattern for a signed integer result. However, that shader did not hit the optimization in the first place because it uses !gl_FronFacing. I changed the shader to use remove the logical-not and reverse the other o

[Mesa-dev] [PATCH 1/5] i965/vs: Add missing resolve_bool_comparison calls on GEN4 and GEN5

2015-03-11 Thread Ian Romanick
From: Ian Romanick The ir_unop_any problem was discovered by some later optimization passes that generate ir_triop_csel. I was also able to reproduce it by modifying the gl-2.0-vertexattribpointer vertex shader to generate its result using color = mix(vec4(0, 1, 0, 0), vec4(1,

Re: [Mesa-dev] [PATCH 5/6] mesa: replace _ASMAPI with __cdecl

2015-03-11 Thread Jose Fonseca
On 11/03/15 16:52, Brian Paul wrote: On 03/11/2015 08:21 AM, Jose Fonseca wrote: On 11/03/15 14:07, Brian Paul wrote: On 03/11/2015 01:29 AM, Jose Fonseca wrote: I don't know the story about this _ASMAPI macro, but __cdecl is also the default calling convention for WIN32: https://msdn.micr

[Mesa-dev] [Bug 89530] FTBFS in loader: missing fstat

2015-03-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89530 --- Comment #3 from Vadim Rutkovsky --- (In reply to Emil Velikov from comment #1) > Sigh... you again with the fstat() implicit declaration :P > But seriously that code has been there for 3+ months and no-one has reported > a thing, despite the

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Kenneth Graunke
On Wednesday, March 11, 2015 07:25:14 PM Francisco Jerez wrote: > "Pohjolainen, Topi" writes: > > On Fri, Feb 27, 2015 at 05:34:44PM +0200, Francisco Jerez wrote: > >> @@ -1218,17 +1198,6 @@ > >> fs_generator::generate_varying_pull_constant_load_gen7(fs_inst *inst, > >>

[Mesa-dev] [Bug 89530] FTBFS in loader: missing fstat

2015-03-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89530 --- Comment #2 from Emil Velikov --- And just in case there was some misunderstanding - your system is reporting the correct thing. I'm wondering why we haven't seen this before. -- You are receiving this mail because: You are the QA Contact fo

[Mesa-dev] [Bug 89530] FTBFS in loader: missing fstat

2015-03-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89530 --- Comment #1 from Emil Velikov --- Sigh... you again with the fstat() implicit declaration :P But seriously that code has been there for 3+ months and no-one has reported a thing, despite the missing include. There must be something really spec

[Mesa-dev] [PATCH] loader: include for non-sysfs builds

2015-03-11 Thread Emil Velikov
Required by fstat(), otherwise we'll error out due to implicit function declaration. Cc: "10.4 10.5" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530 Signed-off-by: Emil Velikov --- src/loader/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/lo

Re: [Mesa-dev] [PATCH 3/9] i965/nir: Lower to registers a bit later.

2015-03-11 Thread Kenneth Graunke
On Wednesday, March 11, 2015 10:29:02 AM Ian Romanick wrote: > On 03/09/2015 01:58 AM, Kenneth Graunke wrote: > > We can't safely call nir_optimize() with register present, since several > > passes called in the loop can't handle registers, and will fail asserts. > > Doesn't that mean this patch s

Re: [Mesa-dev] [PATCH v2 0/4] Support multiple state pipelines for i965

2015-03-11 Thread Kristian Høgsberg
On Wed, Mar 11, 2015 at 11:53 AM, Jordan Justen wrote: > git://people.freedesktop.org/~jljusten/mesa i965-pipelines-v2 > > The big changes from v1: > * Rename brw->atoms[] to render_atoms > * Add brw->compute_atoms[] > * Replace brw_pipeline_first_atom with brw_get_pipeline_atoms > > With this

[Mesa-dev] [PATCH v2 2/4] i965/state: Support multiple pipelines in brw->num_atoms

2015-03-11 Thread Jordan Justen
brw->num_atoms is converted to an array, but currently just an array of length 1. Adds brw_copy_pipeline_atoms which copies the atoms for a pipeline, and sets brw->num_atoms[p] for pipeline p. v2: * Rename brw->atoms[] to render_atoms * Rename brw_add_pipeline_atoms to brw_copy_pipeline_atoms

[Mesa-dev] [PATCH v2 0/4] Support multiple state pipelines for i965

2015-03-11 Thread Jordan Justen
git://people.freedesktop.org/~jljusten/mesa i965-pipelines-v2 The big changes from v1: * Rename brw->atoms[] to render_atoms * Add brw->compute_atoms[] * Replace brw_pipeline_first_atom with brw_get_pipeline_atoms With this version, I was not able to measure a performance change with SynMask B

[Mesa-dev] [PATCH v2 1/4] i965/state: Rename brw_upload_state to brw_upload_render_state

2015-03-11 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_draw.c | 2 +- src/mesa/drivers/dri/i965/brw_state.h| 2 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/sr

[Mesa-dev] [PATCH v2 4/4] i965/state: Add compute pipeline with empty atom lists

2015-03-11 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.h | 2 ++ src/mesa/drivers/dri/i965/brw_state.h| 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 28 +++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/mesa/drive

[Mesa-dev] [PATCH v2 3/4] i965/state: Create separate dirty state bits for each pipeline

2015-03-11 Thread Jordan Justen
When uploading state for a pipeline, we will save changed state for the other pipelines. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_state_upload.c | 42 ++-- 2 files changed, 35 insertions(+), 8 dele

Re: [Mesa-dev] [PATCH 1/3] Revert "common: Fix PBOs for 1D_ARRAY."

2015-03-11 Thread Emil Velikov
On 9 March 2015 at 11:36, Neil Roberts wrote: > Hi Emil, > > The resolve looks good, however I think it would also make sense to > cherry pick a44606 to the stable branch. It doesn't do any harm either > way but it should be slightly faster and cleaner with that patch as > well. > Thanks Neil. The

Re: [Mesa-dev] [Mesa-stable] [PATCH 4/4] i965/fs: Don't issue FB writes for bound but unwritten color targets.

2015-03-11 Thread Emil Velikov
On 7 March 2015 at 21:35, Jason Ekstrand wrote: > On Sat, Mar 7, 2015 at 9:58 AM, Emil Velikov > wrote: >> >> On 27 February 2015 at 08:06, Kenneth Graunke >> wrote: >> > We used to loop over all color attachments, and emit FB writes for each >> > one, even if the shader didn't write to a corres

Re: [Mesa-dev] [PATCH v2 1/2] util: Fix foreach_list_typed_safe when exec_node is not at offset 0.

2015-03-11 Thread Connor Abbott
This version LGTM too. On Wed, Mar 11, 2015 at 1:54 PM, Jason Ekstrand wrote: > __next and __prev are pointers to the structure containing the exec_node > link, not the embedded exec_node. NULL checks would fail unless the > embedded exec_node happened to be at offset 0 in the parent struct. > >

Re: [Mesa-dev] [PATCH 2/2] mesa: use strdup() instead of _mesa_strdup()

2015-03-11 Thread Emil Velikov
On 11/03/15 01:42, Brian Paul wrote: > We were already using strdup() in various places in Mesa. Get rid > of the _mesa_strdup() wrapper. All the callers pass a non-NULL > argument so the NULL check isn't needed either. Last time I've tried using strdup with MSVC there were a few warnings. Iirc t

Re: [Mesa-dev] [PATCH v2 1/2] util: Fix foreach_list_typed_safe when exec_node is not at offset 0.

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 10:54 AM, Jason Ekstrand wrote: > __next and __prev are pointers to the structure containing the exec_node > link, not the embedded exec_node. NULL checks would fail unless the > embedded exec_node happened to be at offset 0 in the parent struct. > > v1 Reviewed-by: Kennet

[Mesa-dev] [PATCH v2 1/2] util: Fix foreach_list_typed_safe when exec_node is not at offset 0.

2015-03-11 Thread Jason Ekstrand
__next and __prev are pointers to the structure containing the exec_node link, not the embedded exec_node. NULL checks would fail unless the embedded exec_node happened to be at offset 0 in the parent struct. v1 Reviewed-by: Kenneth Graunke v1 Reviewed-by: Connor Abbott v2: Jason Ekstrand :

Re: [Mesa-dev] replace __FUNCTION__ with __func__ task

2015-03-11 Thread Predut, Marius
I take a look Thanks, marius > -Original Message- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of > Jose Fonseca > Sent: Wednesday, March 04, 2015 12:06 AM > To: Jan Vesely; Brian Paul > Cc: mesa-dev@lists.freedesktop.org > Subject: Re: [Mesa-dev] replace __F

Re: [Mesa-dev] [RFC] i965: Factor out descriptor building for indirect send messages

2015-03-11 Thread Pohjolainen, Topi
On Tue, Mar 10, 2015 at 11:07:26PM +0200, Francisco Jerez wrote: > "Pohjolainen, Topi" writes: > > > On Mon, Mar 09, 2015 at 12:43:08PM +0200, Francisco Jerez wrote: > >> "Pohjolainen, Topi" writes: > >> > >> > On Sat, Mar 07, 2015 at 04:15:08PM +0200, Francisco Jerez wrote: > >> >> Topi Pohjol

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Pohjolainen, Topi
On Wed, Mar 11, 2015 at 07:25:14PM +0200, Francisco Jerez wrote: > "Pohjolainen, Topi" writes: > > > On Fri, Feb 27, 2015 at 05:34:44PM +0200, Francisco Jerez wrote: > >> --- > >> src/mesa/drivers/dri/i965/brw_eu.h | 19 ++-- > >> src/mesa/drivers/dri/i965/brw_eu_emit.c

Re: [Mesa-dev] [PATCH 4/9] nir: Add intrinsics for SYSTEM_VALUE_BASE_VERTEX and VERTEX_ID_ZERO_BASE

2015-03-11 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 03/09/2015 01:58 AM, Kenneth Graunke wrote: > Ian and I added these around the time Connor was developing NIR. Now > that both exist, we should make them work together! > > Signed-off-by: Kenneth Graunke > --- > src/glsl/nir/nir_intrinsics.h

Re: [Mesa-dev] [PATCH 3/9] i965/nir: Lower to registers a bit later.

2015-03-11 Thread Ian Romanick
On 03/09/2015 01:58 AM, Kenneth Graunke wrote: > We can't safely call nir_optimize() with register present, since several > passes called in the loop can't handle registers, and will fail asserts. Doesn't that mean this patch should go before patch 2? > Notably, nir_lower_vec_alus() and nir_opt_a

Re: [Mesa-dev] [PATCH] i965: Fix out-of-bounds accesses into pull_constant_loc array

2015-03-11 Thread Matt Turner
On Wed, Mar 11, 2015 at 10:10 AM, Ian Romanick wrote: > Given the age of this bug, should this be a candidate for 10.4 and 10.5 > stable branches? I think so. I just sent a cherry-pick request for 10.4 and 10.5. ___ mesa-dev mailing list mesa-dev@lists.

Re: [Mesa-dev] [PATCH 1/3] swrast: remove _BLENDAPI

2015-03-11 Thread Ian Romanick
Series is Reviewed-by: Ian Romanick One humorous observation below... On 03/11/2015 09:49 AM, Brian Paul wrote: > _BLENDAPI boils down to __cdecl on Windows, but __cdecl is the default > calling convention so this serves no purpose. > --- > src/mesa/swrast/s_blend.c | 21 +---

Re: [Mesa-dev] [PATCH 01/13] i965: Factor out logic to build a send message instruction with indirect descriptor.

2015-03-11 Thread Pohjolainen, Topi
On Fri, Feb 27, 2015 at 05:34:44PM +0200, Francisco Jerez wrote: > --- > src/mesa/drivers/dri/i965/brw_eu.h | 19 ++-- > src/mesa/drivers/dri/i965/brw_eu_emit.c | 58 > ++-- > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 55 +---

[Mesa-dev] [PATCH 2/3] mesa: remove _XFORMAPI

2015-03-11 Thread Brian Paul
--- src/mesa/math/m_clip_tmp.h | 8 +++ src/mesa/math/m_norm_tmp.h | 18 +++--- src/mesa/math/m_xform.h | 36 +++- src/mesa/math/m_xform_tmp.h | 58 ++--- 4 files changed, 56 insertions(+), 64 deletions(-) diff --g

[Mesa-dev] [PATCH 1/3] swrast: remove _BLENDAPI

2015-03-11 Thread Brian Paul
_BLENDAPI boils down to __cdecl on Windows, but __cdecl is the default calling convention so this serves no purpose. --- src/mesa/swrast/s_blend.c | 21 + src/mesa/swrast/s_context.h | 8 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/mesa/swra

[Mesa-dev] [PATCH 3/3] mesa: remove _ASMAPI, ASMAPIP

2015-03-11 Thread Brian Paul
--- src/mesa/main/compiler.h| 19 --- src/mesa/swrast/s_context.c | 2 +- src/mesa/x86/3dnow.c| 6 +++--- src/mesa/x86/common_x86.c | 12 ++-- src/mesa/x86/mmx.h | 10 +- src/mesa/x86/sse.c | 20 ++-- src/mesa/x86/x8

Re: [Mesa-dev] [PATCH 5/6] mesa: replace _ASMAPI with __cdecl

2015-03-11 Thread Brian Paul
On 03/11/2015 08:21 AM, Jose Fonseca wrote: On 11/03/15 14:07, Brian Paul wrote: On 03/11/2015 01:29 AM, Jose Fonseca wrote: I don't know the story about this _ASMAPI macro, but __cdecl is also the default calling convention for WIN32: https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx

Re: [Mesa-dev] Statically linking libstdc++ and libgcc

2015-03-11 Thread Ian Romanick
On 03/11/2015 09:32 AM, Jose Fonseca wrote: > I can almost bet that NVIDIA uses C++ somewhere, but no dependencies on > libstdc++. Not sure if they chose to statically link libstdc++ to > support multiple distros, or to avoid issues like applications shipping > their own libstdc++... My recollect

Re: [Mesa-dev] Statically linking libstdc++ and libgcc

2015-03-11 Thread Ian Romanick
On 03/11/2015 09:31 AM, Tobias Klausmann wrote: > The problem in not forcing this to link statically is, that if a > distribution decides to not use this static option, the problem persists > on that distribution. On top every lib pulled in by steam from the > system would need to be link staticall

Re: [Mesa-dev] Statically linking libstdc++ and libgcc

2015-03-11 Thread Tobias Klausmann
On 11.03.2015 17:01, Francisco Jerez wrote: Vivek Dasmohapatra writes: Hi - Hi, As you probably already know, there can only be one version of libstdc++.so in your runtime link chain That's a common misconception, in principle several versions of libstdc++.so with different DT_SONAME (i.

Re: [Mesa-dev] [PATCH] nir/worklist: Don't change the start index when computing the tail index

2015-03-11 Thread Mark Janes
Reviewed-by: Mark Janes Jason Ekstrand writes: > --- > src/glsl/nir/nir_worklist.c | 10 +- > src/glsl/nir/nir_worklist.h | 4 ++-- > 2 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/glsl/nir/nir_worklist.c b/src/glsl/nir/nir_worklist.c > index a8baae9..3087a1d 10

Re: [Mesa-dev] [PATCH] i965: Defer the throttle until we submit new commands

2015-03-11 Thread Ian Romanick
I've sent my substantive feedback in other messages in the thread. Below is just some nitpicky formatting kinds of stuff. On 03/11/2015 05:36 AM, Chris Wilson wrote: > Currently, we throttle before the user begins preparing commands for the > next frame when we acquire the draw/read buffers. Howev

Re: [Mesa-dev] [PATCH 1/2] i965: Throttle rendering to an fbo

2015-03-11 Thread Ian Romanick
I've sent my substantive feedback in other messages in the thread. Below is just some nitpicky formatting kinds of stuff. On 03/06/2015 01:58 PM, Chris Wilson wrote: > When rendering to an fbo, even though it may be acting as a winsys > frontbuffer or just generally, we never throttle. However, wh

Re: [Mesa-dev] [PATCH] i965: Throttle rendering to an fbo

2015-03-11 Thread Ian Romanick
On 03/06/2015 06:30 AM, Daniel Vetter wrote: > On Thu, Mar 05, 2015 at 02:38:44PM -0800, Ian Romanick wrote: >> On 03/04/2015 10:28 AM, Chad Versace wrote: >>> That text does not appear in the GL spec. When I read the manpage alongside >>> the GL spec, to get a more complete context, I think the ma

Re: [Mesa-dev] [PATCH 1/4] mesa: move fpclassify work-arounds into c99_math.h

2015-03-11 Thread Jose Fonseca
On 11/03/15 15:48, Brian Paul wrote: On 03/11/2015 08:20 AM, Brian Paul wrote: On 03/11/2015 01:23 AM, Jose Fonseca wrote: On 11/03/15 01:41, Brian Paul wrote: --- include/c99_math.h | 52 + src/mesa/main/querymatrix.c | 51 +-

Re: [Mesa-dev] [PATCH 1/4] mesa: move fpclassify work-arounds into c99_math.h

2015-03-11 Thread Brian Paul
On 03/11/2015 08:20 AM, Brian Paul wrote: On 03/11/2015 01:23 AM, Jose Fonseca wrote: On 11/03/15 01:41, Brian Paul wrote: --- include/c99_math.h | 52 + src/mesa/main/querymatrix.c | 51 +--- 2 fil

Re: [Mesa-dev] [PATCH v1] vbo: improve the code style by adjust the preprocessing c code directives

2015-03-11 Thread Brian Paul
Looks good. I'll push this for you. -Brian On 03/11/2015 03:25 AM, marius.pre...@intel.com wrote: From: Marius Predut Brian Paul review suggestion: there's more macro use here than necessary. Removed and redefine some #define preprocessing directives. Removed the directive input parameter 'T

Re: [Mesa-dev] [PATCH ] vbo: improve the code style by adjust the preprocessing c code directives.

2015-03-11 Thread Predut, Marius
> -Original Message- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of > Brian Paul > Sent: Tuesday, March 10, 2015 5:36 PM > To: Predut, Marius; mesa-dev@lists.freedesktop.org > Subject: Re: [Mesa-dev] [PATCH ] vbo: improve the code style by adjust the > preproc

[Mesa-dev] [PATCH v1] vbo: improve the code style by adjust the preprocessing c code directives

2015-03-11 Thread marius . predut
From: Marius Predut Brian Paul review suggestion: there's more macro use here than necessary. Removed and redefine some #define preprocessing directives. Removed the directive input parameter 'T' . No functional changes. Signed-off-by: Marius Predut Reviewed-by: Brian Paul --- src/mesa/vbo/vb

Re: [Mesa-dev] [PATCH] xlib: use strdup() instead of _mesa_strdup()

2015-03-11 Thread Ian Romanick
Assuming that this lands before patch 2 in the previous strdup series (so that the build doesn't break at any point), all 3 patches are Reviewed-by: Ian Romanick On 03/11/2015 07:12 AM, Brian Paul wrote: > --- > src/mesa/drivers/x11/fakeglx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deleti

[Mesa-dev] [PATCH 4/4] clover: use get_device_vendor instead of get_vendor

2015-03-11 Thread Giuseppe Bilotta
The pipe's get_vendor method returns something more akin to a driver vendor string in most cases, instead of the actual device vendor. Use get_device_vendor instead, which was introduced specifically for this purpose. Signed-off-by: Giuseppe Bilotta Reviewed-by: Michel Dänzer Reviewed-by: Franc

[Mesa-dev] [PATCHv4 0/4] Separate device from driver vendor

2015-03-11 Thread Giuseppe Bilotta
OpenCL (as opposed to OpenGL) has separate vendor strings for the implementation/driver/platform and the device. CL_PLATFORM_VENDOR is akin to the GL_VENDOR string, while CL_DEVICE_VENDOR is supposed to return the actual device vendor. (For example, the AMD OpenCL platform returns GenuineIntel as

[Mesa-dev] [PATCH 1/4] gallium: remove trailing whitespace in p_screen.h

2015-03-11 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta Reviewed-by: Michel Dänzer --- src/gallium/include/pipe/p_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index ac88506..4018f8a 100644 --- a/src/gallium/inclu

Re: [Mesa-dev] [PATCH 5/6] mesa: replace _ASMAPI with __cdecl

2015-03-11 Thread Jose Fonseca
On 11/03/15 14:07, Brian Paul wrote: On 03/11/2015 01:29 AM, Jose Fonseca wrote: I don't know the story about this _ASMAPI macro, but __cdecl is also the default calling convention for WIN32: https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx Yeah, I had read that too actually but I fi

Re: [Mesa-dev] [PATCH 1/4] mesa: move fpclassify work-arounds into c99_math.h

2015-03-11 Thread Brian Paul
On 03/11/2015 01:23 AM, Jose Fonseca wrote: On 11/03/15 01:41, Brian Paul wrote: --- include/c99_math.h | 52 + src/mesa/main/querymatrix.c | 51 +--- 2 files changed, 53 insertions(+), 50 deletions(

  1   2   >