[Mesa-dev] [Bug 47261] piglit fbo-luminance-alpha regression

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47261

Vinson Lee v...@freedesktop.org changed:

   What|Removed |Added

 CC||bri...@vmware.com,
   ||jfons...@vmware.com

--- Comment #1 from Vinson Lee v...@freedesktop.org 2012-03-12 23:14:00 PDT 
---
ad897fff7730298c21289768d9b1b55f3d166ac5 is the first bad commit
commit ad897fff7730298c21289768d9b1b55f3d166ac5
Author: Brian Paul bri...@vmware.com
Date:   Wed Feb 29 20:55:50 2012 -0700

mesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code

See the comments for _mesa_rebase_rgba_float() for details.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=46679

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca jfons...@vmware.com

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2012-03-13 Thread nobled
ping x2

Also an 8.0 candidate, now that 8.0 exists.

On Mon, Jan 16, 2012 at 6:52 PM, nobled nob...@dreamwidth.org wrote:
 ping?

 On Thu, Dec 22, 2011 at 4:34 PM, nob...@dreamwidth.org wrote:
 The error was erroneously removed in this commit:

 719909698c67c287a393d2380278e7b7495ae018
 mesa: Rewrite the way uniforms are tracked and handled

 You also aren't even supposed to truncate the output to 'bufSize',
 so just return like before.

 Also fixup an old comment and add an assert.
 ---
 (This function has a random mixture of tabs+spaces and pure spaces for
 indentation, so I had no idea which style to use...)

  src/mesa/main/uniform_query.cpp |   16 
  src/mesa/main/uniforms.c        |    2 +-
  2 files changed, 13 insertions(+), 5 deletions(-)

 diff --git a/src/mesa/main/uniform_query.cpp 
 b/src/mesa/main/uniform_query.cpp
 index 33ba53c..8e58fc0 100644
 --- a/src/mesa/main/uniform_query.cpp
 +++ b/src/mesa/main/uniform_query.cpp
 @@ -203,10 +203,18 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint
 program, GLint location,
       const union gl_constant_value *const src =
         uni-storage[offset * elements];

 -      unsigned bytes = sizeof(uni-storage[0]) * elements;
 -      if (bytes  (unsigned) bufSize) {
 -        elements = bufSize / sizeof(uni-storage[0]);
 -        bytes = bufSize;
 +      assert(returnType == GLSL_TYPE_FLOAT || returnType == GLSL_TYPE_INT ||
 +             returnType == GLSL_TYPE_UINT);
 +      /* The three (currently) supported types all have the same size,
 +       * which is of course the same as their union. That'll change
 +       * with glGetUniformdv()...
 +       */
 +      unsigned bytes = sizeof(src[0]) * elements;
 +      if (bufSize  0 || bytes  (unsigned) bufSize) {
 +        _mesa_error( ctx, GL_INVALID_OPERATION,
 +                    glGetnUniformfvARB(out of bounds: bufSize is %d,
 +                     but %u bytes are required), bufSize, bytes );
 +        return;
       }

       /* If the return type and the uniform's native type are compatible,
 diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
 index 685c0f1..981874e 100644
 --- a/src/mesa/main/uniforms.c
 +++ b/src/mesa/main/uniforms.c
 @@ -478,7 +478,7 @@ _mesa_GetnUniformdvARB(GLhandleARB program, GLint 
 location,
    (void) params;

    /*
 -   _mesa_get_uniform(ctx, program, location, bufSize, GL_DOUBLE, params);
 +   _mesa_get_uniform(ctx, program, location, bufSize,
 GLSL_TYPE_DOUBLE, params);
    */
    _mesa_error(ctx, GL_INVALID_OPERATION, glGetUniformdvARB
                (GL_ARB_gpu_shader_fp64 not implemented));
 --
 1.7.4.1
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread nobled
On Mon, Mar 12, 2012 at 8:05 PM, Jakob Bornecrantz ja...@vmware.com wrote:
 Hi all

 We well over due for a 8.0.1 release, so I thought
 we do it aggressively this week. A quick rc tomorrow
 and a release on Thursday or Friday? Is that okay with
 people, comments please?

This should be cherry-picked, right?

commit b60120608f6ddf4098bc324363197c979ee04cb7
Author: David Fries da...@fries.net

Set close on exec flag FD_CLOEXEC

I think most of the marked candidates since the branch that show up in
`git log origin/8.0..origin/master --grep=NOTE` are still only in
master...

And this in particular is reportedly vital[1] for llvmpipe FBO rendering:

commit 5a70e12fc0897a3178c73b20d99fc0f11b180374
Author: Brian Paul bri...@vmware.com

st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created renderbuffers

[1] http://lists.freedesktop.org/archives/mesa-dev/2012-March/019690.html


 Cheers, Jakob.
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread Yuanhan Liu
On Mon, Mar 12, 2012 at 05:05:08PM -0700, Jakob Bornecrantz wrote:
 Hi all
 
 We well over due for a 8.0.1 release, so I thought
 we do it aggressively this week. A quick rc tomorrow
 and a release on Thursday or Friday? Is that okay with
 people, comments please?

Did you mean 8.1? 8.0.1 has been relased for a while, see
http://lists.freedesktop.org/archives/mesa-dev/2012-February/019167.html

Thanks,
Yuanhan Liu
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread Jakob Bornecrantz
- Original Message -
 On Mon, Mar 12, 2012 at 8:05 PM, Jakob Bornecrantz ja...@vmware.com wrote:
  Hi all
 
  We well over due for a 8.0.1 release, so I thought
  we do it aggressively this week. A quick rc tomorrow
  and a release on Thursday or Friday? Is that okay with
  people, comments please?
 
 This should be cherry-picked, right?
 
 commit b60120608f6ddf4098bc324363197c979ee04cb7
 Author: David Fries da...@fries.net
 
 Set close on exec flag FD_CLOEXEC
 
 I think most of the marked candidates since the branch that show up
 in
 `git log origin/8.0..origin/master --grep=NOTE` are still only in
 master...
 
 And this in particular is reportedly vital[1] for llvmpipe FBO
 rendering:
 
 commit 5a70e12fc0897a3178c73b20d99fc0f11b180374
 Author: Brian Paul bri...@vmware.com
 
 st/mesa: don't set PIPE_BIND_DISPLAY_TARGET for user-created
 renderbuffers
 
 [1]
 http://lists.freedesktop.org/archives/mesa-dev/2012-March/019690.html

Thanks, I'll make sure they get picked.

Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 47259] piglit fbo-blending-formats regression

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47259

