Re: [Mesa-dev] [PATCH 01/10] i965: Delete duplicate write_timestamp function.

2014-01-09 Thread Eric Anholt
Kenneth Graunke writes: > brw_queryobj.c needs a version of write_timestamp that works on all > generations for the QueryCounter() driver hook. So there's no point in > duplicating it in gen6_queryobj.c. Patches 1, 4, 6, 7, 9, and 10 are: Reviewed-by: Eric Anholt Patch 2 landed. Patch 3 is r

Re: [Mesa-dev] [PATCH] i965/fs: Optimize LRP with x == y into a MOV.

2014-01-09 Thread Jordan Justen
Reviewed-by: Jordan Justen On Thu, Jan 9, 2014 at 8:58 PM, Matt Turner wrote: > total instructions in shared programs: 1487331 -> 1485988 (-0.09%) > instructions in affected programs: 45638 -> 44295 (-2.94%) > GAINED:7 > LOST:

Re: [Mesa-dev] [PATCH 19/30] mesa/cs: Handle compute shaders in _mesa_use_program().

2014-01-09 Thread Chris Forbes
Minor nit, but could CS be done after the ordered pipeline stages, for consistency? On Fri, Jan 10, 2014 at 3:19 PM, Paul Berry wrote: > --- > src/mesa/main/shaderapi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c > index 519b200.

Re: [Mesa-dev] [PATCH 05/30] glsl/linker: Refactor in preparation for adding more shader stages.

2014-01-09 Thread Chris Forbes
This is a nice cleanup; I like that this brings both writes to prog->LastClipDistanceArraySize together -- but it looks like the behavior changes slightly. Previously, if there was no VS and no GS, then we would never write prog->LastClipDistanceArraySize. Now we'll read an old junk value (potenti

Re: [Mesa-dev] [PATCH 05/10] i965: Use Global GTT for Sandybridge post-sync non-zero workaround.

2014-01-09 Thread Eric Anholt
Eric Anholt writes: > Kenneth Graunke writes: > >> The kernel doesn't even set up the aliasing PPGTT on Sandybridge, so any >> writes marked as PPGTT will likely just get dropped on the floor. > > The hardware bug is that writes not marked as GTT are still looked up in > the GTT anyway. > > The

[Mesa-dev] [PATCH] i965/fs: Optimize LRP with x == y into a MOV.

2014-01-09 Thread Matt Turner
total instructions in shared programs: 1487331 -> 1485988 (-0.09%) instructions in affected programs: 45638 -> 44295 (-2.94%) GAINED:7 LOST: 0 --- No change from the equivalent vec4 change. src/mesa/drivers/dri/i965/brw_fs.cpp |

Re: [Mesa-dev] [PATCH 08/10] i965: Introduce an OUT_RELOC64 macro.

2014-01-09 Thread Eric Anholt
Kenneth Graunke writes: > On 12/13/2013 09:28 AM, Daniel Vetter wrote: >> On Thu, Dec 12, 2013 at 01:26:40AM -0800, Kenneth Graunke wrote: >>> Broadwell uses 48-bit addresses. The first DWord is the low 32 bits, >>> and the second DWord is the high 16 bits. >>> >>> Since individual buffers shoul

Re: [Mesa-dev] [PATCH 11/30] mesa: Change redundant code into loops in shaderapi.c.

2014-01-09 Thread Chris Forbes
This is a slightly odd construction (although copied from the existing code): > + if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL)) > +shProg = NULL; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.

Re: [Mesa-dev] [PATCH 05/10] i965: Use Global GTT for Sandybridge post-sync non-zero workaround.

2014-01-09 Thread Eric Anholt
Kenneth Graunke writes: > The kernel doesn't even set up the aliasing PPGTT on Sandybridge, so any > writes marked as PPGTT will likely just get dropped on the floor. The hardware bug is that writes not marked as GTT are still looked up in the GTT anyway. The kernel does set up the PPGTT, which

Re: [Mesa-dev] [PATCH 03/10] i965: Create a helper function for emitting PIPE_CONTROL flushes.

2014-01-09 Thread Eric Anholt
Kenneth Graunke writes: > These days, we need to emit PIPE_CONTROL flushes all over the place. > Being able to do that via a single function call seems convenient. > > Broadwell will also increase the length of these packets by 1; with the > refactoring, we should have to do this in substantially

Re: [Mesa-dev] [PATCH 2/2] loader: fallback to drmGetVersion() for non-pci devices

2014-01-09 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > Use the driver name from drmGetVersion() for non-pci devices. Seems like a reasonable thing to do. Might just make it clear in the commit message that you're using the kernel driver name, not the userspace driver name. Reviewed-by: Eric Anholt pgpsE_

