[Mesa-dev] i965 Valleyview: 3DSTATE_URB_VS Minimum URB Entries Fix

2012-07-03 Thread Cheah, Douglas
Hello folks, I am not too sure if this right avenue but I am trying to get the patch below integrated into MESA. The patch below solves a bug where for several 3D application running on Intel's Valleyview hardware there would be massive corruption. Corruptions includes vertex being wrongly clip

[Mesa-dev] [PATCH] GLES2: upgrade gl2ext.h to version 18099

2012-07-03 Thread Kristian Høgsberg
Redo this commit, and remove the inclusion of gl2ext.h from src/mapi/glapi/glapi_priv.h. The include was added in 8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype for glDrawBuffersNV and others, but it's not possible to include both glext.h and gl2ext.h from the same file. I do

[Mesa-dev] [PATCH] softpipe: check if we use llvm before calling draw_get_shader_param

2012-07-03 Thread Marek Olšák
draw_get_shader_param returns correct CAPs if Draw was created using draw_create. tgsi_exec_get_shader_param should be used if draw_create_no_llvm was used. --- This is a follow-up to my other patch: "draw: draw_get_shader_param should return correct values WRT llvm" src/gallium/drivers/softpi

[Mesa-dev] [PATCH 3/3] st/mesa: only expose ARB_shader_bit_encoding with GLSL 1.3

2012-07-03 Thread Marek Olšák
I don't think it's possible or even useful to use the extension with GLSL 1.2. --- src/mesa/state_tracker/st_extensions.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 6fea1fa..fd9

[Mesa-dev] [PATCH 2/3] glsl_to_tgsi: follow SHADER_CAP_INTEGERS with per-stage granularity

2012-07-03 Thread Marek Olšák
Some drivers support integers only in vertex shaders (e.g. those which use Draw). Const.NativeIntegers is now useless for Gallium. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 28 ++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tra

[Mesa-dev] [PATCH 1/3] draw: draw_get_shader_param should return correct values WRT llvm

2012-07-03 Thread Marek Olšák
--- src/gallium/auxiliary/draw/draw_context.c | 34 ++-- src/gallium/auxiliary/draw/draw_context.h | 13 +- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c in

Re: [Mesa-dev] Mesa (master): GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Kristian Høgsberg
On Wed, Jul 04, 2012 at 01:48:18AM +0200, Marek Olšák wrote: > On Wed, Jul 4, 2012 at 12:40 AM, Brian Paul wrote: > > On 07/03/2012 02:23 PM, Kristian Høgsberg wrote: > >> > >> Module: Mesa > >> Branch: master > >> Commit: 8818b88748bde6de5a4a98ad237c85151b44c774 > >> URL: > >> http://cgit.freedes

Re: [Mesa-dev] [PATCH 1/2] GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Marek Olšák
On Wed, Jul 4, 2012 at 1:45 AM, Kristian Høgsberg wrote: > On Wed, Jul 04, 2012 at 12:42:50AM +0200, Marek Olšák wrote: >> Hi, >> >> this causes a build failure: >> >> In file included from ../../../src/mapi/glapi/glapi_priv.h:49:0, >> from glapi_entrypoint.c:32: >> ../../../inclu

Re: [Mesa-dev] Mesa (master): GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Marek Olšák
On Wed, Jul 4, 2012 at 12:40 AM, Brian Paul wrote: > On 07/03/2012 02:23 PM, Kristian Høgsberg wrote: >> >> Module: Mesa >> Branch: master >> Commit: 8818b88748bde6de5a4a98ad237c85151b44c774 >> URL: >> http://cgit.freedesktop.org/mesa/mesa/commit/?id=8818b88748bde6de5a4a98ad237c85151b44c774 >> >>