Brian Paul brian.e.p...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Brian Paul brian.e.p...@gmail.com 2012-03-13 07:56:09 PDT 
---
This was the same as bug 47217 and fixed with piglit commit
d17bcdffe3b7e90ca2a7ecd853be22cde9ca111e

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread Brian Paul

On 03/12/2012 06:05 PM, Jakob Bornecrantz wrote:

Hi all

We well over due for a 8.0.1 release, so I thought
we do it aggressively this week. A quick rc tomorrow
and a release on Thursday or Friday? Is that okay with
people, comments please?


8.0.2 sounds good to me, Jakob.  I'll review my recent commits to 
master and check for cherry-picks.


-Brian

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glsl: initialise const force glsl extension warning in fake ctx

2012-03-13 Thread Brian Paul

On 03/13/2012 08:53 AM, Dave Airlie wrote:

From: Dave Airlieairl...@redhat.com

valgrind complained about an uninitialised value being used in
glsl_parser_extras.cpp, and this was the one it was giving out about.

Just initialise the value in the fakectx.

Signed-off-by: Dave Airlieairl...@redhat.com
---
  src/glsl/builtins/tools/generate_builtins.py |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/builtins/tools/generate_builtins.py 
b/src/glsl/builtins/tools/generate_builtins.py
index 72d12bb..bd15c4d 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -156,6 +156,7 @@ read_builtins(GLenum target, const char *protos, const char 
**functions, unsigne
 fakeCtx.API = API_OPENGL;
 fakeCtx.Const.GLSLVersion = 130;
 fakeCtx.Extensions.ARB_ES2_compatibility = true;
+   fakeCtx.Const.ForceGLSLExtensionsWarn = false;
 gl_shader *sh = _mesa_new_shader(NULL, 0, target);
 struct _mesa_glsl_parse_state *st =
new(sh) _mesa_glsl_parse_state(fakeCtx, target, sh);


It might be better to do memset(fakeCtx, 0, sizeof(fakeCtx)) to be 
safer and more future-proof.


-Brian
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 47166] Bad datatype in interpolate_int_colors

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47166

--- Comment #1 from Brian Paul brian.e.p...@gmail.com 2012-03-13 08:10:26 PDT 
---
Is it possible to get a test program or an apitrace of the app?  The later tool
is available at https://github.com/apitrace/apitrace