Re: [Mesa-dev] [PATCH 1/2] loader: refactor duplicated code into loader util lib

2014-01-09 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > All the various window system integration layers duplicate roughly the > same code for figuring out device and driver name, pci-id's, etc. Which > is sad. So extract it out into a loader util lib. Thanks for tackling this. It had been (low) on my list

[Mesa-dev] [PATCH] gallium: add bits for clipping points as tris (d3d-style)

2014-01-09 Thread sroland
From: Roland Scheidegger OpenGL does whole-point clipping, that is a large point is either fully clipped or fully unclipped (the latter means it may extend beyond the viewport as long as the center is inside the viewport). d3d9 (d3d10 has no large points) however requires points to be clipped aft

Re: [Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.

2014-01-09 Thread Chris Forbes
OK, in that case: Reviewed-by: Chris Forbes On Fri, Jan 10, 2014 at 3:42 PM, Paul Berry wrote: > On 9 January 2014 18:19, Chris Forbes wrote: >> >> I'm not convinced this is correct/safe, at least for the meta clear. >> >> The GL 3.2 spec says, on page 221 (page 235 of the PDF): >> >> * If t

Re: [Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.

2014-01-09 Thread Paul Berry
On 9 January 2014 18:19, Chris Forbes wrote: > I'm not convinced this is correct/safe, at least for the meta clear. > > The GL 3.2 spec says, on page 221 (page 235 of the PDF): > > * If the number of layers of each attachment are not all identical, > rendering > will be limited to the small

[Mesa-dev] [PATCH 30/30] i965/cs: Allow ARB_compute_shader to be enabled via env var.

2014-01-09 Thread Paul Berry
This will allow testing of compute shader functionality before it is completed. To enable ARB_compute_shader functionality in the i965 driver, set INTEL_COMPUTE_SHADER=1. --- src/mesa/drivers/dri/i965/brw_context.c | 11 ++- src/mesa/drivers/dri/i965/intel_extensions.c | 2 ++ 2 fil

[Mesa-dev] [PATCH 13/30] mesa/cs: Add extension enable flags for ARB_compute_shader.

2014-01-09 Thread Paul Berry
--- src/glsl/glcpp/glcpp-parse.y| 3 +++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/glsl/standalone_scaffolding.cpp | 1 + src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 6 files changed, 9 insertions(+)

[Mesa-dev] [PATCH 27/30] glsl/cs: Prohibit user-defined ins/outs in compute shaders.

2014-01-09 Thread Paul Berry
--- src/glsl/ast_to_hir.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index c1b1d6a..ed3a4f9 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2220,6 +2220,13 @@ apply_type_qualifier_to_variable(const struct a

[Mesa-dev] [PATCH 04/30] mesa: use _mesa_validate_shader_target() more frequently.

2014-01-09 Thread Paul Berry
This patch replaces code in _mesa_new_shader() and delete_shader_cb() that checks the type of a shader with calls to _mesa_validate_shader_target(). This has two advantages: it allows for a more thorough check (since _mesa_validate_shader_target() doesn't permit shader targets that aren't supporte

[Mesa-dev] [PATCH 26/30] main/cs: Implement query for COMPUTE_WORK_GROUP_SIZE.

2014-01-09 Thread Paul Berry
--- src/mesa/main/shaderapi.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 053f27b..680d449 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -663,6 +663,24 @@ get_programiv(struct gl_con

[Mesa-dev] [PATCH 23/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_COUNT constant.

2014-01-09 Thread Paul Berry
--- src/glsl/builtin_variables.cpp | 4 src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/glsl_parser_extras.h | 1 + src/glsl/main.cpp | 3 +++ src/glsl/standalone_scaffolding.cpp | 3 +++ src/mesa/main/context.c | 3 +++ src/mesa/main/get.c

[Mesa-dev] [PATCH 11/30] mesa: Change redundant code into loops in shaderapi.c.

2014-01-09 Thread Paul Berry
This is possible now that ctx->Shader.CurrentProgram is an array. --- src/mesa/main/shaderapi.c | 39 +-- 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index d57748c..61ac0e3 100644 --- a/src

[Mesa-dev] [PATCH 22/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.

2014-01-09 Thread Paul Berry
--- src/glsl/main.cpp | 1 + src/glsl/standalone_scaffolding.cpp | 1 + src/mesa/main/context.c | 1 + src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py| 3 +++ src/mesa/main/mtypes.h | 1 + 6 files changed, 8 insertions(+)

[Mesa-dev] [PATCH 24/30] glsl/cs: Handle compute shader local_size_{x, y, z} declaration.

2014-01-09 Thread Paul Berry
--- src/glsl/ast.h | 34 +++ src/glsl/ast_to_hir.cpp | 79 ++ src/glsl/ast_type.cpp | 14 ++ src/glsl/builtin_variables.cpp | 20 + src/glsl/glsl_lexer.ll | 3 +- src/glsl/glsl_parser.yy |

[Mesa-dev] [PATCH 21/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_SIZE constant.

2014-01-09 Thread Paul Berry
--- src/glsl/builtin_variables.cpp | 27 +++ src/glsl/glsl_parser_extras.cpp | 4 src/glsl/glsl_parser_extras.h | 3 +++ src/glsl/main.cpp | 3 +++ src/glsl/standalone_scaffolding.cpp | 3 +++ src/mesa/main/context.c |

[Mesa-dev] [PATCH 25/30] mesa/cs: Handle compute shader local size during linking.

2014-01-09 Thread Paul Berry
--- src/glsl/linker.cpp | 64 +++ src/mesa/main/mtypes.h| 17 + src/mesa/main/shaderapi.c | 7 ++ 3 files changed, 88 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 7461b17..11e0651 100644 --- a/src

[Mesa-dev] [PATCH 00/30] mesa: Start implementing compute shaders.

2014-01-09 Thread Paul Berry
This is the first of several planned patch series to implement the extension ARB_compute_shader in Mesa. This series allows the Mesa front-end to parse and compile a "do-nothing" compute shader--that is, one which contains nothing but a compute shader input layout declaration and an empty main() f

[Mesa-dev] [PATCH 19/30] mesa/cs: Handle compute shaders in _mesa_use_program().

2014-01-09 Thread Paul Berry
--- src/mesa/main/shaderapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 519b200..5188e9c 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -993,6 +993,7 @@ _mesa_use_program(struct gl_context *ctx, struct

[Mesa-dev] [PATCH 17/30] glsl/cs: Populate default values for ctx->Const.Program[MESA_SHADER_COMPUTE].

2014-01-09 Thread Paul Berry
--- src/glsl/main.cpp | 4 src/glsl/standalone_scaffolding.cpp | 4 2 files changed, 8 insertions(+) diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index 03b7c78..afc15cb 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -50,6 +50,10 @@ initialize_context(s

[Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_context.h | 8 src/mesa/drivers/dri/i965/brw_program.c | 11 +++ 2 files changed, 19 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index df32ccb..abc1783 100644 --- a/src/mesa/drive

[Mesa-dev] [PATCH 09/30] meta: Replace save_state::{Vertex, Geometry, Fragment}Shader with an array.

2014-01-09 Thread Paul Berry
Since ctx->Shader.Current{Vertex,Geometry,Fragment}Program is an array, this allows some meta code to be rolled up into loops. --- src/mesa/drivers/common/meta.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/sr

[Mesa-dev] [PATCH 14/30] mesa/cs: Add dispatch API stubs for ARB_compute_shader.

2014-01-09 Thread Paul Berry
--- src/mapi/glapi/gen/ARB_compute_shader.xml | 40 +++ src/mapi/glapi/gen/Makefile.am| 1 + src/mapi/glapi/gen/gl_API.xml | 4 ++- src/mapi/glapi/gen/gl_genexec.py | 1 + src/mesa/Makefile.sources | 1 + src/mesa/SConscript

[Mesa-dev] [PATCH 28/30] glsl/cs: Prohibit mixing of compute and non-compute shaders.

2014-01-09 Thread Paul Berry
Fixes piglit test: spec/ARB_compute_shader/linker/mix_compute_and_non_compute --- src/glsl/linker.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 11e0651..f1344ea 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -2107,6 +2

[Mesa-dev] [PATCH 12/30] mesa: Change redundant code into loops in texstate.c.

2014-01-09 Thread Paul Berry
This is possible now that ctx->Shader.CurrentProgram is an array. --- src/mesa/main/texstate.c | 75 +++- 1 file changed, 29 insertions(+), 46 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index b9c76da..905a9d5 100644 --

[Mesa-dev] [PATCH 16/30] mesa/cs: Add a MESA_SHADER_COMPUTE stage and update switch statements.

2014-01-09 Thread Paul Berry
This patch adds MESA_SHADER_COMPUTE to the gl_shader_stage enum. Also, where it is trivial to do so, it adds a compute shader case to switch statements that switch based on the type of shader. This avoids "unhandled switch case" compiler warnings. --- src/glsl/ast_to_hir.cpp | 9 ++

[Mesa-dev] [PATCH 20/30] mesa/cs: Create the gl_compute_program struct, and the code to initialize it.

2014-01-09 Thread Paul Berry
--- src/mesa/main/mtypes.h | 7 +++ src/mesa/program/program.c | 20 src/mesa/program/program.h | 5 + 3 files changed, 32 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 8b88d75..e6c3a22 100644 --- a/src/mesa/main/mtypes.h +++ b

[Mesa-dev] [PATCH 06/30] mesa: Replace ctx->Shader.Current{Vertex, Fragment, Geometry}Program with an array.

2014-01-09 Thread Paul Berry
These are replaced with ctx->Shader.CurrentProgram[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the comman

[Mesa-dev] [PATCH 05/30] glsl/linker: Refactor in preparation for adding more shader stages.

2014-01-09 Thread Paul Berry
Rather than maintain separately named arrays and counts for vertex, geometry, and fragment shaders, just maintain these as arrays indexed by the gl_shader_type enum. --- src/glsl/linker.cpp | 114 ++-- 1 file changed, 39 insertions(+), 75 deletions(-

[Mesa-dev] [PATCH 07/30] mesa: Fold long lines introduced by the previous patch.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 6 -- src/mesa/drivers/dri/i965/brw_vec4_gs.c | 5 +++-- src/mesa/drivers/dri/i965/brw_vs.c | 5 +++-- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 6 -- src/mesa/main/context.c | 6

[Mesa-dev] [PATCH 08/30] i965: Fix comments to refer to the new ctx->Shader.CurrentProgram array.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_wm_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen6_wm_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen7_wm_state.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_w

[Mesa-dev] [PATCH 15/30] glsl/cs: Change some linker loops to use MESA_SHADER_FRAGMENT as a bound.

2014-01-09 Thread Paul Berry
Linker loops that iterate through all the stages in the pipeline need to use MESA_SHADER_FRAGMENT as a bound, so that we can add an additional MESA_SHADER_COMPUTE stage, without it being erroneously included in the pipeline. --- src/glsl/linker.cpp | 8 1 file changed, 4 insertions(+), 4

[Mesa-dev] [PATCH 18/30] glsl/cs: update main.cpp to use the ".comp" extension for compute shaders.

2014-01-09 Thread Paul Berry
--- src/glsl/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index afc15cb..864c929 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -364,6 +364,8 @@ main(int argc, char **argv) shader->Type = GL_GEOMETRY_SHADER; else if

[Mesa-dev] [PATCH 10/30] mesa: Remove ad-hoc arrays of gl_shader_program.

2014-01-09 Thread Paul Berry
Now that we have a ctx->Shader.CurrentProgram array, we can just use it directly. --- src/mesa/main/context.c | 6 +- src/mesa/state_tracker/st_draw.c| 6 +- src/mesa/state_tracker/st_program.c | 6 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 02/30] mesa: Make validate_shader_target() non-static.

2014-01-09 Thread Paul Berry
--- src/mesa/main/shaderapi.c | 8 src/mesa/main/shaderapi.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 6042fa8..716e659 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -171,

[Mesa-dev] [PATCH 01/30] mesa: Replace _mesa_program_index_to_target with _mesa_shader_stage_to_program.

2014-01-09 Thread Paul Berry
In my recent zeal to refactor Mesa's handling of the gl_shader_stage enum, I accidentally wound up with two functions that do the same thing: _mesa_program_index_to_target(), and _mesa_shader_stage_to_program(). This patch keeps _mesa_shader_stage_to_program(), since its name is more consistent wi

[Mesa-dev] [PATCH 03/30] main: Allow ctx == NULL in _mesa_validate_shader_target().

2014-01-09 Thread Paul Berry
This will allow this function to be used in circumstances where there is no context available, such as when building built-in GLSL functions. --- src/mesa/main/shaderapi.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/s

Re: [Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.

2014-01-09 Thread Chris Forbes
I'm not convinced this is correct/safe, at least for the meta clear. The GL 3.2 spec says, on page 221 (page 235 of the PDF): * If the number of layers of each attachment are not all identical, rendering will be limited to the smallest number of layers of any attachment. And then in the de

Re: [Mesa-dev] [PATCH] glsl: Optimize open-coded lrp into lrp.

2014-01-09 Thread Jordan Justen
On Thu, Jan 9, 2014 at 4:27 PM, Matt Turner wrote: > On Thu, Jan 9, 2014 at 2:37 PM, Jordan Justen wrote: >> On Thu, Jan 9, 2014 at 12:14 PM, Matt Turner wrote: >>> From: Jordan Justen >>> >>> total instructions in shared programs: 1498191 -> 1487051 (-0.74%) >>> instructions in affected progra

Re: [Mesa-dev] [PATCH 4/7] radeonsi: handle NULL colorbuffers correctly

2014-01-09 Thread Michel Dänzer
On Don, 2014-01-09 at 13:05 +0100, Marek Olšák wrote: > On Thu, Jan 9, 2014 at 3:51 AM, Michel Dänzer wrote: > > On Mit, 2014-01-08 at 18:23 +0100, Marek Olšák wrote: > >> > >> diff --git a/src/gallium/drivers/radeonsi/si_state.c > >> b/src/gallium/drivers/radeonsi/si_state.c > >> index 3666a11..

Re: [Mesa-dev] [PATCH 2/2] i965: Fix clears of layered framebuffers with mismatched layer counts.

2014-01-09 Thread Anuj Phogat
On Tue, Jan 7, 2014 at 7:33 AM, Paul Berry wrote: > Previously, Mesa enforced the following rule (from > ARB_geometry_shader4's list of criteria for framebuffer completeness): > > * If any framebuffer attachment is layered, all attachments must have > the same layer count. For three-dimensi

Re: [Mesa-dev] [PATCH] i965: Use sample barycentric coordinates with per sample shading

2014-01-09 Thread Chris Forbes
Hi Anuj, There's one fiddly interaction that I don't think this handles quite right, although I think it does conform. Suppose we have this fragment shader: #version 330 #extension ARB_gpu_shader5: require sample in vec4 a; in vec4 b; ... Then `b` is being evaluated at the samp

Re: [Mesa-dev] [PATCH] glsl: Optimize open-coded lrp into lrp.

2014-01-09 Thread Matt Turner
On Thu, Jan 9, 2014 at 2:37 PM, Jordan Justen wrote: > On Thu, Jan 9, 2014 at 12:14 PM, Matt Turner wrote: >> From: Jordan Justen >> >> total instructions in shared programs: 1498191 -> 1487051 (-0.74%) >> instructions in affected programs: 669388 -> 658248 (-1.66%) >> GAINED:

[Mesa-dev] [PATCH] i965: Use sample barycentric coordinates with per sample shading

2014-01-09 Thread Anuj Phogat
Current implementation of arb_sample_shading doesn't set 'Barycentric Interpolation Mode' correctly. We use pixel barycentric coordinates for per sample shading. Instead we should select perspective sample or non-perspective sample barycentric coordinates. It also enables using sample barycentric

Re: [Mesa-dev] [PATCH] glsl: Optimize open-coded lrp into lrp.

2014-01-09 Thread Jordan Justen
On Thu, Jan 9, 2014 at 12:14 PM, Matt Turner wrote: > From: Jordan Justen > > total instructions in shared programs: 1498191 -> 1487051 (-0.74%) > instructions in affected programs: 669388 -> 658248 (-1.66%) > GAINED:1 > LOST: 0

Re: [Mesa-dev] [PATCH 3/3] i965/Gen7: Only emit cube face enables for cubes.

2014-01-09 Thread Kenneth Graunke
On 01/08/2014 01:11 PM, Chris Forbes wrote: > This is not observed to actually fix anything, but the PRM says this > field must be zero for other surface types. > > Signed-off-by: Chris Forbes > --- > src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 7 +-- > 1 file changed, 5 insertions(+

Re: [Mesa-dev] /usr/lib/libglapi.la: No such file or directory

2014-01-09 Thread Trevor Woerner
On 01/09/14 12:56, YuGiOhJCJ Mailing-List wrote: > So, I see /usr/lib/libglapi.la is missing. > I recompile MesaLib-8.0.4 like this: 8.0.4 is from July 10, 2012. Would it be possible to try something newer? ___ mesa-dev mailing list mesa-dev@lists.freede

[Mesa-dev] Plans for 10.0.3 release

2014-01-09 Thread Carl Worth
Hi folks, I just released Mesa 10.0.2 (a bit late) and followed it by immediately working through my queue of commits nominated for the stable branch, which I've just pushed out. Since the code for 10.0.2 was done and pushed a week ago, my current plan is to release 10.0.2 just one week from now,

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: implement missing glGet(GL_RGBA_SIGNED_COMPONENTS_EXT) query

2014-01-09 Thread Carl Worth
Ian Romanick writes: > There are fixes on top of this fix. When they get picked over to the > stable branch, I think at least this and the one from 050961.html should > get squashed together. > > http://lists.freedesktop.org/archives/mesa-dev/2014-January/050961.html > http://lists.freedesktop.or

[Mesa-dev] [PATCH] glsl: Optimize open-coded lrp into lrp.

2014-01-09 Thread Matt Turner
From: Jordan Justen total instructions in shared programs: 1498191 -> 1487051 (-0.74%) instructions in affected programs: 669388 -> 658248 (-1.66%) GAINED:1 LOST: 0 Reviewed-by: Matt Turner --- Looks like my unreviewed 16 patc

[Mesa-dev] Mesa 10.0.2

2014-01-09 Thread Carl Worth
Mesa 10.0.2 has been released. Mesa 10.0.2 is a bug fix release which fixes bugs fixed since the 10.0.1 release, (see below for a list of changes). The tag in the git repository for Mesa 10.0.2 is 'mesa-10.0.2'. Mesa 10.0.2 is available for download at ftp://freedesktop.org/pub/mesa/10.0.2/ md5s

Re: [Mesa-dev] [PATCH 5/7] egl: Use C11 thread abstractions.

2014-01-09 Thread Ian Romanick
I'd like to hear Kristian and / or Chad's opinion, but I'd like to take this a step further and remove the _egl* wrappers altogether... as a follow-on patch. For now, this patch is Reviewed-by: Ian Romanick On 01/09/2014 11:20 AM, jfons...@vmware.com wrote: > From: José Fonseca > > --- > src

Re: [Mesa-dev] [PATCH 2/7] c11: Import threads.h emulation library.

2014-01-09 Thread Ian Romanick
Assuming patch 7 gets squashed in (I sent a comment on that patch), Acked-by: Ian Romanick On 01/09/2014 11:20 AM, jfons...@vmware.com wrote: > From: José Fonseca > > Implementation is based of https://gist.github.com/2223710 with the > following modifications: > - inline implementatation > -

Re: [Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread Ian Romanick
This should get squashed with patch #2 when you push this. That will prevent possible build breaks while bisecting. On 01/09/2014 11:20 AM, jfons...@vmware.com wrote: > From: José Fonseca > > Some system headers already define it, so this prevents conflict. > --- > include/c11/threads.h | 6 ++

Re: [Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread Brian Paul
LGTM. Reviewed-by: Brian Paul On 01/09/2014 12:32 PM, Jose Fonseca wrote: This series is pretty much what I proposed several months ago, rebased on top of master, with minor if any tweaks. Still to do is remove the deprecated abstractions (which now are mere wrappers of the c11 ones). That

Re: [Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread Jose Fonseca
This series is pretty much what I proposed several months ago, rebased on top of master, with minor if any tweaks. Still to do is remove the deprecated abstractions (which now are mere wrappers of the c11 ones). That said, this series is already useful as is, not only because of the code de-du

Re: [Mesa-dev] [PATCH 4/5] glsl: Vectorize multiple scalar assignments

2014-01-09 Thread Ian Romanick
On 01/08/2014 12:43 PM, Matt Turner wrote: > Reduces vertex shader instruction counts in DOTA2 by 6.42%, L4D2 by > 4.61%, and CS:GO by 5.71%. > > total instructions in shared programs: 1500153 -> 1498191 (-0.13%) > instructions in affected programs: 59919 -> 57957 (-3.27%) > --- > src/glsl/Ma

[Mesa-dev] [PATCH 2/2] st/mesa: remove _min(), _maxf(), _clamp()

2014-01-09 Thread Brian Paul
Just use the existing MIN2, MAX2 and CLAMP macros. --- src/mesa/state_tracker/st_extensions.c | 80 ++-- 1 file changed, 34 insertions(+), 46 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index cc63b36..faf

[Mesa-dev] [PATCH 1/2] st/mesa: simplify shader limit initialization code

2014-01-09 Thread Brian Paul
Make use of the new gl_constants::Program[] array. --- src/mesa/state_tracker/st_extensions.c | 31 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 20 +- src/mesa/state_tracker/st_program.h| 18 3 files changed, 28 inser

[Mesa-dev] [PATCH 3/7] gallium: Use C11 threads.h.

2014-01-09 Thread jfonseca
From: José Fonseca Note that PIPE_ROUTINE now returns an int. --- src/gallium/auxiliary/os/os_thread.h | 262 +++--- src/gallium/drivers/llvmpipe/lp_rast.c| 2 +- src/gallium/drivers/rbug/rbug_core.c | 2 +- src/gallium/tests/unit/pipe_ba

[Mesa-dev] [PATCH 1/7] os: Remove pipe_static_condvar.

2014-01-09 Thread jfonseca
From: José Fonseca Never used. --- src/gallium/auxiliary/os/os_thread.h | 12 1 file changed, 12 deletions(-) diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 4528abb..d16f36d 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src

[Mesa-dev] [PATCH 4/7] mapi: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/mapi/u_thread.h | 165 +--- 1 file changed, 13 insertions(+), 152 deletions(-) diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h index 31999c4..75fbec6 100644 --- a/src/mapi/u_thread.h +++ b/src/mapi/u_thread.h @@ -

[Mesa-dev] [PATCH 6/7] rbug: Update for PIPE_THREAD_ROUTINE returning 0.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/rbug/rbug_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c index 7cc9f79..c5b26b8 100644 --- a/src/gallium/drivers/rbug/rbug_core.c +++ b/src/gallium/

[Mesa-dev] [PATCH 2/7] c11: Import threads.h emulation library.

2014-01-09 Thread jfonseca
From: José Fonseca Implementation is based of https://gist.github.com/2223710 with the following modifications: - inline implementatation - retain XP compatability - add temporary hack for static mutex initializers (as they are not part of the stack but still widely used internally). --- inclu

[Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread jfonseca
From: José Fonseca Some system headers already define it, so this prevents conflict. --- include/c11/threads.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/c11/threads.h b/include/c11/threads.h index 678774c..4a4079d 100644 --- a/include/c11/threads.h +++ b/i

[Mesa-dev] [PATCH 5/7] egl: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/egl/main/eglmutex.h | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/egl/main/eglmutex.h b/src/egl/main/eglmutex.h index 1349e9e..2ec965c 100644 --- a/src/egl/main/eglmutex.h +++ b/src/egl/main/eglmutex.h @@ -31,46 +31

Re: [Mesa-dev] [PATCH 3/5] glsl: Add parameter to .equals() to ignore an IR type.

2014-01-09 Thread Ian Romanick
On 01/08/2014 12:43 PM, Matt Turner wrote: > Only implemented for ir_swizzles currently, but perhaps will be useful And ir_texture? > for other IR types in the future. > --- > src/glsl/ir.h | 14 +-- > src/glsl/ir_equals.cpp | 63 > +++---

Re: [Mesa-dev] Mesa (master): mesa: replace ctx->Const.{Vertex, Fragment, Geomtery}Program with an array.

2014-01-09 Thread Jose Fonseca
- Original Message - > Module: Mesa > Branch: master > Commit: 84732a982c3eeaca2e2809532c8422dc5f7045c1 > URL: > https://urldefense.proofpoint.com/v1/url?u=http://cgit.freedesktop.org/mesa/mesa/commit/?id%3D84732a982c3eeaca2e2809532c8422dc5f7045c1&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr

Re: [Mesa-dev] [PATCH 16/42] i965/blorp: remove dependency to compression control state

2014-01-09 Thread Matt Turner
On Fri, Dec 20, 2013 at 6:38 AM, Topi Pohjolainen wrote: > Effectively only the mask control bit gets altered for the single > addition in question and hence there is no real need to use a > fresh state control level for it -- that is more useful when > multiple intructions share the same mask and

[Mesa-dev] /usr/lib/libglapi.la: No such file or directory

2014-01-09 Thread YuGiOhJCJ Mailing-List
Hello, When I try to compile mesa-demos-8.1.0 I got this: $ ./configure --prefix=/usr $ make [...] Making all in src make[1]: Entering directory `/home/yugiohjcj/documents/downloads/software/mesa-demos-8.1.0/src' Making all in util make[2]: Entering directory `/home/yugiohjcj/documents/downloads

Re: [Mesa-dev] [PATCH 2/3] i965/gen6/blorp: Set need_workaround_flush at top of blorp (v2)

2014-01-09 Thread Chad Versace
On Wed, Jan 08, 2014 at 07:59:38AM -0800, Paul Berry wrote: > On 7 January 2014 16:58, Chad Versace wrote: > > Unconditionally set brw->need_workaround_flush at the top of gen6 blorp > state emission. > > The art of emitting workaround flushes on Sandybridge is mysterious and > n

Re: [Mesa-dev] [PATCH 3/5] glsl: Index into ctx->Const.Program[] rather than using ad-hoc code.

2014-01-09 Thread Ian Romanick
On 01/08/2014 11:20 AM, Paul Berry wrote: > --- > src/glsl/ast_to_hir.cpp| 13 + > src/glsl/link_atomics.cpp | 16 ++-- > src/glsl/link_varyings.cpp | 32 ++-- > src/glsl/linker.cpp| 43 --- >

[Mesa-dev] [PATCH] st/mesa: fix breakage from gl_constant::Program[] change

2014-01-09 Thread Brian Paul
--- src/mesa/state_tracker/st_extensions.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 5e4a3b3..c17601a 100644 --- a/src/mesa/state_tracker/st_extensions.c

Re: [Mesa-dev] [PATCH 5/5] mesa: Use functions to convert gl_shader_stage to PROGRAM enum or pipe target.

2014-01-09 Thread Ian Romanick
On 01/08/2014 11:20 AM, Paul Berry wrote: > Suggested-by: Brian Paul > --- > src/mesa/program/ir_to_mesa.cpp| 17 + > src/mesa/program/program.h | 18 ++ > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 40 > +++--- > 3 fi

Re: [Mesa-dev] [PATCH 4/4] MSVC2013: Namespace qualify fma to override ambiguity with fma from math.h

2014-01-09 Thread Ian Romanick
On 01/07/2014 02:38 PM, Thomas Sondergaard wrote: > MSVC 2013 version of math.h includes an fma() function. > --- > src/glsl/builtin_functions.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp > index 10127

Re: [Mesa-dev] [PATCH 1/4] MSVC 2013: Preliminary support for MSVC_VERSION=12.0

2014-01-09 Thread Ian Romanick
Patches 2 & 3 are Reviewed-by: Ian Romanick I don't know anything about the MSVC build system, so I can't really comment about patch 1. On 01/07/2014 02:38 PM, Thomas Sondergaard wrote: > --- > common.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common.py b/comm

Re: [Mesa-dev] [PATCH 5/5] mesa: Use functions to convert gl_shader_stage to PROGRAM enum or pipe target.

2014-01-09 Thread Paul Berry
On 8 January 2014 12:21, Emil Velikov wrote: > On 08/01/14 19:20, Paul Berry wrote: > > diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h > > index 4015b4c..648233c 100644 > > --- a/src/mesa/program/program.h > > +++ b/src/mesa/program/program.h > > @@ -207,6 +207,24 @@ _mesa_p

Re: [Mesa-dev] [PATCH] mesa: add missing SNORM formats in _mesa_base_fbo_format()

2014-01-09 Thread Jose Fonseca
- Original Message - > We weren't handling the LUMINANCE_SNORM, LUMINANCE_ALPHA_SNORM and > INTENSITY_SNORM cases. Note that adding these cases here does not > require a driver to support rendering to these surface types. If > the driver can't do it we'll report an incomplete framebuffe

[Mesa-dev] [Bug 70410] egl-static/Makefile: linking fails with llvm >= 3.4

2014-01-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70410 Krzysztof A. Sobiecki changed: What|Removed |Added Attachment #91763|0 |1 is obsolete|

[Mesa-dev] [Bug 70410] egl-static/Makefile: linking fails with llvm >= 3.4

2014-01-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70410 --- Comment #15 from Krzysztof A. Sobiecki --- Created attachment 91763 --> https://bugs.freedesktop.org/attachment.cgi?id=91763&action=edit --system-libs patch without newline hack Hack free version of patch -- You are receiving this mail b

[Mesa-dev] OpenCL Clang/Clover Offline Compilation issue

2014-01-09 Thread Dorrington, Albert
I am not sure if this is the appropriate list on which to ask this question, if not hopefully someone can suggest an alternative. Under Linux, I am attempting to perform an offline compile of an OpenCL kernel example using Clang, and then load that binary using the clCreateProgramWithBinary() f

[Mesa-dev] GPU lockup CP stall when calling clBuildProgram on Cayman

2014-01-09 Thread christophe choquet
Hi, I am using kernel 3.12.6-gentoo, Mesa 10.0.1 and once every two calls to clBuildProgram, the GPU goes to reset after 10 seconds. This also happens on Debian unstable with Mesa 9.2. First hello_world works, the next one hangs, third works, and so on. Despite this hang on this particular Open

[Mesa-dev] [Bug 71543] [mesa] Source-based games segfault

2014-01-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71543 Johannes Hirte changed: What|Removed |Added CC||johannes.hirte@datenkhaos.d

[Mesa-dev] [Bug 70410] egl-static/Makefile: linking fails with llvm >= 3.4

2014-01-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70410 --- Comment #14 from Aaron Watry --- Created attachment 91751 --> https://bugs.freedesktop.org/attachment.cgi?id=91751&action=edit llvm-config patch to place system-libs on a single line Patch modifies llvm-config to print --system-libs on a s

Re: [Mesa-dev] [PATCH 4/7] radeonsi: handle NULL colorbuffers correctly

2014-01-09 Thread Marek Olšák
On Thu, Jan 9, 2014 at 3:51 AM, Michel Dänzer wrote: > On Mit, 2014-01-08 at 18:23 +0100, Marek Olšák wrote: >> >> diff --git a/src/gallium/drivers/radeonsi/si_state.c >> b/src/gallium/drivers/radeonsi/si_state.c >> index 3666a11..ba73401 100644 >> --- a/src/gallium/drivers/radeonsi/si_state.c >>

[Mesa-dev] commit 0a1479c829 breaks glsl-fs-lots-of-tex.shader_test on nv50/nvc0

2014-01-09 Thread Ilia Mirkin
Hi Marek, I won't pretend to understand what's going on, but I just bisected a failure on tests/shaders/glsl-fs-lots-of-tex.shader_test in piglit between 9.1 and HEAD, and it landed on your commit. It's approximately the simplest shader known to man (esp at HEAD when all the TEX instructions are g