Re: [Mesa-dev] [PATCH 1/2] GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Kristian Høgsberg
On Wed, Jul 04, 2012 at 12:42:50AM +0200, Marek Olšák wrote: > Hi, > > this causes a build failure: > > In file included from ../../../src/mapi/glapi/glapi_priv.h:49:0, > from glapi_entrypoint.c:32: > ../../../include/GLES2/gl2ext.h:1074:28: error: redefinition of > typedef ‘PFNG

Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-03 Thread Marek Olšák
FWIW, I think Draw needs to know if a driver does or does not support integers, so that it can return system values in the correct type (not sure if that includes gallivm too). The reason for that is that glsl_to_tgsi generates *different* shaders depending on the native integer cap. I think this i

Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-03 Thread Stéphane Marchesin
On Fri, Jun 29, 2012 at 3:49 PM, Olivier Galibert wrote: > On Fri, Jun 29, 2012 at 03:09:23PM -0700, Stéphane Marchesin wrote: >> I do, but it fixes a regression, so unless you have a fix, it's the way to >> go. If you have a fix I'll happily test it :) > > Just between us, revert on small regress

Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-03 Thread Jose Fonseca
- Original Message - > On Tue, Jul 03, 2012 at 12:39:47PM -0700, Jose Fonseca wrote: > > Note that all registers are stored as floats (for convenience, and > > because LLVM has no unions), so integers are bitcasted into floats > > while storing/loading. And I'm not sure if your patch wou

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 03:41 PM, Eric Anholt wrote: [snip] > I can't find spec text explicitly justifying it, but I was quite sure > that we have total leeway to be inconsistent between constant expression > handling (CPU) and variable expression handling -- you just need to be > invariant in constant expre

Re: [Mesa-dev] [PATCH 3/3] glx/dri2: Add support for GLX_ARB_create_context_robustness

2012-07-03 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick > > Add the infrastructure required for this extension. There is no > xserver support and no driver support yet. Drivers can enable this be > advertising DRI2 version 4 and accepting the > __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag and the > __DRI_CTX_AT

Re: [Mesa-dev] [PATCH 06/18] glsl: Turn UBO variable declarations into ir_variables and check qualifiers.

2012-07-03 Thread Kenneth Graunke
On 07/02/2012 05:38 PM, Eric Anholt wrote: > Fixes piglit layout-*-non-uniform and layout-*-within-block. > --- > src/glsl/ast.h |6 ++ > src/glsl/ast_to_hir.cpp | 36 +--- > src/glsl/glsl_parser.yy |2 ++ > src/glsl/gl

Re: [Mesa-dev] [PATCH 1/2] GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Marek Olšák
Hi, this causes a build failure: In file included from ../../../src/mapi/glapi/glapi_priv.h:49:0, from glapi_entrypoint.c:32: ../../../include/GLES2/gl2ext.h:1074:28: error: redefinition of typedef ‘PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC’ ../../../include/GL/glext.h:10237:25:

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Eric Anholt
Kenneth Graunke writes: > On 07/03/2012 09:00 AM, Brian Paul wrote: >> The GLSL round() and roundEven() functions were both generating the >> ir_unop_round_even instruction but the GLSL spec allows some leeway for >> implementing round(). This change allows drivers to take advantage of >> that.

Re: [Mesa-dev] Mesa (master): GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Brian Paul
On 07/03/2012 02:23 PM, Kristian Høgsberg wrote: Module: Mesa Branch: master Commit: 8818b88748bde6de5a4a98ad237c85151b44c774 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8818b88748bde6de5a4a98ad237c85151b44c774 Author: Gwenole Beauchesne Date: Mon Apr 23 10:55:28 2012 +0200 GLES

Re: [Mesa-dev] [PATCH 05/18] glsl: Add parsing for GLSL uniform blocks.

2012-07-03 Thread Kenneth Graunke
On 07/02/2012 05:38 PM, Eric Anholt wrote: > This doesn't do anything with the uniform block declarations yet, so > usage of those uniforms finds them to be undeclared. > --- > src/glsl/ast.h | 28 +++ > src/glsl/ast_to_hir.cpp | 11 + > src/glsl/glsl_lexer.ll |5 +- >