Does the failure still happen if you draw fewer polygons?

You might also try running with valgrind to see if it's a memory corruption
issue.  But valgrind will be pretty slow if the dataset is large.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2012-03-13 Thread Brian Paul

This looks good to me.  One minor comment below.


On 03/13/2012 01:51 AM, nobled wrote:

ping x2

Also an 8.0 candidate, now that 8.0 exists.

On Mon, Jan 16, 2012 at 6:52 PM, noblednob...@dreamwidth.org  wrote:

ping?

On Thu, Dec 22, 2011 at 4:34 PM, nob...@dreamwidth.org wrote:

The error was erroneously removed in this commit:

719909698c67c287a393d2380278e7b7495ae018
mesa: Rewrite the way uniforms are tracked and handled

You also aren't even supposed to truncate the output to 'bufSize',
so just return like before.

Also fixup an old comment and add an assert.
---
(This function has a random mixture of tabs+spaces and pure spaces for
indentation, so I had no idea which style to use...)

  src/mesa/main/uniform_query.cpp |   16 
  src/mesa/main/uniforms.c|2 +-
  2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 33ba53c..8e58fc0 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -203,10 +203,18 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint
program, GLint location,
   const union gl_constant_value *const src =
 uni-storage[offset * elements];

-  unsigned bytes = sizeof(uni-storage[0]) * elements;
-  if (bytes  (unsigned) bufSize) {
-elements = bufSize / sizeof(uni-storage[0]);
-bytes = bufSize;
+  assert(returnType == GLSL_TYPE_FLOAT || returnType == GLSL_TYPE_INT ||
+ returnType == GLSL_TYPE_UINT);
+  /* The three (currently) supported types all have the same size,
+   * which is of course the same as their union. That'll change
+   * with glGetUniformdv()...
+   */
+  unsigned bytes = sizeof(src[0]) * elements;
+  if (bufSize  0 || bytes  (unsigned) bufSize) {
+_mesa_error( ctx, GL_INVALID_OPERATION,
+glGetnUniformfvARB(out of bounds: bufSize is %d,
+ but %u bytes are required), bufSize, bytes );


In the error message, let's just use the generic glGetUniform(...) 
since this function might be called by any of the various glGetUniform 
functions (iv, if, uiv, etc).




+return;
   }

   /* If the return type and the uniform's native type are compatible,
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 685c0f1..981874e 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -478,7 +478,7 @@ _mesa_GetnUniformdvARB(GLhandleARB program, GLint location,
(void) params;

/*
-   _mesa_get_uniform(ctx, program, location, bufSize, GL_DOUBLE, params);
+   _mesa_get_uniform(ctx, program, location, bufSize,
GLSL_TYPE_DOUBLE, params);
*/
_mesa_error(ctx, GL_INVALID_OPERATION, glGetUniformdvARB
(GL_ARB_gpu_shader_fp64 not implemented));
--
1.7.4.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: fix compiling warning from gcc 4.7

2012-03-13 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

ir_validate.cpp: In member function ‘virtual ir_visitor_status 
ir_validate::visit_leave(ir_swizzle*)’:
ir_validate.cpp:458:66: warning: narrowing conversion of 
‘ir-ir_swizzle::mask.ir_swizzle_mask::x’ from ‘unsigned int’ to ‘int’ inside { 
} is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of 
‘ir-ir_swizzle::mask.ir_swizzle_mask::y’ from ‘unsigned int’ to ‘int’ inside { 
} is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of 
‘ir-ir_swizzle::mask.ir_swizzle_mask::z’ from ‘unsigned int’ to ‘int’ inside { 
} is ill-formed in C++11 [-Wnarrowing]
ir_validate.cpp:458:66: warning: narrowing conversion of 
‘ir-ir_swizzle::mask.ir_swizzle_mask::w’ from ‘unsigned int’ to ‘int’ inside { 
} is ill-formed in C++11 [-Wnarrowing]

Signed-off-by: Dave Airlie airl...@redhat.com
---
 src/glsl/ir_validate.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 20a0377..101d999 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -455,7 +455,7 @@ ir_validate::visit_leave(ir_expression *ir)
 ir_visitor_status
 ir_validate::visit_leave(ir_swizzle *ir)
 {
-   int chans[4] = {ir-mask.x, ir-mask.y, ir-mask.z, ir-mask.w};
+   unsigned int chans[4] = {ir-mask.x, ir-mask.y, ir-mask.z, ir-mask.w};
 
for (unsigned int i = 0; i  ir-type-vector_elements; i++) {
   if (chans[i] = ir-val-type-vector_elements) {
-- 
1.7.7.6

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/4] gallium/drivers: Use automake to generate makefile

2012-03-13 Thread Tom Stellard
If no one objects, I'm going to push this series tomorrow.

On Sun, Mar 04, 2012 at 07:14:18PM -0500, Tom Stellard wrote:
 ---
  configure.ac  |1 +
  src/gallium/drivers/.gitignore|3 +++
  src/gallium/drivers/Makefile  |   12 
  src/gallium/drivers/Makefile.am   |4 
  src/gallium/drivers/galahad/Makefile  |3 +++
  src/gallium/drivers/i915/Makefile |3 +++
  src/gallium/drivers/identity/Makefile |3 +++
  src/gallium/drivers/llvmpipe/Makefile |3 +++
  src/gallium/drivers/noop/Makefile |3 +++
  src/gallium/drivers/nouveau/Makefile  |3 +++
  src/gallium/drivers/nv50/Makefile |3 +++
  src/gallium/drivers/nvc0/Makefile |3 +++
  src/gallium/drivers/nvfx/Makefile |3 +++
  src/gallium/drivers/r300/Makefile.am  |4 
  src/gallium/drivers/r600/Makefile |3 +++
  src/gallium/drivers/rbug/Makefile |3 +++
  src/gallium/drivers/softpipe/Makefile |3 +++
  src/gallium/drivers/svga/Makefile |3 +++
  src/gallium/drivers/trace/Makefile|3 +++
  19 files changed, 50 insertions(+), 16 deletions(-)
  create mode 100644 src/gallium/drivers/.gitignore
  delete mode 100644 src/gallium/drivers/Makefile
  create mode 100644 src/gallium/drivers/Makefile.am
 
 diff --git a/configure.ac b/configure.ac
 index a2d906a..4515731 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1948,6 +1948,7 @@ CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
  
  dnl Substitute the config
  AC_CONFIG_FILES([configs/autoconf
 + src/gallium/drivers/Makefile
   src/gallium/drivers/r300/Makefile
   src/gbm/Makefile
   src/gbm/main/gbm.pc
 diff --git a/src/gallium/drivers/.gitignore b/src/gallium/drivers/.gitignore
 new file mode 100644
 index 000..a963aad
 --- /dev/null
 +++ b/src/gallium/drivers/.gitignore
 @@ -0,0 +1,3 @@
 +Makefile
 +Makefile.in
 +.deps/
 diff --git a/src/gallium/drivers/Makefile b/src/gallium/drivers/Makefile
 deleted file mode 100644
 index 9fe9b2c..000
 --- a/src/gallium/drivers/Makefile
 +++ /dev/null
 @@ -1,12 +0,0 @@
 -# src/gallium/drivers/Makefile
 -TOP = ../../..
 -include $(TOP)/configs/current
 -
 -SUBDIRS = $(GALLIUM_DRIVERS_DIRS)
 -
 -default install clean:
 - @for dir in $(SUBDIRS) ; do \
 - if [ -d $$dir ] ; then \
 - (cd $$dir  $(MAKE) $@) || exit 1; \
 - fi \
 - done
 diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
 new file mode 100644
 index 000..b6954e2
 --- /dev/null
 +++ b/src/gallium/drivers/Makefile.am
 @@ -0,0 +1,4 @@
 +SUBDIRS = $(GALLIUM_DRIVERS_DIRS)
 +
 +# FIXME: Remove when the rest of Gallium is converted to automake.
 +default: all
 diff --git a/src/gallium/drivers/galahad/Makefile 
 b/src/gallium/drivers/galahad/Makefile
 index e9c4f7e..15ea136 100644
 --- a/src/gallium/drivers/galahad/Makefile
 +++ b/src/gallium/drivers/galahad/Makefile
 @@ -9,3 +9,6 @@ C_SOURCES = \
   glhd_screen.c
  
  include ../../Makefile.template
 +
 +# FIXME: Remove when this driver is converted to automake.
 +all: default
 diff --git a/src/gallium/drivers/i915/Makefile 
 b/src/gallium/drivers/i915/Makefile
 index 0e57678..b7d8a1f 100644
 --- a/src/gallium/drivers/i915/Makefile
 +++ b/src/gallium/drivers/i915/Makefile
 @@ -7,3 +7,6 @@ LIBNAME = i915
  include Makefile.sources
  
  include ../../Makefile.template
 +
 +# FIXME: Remove when this driver is converted to automake.
 +all: default
 diff --git a/src/gallium/drivers/identity/Makefile 
 b/src/gallium/drivers/identity/Makefile
 index 74692d9..a15e17e 100644
 --- a/src/gallium/drivers/identity/Makefile
 +++ b/src/gallium/drivers/identity/Makefile
 @@ -9,3 +9,6 @@ C_SOURCES = \
   id_screen.c
  
  include ../../Makefile.template
 +
 +# FIXME: Remove when this driver is converted to automake.
 +all: default
 diff --git a/src/gallium/drivers/llvmpipe/Makefile 
 b/src/gallium/drivers/llvmpipe/Makefile
 index 1a4e93d..8df891c 100644
 --- a/src/gallium/drivers/llvmpipe/Makefile
 +++ b/src/gallium/drivers/llvmpipe/Makefile
 @@ -62,6 +62,9 @@ CLEAN_EXTRA = *.o
  
  include ../../Makefile.template
  
 +# FIXME: Remove when this driver is converted to automake.
 +all: default
 +
  PROGS_DEPS := ../../auxiliary/libgallium.a
  
  lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py 
 ../../auxiliary/util/u_format_pack.py ../../auxiliary/util/u_format.csv
 diff --git a/src/gallium/drivers/noop/Makefile 
 b/src/gallium/drivers/noop/Makefile
 index 29b8d73..75e65ed 100644
 --- a/src/gallium/drivers/noop/Makefile
 +++ b/src/gallium/drivers/noop/Makefile
 @@ -11,3 +11,6 @@ C_SOURCES = \
   noop_state.c
  
  include ../../Makefile.template
 +
 +# FIXME: Remove when this driver is converted to automake.
 +all: default
 diff --git a/src/gallium/drivers/nouveau/Makefile 
 b/src/gallium/drivers/nouveau/Makefile
 index d583324..cfb8831 100644
 --- 

Re: [Mesa-dev] [PATCH 1/4] gallium/drivers: Use automake to generate makefile

2012-03-13 Thread Jose Fonseca
FWIW, I personally have no objections against the automakification provided 
it does not cause build failures, or that any unintended build failure is soon 
addressed. That is, better not commit this sort of stuff right before leaving 
for the pub ;-)

Jose

- Original Message -
 If no one objects, I'm going to push this series tomorrow.
 
 On Sun, Mar 04, 2012 at 07:14:18PM -0500, Tom Stellard wrote:
  ---
   configure.ac  |1 +
   src/gallium/drivers/.gitignore|3 +++
   src/gallium/drivers/Makefile  |   12 
   src/gallium/drivers/Makefile.am   |4 
   src/gallium/drivers/galahad/Makefile  |3 +++
   src/gallium/drivers/i915/Makefile |3 +++
   src/gallium/drivers/identity/Makefile |3 +++
   src/gallium/drivers/llvmpipe/Makefile |3 +++
   src/gallium/drivers/noop/Makefile |3 +++
   src/gallium/drivers/nouveau/Makefile  |3 +++
   src/gallium/drivers/nv50/Makefile |3 +++
   src/gallium/drivers/nvc0/Makefile |3 +++
   src/gallium/drivers/nvfx/Makefile |3 +++
   src/gallium/drivers/r300/Makefile.am  |4 
   src/gallium/drivers/r600/Makefile |3 +++
   src/gallium/drivers/rbug/Makefile |3 +++
   src/gallium/drivers/softpipe/Makefile |3 +++
   src/gallium/drivers/svga/Makefile |3 +++
   src/gallium/drivers/trace/Makefile|3 +++
   19 files changed, 50 insertions(+), 16 deletions(-)
   create mode 100644 src/gallium/drivers/.gitignore
   delete mode 100644 src/gallium/drivers/Makefile
   create mode 100644 src/gallium/drivers/Makefile.am
  
  diff --git a/configure.ac b/configure.ac
  index a2d906a..4515731 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -1948,6 +1948,7 @@ CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
   
   dnl Substitute the config
   AC_CONFIG_FILES([configs/autoconf
  +   src/gallium/drivers/Makefile
  src/gallium/drivers/r300/Makefile
  src/gbm/Makefile
  src/gbm/main/gbm.pc
  diff --git a/src/gallium/drivers/.gitignore
  b/src/gallium/drivers/.gitignore
  new file mode 100644
  index 000..a963aad
  --- /dev/null
  +++ b/src/gallium/drivers/.gitignore
  @@ -0,0 +1,3 @@
  +Makefile
  +Makefile.in
  +.deps/
  diff --git a/src/gallium/drivers/Makefile
  b/src/gallium/drivers/Makefile
  deleted file mode 100644
  index 9fe9b2c..000
  --- a/src/gallium/drivers/Makefile
  +++ /dev/null
  @@ -1,12 +0,0 @@
  -# src/gallium/drivers/Makefile
  -TOP = ../../..
  -include $(TOP)/configs/current
  -
  -SUBDIRS = $(GALLIUM_DRIVERS_DIRS)
  -
  -default install clean:
  -   @for dir in $(SUBDIRS) ; do \
  -   if [ -d $$dir ] ; then \
  -   (cd $$dir  $(MAKE) $@) || exit 1; \
  -   fi \
  -   done
  diff --git a/src/gallium/drivers/Makefile.am
  b/src/gallium/drivers/Makefile.am
  new file mode 100644
  index 000..b6954e2
  --- /dev/null
  +++ b/src/gallium/drivers/Makefile.am
  @@ -0,0 +1,4 @@
  +SUBDIRS = $(GALLIUM_DRIVERS_DIRS)
  +
  +# FIXME: Remove when the rest of Gallium is converted to automake.
  +default: all
  diff --git a/src/gallium/drivers/galahad/Makefile
  b/src/gallium/drivers/galahad/Makefile
  index e9c4f7e..15ea136 100644
  --- a/src/gallium/drivers/galahad/Makefile
  +++ b/src/gallium/drivers/galahad/Makefile
  @@ -9,3 +9,6 @@ C_SOURCES = \
  glhd_screen.c
   
   include ../../Makefile.template
  +
  +# FIXME: Remove when this driver is converted to automake.
  +all: default
  diff --git a/src/gallium/drivers/i915/Makefile
  b/src/gallium/drivers/i915/Makefile
  index 0e57678..b7d8a1f 100644
  --- a/src/gallium/drivers/i915/Makefile
  +++ b/src/gallium/drivers/i915/Makefile
  @@ -7,3 +7,6 @@ LIBNAME = i915
   include Makefile.sources
   
   include ../../Makefile.template
  +
  +# FIXME: Remove when this driver is converted to automake.
  +all: default
  diff --git a/src/gallium/drivers/identity/Makefile
  b/src/gallium/drivers/identity/Makefile
  index 74692d9..a15e17e 100644
  --- a/src/gallium/drivers/identity/Makefile
  +++ b/src/gallium/drivers/identity/Makefile
  @@ -9,3 +9,6 @@ C_SOURCES = \
  id_screen.c
   
   include ../../Makefile.template
  +
  +# FIXME: Remove when this driver is converted to automake.
  +all: default
  diff --git a/src/gallium/drivers/llvmpipe/Makefile
  b/src/gallium/drivers/llvmpipe/Makefile
  index 1a4e93d..8df891c 100644
  --- a/src/gallium/drivers/llvmpipe/Makefile
  +++ b/src/gallium/drivers/llvmpipe/Makefile
  @@ -62,6 +62,9 @@ CLEAN_EXTRA = *.o
   
   include ../../Makefile.template
   
  +# FIXME: Remove when this driver is converted to automake.
  +all: default
  +
   PROGS_DEPS := ../../auxiliary/libgallium.a
   
   lp_tile_soa.c: lp_tile_soa.py
   ../../auxiliary/util/u_format_parse.py
   ../../auxiliary/util/u_format_pack.py
   ../../auxiliary/util/u_format.csv
  diff --git a/src/gallium/drivers/noop/Makefile
  b/src/gallium/drivers/noop/Makefile
  index 29b8d73..75e65ed 100644
  --- 

[Mesa-dev] [PATCH 2/2] i965/fs: Try to avoid generating extra MOVs to do saturates.

2012-03-13 Thread Eric Anholt
shader-db results:
Total instructions: 212648 - 206044
614/1246 programs affected (49.3%)
178350 - 171746 instructions in affected programs (3.7% reduction)
---
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |   24 +---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index eb129ce..e7af75b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -172,12 +172,30 @@ fs_visitor::try_emit_saturate(ir_expression *ir)
if (!sat_val)
   return false;
 
+   fs_inst *pre_inst = (fs_inst *) this-instructions.get_tail();
+
sat_val-accept(this);
fs_reg src = this-result;
 
-   this-result = fs_reg(this, ir-type);
-   fs_inst *inst = emit(BRW_OPCODE_MOV, this-result, src);
-   inst-saturate = true;
+   fs_inst *last_inst = (fs_inst *) this-instructions.get_tail();
+
+   /* If the last instruction from our accept() didn't generate our
+* src, generate a saturated MOV
+*/
+   if (last_inst == pre_inst ||
+   last_inst-predicated ||
+   last_inst-force_uncompressed ||
+   last_inst-force_sechalf ||
+   !src.equals(last_inst-dst) ||
+   last_inst-regs_written() != 1) {
+  this-result = fs_reg(this, ir-type);
+  fs_inst *inst = emit(BRW_OPCODE_MOV, this-result, src);
+  inst-saturate = true;
+   } else {
+  last_inst-saturate = true;
+  this-result = src;
+   }
+
 
return true;
 }
-- 
1.7.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/2] i965/fs: Avoid generating extra AND instructions on bool logic ops.

2012-03-13 Thread Eric Anholt
By making a bool fs_reg only have a defined low bit (matching CMP
output), instead of being a full 0 or 1 value, we reduce the ANDs
generated in logic chains like:

   if (v_texcoord.x  0.0 || v_texcoord.x  texwidth ||
   v_texcoord.y  0.0 || v_texcoord.y  1.0)
  discard;

My concern originally when writing this code was that we would end up
generating unnecessary ANDs on bool uniforms, so I put the ANDs right
at the point of doing the CMPs that otherwise set only the low bit.
However, in order to use a bool, we're generating some instruction
anyway (e.g. moving it so as to produce a condition code update), and
those instructions can often be turned into an AND at that point.  It
turns out in the shaders I have on hand, none of them regress in
instruction count:

Total instructions: 212752 - 212648
39/1246 programs affected (3.1%)
14519 - 14415 instructions in affected programs (0.7% reduction)
---
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |   36 ++
 1 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 15eae43..eb129ce 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -381,7 +381,6 @@ fs_visitor::visit(ir_expression *ir)
 
   inst = emit(BRW_OPCODE_CMP, temp, op[0], op[1]);
   inst-conditional_mod = brw_conditional_for_comparison(ir-operation);
-  emit(BRW_OPCODE_AND, this-result, this-result, fs_reg(0x1));
   break;
 
case ir_binop_logic_xor:
@@ -427,11 +426,19 @@ fs_visitor::visit(ir_expression *ir)
   break;
case ir_unop_i2f:
case ir_unop_u2f:
-   case ir_unop_b2f:
-   case ir_unop_b2i:
case ir_unop_f2i:
   emit(BRW_OPCODE_MOV, this-result, op[0]);
   break;
+
+   case ir_unop_b2i:
+  inst = emit(BRW_OPCODE_AND, this-result, op[0], fs_reg(1));
+  break;
+   case ir_unop_b2f:
+  temp = fs_reg(this, glsl_type::int_type);
+  emit(BRW_OPCODE_AND, temp, op[0], fs_reg(1));
+  emit(BRW_OPCODE_MOV, this-result, temp);
+  break;
+
case ir_unop_f2b:
case ir_unop_i2b:
   temp = this-result;
@@ -443,7 +450,6 @@ fs_visitor::visit(ir_expression *ir)
 
   inst = emit(BRW_OPCODE_CMP, temp, op[0], fs_reg(0.0f));
   inst-conditional_mod = BRW_CONDITIONAL_NZ;
-  inst = emit(BRW_OPCODE_AND, this-result, this-result, fs_reg(1));
   break;
 
case ir_unop_trunc:
@@ -1478,19 +1484,9 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
 break;
 
   case ir_binop_logic_xor:
-inst = emit(BRW_OPCODE_XOR, reg_null_d, op[0], op[1]);
-inst-conditional_mod = BRW_CONDITIONAL_NZ;
-break;
-
   case ir_binop_logic_or:
-inst = emit(BRW_OPCODE_OR, reg_null_d, op[0], op[1]);
-inst-conditional_mod = BRW_CONDITIONAL_NZ;
-break;
-
   case ir_binop_logic_and:
-inst = emit(BRW_OPCODE_AND, reg_null_d, op[0], op[1]);
-inst-conditional_mod = BRW_CONDITIONAL_NZ;
-break;
+goto out;
 
   case ir_unop_f2b:
 if (intel-gen = 6) {
@@ -1531,15 +1527,11 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
   return;
}
 
+out:
ir-accept(this);
 
-   if (intel-gen = 6) {
-  fs_inst *inst = emit(BRW_OPCODE_AND, reg_null_d, this-result, 
fs_reg(1));
-  inst-conditional_mod = BRW_CONDITIONAL_NZ;
-   } else {
-  fs_inst *inst = emit(BRW_OPCODE_MOV, reg_null_d, this-result);
-  inst-conditional_mod = BRW_CONDITIONAL_NZ;
-   }
+   fs_inst *inst = emit(BRW_OPCODE_AND, reg_null_d, this-result, fs_reg(1));
+   inst-conditional_mod = BRW_CONDITIONAL_NZ;
 }
 
 /**
-- 
1.7.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Is Mesa on win32 thread safe?

2012-03-13 Thread Juraj Švec
Hi,

Is Mesa 8.0 implementation on windows thread safe?
I have some test code that is doing rendering in parallel threads using
debug build of opengl32.dll and it is crashing in debug_free on list_del
operation.

The implementation of u_double_list.h does not seem to be thread safe, so I
believe if concurrent debug_free/debug_malloc happen it can cause crashes.
Is it possible or is there proper locking somewhere up in the calling stack?

Thanks,
Juraj
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] autoconf: bail out if flex isn't found

2012-03-13 Thread Matt Turner
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47248
Signed-off-by: Matt Turner matts...@gmail.com
---
 configure.ac |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index a2d906a..e7994b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,9 @@ if test ! -f $srcdir/src/glsl/glcpp/glcpp-parse.y; then
 fi
 fi
 AC_PROG_LEX
+if test x$LEX != xflex; then
+AC_MSG_ERROR([flex not found - unable to compile glcpp-lex.l])
+fi 
 
 dnl Our fallback install-sh is a symlink to minstall. Use the existing
 dnl configuration in that case.
-- 
1.7.3.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 47248] autogen missing dependency on flex and bison, causes infinite loop in glsl build

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47248

--- Comment #1 from Matt Turner matts...@gmail.com 2012-03-13 20:15:23 PDT ---
Created attachment 58416
  -- https://bugs.freedesktop.org/attachment.cgi?id=58416
patch

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 47248] autogen missing dependency on flex and bison, causes infinite loop in glsl build

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=47248

Matt Turner matts...@gmail.com changed:

   What|Removed |Added

 CC||matts...@gmail.com

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 44697] Update from 7.12 to 8 (git) breaks compiz/unity

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44697

Alan Coopersmith alan.coopersm...@oracle.com changed:

   What|Removed |Added

 AssignedTo|xorg-t...@lists.x.org   |mesa-dev@lists.freedesktop.
   ||org
  QAContact|xorg-t...@lists.x.org   |
Product|xorg|Mesa
Version|git |8.0
  Component|* Other |Mesa core

--- Comment #2 from Alan Coopersmith alan.coopersm...@oracle.com 2012-03-13 
22:42:11 PDT ---
7.12  8 are not Xorg version numbers - dpkg log implies this was a Mesa
upgrade so moving there.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.

2012-03-13 Thread Vinson Lee
llvm-3.1svn r15620 refactored the OProfile profiling code.
createOProfileJITEventListener was moved from the llvm namespace to the
llvm::JITEventListener namespace.

Signed-off-by: Vinson Lee v...@freedesktop.org
---
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index fe7616b..68f8808 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -62,7 +62,11 @@
 extern C void
 lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
 {
+#if HAVE_LLVM = 0x0301
+   
llvm::unwrap(EE)-RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
+#else

llvm::unwrap(EE)-RegisterJITEventListener(llvm::createOProfileJITEventListener());
+#endif
 }
 
 
-- 
1.7.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 44697] Update from 7.12 to 8 (git) breaks compiz/unity

2012-03-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44697

Robert Hooker (Sarvatt) sarv...@gmail.com changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #3 from Robert Hooker (Sarvatt) sarv...@gmail.com 2012-03-13 
22:52:58 UTC ---
Is this still an issue after recent updates to mesa? It looks like a transient
problem that's a few months old and is most likely already resolved.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev