[Mesa-dev] [PATCH] tgsi: properly parse indirect dimension references (e.g. for UBOs)

2014-07-08 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_text.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index c6134c5..6403344 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/ga

Re: [Mesa-dev] [PATCH] i965: Initialize new chunks of realloc'd memory.

2014-07-08 Thread Matt Turner
On Tue, Jul 8, 2014 at 9:51 PM, Chris Forbes wrote: > I think you want to move the memset after the !annotation->ann bail > out. Currently, if that allocation were to fail (and we care enough to > check...) , you'll segfault. Yeah... of course. Thanks. ___

Re: [Mesa-dev] [PATCH] i965: Initialize new chunks of realloc'd memory.

2014-07-08 Thread Chris Forbes
I think you want to move the memset after the !annotation->ann bail out. Currently, if that allocation were to fail (and we care enough to check...) , you'll segfault. On Wed, Jul 9, 2014 at 3:44 PM, Matt Turner wrote: > Otherwise we'd compare uninitialized pointers with NULL and dereference, > l

[Mesa-dev] [PATCH] i965: Initialize new chunks of realloc'd memory.

2014-07-08 Thread Matt Turner
Otherwise we'd compare uninitialized pointers with NULL and dereference, leading to crashes. --- src/mesa/drivers/dri/i965/intel_asm_annotation.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotati

[Mesa-dev] [Bug 80933] Fullscreen OpenGL programs (e.g. games) crash if focus lost then regained, something to do with automatic compositing suspension

2014-07-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=80933 Michel Dänzer changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #2 from Michel Dänz

[Mesa-dev] [PATCH 1/2] mesa/st: add support for dynamic ubo selection

2014-07-08 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- With ChrisF's patches to add support for this in core mesa, this generates code like: FRAG DCL OUT[0], COLOR DCL CONST[0] DCL CONST[1][0] DCL CONST[2][0] DCL CONST[3][0] DCL CONST[4][0] DCL TEMP[0], LOCAL DCL ADDR[0..1] IMM[0] UINT32 {0, 0, 0, 0} IMM[1] INT32 {1, 0

[Mesa-dev] [PATCH 2/2] nvc0/ir: support 2d constbuf indexing

2014-07-08 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- .../drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 13 + 1 file changed, 13 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 37e2f7

Re: [Mesa-dev] [PATCH 01/11] nvc0: allocate more space before a counter is configured

2014-07-08 Thread Ilia Mirkin
On Sat, Jul 5, 2014 at 7:41 PM, Martin Peres wrote: > On 05/07/2014 20:49, Samuel Pitoiset wrote: >> >> On nvc0, a counter can up to 6 sources instead of only one >> for nve4+. This fixes a crash when a counter uses more than >> one source. > > The verb is missing in the first sentence :) Yeah, h

Re: [Mesa-dev] [PATCH 01/11] nvc0: allocate more space before a counter is configured

2014-07-08 Thread Martin Peres
On 05/07/2014 20:49, Samuel Pitoiset wrote: On nvc0, a counter can up to 6 sources instead of only one for nve4+. This fixes a crash when a counter uses more than one source. The verb is missing in the first sentence :) ___ mesa-dev mailing list mesa-d

Re: [Mesa-dev] [PATCH 1/2] mesa: add fix geometry shader memory leaks

2014-07-08 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák Marek On Wed, Jul 9, 2014 at 12:32 AM, Brian Paul wrote: > Spotted by Charmaine Lee. > Cc: "10.2" > --- > src/mesa/main/context.c |3 +++ > src/mesa/main/shared.c |1 + > 2 files changed, 4 insertions(+) > > diff --git a/src/mesa/main/context

Re: [Mesa-dev] [PATCH 2/2] st/mesa: fix geometry shader memory leak

2014-07-08 Thread Charmaine Lee
Changes looks good. Tested with svga driver. Reviewed-by: Charmaine Lee From: mesa-dev on behalf of Brian Paul Sent: Tuesday, July 8, 2014 3:32 PM To: mesa-dev@lists.freedesktop.org Cc: 10.2 Subject: [Mesa-dev] [PATCH 2/2] st/mesa: fix geometry shader m

