[Mesa-dev] [PATCH] glsl: When assigning to a whole array, mark the array as accessed.

2011-08-05 Thread Eric Anholt
The vs-varying-array-mat2-col-row-wr test writes a mat2[3] constant to a mat2[3] varying out array, and also statically accesses element 1 of it on the VS and FS sides. At link time it would get trimmed down to just 2 elements, and then codegen of the VS would end up generating assignments to the

Re: [Mesa-dev] [PATCH 1/4] Revert "glsl: Skip processing the first function's body in do_dead_functions()."

2011-08-05 Thread Kenneth Graunke
On 08/01/2011 04:07 PM, Paul Berry wrote: > opt_dead_functions contained a shortcut to skip processing the first > function's body, based on the assumption that IR functions are > topologically sorted, with callees always coming before their callers > (therefore the first function cannot contain an

Re: [Mesa-dev] [PATCH 1/2] glsl: validate IR after linking (debug builds only)

2011-08-05 Thread Kenneth Graunke
On 08/03/2011 05:07 PM, Paul Berry wrote: > At least one of the invariants verified by IR validation concerns the > relative ordering of toplevel constructs in the IR: references to > global variables must come after the declarations of those global > variables. > > Since linking affects the order

Re: [Mesa-dev] [PATCH 2/2] glsl: When linking, emit functions at the tail of the final linked program.