[Mesa-dev] [PATCH 03.5/18] glcpp: Add built-in #define for GL_ARB_uniform_buffer_object.

2012-07-03 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/glsl/glcpp/glcpp-parse.y |3 +++ 1 file changed, 3 insertions(+) I think this minor detail got overlooked. Feel free to toss it somewhere in your series or squash with something. diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y

Re: [Mesa-dev] [PATCH 1/3] glapi: Apply Xorg indent rules to all files generated for the xserver

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 12:57 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/mapi/glapi/gen/Makefile.am | 54 --- > 1 files changed, 39 insertions(+), 15 deletions(-) This series looks good to me, but it would probably be be

Re: [Mesa-dev] powerpc / gallium/drivers/llvmpipe segfaults running lp_test_* tests

2012-07-03 Thread Will Schmidt
On Tue, 2012-07-03 at 16:07 -0500, Will Schmidt wrote: > (gdb) info reg r3 > r3 0xfffb7f60010 17590977429520 > (gdb) info reg r10 > r100x7c0802a6f8010010 8937396376665391120 BenH points out to me that r10 value looks like code. ppcdis 0x7c0802a6 mflrr0 ppcdis 0

[Mesa-dev] [PATCH] svga: fix register collision issue in emit_conditional()

2012-07-03 Thread Brian Paul
If the 'dst' register is the same as the 'pass' register we'll generate invalid code. Use a temporary register in that case. --- src/gallium/drivers/svga/svga_tgsi_insn.c | 32 +++- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/svga/

Re: [Mesa-dev] [PATCH 2/2] mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.

2012-07-03 Thread Gwenole Beauchesne
Hi, 2012/7/3 Kenneth Graunke : > On 07/03/2012 06:28 AM, Kristian Høgsberg wrote: >> From: Gwenole Beauchesne > > Brian and I actually reviewed this back in April, it just didn't get > pushed for some reason. I am sorry, I didn't push them as I think Ian also wanted some testcases. I didn't writ

[Mesa-dev] powerpc / gallium/drivers/llvmpipe segfaults running lp_test_* tests

2012-07-03 Thread Will Schmidt
Hi, I'm starting to investigate mesa/llvmpipe on powerpc (powerpc64/power7) and hitting some issues trying to run the tests found in mesa/src/gallium/drivers/llvmpipe/lp_test_*. (lp_test_arit, lp_test_printf, lp_test_blend all seem to fail in similar fashion. lp_test_round passes, but does not

Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-03 Thread Olivier Galibert
On Tue, Jul 03, 2012 at 12:39:47PM -0700, Jose Fonseca wrote: > Note that all registers are stored as floats (for convenience, and > because LLVM has no unions), so integers are bitcasted into floats > while storing/loading. And I'm not sure if your patch would break > that. I did test the patch

Re: [Mesa-dev] [PATCH 2/2] mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.

2012-07-03 Thread Kristian Høgsberg
On Tue, Jul 3, 2012 at 3:49 PM, Kenneth Graunke wrote: > On 07/03/2012 06:28 AM, Kristian Høgsberg wrote: >> From: Gwenole Beauchesne > > Brian and I actually reviewed this back in April, it just didn't get > pushed for some reason. > > So I'd go ahead and add > Reviewed-by: Kenneth Graunke > Re

Re: [Mesa-dev] Upcoming Mesa releases

2012-07-03 Thread Brian Paul
On 06/29/2012 07:29 PM, Jakob Bornecrantz wrote: - Original Message - On Thu, May 03, 2012 at 02:38:11PM -0700, Ian Romanick wrote: To keep in the habit of doing regular releases, I'd like to propose the following set of release dates. We had previously discussed doing stable releases

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Brian Paul
On 07/03/2012 01:43 PM, Kenneth Graunke wrote: On 07/03/2012 09:00 AM, Brian Paul wrote: The GLSL round() and roundEven() functions were both generating the ir_unop_round_even instruction but the GLSL spec allows some leeway for implementing round(). This change allows drivers to take advantage

[Mesa-dev] [PATCH 3/3] glx/dri2: Add support for GLX_ARB_create_context_robustness

2012-07-03 Thread Ian Romanick
From: Ian Romanick Add the infrastructure required for this extension. There is no xserver support and no driver support yet. Drivers can enable this be advertising DRI2 version 4 and accepting the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag and the __DRI_CTX_ATTRIB_RESET_STRATEGY attribute in cre

[Mesa-dev] [PATCH 2/3] dri2: Hard-code the DRI2 version

2012-07-03 Thread Ian Romanick
From: Ian Romanick This allows revising the dri_interface.h separately from adding driver support. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/common/dri_util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa

[Mesa-dev] [PATCH 1/3] glapi: Apply Xorg indent rules to all files generated for the xserver

2012-07-03 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mapi/glapi/gen/Makefile.am | 54 --- 1 files changed, 39 insertions(+), 15 deletions(-) diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index df3e82d..52aeb3a 100644 --- a/

Re: [Mesa-dev] [PATCH 2/2] mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 06:28 AM, Kristian Høgsberg wrote: > From: Gwenole Beauchesne Brian and I actually reviewed this back in April, it just didn't get pushed for some reason. So I'd go ahead and add Reviewed-by: Kenneth Graunke Reviewed-by: Brian Paul to patch 2 and push it... __

