Re: [Mesa-dev] [PATCH] i965: fix timer query on gen6+

2011-07-20 Thread Zou, Nanhai
For ILK, It is vol 1.18.11.2, This register has the contents from TIMESTAMP_HI (0x70070) display register. This field gets incremented every 1 uS of time. Thanks Zou Nanhai -Original Message- From: mesa-dev-bounces+nanhai.zou=intel@lists.freedesktop.or

Re: [Mesa-dev] [PATCH] mesa: GLES2 should return different error enums for invalid fbo queries

2011-07-20 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/20/2011 01:38 PM, Marek Olšák wrote: > Alright, here's an updated patch: Reviewed-by: Ian Romanick > --- > src/mesa/main/fbobject.c | 23 --- > 1 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 0/8] Fix non-constant array-of-matrix accesses

2011-07-20 Thread Eric Anholt
On Mon, 18 Jul 2011 14:15:19 -0700, "Ian Romanick" wrote: > As can be seen from the giant pile of tests recently sent to the > piglit mailing list for review, the > lower_variable_index_to_cond_assign pass had some issues. With this > patch series, *all* of the variable indexing tests posted to t

Re: [Mesa-dev] [PATCH 2/2] glsl: Reject shaders that contain static recursion

2011-07-20 Thread Kenneth Graunke
On 07/17/2011 01:03 PM, Ian Romanick wrote: > From: Ian Romanick > > The GLSL 1.20 and later specs say: > > "Recursion is not allowed, not even statically. Static recursion is > present if the static function call graph of the program contains > cycles." > > Recursion is detected an

Re: [Mesa-dev] [PATCH 3/8] glsl: Rework lowering of non-constant array indexing

2011-07-20 Thread Eric Anholt
On Mon, 18 Jul 2011 14:15:22 -0700, "Ian Romanick" wrote: > From: Ian Romanick > > The previous implementation could easily get tricked if the LHS of an > assignment included a non-constant index that was "inside" another > dereference. For example: > > mat4 m[2]; > m[0][i] = vec4(0.0)

[Mesa-dev] [PATCH 2/2] util: enable S3TC support when the force_s3tc_enable env var is set to "true"

2011-07-20 Thread Bryan Cain
--- src/gallium/auxiliary/util/u_format_s3tc.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c index bb989c2..d8a7c0d 100644 --- a/src/gallium/auxiliary/util/u_format_s3tc.c

[Mesa-dev] [PATCH 1/2] st/mesa: respect force_s3tc_enable environment variable

2011-07-20 Thread Bryan Cain
--- src/mesa/state_tracker/st_extensions.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 99b231d..073e72c 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa

[Mesa-dev] Patches to make Gallium drivers respect the force_s3tc_enable environment variable

2011-07-20 Thread Bryan Cain
The purpose of the following two patches is to make st/mesa expose the S3TC extensions when the force_s3tc_enable environment variable is used. This is to match the behavior of the DRI drivers, in which force_s3tc_enable is an option in driconf. Although st/mesa can't use the driconf functions, i

[Mesa-dev] [Bug 39209] [bisected] Wrong display after "prefer native texture formats when possible" commit - part2

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39209 Victor Tseng changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

Re: [Mesa-dev] [PATCH] mesa: GLES2 should return different error enums for invalid fbo queries

2011-07-20 Thread Marek Olšák
Alright, here's an updated patch: --- src/mesa/main/fbobject.c | 23 --- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8496936..82eb7fb 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobj

Re: [Mesa-dev] [PATCH 2/4] glsl: Move initialize_context() to glsl_parser_extras.cpp so it can be re-used.

2011-07-20 Thread Paul Berry
On 20 July 2011 09:52, Paul Berry wrote: > On 20 July 2011 07:55, Chad Versace wrote: >>> +   ctx->Const.GLSLVersion = 120; >>> + >>> +   /* 1.10 minimums. */ >>> +   ctx->Const.MaxLights = 8; >> >> There is conflict here. The GLSL vrsion is 1.20, but the comment says 1.10. >> The minimum values

Re: [Mesa-dev] [PATCH] i965: fix timer query on gen6+