Re: [Mesa-dev] [PATCH 2/3] mesa/st: add per sample shading state to fp key and set interpolation

2014-07-08 Thread Marek Olšák
Alright. For the patch: Reviewed-by: Marek Olšák Marek On Wed, Jul 9, 2014 at 2:48 AM, Ilia Mirkin wrote: > So... I don't think we're going to figure this out here. At least I > have nothing enlightening to say. FWIW this is doing the same thing as > what i965 does wrt the persample_shading co

Re: [Mesa-dev] [PATCH 2/3] mesa/st: add per sample shading state to fp key and set interpolation

2014-07-08 Thread Ilia Mirkin
So... I don't think we're going to figure this out here. At least I have nothing enlightening to say. FWIW this is doing the same thing as what i965 does wrt the persample_shading computation. It should be pretty easy to change should we decide on a different interpretation of the spec. The only q

Re: [Mesa-dev] [PATCH 1/3] gallium: switch dedicated centroid field to interpolation location

2014-07-08 Thread Ilia Mirkin
On Sat, Jul 5, 2014 at 5:20 PM, Roland Scheidegger wrote: > Am 05.07.2014 06:07, schrieb Ilia Mirkin: >> The new location field can be either center, centroid, or sample, which >> indicates the location that the shader should interpolate at. > Looks good though maybe it should be mentioned in the

[Mesa-dev] A proposal for new testing requirements for stable releases

2014-07-08 Thread Carl Worth
I've been doing stable-branch release of mesa for close to a year now. In all of that time, there's one thing that I've never been very comfortable with. Namely, release candidates are not tested very thoroughly prior to release.[*] I'm glad that we haven't had any major problems yet with broken r

[Mesa-dev] [PATCH 1/2] mesa: add fix geometry shader memory leaks

2014-07-08 Thread Brian Paul
Spotted by Charmaine Lee. Cc: "10.2" --- src/mesa/main/context.c |3 +++ src/mesa/main/shared.c |1 + 2 files changed, 4 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b082159..50aae8b 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c

[Mesa-dev] [PATCH 2/2] st/mesa: fix geometry shader memory leak

2014-07-08 Thread Brian Paul
Spotted by Charmaine Lee. Cc: "10.2" --- src/mesa/state_tracker/st_context.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index c7f3ec6..c805a09 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/sta

Re: [Mesa-dev] [PATCH 0/3] various exec_list things

2014-07-08 Thread Thomas Helland
Well, if that's how things work then, for the series, : Reviewed-by: Thomas Helland 2014-07-08 23:07 GMT+02:00 Matt Turner : > On Tue, Jul 8, 2014 at 2:04 PM, Thomas Helland > wrote: > > I don't feel comfortable reviewing things > > on here quite yet, so you should > > probably get a reviewed

Re: [Mesa-dev] [PATCH 1/2] glsl: add a mechanism to allow #extension directives in the middle of shaders

2014-07-08 Thread Brian Paul
On 07/08/2014 12:29 PM, Marek Olšák wrote: From: Marek Olšák This is needed to make Unigine Heaven 4.0 and Unigine Valley 1.0 work with sample shading. Also, if this is disabled, the error message at least makes sense now. --- src/glsl/glsl_parser.yy | 8 src/glsl/glsl_pars

Re: [Mesa-dev] [PATCH 0/3] various exec_list things

2014-07-08 Thread Matt Turner
On Tue, Jul 8, 2014 at 2:04 PM, Thomas Helland wrote: > I don't feel comfortable reviewing things > on here quite yet, so you should > probably get a reviewed-by by someone else. > > That being said this series LGTM. Feel free to give a Reviewed-by tag if the code looks correct to you. It's up to

[Mesa-dev] [PATCH 0/3] various exec_list things