Re: [Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Kenneth Graunke
On 07/03/2012 09:00 AM, Brian Paul wrote: > The GLSL round() and roundEven() functions were both generating the > ir_unop_round_even instruction but the GLSL spec allows some leeway for > implementing round(). This change allows drivers to take advantage of > that. For i965, they still equate to

Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper

2012-07-03 Thread Jose Fonseca
- Original Message - > On Mon, Jul 02, 2012 at 06:44:37AM -0700, Jose Fonseca wrote: > > But I think that this fix is too ad-hoc, and I suspect it may > > introduce other regressions. > > > > If I understood the problem correctly, the issue here is that some > > drivers want system value

Re: [Mesa-dev] [PATCH 1/2] mesa: use the PRIx64 macro for printing 64-bit hexadecimal values

2012-07-03 Thread Brian Paul
Will do. For C99 compilers, inttypes.h is included via GL/glext.h, but it'll probably get missed on MSVC. -Brian On 07/03/2012 11:05 AM, Jose Fonseca wrote: Sounds a good idea. These are defined in include/c99/inttypes.h for MSVC, so it should work there too. But I wonder if #include

Re: [Mesa-dev] [PATCH 1/2] mesa: use the PRIx64 macro for printing 64-bit hexadecimal values

2012-07-03 Thread Jose Fonseca
Sounds a good idea. These are defined in include/c99/inttypes.h for MSVC, so it should work there too. But I wonder if #include shouldn't be added though. Jose - Original Message - > We'll revert the #define fprintf __mingw_fprintf change next. > --- > src/mesa/program/prog_prin

Re: [Mesa-dev] [PATCH 1/2] GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Brian Paul
On 07/03/2012 07:28 AM, Kristian Høgsberg wrote: From: Gwenole Beauchesne --- include/GLES2/gl2ext.h | 384 ++-- 1 file changed, 372 insertions(+), 12 deletions(-) For both: Reviewed-by: Brian Paul __

[Mesa-dev] [PATCH] mesa/glsl: add ir_unop_round

2012-07-03 Thread Brian Paul
The GLSL round() and roundEven() functions were both generating the ir_unop_round_even instruction but the GLSL spec allows some leeway for implementing round(). This change allows drivers to take advantage of that. For i965, they still equate to the same thing. v2: implement ir_unop_round for c

Re: [Mesa-dev] [ANNOUNCE] libdrm 2.4.37

2012-07-03 Thread Ben Widawsky
The link generated by the release script was incorrect. They should be http://dri.freedesktop.org/libdrm/libdrm-2.4.37.tar.gz http://dri.freedesktop.org/libdrm/libdrm-2.4.37.tar.bz2 On Fri, 29 Jun 2012 11:17:47 -0700 Ben Widawsky wrote: > I botched the 2.3.36 release quite royally. Here is 2.6.

Re: [Mesa-dev] [PATCH 3/3] tgsi: implement ROUND and ROUNDEVEN instructions in exec module

2012-07-03 Thread Brian Paul
On 07/02/2012 06:33 PM, Ian Romanick wrote: On 07/02/2012 04:00 PM, Brian Paul wrote: Won't this cause a constant and a non-constant to generate a different value? The implementation of round() used in constant folding really needs to be the same as the one used by the code generator. Right? Y

[Mesa-dev] [PATCH 2/2] Revert "mesa: #define fprintf to be __mingw_fprintf() on Mingw32"

2012-07-03 Thread Brian Paul
This reverts commit cbffaf20e9e6154310ba68bb2b44adc37ba83bcd. Use the PRIx64 macro in the fprintf() call instead, as suggested by Dylan Noblesmith. --- src/mesa/main/imports.h | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/imports.h b/src/mesa/mai

[Mesa-dev] [PATCH 1/2] mesa: use the PRIx64 macro for printing 64-bit hexadecimal values

2012-07-03 Thread Brian Paul
We'll revert the #define fprintf __mingw_fprintf change next. --- src/mesa/program/prog_print.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index 46f1df0..db69884 100644 --- a/src/mesa/program/prog_p

[Mesa-dev] [PATCH 2/2] mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.

2012-07-03 Thread Kristian Høgsberg
From: Gwenole Beauchesne --- src/mapi/glapi/gen/es_EXT.xml |8 src/mesa/main/APIspec.xml |1 + src/mesa/main/extensions.c|1 + 3 files changed, 10 insertions(+) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index b26cac5..ad83d91 100644

[Mesa-dev] [PATCH 1/2] GLES2: upgrade gl2ext.h to version 16994.

2012-07-03 Thread Kristian Høgsberg
From: Gwenole Beauchesne --- include/GLES2/gl2ext.h | 384 ++-- 1 file changed, 372 insertions(+), 12 deletions(-) diff --git a/include/GLES2/gl2ext.h b/include/GLES2/gl2ext.h index 4eae246..e4016a5 100644 --- a/include/GLES2/gl2ext.h +++ b/include/G

Re: [Mesa-dev] [PATCH 3/3] svga: implement TGSI_OPCODE_ROUND

2012-07-03 Thread Jose Fonseca
Looks good AFAICT. Reviewed-by: Jose Fonseca Jose - Original Message - > ROUND and TRUNC are implemented with one function to reduce code > duplication. > --- > src/gallium/drivers/svga/svga_tgsi_insn.c | 69 > ++--- > 1 files changed, 53 insertions(+), 16 d

Re: [Mesa-dev] [PATCH 2/3] svga: fix CMP translation for vertex shaders

2012-07-03 Thread Jose Fonseca
Reviewed-by: Jose Fonseca - Original Message - > Converting CMP to SLT+LRP didn't work when src2 or src3 was Inf/NaN. > That's the case for GLSL sqrt(0). sqrt(0) actually happens in many > piglit auto-generated tests that use the distance() function. > > v2: remove debug/devel code, per

Re: [Mesa-dev] [PATCH 1/3] svga: properly implement TRUNC instruction

2012-07-03 Thread Jose Fonseca
Reviewed-by: Jose Fonseca - Original Message - > Was previously implemented with FLOOR. > Fixes quite a few piglit tests of float->int conversion, integer > division, etc. > > v2: clean up left over debug/devel code, per Jose > --- > src/gallium/drivers/svga/svga_tgsi_insn.c | 55 > +