2011-07-20 Thread Kenneth Graunke
On 07/20/2011 09:12 AM, Zou Nan hai wrote: > on gen6+, PIPE_CONTROL reported time stamp are 64 bits > value (high 32 bits MBZ on snb), toggles every 80 ns. > > Signed-off-by: Zou Nan hai This seems correct to me. The Sandybridge PRM, Volume 1, Part 3, section 1.1.10.10 "TIMEST

Re: [Mesa-dev] [PATCH 3/3] i965: Apply a homebrew workaround for GPU hang in OGLC api-texcoord.

2011-07-20 Thread Eric Anholt
On Wed, 20 Jul 2011 01:25:40 +0100, Chris Wilson wrote: > On Tue, 19 Jul 2011 15:44:12 -0700, Eric Anholt wrote: > > The behavior of flushes in the hardware is a maze of twisty passages, > > and strangely the VS constants appear to be loaded during a pipeline > > flush instead of at the time of

[Mesa-dev] [Bug 39209] [bisected] Wrong display after "prefer native texture formats when possible" commit - part2

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39209 --- Comment #9 from Emil Velikov 2011-07-20 11:08:40 PDT --- Hi Victor Can you please test the latest mesa/master A patch that should resolve your issue has been pushed [1] Cheers Emil [1] http://cgit.freedesktop.org/mesa/mesa/commit/?id=d84

Re: [Mesa-dev] [PATCH 2/3] i965: Enable the PIPE_CONTROL workaround workaround out of paranoia.

2011-07-20 Thread Eric Anholt
On Tue, 19 Jul 2011 22:11:27 -0700, Kenneth Graunke wrote: > On 07/19/2011 03:44 PM, Eric Anholt wrote: > > There's scary stuff going on in PIPE_CONTROL internals, and if the > > BSpec says to do this to make PIPE_CONTROL work, I'll go ahead and do > > it because we'll probably never be able to d

Re: [Mesa-dev] [PATCH 2/4] glsl: Move initialize_context() to glsl_parser_extras.cpp so it can be re-used.

2011-07-20 Thread Paul Berry
On 20 July 2011 07:55, Chad Versace wrote: >> +   ctx->Const.GLSLVersion = 120; >> + >> +   /* 1.10 minimums. */ >> +   ctx->Const.MaxLights = 8; > > There is conflict here. The GLSL vrsion is 1.20, but the comment says 1.10. > The minimum values below are identical for both versions, so I can't d

Re: [Mesa-dev] Mesa 7.11 release candidate 2

2011-07-20 Thread Sebastian H.
>> Indeed it isn't installed anywhere in /opt (also not in /usr). >> Btw. the latest git mesa main compiles without it beeing there. >> >> Alright, on the same system in ~/source/libdrm-2.4.26/ >> >> ./configure --prefix=/opt/mesa \ >>LDFLAGS=-L/opt/mesa/lib \ >>PKG_CONFIG_PATH=/op

Re: [Mesa-dev] [PATCH 2/4] glsl: Move initialize_context() to glsl_parser_extras.cpp so it can be re-used.

2011-07-20 Thread Paul Berry
On 18 July 2011 18:13, Kenneth Graunke wrote: >> +   ctx->Extensions.ARB_ES2_compatibility = GL_TRUE; >> +   ctx->Extensions.ARB_draw_buffers = GL_TRUE; >> +   ctx->Extensions.ARB_draw_instanced = GL_TRUE; >> +   ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; >> +   ctx->Extensions.EXT_

Re: [Mesa-dev] [PATCH 3/4] glsl: Create a standalone executable for testing optimization passes.

2011-07-20 Thread Paul Berry
On 20 July 2011 08:50, Kenneth Graunke wrote: > Without taking sides, I would like to point out load_text_file, which > already implements this.  Unfortunately, it got cut and pasted and > diverged, so there's one in glsl/main.cpp and one in glsl/glcpp/glcpp.c. >  (That should probably be fixed.)

Re: [Mesa-dev] [PATCH 4/4] glsl: Add unit tests for lower_jumps.cpp

