Re: [Mesa-dev] [PATCH 9/9] i965: Use NIR by default for Fragment shaders on SNB+

2015-03-18 Thread Matt Turner
On Tue, Mar 17, 2015 at 10:56 PM, Matt Turner wrote: > Thanks. Looked through stats and at some of the regressions. I disabled the pow(x, y) optimization in NIR, turned off the SEL peephole in the fs backend, and added neg/abs to block_check_for_allowed_instrs() (will test and send a patch) to ma

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

2015-03-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=81992 --- Comment #1 from comicfans44 --- Qt OpenGL use dynamic allocated memory to test GL extensions. this bug makes every Qt OpenGL app memory corrupted. I'm not sure a simple strdup is the correct way (maybe leak instead of memory corrupt). with

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

2015-03-18 Thread Tapani
Reviewed-by: Tapani Pälli On 03/11/2015 10:44 PM, Ian Romanick wrote: 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_t

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Connor Abbott
On Thu, Mar 19, 2015 at 12:35 AM, Jason Ekstrand wrote: > On Wed, Mar 18, 2015 at 9:31 PM, Matt Turner wrote: >> On Wed, Mar 18, 2015 at 9:27 PM, Jason Ekstrand wrote: >>> On Wed, Mar 18, 2015 at 8:59 PM, Connor Abbott wrote: On Wed, Mar 18, 2015 at 11:35 PM, Jason Ekstrand wrote: >

[Mesa-dev] [PATCH] i965/nir: Don't emit a copy after a texture instruction if it's not needed

2015-03-18 Thread Jason Ekstrand
Shader-db results on HSW: total instructions in shared programs: 4112172 -> 4111347 (-0.02%) instructions in affected programs: 18265 -> 17440 (-4.52%) helped:137 HURT: 0 GAINED:0 LOST:

Re: [Mesa-dev] [PATCH] i965/fs: Allow copy propagation on ATTR file registers.

2015-03-18 Thread Jason Ekstrand
On Tue, Mar 10, 2015 at 4:18 AM, Kenneth Graunke wrote: > This especially helps with NIR because we currently emit MOVs at the top > of the shader to copy from various ATTR registers to a giant VGRF array > of all inputs. (This could potentially be done better, but since > there's only ever one w

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 9:31 PM, Matt Turner wrote: > On Wed, Mar 18, 2015 at 9:27 PM, Jason Ekstrand wrote: >> On Wed, Mar 18, 2015 at 8:59 PM, Connor Abbott wrote: >>> On Wed, Mar 18, 2015 at 11:35 PM, Jason Ekstrand >>> wrote: On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: > >

Re: [Mesa-dev] [PATCH 5/9] i965/nir: Emit MUL + ADD for MAD on GEN <= 5

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 8:43 PM, Kenneth Graunke wrote: > On Wednesday, March 18, 2015 11:27:19 PM Connor Abbott wrote: >> On Wed, Mar 18, 2015 at 11:24 PM, Kenneth Graunke >> wrote: >> > On Tuesday, March 17, 2015 07:17:19 PM Jason Ekstrand wrote: >> >> --- >> >> src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 9:27 PM, Jason Ekstrand wrote: > On Wed, Mar 18, 2015 at 8:59 PM, Connor Abbott wrote: >> On Wed, Mar 18, 2015 at 11:35 PM, Jason Ekstrand >> wrote: >>> >>> On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand wro

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 8:59 PM, Connor Abbott wrote: > On Wed, Mar 18, 2015 at 11:35 PM, Jason Ekstrand wrote: >> >> On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: >>> >>> On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand >>> wrote: >>> > On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner >>> > wrote

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Connor Abbott
On Wed, Mar 18, 2015 at 11:35 PM, Jason Ekstrand wrote: > > On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: >> >> On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand >> wrote: >> > On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner >> > wrote: >> >> Transform this into b2f(and(a, b)). >> >> >> >> total in

Re: [Mesa-dev] [PATCH 5/9] i965/nir: Emit MUL + ADD for MAD on GEN <= 5

2015-03-18 Thread Kenneth Graunke
On Wednesday, March 18, 2015 11:27:19 PM Connor Abbott wrote: > On Wed, Mar 18, 2015 at 11:24 PM, Kenneth Graunke > wrote: > > On Tuesday, March 17, 2015 07:17:19 PM Jason Ekstrand wrote: > >> --- > >> src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 8 +++- > >> 1 file changed, 7 insertions(+), 1

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 8:35 PM, Jason Ekstrand wrote: > On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: >> >> On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand >> wrote: >> > On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner >> > wrote: >> >> Transform this into b2f(and(a, b)). >> >> >> >> total instr

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Jason Ekstrand
On Mar 18, 2015 8:32 PM, "Matt Turner" wrote: > > On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand wrote: > > On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner wrote: > >> Transform this into b2f(and(a, b)). > >> > >> total instructions in shared programs: 6205448 -> 6204391 (-0.02%) > >> instruction

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 7:39 PM, Jason Ekstrand wrote: > On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner wrote: >> Transform this into b2f(and(a, b)). >> >> total instructions in shared programs: 6205448 -> 6204391 (-0.02%) >> instructions in affected programs: 284030 -> 282973 (-0.37%) >> help

Re: [Mesa-dev] [PATCH] i965/fs: Allow copy propagation on ATTR file registers.

2015-03-18 Thread Matt Turner
On Tue, Mar 10, 2015 at 4:18 AM, Kenneth Graunke wrote: > This especially helps with NIR because we currently emit MOVs at the top > of the shader to copy from various ATTR registers to a giant VGRF array > of all inputs. (This could potentially be done better, but since > there's only ever one w

Re: [Mesa-dev] [PATCH 5/9] i965/nir: Emit MUL + ADD for MAD on GEN <= 5

2015-03-18 Thread Connor Abbott
On Wed, Mar 18, 2015 at 11:24 PM, Kenneth Graunke wrote: > On Tuesday, March 17, 2015 07:17:19 PM Jason Ekstrand wrote: >> --- >> src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 8 +++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp >

Re: [Mesa-dev] [PATCH 5/9] i965/nir: Emit MUL + ADD for MAD on GEN <= 5

2015-03-18 Thread Kenneth Graunke
On Tuesday, March 17, 2015 07:17:19 PM Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp > index 5da8423..41f

Re: [Mesa-dev] [Mesa-stable] [PATCH] freedreno/a3xx: use the same layer size for all slices

2015-03-18 Thread Ilia Mirkin
On Wed, Mar 18, 2015 at 8:52 PM, Emil Velikov wrote: > On 13 March 2015 at 04:56, Ilia Mirkin wrote: >> We only program in one layer size per texture, so that means that all >> levels must share one size. This makes the piglit test >> >> bin/texelFetch fs sampler2DArray >> >> have the same breaka

Re: [Mesa-dev] [PATCH 5/5] nir: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner wrote: > Transform this into b2f(or(a, b)). > > instructions in affected programs: 432 -> 430 (-0.46%) > helped:2 > --- > src/glsl/nir/nir_opt_algebraic.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sr

Re: [Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 11:37 AM, Matt Turner wrote: > Transform this into b2f(and(a, b)). > > total instructions in shared programs: 6205448 -> 6204391 (-0.02%) > instructions in affected programs: 284030 -> 282973 (-0.37%) > helped:903 > HURT:

Re: [Mesa-dev] [PATCH 2/4] nir/lower_io: Make variable location assignment a manual operation

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 7:11 PM, Connor Abbott wrote: > Given that the way we pack inputs/outputs/uniforms is probably only > going to be useful for scalar backends, can we rename this to > nir_assign_var_locations_scalar() and in the next patch > nir_assign_var_locations_scalar_direct_first()? Th

Re: [Mesa-dev] [PATCH 2/4] nir/lower_io: Make variable location assignment a manual operation

2015-03-18 Thread Connor Abbott
Given that the way we pack inputs/outputs/uniforms is probably only going to be useful for scalar backends, can we rename this to nir_assign_var_locations_scalar() and in the next patch nir_assign_var_locations_scalar_direct_first()? That makes more sense to me than "packed," since on vec4 "packed"

Re: [Mesa-dev] [PATCH 7/9] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 6:40 PM, Connor Abbott wrote: > On Wed, Mar 18, 2015 at 9:10 PM, Jason Ekstrand wrote: >> On Wed, Mar 18, 2015 at 6:07 PM, Connor Abbott wrote: >>> Overall, I think it might be better to do this as a SSA pass right >>> before lowering to source modifiers. I don't think we

[Mesa-dev] [PATCH] egl: cut down static storage size for {Version, ClientAPI}String

2015-03-18 Thread Emil Velikov
Both seems to be excessively long, namely: ClientAPIString can get up-to 47 based on current code, while the name of the driver can dictate the length of the VersionString, currently it is around 11. Let's pad each to 100, rather than the current 1000. Signed-off-by: Emil Velikov --- src/egl/ma

Re: [Mesa-dev] [PATCH 7/9] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-18 Thread Connor Abbott
On Wed, Mar 18, 2015 at 9:10 PM, Jason Ekstrand wrote: > On Wed, Mar 18, 2015 at 6:07 PM, Connor Abbott wrote: >> Overall, I think it might be better to do this as a SSA pass right >> before lowering to source modifiers. I don't think we would be running >> any optimizations after it that depend

Re: [Mesa-dev] [PATCH 1/5] glsl: Allow vector logic ops to be generated.

2015-03-18 Thread Connor Abbott
So in GLSL, add and mul can take a combination of a scalar and a vector, and it'll splat the scalar automatically, and with this this series that means that and/or can now take a combination of a scalar and a vector as well, and we'll have to splat them as well. Are you sure that the various backen

Re: [Mesa-dev] [PATCH 7/9] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 6:07 PM, Connor Abbott wrote: > Overall, I think it might be better to do this as a SSA pass right > before lowering to source modifiers. I don't think we would be running > any optimizations after it that depend on the output being all 0's or > all 1's, but if you're conce

Re: [Mesa-dev] [PATCH 7/9] i965: Add a NIR analysis pass for determining when a boolean resolve is needed

2015-03-18 Thread Connor Abbott
Overall, I think it might be better to do this as a SSA pass right before lowering to source modifiers. I don't think we would be running any optimizations after it that depend on the output being all 0's or all 1's, but if you're concerned about that then we could add separate gen5-compare compare

[Mesa-dev] New stable-branch 10.4 candidate pushed

2015-03-18 Thread Emil Velikov
Hello list, A candidate for the Mesa 10.4.7 release is now available. The current patch queue is as follows: - 24 queued - 3 nominated (outstanding) - and 7 rejected/obsolete patches The current series includes bugfixes for the loaders - libEGL and libGL, a some for the i965, freedreno, r300g

[Mesa-dev] [PATCH v2 4/4] i965/nir: Sort uniforms direct-first and use two different uniform registers

2015-03-18 Thread Jason Ekstrand
Previously, we put all the uniforms into one big array. The problem with this approach is that, as soon as there was one indirect array acces, the backend would decide that the entire large array should be pull constants. This commit splits the array in half: first direct-only uniforms and then po

Re: [Mesa-dev] [Mesa-stable] [PATCH] freedreno/a3xx: use the same layer size for all slices

2015-03-18 Thread Emil Velikov
On 13 March 2015 at 04:56, Ilia Mirkin wrote: > We only program in one layer size per texture, so that means that all > levels must share one size. This makes the piglit test > > bin/texelFetch fs sampler2DArray > > have the same breakage as its non-array version instead of being > completely off.

[Mesa-dev] [PATCH v2 3/4] nir/lower_io: Add a assign_locations function that sorts by [in]direct use

2015-03-18 Thread Jason Ekstrand
v2: Delete the set of indirectly accessed variables when we're done with it --- src/glsl/nir/nir.h | 4 +++ src/glsl/nir/nir_lower_io.c | 71 + 2 files changed, 75 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 0015e

Re: [Mesa-dev] [PATCH 1/4] nir: Use a list instead of a hash_table for inputs, outputs, and uniforms

2015-03-18 Thread Connor Abbott
Reviewed-by: Connor Abbott A case of premature optimization I guess... I think I did it for linking, but we'll cross that bridge when we come to it. On Wed, Mar 18, 2015 at 7:45 PM, Jason Ekstrand wrote: > We never did a single hash table lookup in the entire NIR code base that I > found so the

Re: [Mesa-dev] [PATCH 4/4] i965/nir: Sort uniforms direct-first and use two different uniform registers

2015-03-18 Thread Jason Ekstrand
Forgot the shader-db numbers: total instructions in shared programs: 4114840 -> 4112172 (-0.06%) instructions in affected programs: 43316 -> 40648 (-6.16%) helped:116 HURT: 0 GAINED:0 LOST:

[Mesa-dev] [PATCH 2/4] nir/lower_io: Make variable location assignment a manual operation

2015-03-18 Thread Jason Ekstrand
Previously, we just assigned variable locations in nir_lower_io. Now, we force the user to assign variable locations for us. This gives the backend a bit more control over where variables are placed. --- src/glsl/nir/nir.h | 3 +++ src/glsl/nir/nir_lower_io.c

[Mesa-dev] [PATCH 3/4] nir/lower_io: Add a assign_locations function that sorts by [in]direct use

2015-03-18 Thread Jason Ekstrand
--- src/glsl/nir/nir.h | 4 +++ src/glsl/nir/nir_lower_io.c | 69 + 2 files changed, 73 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 0015ec2..ba48eea 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1579

[Mesa-dev] [PATCH 1/4] nir: Use a list instead of a hash_table for inputs, outputs, and uniforms

2015-03-18 Thread Jason Ekstrand
We never did a single hash table lookup in the entire NIR code base that I found so there was no real benifit to doing it that way. I suppose that for linking, we'll probably want to be able to lookup by name but we can leave building that hash table to the linker. In the mean time this was causi

[Mesa-dev] [PATCH 4/4] i965/nir: Sort uniforms direct-first and use two different uniform registers

2015-03-18 Thread Jason Ekstrand
Previously, we put all the uniforms into one big array. The problem with this approach is that, as soon as there was one indirect array acces, the backend would decide that the entire large array should be pull constants. This commit splits the array in half: first direct-only uniforms and then po

[Mesa-dev] [Bug 89662] context.c:943: undefined reference to `_glapi_new_nop_table'

2015-03-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89662 --- Comment #6 from Brian Paul --- I can't reproduce this. Did you try a make clean first? -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. __

Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 4:27 PM, Connor Abbott wrote: > On Wed, Mar 18, 2015 at 2:58 PM, Matt Turner wrote: >> On Thu, Mar 12, 2015 at 9:46 PM, Matt Turner wrote: >>> Here are some ideas I think might be reasonable GSoC ideas. >>> >>> - GLSL linking in NIR >>> - Would allow us to stop doin

Re: [Mesa-dev] [PATCH 03/22] mesa: Keep track of the last looked-up VAO

2015-03-18 Thread Brian Paul
On 03/18/2015 05:18 PM, Fredrik Höglund wrote: This saves the cost of repeated hash table lookups when the same vertex array object is referenced in a sequence of calls such as: glVertexArrayAttribFormat(vao, ...); glVertexArrayAttribBinding(vao, ...); glEnableVertexArrayAttrib(va

Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-18 Thread Connor Abbott
On Wed, Mar 18, 2015 at 2:58 PM, Matt Turner wrote: > On Thu, Mar 12, 2015 at 9:46 PM, Matt Turner wrote: >> Here are some ideas I think might be reasonable GSoC ideas. >> >> - GLSL linking in NIR >> - Would allow us to stop doing optimizations and other expensive >> things on GLSL IR > > I

[Mesa-dev] [PATCH 16/22] mesa: Implement VertexArrayBindingDivisor

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 65 +++--- src/mesa/main/varray.h | 2 + 4 files changed, 58 insertions(+), 16 deletions

[Mesa-dev] [PATCH 17/22] mesa: Implement GetVertexArrayiv

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 + src/mesa/main/arrayobj.c | 34 ++ src/mesa/main/arrayobj.h | 2 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 43 insertions(+) diff --gi

[Mesa-dev] [PATCH 22/22] docs: Update the ARB_direct_state_access status

2015-03-18 Thread Fredrik Höglund
--- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 93fa60d..04a9e1e 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -198,7 +198,7 @@ GL 4.5, GLSL 4.50: - Framebuffer object started (Laura Ekstran

[Mesa-dev] [PATCH 15/22] mesa: Add a vao parameter to vertex_binding_divisor

2015-03-18 Thread Fredrik Höglund
This is needed to implement VertexArrayBindingDivisor. --- src/mesa/main/varray.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 6cfe240..c9a328b 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @

[Mesa-dev] [PATCH 00/22] Add DSA support for vertex array objects

2015-03-18 Thread Fredrik Höglund
This series implements the VAO portion of GL_ARB_direct_state_access. I started working on this before the decision was made to only expose the extension in the core profile, so this series implements both the core and compatibility behavior. The compatibility support actually only amounts to a c

[Mesa-dev] [PATCH 04/22] mesa: Implement DisableVertexArrayAttrib

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 45 -- src/mesa/main/varray.h | 4 +++ 4 files changed, 46 insertions(+), 9 deletion

[Mesa-dev] [PATCH 09/22] mesa: Implement VertexArrayVertexBuffers

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 9 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 90 ++ src/mesa/main/varray.h | 5 ++ 4 files changed, 78 insertions(+), 27 deletion

[Mesa-dev] [PATCH 13/22] mesa: Add a vao parameter to vertex_attrib_binding

2015-03-18 Thread Fredrik Höglund
This is needed to implement VertexArrayAttribBinding. --- src/mesa/main/varray.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index cdda6f3..4347a92 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray

[Mesa-dev] [PATCH 08/22] mesa: Implement VertexArrayVertexBuffer

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 8 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 83 ++ src/mesa/main/varray.h | 4 ++ 4 files changed, 71 insertions(+), 25 deletion

[Mesa-dev] [PATCH 05/22] mesa: Implement EnableVertexArrayAttrib

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 +++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 46 -- src/mesa/main/varray.h | 4 +++ 4 files changed, 46 insertions(+), 10 deletio

[Mesa-dev] [PATCH 10/22] mesa: Refactor VertexAttrib[I|L]Format

2015-03-18 Thread Fredrik Höglund
The only difference between these functions is the legal types and sizes, so consolidate the code into a single vertex_attrib_format() function and call it from all three entry points. --- src/mesa/main/varray.c | 143 +++-- 1 file changed, 43 insertions

[Mesa-dev] [PATCH 07/22] mesa: Add a vao parameter to bind_vertex_buffer

2015-03-18 Thread Fredrik Höglund
This is needed to implement VertexArrayVertexBuffer and VertexArrayVertexBuffers. --- src/mesa/main/varray.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 2017167..e41d32f 100644 --- a/src/mesa/main/varray

[Mesa-dev] [PATCH 02/22] mesa: Add _mesa_lookup_vao_err

2015-03-18 Thread Fredrik Höglund
--- src/mesa/main/arrayobj.c | 50 src/mesa/main/arrayobj.h | 3 +++ 2 files changed, 53 insertions(+) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 0c15630..ac081b0 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/mai

[Mesa-dev] [PATCH 06/22] mesa: Implement VertexArrayElementBuffer

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 src/mesa/main/arrayobj.c | 34 ++ src/mesa/main/arrayobj.h | 2 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 42 insertions(+) diff --git

[Mesa-dev] [PATCH 14/22] mesa: Implement VertexArrayAttribBinding

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + src/mesa/main/varray.c | 77 ++ src/mesa/main/varray.h | 4 ++ 4 files changed, 66 insertions(+), 22 deletions

[Mesa-dev] [PATCH 18/22] mesa: Add a vao parameter to get_vertex_array_attrib

2015-03-18 Thread Fredrik Höglund
This is needed to implement glGetVertexArrayIndexediv and glGetVertexArrayIndexed64iv. --- src/mesa/main/varray.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 0faf158..13b9c01 100644 --- a/src/mesa

[Mesa-dev] [PATCH 11/22] mesa: Add a vao parameter to update_array_format

2015-03-18 Thread Fredrik Höglund
This is needed to implement VertexArrayAttrib*Format. --- src/mesa/main/varray.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index a6b66a0..93cc0e3 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray

[Mesa-dev] [PATCH 19/22] mesa: Add a Doubles field in gl_vertex_attrib_array

2015-03-18 Thread Fredrik Höglund
When true, this field indicates that double-precision floating point attribute values are not converted to single-precision floats. It is set to true by glVertexAttribLFormat and glVertexArrayAttribLFormat. Based on a patch by Dave Airlie. --- src/mesa/main/arrayobj.c | 1 + src/mesa/main/mtype

[Mesa-dev] [PATCH 01/22] mesa: Implement CreateVertexArrays

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++ src/mesa/main/arrayobj.c | 20 +++- src/mesa/main/arrayobj.h | 2 ++ src/mesa/main/tests/dispatch_sanity.cpp| 1 + 4 files changed, 25 insertions(+), 5 deletions(-

[Mesa-dev] [PATCH 03/22] mesa: Keep track of the last looked-up VAO

2015-03-18 Thread Fredrik Höglund
This saves the cost of repeated hash table lookups when the same vertex array object is referenced in a sequence of calls such as: glVertexArrayAttribFormat(vao, ...); glVertexArrayAttribBinding(vao, ...); glEnableVertexArrayAttrib(vao, ...); ... Note that VAO's are container obje

[Mesa-dev] [PATCH 12/22] mesa: Implement VertexArrayAttrib[I|L]Format

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 25 + src/mesa/main/tests/dispatch_sanity.cpp| 3 + src/mesa/main/varray.c | 78 ++ src/mesa/main/varray.h | 15 + 4 files changed, 121 insertions(+) d

[Mesa-dev] [PATCH 21/22] mesa: Implement GetVertexArrayIndexed[64]iv

2015-03-18 Thread Fredrik Höglund
--- src/mapi/glapi/gen/ARB_direct_state_access.xml | 14 +++ src/mesa/main/tests/dispatch_sanity.cpp| 2 + src/mesa/main/varray.c | 117 + src/mesa/main/varray.h | 10 +++ 4 files changed, 143 insertions(+) diff -

[Mesa-dev] [PATCH 20/22] mesa: Add support for quering GL_VERTEX_ATTRIB_ARRAY_LONG

2015-03-18 Thread Fredrik Höglund
This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access. --- src/mesa/main/varray.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index bbfe947..ec768f0 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -872

Re: [Mesa-dev] [PATCH 1/3] mesa: Replace _mesa_round_to_even() with _mesa_roundeven().

2015-03-18 Thread Carl Worth
On Wed, Mar 18 2015, Matt Turner wrote: > This patch implements _mesa_roundeven{f,}, a function similar to the > roundeven function added by a yet unimplemented technical specification > (ISO/IEC TS 18661-1:2014), with a small difference in behavior -- we > don't bother raising the inexact exceptio

Re: [Mesa-dev] [PATCH] egl: don't fill client apis string forever.

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 3:27 PM, Dave Airlie wrote: > On 17 March 2015 at 01:39, Matt Turner wrote: >> On Sun, Mar 15, 2015 at 10:22 PM, Dave Airlie wrote: >>> We never reset the string on eglTerminate, so it grows >>> for ever on multiple eglInitialise. >>> >>> Signed-off-by: Dave Airlie >>> -

Re: [Mesa-dev] [PATCH] egl: don't fill client apis string forever.

2015-03-18 Thread Dave Airlie
On 17 March 2015 at 01:39, Matt Turner wrote: > On Sun, Mar 15, 2015 at 10:22 PM, Dave Airlie wrote: >> We never reset the string on eglTerminate, so it grows >> for ever on multiple eglInitialise. >> >> Signed-off-by: Dave Airlie >> --- >> src/egl/main/eglapi.c | 1 + >> 1 file changed, 1 inse

Re: [Mesa-dev] [PATCH] i965/fs: Ignore type in cmod prop if scan_inst is CMP.

2015-03-18 Thread Jason Ekstrand
Yeah, that looks better. V2 R-B me. --Jason On Wed, Mar 18, 2015 at 2:56 PM, Matt Turner wrote: > total instructions in shared programs: 6263270 -> 6203091 (-0.96%) > instructions in affected programs: 2606529 -> 2546350 (-2.31%) > helped:14301 > GAINED:

Re: [Mesa-dev] [PATCH 2/9] i965/nir: Make our environment variable checking smarter

2015-03-18 Thread Jason Ekstrand
On Wed, Mar 18, 2015 at 3:17 PM, Mark Janes wrote: > Reviewed-by: Mark Janes Thanks! Noted. > > Jason Ekstrand writes: > >> Before, we enabled NIR if you set INTEL_USE_NIR to anything which mean that >> INTEL_USE_NIR=false would actually turn on NIR. In preparation for turning >> NIR on by d

Re: [Mesa-dev] [PATCH 2/9] i965/nir: Make our environment variable checking smarter

2015-03-18 Thread Mark Janes
Reviewed-by: Mark Janes Jason Ekstrand writes: > Before, we enabled NIR if you set INTEL_USE_NIR to anything which mean that > INTEL_USE_NIR=false would actually turn on NIR. In preparation for turning > NIR on by default, this commit makes it smarter by allowing the > INTEL_USE_NIR variable t

Re: [Mesa-dev] [PATCH] main: Add TEXTURE_CUBE_MAP support in CopyTextureSubImage3D.

2015-03-18 Thread Anuj Phogat
On Wed, Mar 18, 2015 at 1:06 PM, Laura Ekstrand wrote: > So it turns out that this doesn't actually fix any bugs or add any features, > stictly speaking. However, it does avoid a lot of kludginess. Previously, if > you called > > glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ... > > it w

Re: [Mesa-dev] [PATCH 1/9] i965/cmod_propagation: Ignore type in cmod prop if scan_inst is cmp

2015-03-18 Thread Matt Turner
On Tue, Mar 17, 2015 at 7:17 PM, Jason Ekstrand wrote: > From: Matt Turner > > Shader-db results for FS instructions with NIR on HSW: > > total instructions in shared programs: 4186747 -> 4129871 (-1.36%) > instructions in affected programs: 2438094 -> 2381218 (-2.33%) > helped:

[Mesa-dev] [PATCH] i965/fs: Ignore type in cmod prop if scan_inst is CMP.

2015-03-18 Thread Matt Turner
total instructions in shared programs: 6263270 -> 6203091 (-0.96%) instructions in affected programs: 2606529 -> 2546350 (-2.31%) helped:14301 GAINED:5 LOST: 3 Revewed-by: Jason Ekstrand [v1] ---

[Mesa-dev] [PATCH 2/3] util: Add a roundeven test.

2015-03-18 Thread Matt Turner
Reviewed-by: Carl Worth --- src/util/Makefile.am | 4 +- src/util/roundeven_test.c | 140 ++ 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 src/util/roundeven_test.c diff --git a/src/util/Makefile.am b/src/util/Makefile.am

[Mesa-dev] [PATCH 3/3] util: Optimize _mesa_roundeven with SSE 4.1.

2015-03-18 Thread Matt Turner
The SSE 4.1 ROUND instructions let us implement roundeven directly. Otherwise we assume that the rounding mode has not been modified (as we do in the rest of Mesa) and use rint(). glibc uses the ROUND instruction in rint() after a cpuid check. This patch just lets us inline it directly when we're

[Mesa-dev] [PATCH 1/3] mesa: Replace _mesa_round_to_even() with _mesa_roundeven().

2015-03-18 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] docs: Update progress on ARB_direct_state_access.

2015-03-18 Thread Matt Turner
Acked-by: Matt Turner Feel free to push it. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Annotate as_foo functions that the this pointer cannot be NULL

2015-03-18 Thread Ian Romanick
On 03/18/2015 01:29 PM, Ilia Mirkin wrote: > On Wed, Mar 18, 2015 at 4:25 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> We use the idoim >> >>ir_foo *x = y->as_foo(); >>if (x == NULL) >> return; >> >> all over the place. GCC generates some quite lovely code for this. >> One s

[Mesa-dev] [Bug 89662] context.c:943: undefined reference to `_glapi_new_nop_table'

2015-03-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89662 --- Comment #5 from Christoph Haag --- Created attachment 114451 --> https://bugs.freedesktop.org/attachment.cgi?id=114451&action=edit similar error in line 525 I seem to get the same error in make install, with 627991dbf74ce5aee9ce75155fc27a4

Re: [Mesa-dev] [PATCH] glsl: Annotate as_foo functions that the this pointer cannot be NULL

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 1:25 PM, Ian Romanick wrote: > From: Ian Romanick > > We use the idoim typo: idiom > >ir_foo *x = y->as_foo(); >if (x == NULL) > return; > > all over the place. GCC generates some quite lovely code for this. > One such example: > > 340a5b: 83 7d 18

[Mesa-dev] [PATCH] docs: Update progress on ARB_direct_state_access.

2015-03-18 Thread Laura Ekstrand
--- docs/GL3.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 5d59341..fcbb213 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -194,10 +194,10 @@ GL 4.5, GLSL 4.50: GL_ARB_derivative_controlDONE (i965, nv50

Re: [Mesa-dev] [PATCH] glsl: Annotate as_foo functions that the this pointer cannot be NULL

2015-03-18 Thread Ilia Mirkin
On Wed, Mar 18, 2015 at 4:25 PM, Ian Romanick wrote: > From: Ian Romanick > > We use the idoim > >ir_foo *x = y->as_foo(); >if (x == NULL) > return; > > all over the place. GCC generates some quite lovely code for this. > One such example: > > 340a5b: 83 7d 18 04

[Mesa-dev] [PATCH] glsl: Annotate as_foo functions that the this pointer cannot be NULL

2015-03-18 Thread Ian Romanick
From: Ian Romanick We use the idoim ir_foo *x = y->as_foo(); if (x == NULL) return; all over the place. GCC generates some quite lovely code for this. One such example: 340a5b: 83 7d 18 04 cmpl $0x4,0x18(%rbp) 340a5f: 0f 85 06 04 00 00 jne34

[Mesa-dev] [PATCH] main: Add TEXTURE_CUBE_MAP support in CopyTextureSubImage3D.

2015-03-18 Thread Laura Ekstrand
So it turns out that this doesn't actually fix any bugs or add any features, stictly speaking. However, it does avoid a lot of kludginess. Previously, if you called glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ... it would grab the texture image object for face = 0 in teximage.c instea

Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-18 Thread Aditya Avinash
Hi, I am looking for a GSOC project. I am interested in working on driver. Hardware available: All AMD gpus (+1 APU) NVIDIA k40, GTX780, Quadro 3500, GT755M Intel: Haswell (buying on next pay date) On Wed, Mar 18, 2015 at 2:58 PM, Matt Turner wrote: > On Thu, Mar 12, 2015 at 9:46 PM, Matt Turne

Re: [Mesa-dev] [PATCH] nir: Use a list instead of a hash_table for inputs, outputs, and uniforms

2015-03-18 Thread Jason Ekstrand
On Mar 18, 2015 12:39 PM, "Ilia Mirkin" wrote: > > On Wed, Mar 18, 2015 at 3:36 PM, Jason Ekstrand wrote: > > diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp > > index 047cb51..e3c085a 100644 > > --- a/src/glsl/nir/glsl_to_nir.cpp > > +++ b/src/glsl/nir/glsl_to_nir.cpp >

Re: [Mesa-dev] [PATCH] nir: Use a list instead of a hash_table for inputs, outputs, and uniforms

2015-03-18 Thread Ilia Mirkin
On Wed, Mar 18, 2015 at 3:36 PM, Jason Ekstrand wrote: > diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp > index 047cb51..e3c085a 100644 > --- a/src/glsl/nir/glsl_to_nir.cpp > +++ b/src/glsl/nir/glsl_to_nir.cpp > @@ -98,6 +98,9 @@ private: > /* whether the IR we're ope

[Mesa-dev] [PATCH] nir: Use a list instead of a hash_table for inputs, outputs, and uniforms

2015-03-18 Thread Jason Ekstrand
We never did a single hash table lookup in the entire NIR code base that I found so there was no real benifit to doing it that way. I suppose that for linking, we'll probably want to be able to lookup by name but we can leave building that hash table to the linker. In the mean time this was causi

Re: [Mesa-dev] [PATCH] u_primconvert: add primitive restart support

2015-03-18 Thread Brian Paul
On 03/17/2015 08:13 PM, Dave Airlie wrote: This add primitive restart support to the prim conversion. This involves changing the API for the translate functions as we need to pass the prim restart index and the original number of indices into the translate functions. primitive restart is suppor

Re: [Mesa-dev] Summer of Code ideas (maybe just an idea wishlist?)

2015-03-18 Thread Matt Turner
On Thu, Mar 12, 2015 at 9:46 PM, Matt Turner wrote: > Here are some ideas I think might be reasonable GSoC ideas. > > - GLSL linking in NIR > - Would allow us to stop doing optimizations and other expensive > things on GLSL IR Ian said this should wait until everything is using NIR so that

Re: [Mesa-dev] [PATCH 4/6] glsl: Avoid GLboolean vs bool arithmetic MSVC warnings.

2015-03-18 Thread Ian Romanick
On 03/18/2015 09:34 AM, Jose Fonseca wrote: > Note that GLboolean is an alias for unsigned char, which lacks the > implicit true/false semantics that C++/C99 bool have. > --- > src/glsl/linker.cpp | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/linker.cpp

Re: [Mesa-dev] [PATCH 3/5] glsl: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.

2015-03-18 Thread Matt Turner
On Wed, Mar 18, 2015 at 11:51 AM, Ian Romanick wrote: > Did this patch help anything? Nope. I guess NIR is able to recognize something here that the GLSL IR can't. Thanks for reviewing! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://li

Re: [Mesa-dev] [PATCH 1/5] glsl: Allow vector logic ops to be generated.

2015-03-18 Thread Ian Romanick
Patches 1, 2, and 3 are Reviewed-by: Ian Romanick Patches 4 and 5 are Acked-by: Ian Romanick On 03/18/2015 11:37 AM, Matt Turner wrote: > They're not accessible from the source language, but optimizations are > allowed to generate them. > --- > src/glsl/ir_validate.cpp

Re: [Mesa-dev] [PATCH 3/5] glsl: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.

2015-03-18 Thread Ian Romanick
Did this patch help anything? On 03/18/2015 11:37 AM, Matt Turner wrote: > Transform this into b2f(or(a, b)). > --- > src/glsl/opt_algebraic.cpp | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp > index 0d1f3fc..98c852a

[Mesa-dev] [Bug 89662] context.c:943: undefined reference to `_glapi_new_nop_table'

2015-03-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89662 Brian Paul changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] dri: add _glapi_set_nop_handler(), _glapi_new_nop_table() to dri_test.c

2015-03-18 Thread Mark Janes
Reviewed-by: Mark Janes Brian Paul writes: > I wasn't aware of these _glapi_ stub functions when I committed > 4bdbb588a9d385509f9168e38bfdb76952ba469c. Fixes "make check" > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89662 > --- > src/mesa/drivers/dri/common/dri_test.c | 11

[Mesa-dev] [PATCH 4/5] nir: Recognize mul(b2f(a), b2f(b)) as a logical AND.

2015-03-18 Thread Matt Turner
Transform this into b2f(and(a, b)). total instructions in shared programs: 6205448 -> 6204391 (-0.02%) instructions in affected programs: 284030 -> 282973 (-0.37%) helped:903 HURT: 6 --- src/glsl/nir/nir_opt_algebraic.py | 2 ++

[Mesa-dev] [PATCH 3/5] glsl: Recognize sat(add(b2f(a), b2f(b))) as a logical OR.

2015-03-18 Thread Matt Turner
Transform this into b2f(or(a, b)). --- src/glsl/opt_algebraic.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index 0d1f3fc..98c852a 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -421,6 +421

  1   2   >