Re: [Mesa-dev] glsl2: Remove generated files from git

2010-09-07 Thread Miles Bader
Ian Romanick writes: >> How about putting "generated" files like that into a separate >> subdirectory (e.g. ".../prebuilt"), which is ignored by the non-windows >> builds? >> >> Then on windows, it can simply do "cp .../prebuilt/foo .../foo" instead >> of generating the file using bison or whatev

Re: [Mesa-dev] [PATCH] fix crash: check for _NumLinkedShaders being 0.

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Török Edwin wrote: > On Sun, 5 Sep 2010 09:48:22 -0700 > Ian Romanick wrote: > >> On Sep 4, 2010, at 3:48 AM, Török Edwin wrote: >> >>> From: Török Edvin >>> >>> Otherwise spring 0.82+.4.0 crashes when starting a game >>> because prog->_LinkedShade

[Mesa-dev] r300 presubtract v2

2010-09-07 Thread Tom Stellard
Hi, I have just pushed a branching adding support for presubtract sources to my personal repo. The branch contains peephole optimizations for all the presubtract operations except for 1 - 2 * src0. I've tested this branch on an RV370 and an RV515 and both match the piglit results from master. T

[Mesa-dev] [Bug 30075] New: Possible glXDestroyContext glXMakeContextCurrent inconsistency

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30075 Summary: Possible glXDestroyContext glXMakeContextCurrent inconsistency Product: Mesa Version: unspecified Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW

Re: [Mesa-dev] Mesa (shader-work): glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps

2010-09-07 Thread Luca Barbieri
> Too bad LLVM doesn't have a clue about hardware that requires structured > branching.  Any decent optimizer for general purpose CPUs generates > spaghetti code. Yes, that's the biggest challenge, but I think it can be solved. Also, modern hardware tends to have more flexible branching than GLSL,

Re: [Mesa-dev] Mesa (shader-work): glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Luca Barbieri wrote: > I think my patch can be seen an intermediate step towards that. > > I'm not sure that it's a good idea to implement them in terms of all/any. > > ir_binop_all_equal and ir_binop_any_nequal represent the concept of > "whole obje

Re: [Mesa-dev] Mesa (shader-work): glsl: teach loop analysis that array dereferences are bounds on the index

2010-09-07 Thread Luca Barbieri
> Clever. :) > > Technically speaking only the access to the array has undefined > behavior, and that undefined behavior does not include program > termination. No, my interpretation is correct, because ARB_robustness contains the following text: << ... Undefined behavior results from indexing

Re: [Mesa-dev] Mesa (shader-work): glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps

2010-09-07 Thread Luca Barbieri
I think my patch can be seen an intermediate step towards that. I'm not sure that it's a good idea to implement them in terms of all/any. ir_binop_all_equal and ir_binop_any_nequal represent the concept of "whole object equality", which seems quite useful in itself. For instance, it can be trivi

Re: [Mesa-dev] Mesa (shader-work): glsl: teach loop analysis that array dereferences are bounds on the index

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Luca Barbieri wrote: > Module: Mesa > Branch: shader-work > Commit: 2ecf7b5cd5067d80cb6ce74d55b2ed93c974d8dc > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ecf7b5cd5067d80cb6ce74d55b2ed93c974d8dc > > Author: Luca Barbieri > Date: Tu

Re: [Mesa-dev] Mesa (shader-work): glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I sure do wish the reply-to on mesa-commit message was automatically set to mesa-dev. :( - Original Message Message-ID: <4c86e67c.2010...@freedesktop.org> Date: Tue, 07 Sep 2010 18:27:24 -0700 From: Ian Romanick User-Agent: Thunderb

[Mesa-dev] New interesting closed-source OpenGL/GLSL test

2010-09-07 Thread Luca Barbieri
For anyone who doesn't know it yet, there is a new closed-source OpenGL game for Linux called Amnesia, with the very interesting property that the developers offer a test program that renders several complex GLSL-based effects one at a time. Unfortunately, it's pretty broken right now (on softpipe

Re: [Mesa-dev] [PATCH 1/3] glsl: add ir_partial_visitor

2010-09-07 Thread Luca Barbieri
Yes, I think what is really needed here is a class that only ignores IR related to declaration and expression statements. This would allow lower_jumps to avoid caring about stuff like ir_texture that it doesn't care about at all. Would this be acceptable? BTW, using hierarchical_visitor is less

Re: [Mesa-dev] [PATCH 1/3] glsl: add ir_partial_visitor

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Luca Barbieri wrote: > Well, the alternative is to copy&paste this into ir_lower_jumps and > other similar passes. > > I added a new class instead of changing ir_visitor so that subclasses > that need to examine all leaves will get a compile error if

[Mesa-dev] [Bug 29460] GNU/Hurd support

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29460 nobled changed: What|Removed |Added Attachment #38273|0 |1 is obsolete|

[Mesa-dev] [Bug 29460] GNU/Hurd support

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=29460 nobled changed: What|Removed |Added Attachment #37727|1 |0 is obsolete|

Re: [Mesa-dev] [PATCHES] surfaceless EGL: new DRI extension

2010-09-07 Thread nobled
2010/9/7 Kristian Høgsberg : But the dri2 extension's version 2 doesn't actually mean "this driver can create and bind contexts without drawables"--and right now only the intel drivers can. >>> >>> No, that is actually one of the implied features of version 2 of the >>> DRI2 extensio

[Mesa-dev] [PATCH] r600g: Added missing abs-ification to RSQ.

2010-09-07 Thread Tilman Sauerbeck
This makes the 'fp1-RSQ test 2' piglit test work. --- src/gallium/drivers/r600/r600_shader.c | 31 ++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 7cf255b..94ddb

Re: [Mesa-dev] glsl2: Remove generated files from git

2010-09-07 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Miles Bader wrote: > Ian Romanick writes: >>> These files generated by bison and flex are different for me than the >>> ones checked in to git: >>> >>> src/glsl/glcpp/glcpp-lex.c >>> src/glsl/glcpp/glcpp-parse.c >>> src/glsl/glcpp/glcpp-parse.h >>> sr

[Mesa-dev] [Bug 27840] Enable mesa to be built for Cygwin -with-driver=dri

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27840 --- Comment #13 from Jon TURNEY 2010-09-07 11:36:05 PDT --- Created an attachment (id=38525) View: https://bugs.freedesktop.org/attachment.cgi?id=38525 Review: https://bugs.freedesktop.org/review?bug=27840&attachment=38525 Fix compilation wit

[Mesa-dev] [Bug 27840] Enable mesa to be built for Cygwin -with-driver=dri

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27840 --- Comment #12 from Jon TURNEY 2010-09-07 11:32:38 PDT --- (In reply to comment #11) > I removed the dri2proto.h include, no longer necessary and pulled the > xf86vidmode patch. Not sure what you want to do for configure.ac, can you > post >

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Luca Barbieri
I pushed yet another commit that teaches the unroller to unroll loops like this: uniform int texcoords; float4 gl_TexCoord[8]; for(i = 0; i < texcoords; ++i) do_something_with(gl_TexCoord[i]); After this, we should now be able to inline all functions and unroll all loops with reasonably obvio

Re: [Mesa-dev] [PATCHES] multi-api support in st/dri

2010-09-07 Thread Chia-I Wu
On Wed, Sep 8, 2010 at 12:36 AM, nobled wrote: > The first patch fixes a current bug, the second naively integrates > support for ES 1 and ES 2 into Gallium DRI drivers: > 1. st/dri: Make clear which API's are supported (aka just desktop GL) > 2. st/dri: Add multi-api support (applies after the fi

[Mesa-dev] [Bug 27840] Enable mesa to be built for Cygwin -with-driver=dri

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27840 --- Comment #11 from Kristian Høgsberg 2010-09-07 10:33:52 PDT --- I removed the dri2proto.h include, no longer necessary and pulled the xf86vidmode patch. Not sure what you want to do for configure.ac, can you post the complete patch you'd lik

[Mesa-dev] [Bug 30045] mesa fails to build when configured --disable-driglx-direct

2010-09-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=30045 Kristian Høgsberg changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

Re: [Mesa-dev] [PATCH] mesa: allow unlimited temporaries

2010-09-07 Thread Eric Anholt
On Sun, 5 Sep 2010 09:58:40 -0700, Ian Romanick wrote: > On Sep 5, 2010, at 3:38 AM, Christoph Bumiller > wrote: > > > On 09/05/2010 01:59 AM, Luca Barbieri wrote: > >> Currently Mesa has a limit of 1024 temporaries. > >> > >> Unfortunately, some GLSL shaders such as an SSAO fragment > >> post

[Mesa-dev] [PATCHES] multi-api support in st/dri

2010-09-07 Thread nobled
The first patch fixes a current bug, the second naively integrates support for ES 1 and ES 2 into Gallium DRI drivers: 1. st/dri: Make clear which API's are supported (aka just desktop GL) 2. st/dri: Add multi-api support (applies after the first patch) One issue with patch 2, though, is implement

Re: [Mesa-dev] [PATCHES] surfaceless EGL: new DRI extension

2010-09-07 Thread Kristian Høgsberg
On Mon, Aug 30, 2010 at 4:35 PM, nobled wrote: > Kristian Høgsberg wrote: >> On Sun, Aug 29, 2010 at 1:54 PM, nobled wrote: >>> The current egl_dri2 code for enabling the EGL_KHR_surfaceless_* >>> extensions is a bit broken right now. First, the code in dri_util.c >>> and drisw_util.c doesn't ch

[Mesa-dev] [PATCH] dri: Make drisw_util c++ compatible

2010-09-07 Thread nobled
--- src/mesa/drivers/dri/common/drisw_util.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/common/drisw_util.h b/src/mesa/drivers/dri/common/drisw_util.h index 9c3d01c..3cf4998 100644 --- a/src/mesa/drivers/dri/common/drisw_util.h +++ b/src/mesa/d

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Luca Barbieri
I added two commits that allow unrolling of loops with jumps. One fixes a serious bug in loop controls, where the analyzer wouldn't recognize the from/to/increment data it itself created on a previous run. The second adds code to build the if structures to the unroller. Note that some orderings

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Luca Barbieri
>> at least for chips with no control flow support like nv30 and i915 > s/at least/only > This doesn't reduce divergence, only increases code size. The purpose of this unrolling is not to reduce divergence, but to avoid the expense of computing and checking the loop iteration variable, and the exp

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Christoph Bumiller
On 09/07/2010 03:10 PM, Luca Barbieri wrote: >>> 2. Remove all "continue"s, replacing them with an "execute flag" >> >> This essentially wraps the rest of the code in the loop with >> if-statements, right? I had been thinking about adding a pass to do >> this as well. > Yes. > >>> 3. Replace all

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Luca Barbieri
I just put an updated version in the shader-work branch, which better adheres to the coding conventions, has better comments, and fixes and improves the execute flag if-insertion logic. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists

Re: [Mesa-dev] [PATCH 2/3] glsl: add continue/break/return unification/elimination pass

2010-09-07 Thread Luca Barbieri
>> 2. Remove all "continue"s, replacing them with an "execute flag" > > This essentially wraps the rest of the code in the loop with > if-statements, right?  I had been thinking about adding a pass to do > this as well. Yes. >> 3. Replace all "break" with a single conditional one at the end of the

Re: [Mesa-dev] nouveau_vieux_dri.so cant be build because of changes in nvfx

2010-09-07 Thread Luca Barbieri
Sorry, should be fixed now. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/3] glsl: add ir_partial_visitor

2010-09-07 Thread Luca Barbieri
Well, the alternative is to copy&paste this into ir_lower_jumps and other similar passes. I added a new class instead of changing ir_visitor so that subclasses that need to examine all leaves will get a compile error if not updated when new leaves are introduced. This is debatable though, since yo

Re: [Mesa-dev] [PATCH 1/3] Replace reference to tgsi-instruction-set.txt.

2010-09-07 Thread José Fonseca
Submitted. Thanks. Jose On Tue, 2010-09-07 at 02:59 -0700, Tilman Sauerbeck wrote: > That file has been replaced by tgsi.rst. > --- > src/gallium/include/pipe/p_shader_tokens.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/include/pipe/p_shader_token

Re: [Mesa-dev] [PATCH] mesa: allow unlimited temporaries

2010-09-07 Thread Christoph Bumiller
On 09/06/2010 06:58 PM, Luca Barbieri wrote: >> And prog_optimize can't do anything if there are temporaries with indirect >> addressing. We need either the temporary array file or to do register >> allocation in GLSL IR. > > Sure, but I think this can/should be done on top of this change, and > t

Re: [Mesa-dev] [PATCH 1/3] Replace reference to tgsi-instruction-set.txt.

2010-09-07 Thread Tilman Sauerbeck
Tilman Sauerbeck [2010-09-07 11:59]: > That file has been replaced by tgsi.rst. Sorry about the duplicate mails. I sent the first three patches to mesa...@fdo, and when I didn't receive mail from mailman I assumed it was because I should have used @lists.fdo. Regards, Tilman -- A: Because it me

[Mesa-dev] [PATCH 3/3] r600g: Added missing r600_bc_add_literal() calls to XPD implementation.

2010-09-07 Thread Tilman Sauerbeck
--- src/gallium/drivers/r600/r600_shader.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f211ec2..7cf255b 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/d

[Mesa-dev] [PATCH 2/3] r600g: Added preliminary support for the LOG opcode.

2010-09-07 Thread Tilman Sauerbeck
--- src/gallium/drivers/r600/r600_shader.c | 122 +++- 1 files changed, 121 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 0ba26a2..f211ec2 100644 --- a/src/gallium/drivers/r600/r600_sh

[Mesa-dev] [PATCH 1/3] Replace reference to tgsi-instruction-set.txt.

2010-09-07 Thread Tilman Sauerbeck
That file has been replaced by tgsi.rst. --- src/gallium/include/pipe/p_shader_tokens.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index c4bd17e..74488de 100644 --- a/src/gallium

[Mesa-dev] [PATCH 3/3] r600g: Added missing r600_bc_add_literal() calls to XPD implementation.

2010-09-07 Thread Tilman Sauerbeck
--- src/gallium/drivers/r600/r600_shader.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f211ec2..7cf255b 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/d

[Mesa-dev] [PATCH 2/3] r600g: Added preliminary support for the LOG opcode.

2010-09-07 Thread Tilman Sauerbeck
--- src/gallium/drivers/r600/r600_shader.c | 122 +++- 1 files changed, 121 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 0ba26a2..f211ec2 100644 --- a/src/gallium/drivers/r600/r600_sh

Re: [Mesa-dev] [PATCH 08/10] gallium: introduce get_shader_param (ALL DRIVERS CHANGED)

2010-09-07 Thread José Fonseca
FWIW, I think this is a worthwhile interface cleanup. Your commit comment says it all. I did think of this when introducing the current shader caps enums, but informal feedback I got was that it was better to stick with the current get_param system. Now that the number of shader types is growing p

[Mesa-dev] [PATCH] Replace reference to tgsi-instruction-set.txt.

2010-09-07 Thread Tilman Sauerbeck
That file has been replaced by tgsi.rst. --- src/gallium/include/pipe/p_shader_tokens.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index c4bd17e..74488de 100644 --- a/src/gallium