2011-07-20 Thread Chad Versace
On 07/18/2011 11:37 AM, Paul Berry wrote: > These tests invoke do_lower_jumps() in isolation (using the glsl_test > executable) and verify that it transforms the IR in the expected way. > > The unit tests may be run from the top level directory using "make > check". > > For reference, I've also c

Re: [Mesa-dev] [PATCH 3/4] glsl: Create a standalone executable for testing optimization passes.

2011-07-20 Thread Kenneth Graunke
On 07/20/2011 08:00 AM, Chad Versace wrote: > On the issue of std::stringbuf, I'm siding with Paul here. This > concise, safe function definition: Without taking sides, I would like to point out load_text_file, which already implements this. Unfortunately, it got cut and pasted and diverged, so t

Re: [Mesa-dev] Mesa 7.11 release candidate 2

2011-07-20 Thread Marek Olšák
On Wed, Jul 20, 2011 at 4:39 PM, Sebastian H. wrote: Mesa 7.11-rc2 has been released.  This is a release candidate for the 7.11 development release. >>> >>> I've tried to compile this one >>> 996aea3cca40bb34c0a9027411924879  MesaGLUT-7.11-rc2.tar.bz2 >>> >>> After unpacking >>> >>>

Re: [Mesa-dev] [PATCH] u_vbuf_mgr: restore buffer offsets

2011-07-20 Thread Marek Olšák
Well spotted, thanks. Some comments below. On Wed, Jul 20, 2011 at 3:25 PM, Chia-I Wu wrote: > From: Chia-I Wu > > u_vbuf_upload_buffers modifies the buffer offsets.  If they are not > restored, and any of the vertex formats is not supported natively, the > next u_vbuf_mgr_draw_begin call will t

Re: [Mesa-dev] [PATCH 3/4] glsl: Create a standalone executable for testing optimization passes.

2011-07-20 Thread Chad Versace
On 07/19/2011 04:30 PM, Paul Berry wrote: > On 19 July 2011 13:15, Ian Romanick wrote: On the issue of std::stringbuf, I'm siding with Paul here. This concise, safe function definition: static string read_stdin_to_eof() { stringbuf sb; cin.get(sb, '\0'); return sb.str(); } is vastly mo

Re: [Mesa-dev] [PATCH 2/4] glsl: Move initialize_context() to glsl_parser_extras.cpp so it can be re-used.

2011-07-20 Thread Chad Versace
Comments below. On 07/18/2011 11:37 AM, Paul Berry wrote: > This function is used by main.cpp to initialize a context to a default > configuration for use in compiling builtins. Moved the bulk of it to > glsl_parser_extras.cpp so that it can be re-used in testing. > --- > src/glsl/glsl_parser_ex

[Mesa-dev] [Bug 38869] Cannot create a valid pBuffer with height and/or width of zero

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38869 --- Comment #3 from Brian Paul 2011-07-20 07:52:24 PDT --- (In reply to comment #2) > (In reply to comment #0) > > Both the EGL and GLX specifications allow pbuffers to be created with a > > height > > and/or width of zero (and these are the de

Re: [Mesa-dev] [PATCH 1/4] mesa: Add an ifndef guard around the definition of the INLINE macro

2011-07-20 Thread Chad Versace
On 07/18/2011 11:37 AM, Paul Berry wrote: > Several headers redundantly define the INLINE macro. Adding this > guard prevents the compiler from complaining about macro redefinition. > --- > src/mesa/main/compiler.h | 42 ++ > 1 files changed, 22 insertion

[Mesa-dev] [Bug 38869] Cannot create a valid pBuffer with height and/or width of zero

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38869 Ian Romanick changed: What|Removed |Added CC||i...@freedesktop.org -- Configure bugmai

[Mesa-dev] [Bug 38869] Cannot create a valid pBuffer with height and/or width of zero

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38869 --- Comment #2 from Ian Romanick 2011-07-20 07:42:30 PDT --- (In reply to comment #0) > Both the EGL and GLX specifications allow pbuffers to be created with a height > and/or width of zero (and these are the default values). Is there any langu

Re: [Mesa-dev] Mesa 7.11 release candidate 2

2011-07-20 Thread Sebastian H.
>>> Mesa 7.11-rc2 has been released. This is a release candidate for the >>> 7.11 development release. >> >> I've tried to compile this one >> >>> 996aea3cca40bb34c0a9027411924879 MesaGLUT-7.11-rc2.tar.bz2 >> >> After unpacking >> >> ./configure --prefix=/opt/mesa PKG_CONFIG_PATH=/opt/mesa/lib/pk

Re: [Mesa-dev] [PATCH 1/4] mesa: Add an ifndef guard around the definition of the INLINE macro

2011-07-20 Thread Brian Paul
On 07/19/2011 05:59 PM, Paul Berry wrote: On 19 July 2011 13:15, Ian Romanick wrote: src/egl/main/eglcompiler.h src/gallium/include/pipe/p_compiler.h src/mapi/mapi/u_compiler.h src/mesa/main/compiler.h None of those headers should ever cross paths. The only one of those that anything under s

[Mesa-dev] [Bug 38869] Cannot create a valid pBuffer with height and/or width of zero

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38869 --- Comment #1 from Brian Paul 2011-07-20 07:25:36 PDT --- "Both the EGL and GLX specifications allow pbuffers to be created with a height and/or width of zero (and these are the default values)." [...] "Other implementations throw a BAD_VALUE e

Re: [Mesa-dev] [PATCH] st/mesa: st_copy_texsubimage: clip source size to rb size

2011-07-20 Thread Brian Paul
On 07/18/2011 09:19 PM, Brian Paul wrote: On 07/18/2011 09:29 AM, Vadim Girlin wrote: On Mon, 2011-07-18 at 08:34 -0600, Brian Paul wrote: On Mon, Jul 18, 2011 at 8:11 AM, Vadim Girlin wrote: Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39286 --- src/mesa/state_tracker/st_cb_texture.c |

Re: [Mesa-dev] Mesa 7.11 release candidate 2

2011-07-20 Thread Brian Paul
On 07/20/2011 07:38 AM, Matt Turner wrote: On Wed, Jul 20, 2011 at 1:08 AM, Sebastian H. wrote: Hello list Mesa 7.11-rc2 has been released. This is a release candidate for the 7.11 development release. I've tried to compile this one 996aea3cca40bb34c0a9027411924879 MesaGLUT-7.11-rc2.tar

Re: [Mesa-dev] Mesa 7.11 release candidate 2

2011-07-20 Thread Matt Turner
On Wed, Jul 20, 2011 at 1:08 AM, Sebastian H. wrote: > Hello list > >> Mesa 7.11-rc2 has been released.  This is a release candidate for the >> 7.11 development release. > > I've tried to compile this one > >> 996aea3cca40bb34c0a9027411924879  MesaGLUT-7.11-rc2.tar.bz2 > > After unpacking > > ./co

[Mesa-dev] [PATCH] u_vbuf_mgr: restore buffer offsets

2011-07-20 Thread Chia-I Wu
From: Chia-I Wu u_vbuf_upload_buffers modifies the buffer offsets. If they are not restored, and any of the vertex formats is not supported natively, the next u_vbuf_mgr_draw_begin call will translate the vertex buffers with incorrect buffer offsets. --- src/gallium/auxiliary/util/u_vbuf_mgr.c

[Mesa-dev] [PATCH] i965: fix timer query on gen6+

2011-07-20 Thread Zou Nan hai
on gen6+, PIPE_CONTROL reported time stamp are 64 bits value (high 32 bits MBZ on snb), toggles every 80 ns. Signed-off-by: Zou Nan hai --- src/mesa/drivers/dri/i965/brw_queryobj.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/s

[Mesa-dev] [Bug 39393] New: [PNV] X Error of failed request: BadMatch (invalid parameter attributes) when run jkrahantest

2011-07-20 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39393 Summary: [PNV] X Error of failed request: BadMatch (invalid parameter attributes) when run jkrahantest Product: Mesa Version: unspecified Platform: All OS/Version: Linux (All)