2014-07-08 Thread Thomas Helland
I don't feel comfortable reviewing things on here quite yet, so you should probably get a reviewed-by by someone else. That being said this series LGTM. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinf

[Mesa-dev] [PATCH 3/3] exec_list: make various places use the new get_size() method

2014-07-08 Thread Connor Abbott
Instead of hand-rolling it. Signed-off-by: Connor Abbott --- src/glsl/ast_to_hir.cpp | 4 +--- src/glsl/ir_reader.cpp| 7 +++ src/glsl/opt_function_inlining.cpp| 7 ++- src/mesa/drivers/dri/i965/brw_fs.cpp

[Mesa-dev] [PATCH 1/3] exec_list: add a prepend function

2014-07-08 Thread Connor Abbott
This complements the existing append function. It's implemented in a rather simple way right now; it could be changed if performance is a concern. Signed-off-by: Connor Abbott --- src/glsl/list.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/glsl/li

[Mesa-dev] [PATCH 2/3] exec_list: add a function to count the size of a list

2014-07-08 Thread Connor Abbott
Signed-off-by: Connor Abbott --- src/glsl/list.h | 20 1 file changed, 20 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index ca6ee9d..68ab3fd 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -324,6 +324,8 @@ struct exec_list { const exec_node *get_

[Mesa-dev] [PATCH 0/3] various exec_list things

2014-07-08 Thread Connor Abbott
This series adds a couple things I need to exec_list for my work, and does some cleanups made possible. Only compile tested on i965. Connor Abbott (3): exec_list: add a prepend function exec_list: add a function to count the size of a list exec_list: make various places use the new get_size(

Re: [Mesa-dev] [v2 PATCH 09/16] glsl: Optimize clamp(x, 0, 1) as saturate(x)

2014-07-08 Thread Roland Scheidegger
Am 08.07.2014 18:03, schrieb Erik Faye-Lund: > On Tue, Jul 8, 2014 at 5:44 PM, Roland Scheidegger wrote: >> Am 08.07.2014 08:22, schrieb Matt Turner: >>> On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner wrote: > This comment tripped me u

[Mesa-dev] [PATCH 2/2] st/mesa, gallium: add a workaround for Unigine Heaven 4.0 and Valley 1.0

2014-07-08 Thread Marek Olšák
From: Marek Olšák Most (all?) Unigine shaders fail to compile without this if sample shading is advertised. This is, of course, Unigine developers' fault. --- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_context.c | 2 ++ src/gallium/stat

[Mesa-dev] [PATCH 1/2] glsl: add a mechanism to allow #extension directives in the middle of shaders

2014-07-08 Thread Marek Olšák
From: Marek Olšák This is needed to make Unigine Heaven 4.0 and Unigine Valley 1.0 work with sample shading. Also, if this is disabled, the error message at least makes sense now. --- src/glsl/glsl_parser.yy | 8 src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/glsl_parser_extr

Re: [Mesa-dev] [PATCH 10/16] gallium: add is_percentage and is_float fields to pipe_driver_query_info

2014-07-08 Thread Marek Olšák
It would be nicer to define all the types as enums, e.g. enum pipe_driver_query_type { PIPE_DRIVER_QUERY_TYPE_BYTES, PIPE_DRIVER_QUERY_TYPE_PERCENTAGE, PIPE_DRIVER_QUERY_TYPE_FLOAT, PIPE_DRIVER_QUERY_TYPE_UINT }; That would be nicer than a bunch of booleans. If that's not possible, please documen

Re: [Mesa-dev] [v2 PATCH 09/16] glsl: Optimize clamp(x, 0, 1) as saturate(x)

2014-07-08 Thread Erik Faye-Lund
On Tue, Jul 8, 2014 at 5:44 PM, Roland Scheidegger wrote: > Am 08.07.2014 08:22, schrieb Matt Turner: >> On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund wrote: >>> On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner wrote: This comment tripped me up for a second. This really means that you've

[Mesa-dev] [v3 PATCH 13/16] i965/vec4: Allow propagation of instructions with saturate flag to sel

2014-07-08 Thread Abdiel Janulgue
When sel conditon is bounded within 0 and 1.0. This allows code as: mov.sat a b sel.ge dst a 0.25F To be propagated as: sel.ge.sat dst b 0.25F v3: - Syntax clarification in inst->saturate assignment - Remove extra parenthesis when assigning src_reg value from co

[Mesa-dev] [v3 PATCH 12/16] i965/fs: Allow propagation of instructions with saturate flag to sel

2014-07-08 Thread Abdiel Janulgue
When sel conditon is bounded within 0 and 1.0. This allows code as: mov.sat a b sel.ge dst a 0.25F To be propagated as: sel.ge.sat dst b 0.25F v3: Syntax clarification in inst->saturate assignment (Matt Turner) Signed-off-by: Abdiel Janulgue --- src/mesa/drivers/dri/i9

[Mesa-dev] [v3 PATCH 11/16] glsl: Optimize clamp(x, b, 1.0), where b > 0.0 as max(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
v2: - Output max(saturate(x),b) instead of saturate(max(x,b)) - Make sure we do component-wise comparison for vectors (Ian Romanick) v3: - Add missing condition where the outer constant value is > 0.0 and inner constant is 1.0. - Fix comments to show that the optimization is a commuta

[Mesa-dev] [v3 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b < 1.0 as min(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do component-wise comparison for vectors (Ian Romanick) v3: - Add missing condition where the outer constant value is zero and inner constant is < 1 - Fix comments to reflect we are

[Mesa-dev] [v3 PATCH 09/16] glsl: Optimize clamp(x, 0, 1) as saturate(x)

2014-07-08 Thread Abdiel Janulgue
v2: - Check that the base type is float (Ian Romanick) v3: - Make sure comments reflect that we are doing a commutative operation - Add missing condition where the inner constant is 1.0 and outer constant is 0.0 - Make indexing of operands easier to read (Matt Turner) Signed-off-by: Abdie

Re: [Mesa-dev] [v2 PATCH 09/16] glsl: Optimize clamp(x, 0, 1) as saturate(x)

2014-07-08 Thread Roland Scheidegger
Am 08.07.2014 08:22, schrieb Matt Turner: > On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund wrote: >> On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner wrote: >>> This comment tripped me up for a second. This really means that you've >>> found either >>> >>> - min(max(x, 0.0), 1.0); or >>> - max(mi

Re: [Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b < 1.0 as min(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
On 08.07.2014 12:37, Abdiel Janulgue wrote: > > On 07.07.2014 20:25, Matt Turner wrote: >> On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue >> wrote: >>> v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by >>> Ilia Mirkin >>> - Make sure we do component-wise comparison

Re: [Mesa-dev] [v2 PATCH 10/16] glsl: Optimize clamp(x, 0.0, b), where b < 1.0 as min(saturate(x), b)

2014-07-08 Thread Abdiel Janulgue
On 07.07.2014 20:25, Matt Turner wrote: > On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue > wrote: >> v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by >> Ilia Mirkin >> - Make sure we do component-wise comparison for vectors (Ian Romanick) >> >> Signed-off-by: Abdie

[Mesa-dev] i965: overwriting parts of a register and optimization passes

2014-07-08 Thread Iago Toral
Hi, I have some code that first initializes a register and then overwrites a specific subregister. However, after the optimization passes in brw_vec4.cpp the initialization instruction goes away. I see that live intervals are computed for the destination register without considering if we are

Re: [Mesa-dev] [v2 PATCH 09/16] glsl: Optimize clamp(x, 0, 1) as saturate(x)

2014-07-08 Thread Abdiel Janulgue
On 08.07.2014 09:47, Erik Faye-Lund wrote: > On Tue, Jul 8, 2014 at 8:22 AM, Matt Turner wrote: >> On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund wrote: >>> On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner wrote: This comment tripped me up for a second. This really means that you've found