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

2014-07-08 Thread Erik Faye-Lund
On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com wrote: On Mon, Jul 7, 2014 at 6:57 AM, Abdiel Janulgue abdiel.janul...@linux.intel.com wrote: v2: Check that the base type is float (Ian Romanick) Signed-off-by: Abdiel Janulgue abdiel.janul...@linux.intel.com ---

Re: [Mesa-dev] [PATCH] i965: Extend compute-to-mrf pass to understand blocks of MOVs

2014-07-08 Thread Kristian Høgsberg
On Mon, Jun 30, 2014 at 3:14 PM, Matt Turner matts...@gmail.com wrote: On Fri, Jun 27, 2014 at 12:00 PM, Kristian Høgsberg k...@bitplanet.net wrote: From: Kristian Høgsberg krh@century-sparrow.local With your email address fixed, Done, thanks for the review. I realized that this also

Re: [Mesa-dev] [PATCH] i965: Extend compute-to-mrf pass to understand blocks of MOVs

2014-07-08 Thread Kristian Høgsberg
On Mon, Jul 7, 2014 at 11:07 PM, Kristian Høgsberg k...@bitplanet.net wrote: On Mon, Jun 30, 2014 at 3:14 PM, Matt Turner matts...@gmail.com wrote: On Fri, Jun 27, 2014 at 12:00 PM, Kristian Høgsberg k...@bitplanet.net wrote: From: Kristian Høgsberg krh@century-sparrow.local With your email

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

2014-07-08 Thread Matt Turner
On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com 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(min(x, 1.0), 0.0) Hmm,

Re: [Mesa-dev] [PATCH 2/3] i965: Avoid crashing while dumping vec4 insn operands

2014-07-08 Thread Matt Turner
On Sun, Jul 6, 2014 at 1:11 AM, Chris Forbes chr...@ijw.co.nz wrote: We'd otherwise go looking into virtual_grf_sizes for things that aren't in there at all. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 +++- 1 file changed, 3 insertions(+), 1

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 8:22 AM, Matt Turner matts...@gmail.com wrote: On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com wrote: This comment tripped me up for a second. This really means that you've found

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 matts...@gmail.com wrote: On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com wrote: This comment tripped me up for a

[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

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 abdiel.janul...@linux.intel.com 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)

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 abdiel.janul...@linux.intel.com wrote: v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do

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 kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com wrote: This comment tripped me up for a second. This really means that you've found either - min(max(x, 0.0),

[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:

[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 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

[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

[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

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 srol...@vmware.com wrote: Am 08.07.2014 08:22, schrieb Matt Turner: On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner matts...@gmail.com wrote: This comment tripped me up for

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

[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 marek.ol...@amd.com 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 ++

[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 marek.ol...@amd.com 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

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 srol...@vmware.com wrote: Am 08.07.2014 08:22, schrieb Matt Turner: On Mon, Jul 7, 2014 at 11:00 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Mon, Jul 7, 2014 at 7:18 PM, Matt Turner

[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

[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 connor.abb...@intel.com --- src/glsl/list.h | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[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 connor.abb...@intel.com --- 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 {

[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 connor.abb...@intel.com --- src/glsl/ast_to_hir.cpp | 4 +--- src/glsl/ir_reader.cpp| 7 +++ src/glsl/opt_function_inlining.cpp| 7 ++-

[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

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 thomashellan...@gmail.com 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

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 marek.ol...@amd.com 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

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 thomashellan...@gmail.com 2014-07-08 23:07 GMT+02:00 Matt Turner matts...@gmail.com: On Tue, Jul 8, 2014 at 2:04 PM, Thomas Helland thomashellan...@gmail.com wrote: I don't feel comfortable reviewing things

[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 mesa-sta...@lists.freedesktop.org --- 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 ---

[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 mesa-sta...@lists.freedesktop.org --- 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 ---

[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

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 srol...@vmware.com 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

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

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.ol...@amd.com Marek On Wed, Jul 9, 2014 at 2:48 AM, Ilia Mirkin imir...@alum.mit.edu 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

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 charmai...@vmware.com From: mesa-dev mesa-dev-boun...@lists.freedesktop.org on behalf of Brian Paul bri...@vmware.com Sent: Tuesday, July 8, 2014 3:32 PM To:

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.ol...@amd.com Marek On Wed, Jul 9, 2014 at 12:32 AM, Brian Paul bri...@vmware.com wrote: Spotted by Charmaine Lee. Cc: 10.2 mesa-sta...@lists.freedesktop.org --- src/mesa/main/context.c |3 +++ src/mesa/main/shared.c |1 + 2 files

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

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 martin.pe...@free.fr 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

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

2014-07-08 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin imir...@alum.mit.edu --- 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,

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

2014-07-08 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin imir...@alum.mit.edu --- .../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

[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 mic...@daenzer.net changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment

[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

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 matts...@gmail.com wrote: Otherwise we'd compare uninitialized pointers with NULL and

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 chr...@ijw.co.nz 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.