2011-08-05 Thread Kenneth Graunke
On 08/03/2011 05:07 PM, Paul Berry wrote: > When link_functions.cpp adds a new function to the final linked > program, it needs to add it after any global variable declarations > that the function refers to, otherwise the IR will be invalid (because > variable declarations must occur before variabl

Re: [Mesa-dev] [PATCH 4/4] glsl: Check array size is const before asserting that no IR was generated.

2011-08-05 Thread Kenneth Graunke
On 08/01/2011 04:07 PM, Paul Berry wrote: > process_array_type() contains an assertion to verify that no IR > instructions are generated while processing the expression that > specifies the size of the array. This assertion needs to happen > _after_ checking whether the expression is constant. Ot

Re: [Mesa-dev] [PATCH 3/4] glsl: Constant-fold built-in functions before outputting IR

2011-08-05 Thread Kenneth Graunke
On 08/01/2011 04:07 PM, Paul Berry wrote: > Rearranged the logic for converting the ast for a function call to > hir, so that we constant fold before emitting any IR. Previously we > would emit some IR, and then only later detect whether we could > constant fold. The unnecessary IR would usually

Re: [Mesa-dev] [PATCH 2/4] glsl: Emit function signatures at toplevel, even for built-ins.

2011-08-05 Thread Kenneth Graunke
On 08/01/2011 04:07 PM, Paul Berry wrote: > The ast-to-hir conversion needs to emit function signatures in two > circumstances: when a function declaration (or definition) is > encountered, and when a built-in function is encountered. > > To avoid emitting a function signature in an illegal place

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Kenneth Graunke
On 08/05/2011 06:45 AM, Brian Paul wrote: > On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke wrote: >> Hey, >> >> I'd like to remove libGLw from the main Mesa repository. It never >> changes, and almost noone uses it...because GL and Motif is awesome, right? >> >> Since Debian still packages it, I

Re: [Mesa-dev] [PATCH 3/3] glsl: Perform implicit type conversions on function call out parameters.

2011-08-05 Thread Paul Berry
On 2 August 2011 18:27, Ian Romanick wrote: >> +       * >> +       * Also, perform implicit conversion of arguments.  Note: to >> +       * implicitly convert out parameters, we need to place them in a >> +       * temporary variable, and do the conversion after the call >> +       * takes place.

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Kenneth Graunke
On 08/05/2011 11:05 AM, Dan Nicholson wrote: > On Fri, Aug 5, 2011 at 7:25 AM, Benjamin Franzke > wrote: >> There is nothing compiled since GLW_SOURCES is not substituted by configure: >> Makefile.am:29 >> libGLw_la_SOURCES = $(GLW_SOURCES) >> >> This would need AC_SUBST([GLW_SOURCES]) in configu

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Kenneth Graunke
On 08/05/2011 10:58 AM, Dan Nicholson wrote: > On Fri, Aug 5, 2011 at 6:45 AM, Brian Paul wrote: >> On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke >> wrote: >>> Hey, >>> >>> I'd like to remove libGLw from the main Mesa repository. It never >>> changes, and almost noone uses it...because GL and

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Kenneth Graunke
On 08/05/2011 06:55 AM, Maxim Levitsky wrote: > On Fri, 2011-08-05 at 07:45 -0600, Brian Paul wrote: >> On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke >> wrote: >>> Hey, >>> >>> I'd like to remove libGLw from the main Mesa repository. It never >>> changes, and almost noone uses it...because GL

Re: [Mesa-dev] [PATCH 2/4] glsl: Emit function signatures at toplevel, even for built-ins.

2011-08-05 Thread Paul Berry
On 2 August 2011 18:02, Ian Romanick wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 08/02/2011 12:18 PM, Paul Berry wrote: >> The case this patch is designed to fix is when a built-in function is >> called from inside the constant integer expression that specifies the >> length of

[Mesa-dev] [Bug 39846] can' t compile mesa ‘__u64’problem .

2011-08-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39846 --- Comment #3 from Chad Versace 2011-08-05 14:41:32 PDT --- (In reply to comment #2) > (In reply to comment #1) > > __u64 is supposed to be defined by the userspace headers from the Linux > > kernel > > (/usr/include/linux/, /usr/include/asm*)

Re: [Mesa-dev] [PATCH] mesa: In validate_program(), initialize errMsg for safety.

2011-08-05 Thread Chad Versace
On 07/30/2011 09:34 PM, Kenneth Graunke wrote: > validate_program relies on validate_shader_program to fill in errMsg; > empirically, there exist cases where that doesn't happen. > > While tracking those down may be worthwhile, initializing the string so > we don't try to ralloc_strdup random garb

Re: [Mesa-dev] upstreaming Android support [Was: i965, mesa, glapi: Build libi965_dri on Android]

2011-08-05 Thread Chad Versace
On 08/05/2011 12:24 AM, Chia-I Wu wrote: > On Fri, Aug 5, 2011 at 3:42 PM, Chia-I Wu wrote: >> We will be basically doing everything from scratch, in smaller steps. >> In that case, I see no reason not to do this based on what is already >> there. I did plan to upstream my changes. So cleaning i

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/05/2011 12:41 AM, Chia-I Wu wrote: > On Fri, Aug 5, 2011 at 1:48 PM, Chad Versace wrote: >> On 08/04/2011 06:18 PM, Chad Versace wrote: >>> On 08/04/2011 01:29 PM, Eric Anholt wrote: On Thu, 4 Aug 2011 12:59:35 +0900, Chia-I Wu wrote: >>>

Re: [Mesa-dev] Mesa (master): egl/gbm: Fix EGL_DEFAULT_DISPLAY

2011-08-05 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/04/2011 03:32 PM, Chad Versace wrote: > This commit *really* needs a more descriptive commit message. > - What were the symptoms of the broken EGL_DEFAULT_DISPLAY? > - What error in the code caused the problem? > - What the hell did you do

Re: [Mesa-dev] [PATCH 00/15] i965, mesa, glapi: Build libi965_dri on Android

2011-08-05 Thread Chad Versace
On 08/04/2011 11:42 PM, Chia-I Wu wrote: > On Fri, Aug 5, 2011 at 12:27 PM, Chad Versace wrote: >> On 08/04/2011 11:25 AM, Chia-I Wu wrote: >>> Hi Chad, >>> >>> On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace wrote: This is the first step in porting i965 to Android, initially to Gingerbre

Re: [Mesa-dev] [PATCH 1/3] glsl: Make is_lvalue() and variable_referenced() const.

2011-08-05 Thread Kenneth Graunke
On 08/04/2011 06:55 PM, Chad Versace wrote: > On 08/02/2011 05:38 PM, Paul Berry wrote: >> These functions don't modify the target instruction, so it makes sense >> to make them const. This allows these functions to be called from ir >> validation code (which uses const to ensure that it doesn't >

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Kenneth Graunke
On 08/04/2011 09:48 PM, Chad Versace wrote: > On 08/04/2011 06:18 PM, Chad Versace wrote: >> On 08/04/2011 01:29 PM, Eric Anholt wrote: >>> On Thu, 4 Aug 2011 12:59:35 +0900, Chia-I Wu wrote: From: Chia-I Wu Unlike C++, empty declarations such as float; shoul

Re: [Mesa-dev] [PATCH 01/15] mesa: Add toplevel Android.mk

2011-08-05 Thread Chad Versace
On 08/05/2011 05:41 AM, Dan Nicholson wrote: > On Thu, Aug 4, 2011 at 7:55 PM, Chad Versace wrote: >> On 08/04/2011 04:17 PM, Jose Fonseca wrote: >>> - Original Message - On Thu, Aug 4, 2011 at 2:47 AM, Chad Versace wrote: > This is the first step in porting libGLES* and lib

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Chad Versace
On 08/05/2011 11:45 AM, Paul Berry wrote: > On 4 August 2011 18:18, Chad Versace wrote: >> On 08/04/2011 01:29 PM, Eric Anholt wrote: >>> On Thu, 4 Aug 2011 12:59:35 +0900, Chia-I Wu wrote: From: Chia-I Wu Unlike C++, empty declarations such as float; should

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Chad Versace
On 08/05/2011 12:41 AM, Chia-I Wu wrote: > On Fri, Aug 5, 2011 at 1:48 PM, Chad Versace wrote: >> Also, please update the commit message to say that `gcc --std=c99` allows >> empty >> declrations and include the appropriate quotation from the GLSL 1.20 spec's >> grammar. Without that extra info,

[Mesa-dev] [Bug 39846] can' t compile mesa ‘__u64’problem .

2011-08-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39846 Soohyun Lee changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #2 from Soohyun Lee

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Paul Berry
On 4 August 2011 18:18, Chad Versace wrote: > On 08/04/2011 01:29 PM, Eric Anholt wrote: >> On Thu,  4 Aug 2011 12:59:35 +0900, Chia-I Wu wrote: >>> From: Chia-I Wu >>> >>> Unlike C++, empty declarations such as >>> >>>   float; >>> >>> should be valid.  The spec is not explicit about this actua

Re: [Mesa-dev] [PATCH 2/2] glsl: When linking, emit functions at the tail of the final linked program.

2011-08-05 Thread Paul Berry
On 4 August 2011 08:33, Eric Anholt wrote: > On Wed,  3 Aug 2011 17:07:42 -0700, Paul Berry > wrote: >> When link_functions.cpp adds a new function to the final linked >> program, it needs to add it after any global variable declarations >> that the function refers to, otherwise the IR will be i

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Dan Nicholson
On Fri, Aug 5, 2011 at 7:25 AM, Benjamin Franzke wrote: > There is nothing compiled since GLW_SOURCES is not substituted by configure: > Makefile.am:29 >  libGLw_la_SOURCES = $(GLW_SOURCES) > > This would need AC_SUBST([GLW_SOURCES]) in configure.ac, > but thats not allowed for _SOURCES variables,

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Dan Nicholson
On Fri, Aug 5, 2011 at 6:45 AM, Brian Paul wrote: > On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke wrote: >> Hey, >> >> I'd like to remove libGLw from the main Mesa repository.  It never >> changes, and almost noone uses it...because GL and Motif is awesome, right? >> >> Since Debian still packa

Re: [Mesa-dev] [PATCH resend] glx/dri2: Paper over errors in DRI2Connect when indirect

2011-08-05 Thread Eric Anholt
On Thu, 4 Aug 2011 12:06:13 +1000, Christopher James Halse Rogers wrote: > DRI2 will throw BadRequest for this when the client is not local, but > DRI2 is an implementation detail and not something callers should have > to know about. Silently swallow errors in this case, and just propagate > t

Re: [Mesa-dev] Mesa (master): egl/gbm: Fix EGL_DEFAULT_DISPLAY

2011-08-05 Thread Chad Versace
On 08/05/2011 12:30 AM, Benjamin Franzke wrote: > 2011/8/5 Chad Versace : >> This commit *really* needs a more descriptive commit message. > > Ok, I thought its clear what is to be done for EGL_DEFAULT_DISPLAY. > But your right, it should have more descriptive. In future I'll try to do so. > > Si

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Benjamin Franzke
There is nothing compiled since GLW_SOURCES is not substituted by configure: Makefile.am:29 libGLw_la_SOURCES = $(GLW_SOURCES) This would need AC_SUBST([GLW_SOURCES]) in configure.ac, but thats not allowed for _SOURCES variables, see automake output: configure.ac:96: `GLW_SOURCES' includes conf

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Maxim Levitsky
On Fri, 2011-08-05 at 07:45 -0600, Brian Paul wrote: > On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke wrote: > > Hey, > > > > I'd like to remove libGLw from the main Mesa repository. It never > > changes, and almost noone uses it...because GL and Motif is awesome, right? > > > > Since Debian sti

Re: [Mesa-dev] Removing GLw from the main Mesa repository

2011-08-05 Thread Brian Paul
On Thu, Aug 4, 2011 at 4:26 PM, Kenneth Graunke wrote: > Hey, > > I'd like to remove libGLw from the main Mesa repository.  It never > changes, and almost noone uses it...because GL and Motif is awesome, right? > > Since Debian still packages it, I pulled it into its own git repository, > preservi

Re: [Mesa-dev] [PATCH 01/15] mesa: Add toplevel Android.mk

2011-08-05 Thread Dan Nicholson
On Thu, Aug 4, 2011 at 7:55 PM, Chad Versace wrote: > On 08/04/2011 04:17 PM, Jose Fonseca wrote: >> - Original Message - >>> On Thu, Aug 4, 2011 at 2:47 AM, Chad Versace >>> wrote: This is the first step in porting libGLES* and libEGL to Android. The makefile doesn't build

Re: [Mesa-dev] [PATCH 01/15] mesa: Add toplevel Android.mk

2011-08-05 Thread Jose Fonseca
- Original Message - > On 08/04/2011 04:17 PM, Jose Fonseca wrote: > > - Original Message - > >> On Thu, Aug 4, 2011 at 2:47 AM, Chad Versace > >> > >> wrote: > >>> This is the first step in porting libGLES* and libEGL to Android. > >>> > >>> The makefile doesn't build anything yet

Re: [Mesa-dev] [PATCH] glsl: empty declarations should be valid

2011-08-05 Thread Chia-I Wu
On Fri, Aug 5, 2011 at 1:48 PM, Chad Versace wrote: > On 08/04/2011 06:18 PM, Chad Versace wrote: >> On 08/04/2011 01:29 PM, Eric Anholt wrote: >>> On Thu,  4 Aug 2011 12:59:35 +0900, Chia-I Wu wrote: From: Chia-I Wu Unlike C++, empty declarations such as   float; >

Re: [Mesa-dev] Mesa (master): egl/gbm: Fix EGL_DEFAULT_DISPLAY

2011-08-05 Thread Benjamin Franzke
2011/8/5 Chad Versace : > This commit *really* needs a more descriptive commit message. Ok, I thought its clear what is to be done for EGL_DEFAULT_DISPLAY. But your right, it should have more descriptive. In future I'll try to do so. Since I cant change the commit message now, let me answer your

[Mesa-dev] upstreaming Android support [Was: i965, mesa, glapi: Build libi965_dri on Android]

2011-08-05 Thread Chia-I Wu
On Fri, Aug 5, 2011 at 3:42 PM, Chia-I Wu wrote: > We will be basically doing everything from scratch, in smaller steps. > In that case, I see no reason not to do this based on what is already > there.  I did plan to upstream my changes.  So cleaning it up should > not be a nightmare. I've pushed