Re: [Mesa-dev] [PATCH 1/7] ir_to_mesa: Don't assertion fail on remaining GLSL 1.30 ops.

2011-09-27 Thread Chad Versace
For pathes 1-6: Reviewed-by: Chad Versace I have a minor comment on patch 7. -- Chad Versace c...@chad-versace.us On 09/27/2011 03:08 PM, Eric Anholt wrote: For hardware drivers, we only have ir_to_mesa called for the purposes of potential swrast fallbacks (basically never on a 1.30 driver),

Re: [Mesa-dev] [PATCH 7/7] glsl: Add support for constant expression evaluation on round(), roundEven().

2011-09-27 Thread Chad Versace
On 09/27/2011 03:08 PM, Eric Anholt wrote: They're both implemented the same in GLSL IR (since round() has undefined behavior for N.5). Fixes glsl-1.30/compiler/built-in-functions/round* --- src/glsl/ir_constant_expression.cpp | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(

[Mesa-dev] [PATCH 2/2] intel: Remove unused function get_glsl_version()

2011-09-27 Thread Chad Versace
It was replaced by _mesa_override_glsl_version(). Signed-off-by: Chad Versace --- src/mesa/drivers/dri/intel/intel_extensions.c | 16 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/int

[Mesa-dev] [PATCH 1/2] mesa: Allow overriding GLSL version with environment varirable

2011-09-27 Thread Chad Versace
Override the context's GLSL version if the environment variable MESA_GLSL_VERSION_OVERRIDE is set. Valid values for MESA_GLSL_VERSION_OVERRIDE are integers, such as "130". MESA_GLSL_VERSION_OVERRIDE has the same behavior as INTEL_GLSL_VERSION, except that it applies to all drivers, not just Intel'

[Mesa-dev] [ANNOUNCE] apitrace 2.0

2011-09-27 Thread José Fonseca
There were a bunch of features accumulated on apitrace's master branch, so I've tagged version 2.0: * Flush/sync trace file only when there is an uncaught signal/exception, yielding a 5x speed up while tracing. * Employ google snappy compression library instead of zlib, yielding a further 2x

[Mesa-dev] [PATCH 7/7] glsl: Add support for constant expression evaluation on round(), roundEven().

2011-09-27 Thread Eric Anholt
They're both implemented the same in GLSL IR (since round() has undefined behavior for N.5). Fixes glsl-1.30/compiler/built-in-functions/round* --- src/glsl/ir_constant_expression.cpp | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_constant_expressio

[Mesa-dev] [PATCH 6/7] glsl: Add support for constant expression evaluation on trunc().

2011-09-27 Thread Eric Anholt
Fixes the glsl-1.30/compiler/built-in-functions/trunc-* tests under 1.30. --- src/glsl/ir_constant_expression.cpp |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 56a4237..b3fe6cf 100644 --- a

[Mesa-dev] [PATCH 3/7] i965/fs: Add support for bit-shift operations.

2011-09-27 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index df43be0..d8ce47b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor

[Mesa-dev] [PATCH 5/7] i965/vs: Add support for bit-shift operations.

2011-09-27 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index a32451f..af6a00c 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4

[Mesa-dev] [PATCH 2/7] glsl: Fix assertion checking types of constant bitshift expressions.

2011-09-27 Thread Eric Anholt
Bitshifts are one of the rare places that GLSL allows mixed base types without an implicit conversion occurring. --- src/glsl/ir_constant_expression.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expressio

[Mesa-dev] [PATCH 4/7] mesa: Add missing _mesa_sizeof_glsl_type() for UNSIGNED_INT.

2011-09-27 Thread Eric Anholt
Somehow we managed to get the unsigned int vectors, but not scalar. Fixes _mesa_problem complaints in piglit's uint tests. --- src/mesa/main/shaderapi.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 74997ea..3ce

[Mesa-dev] [PATCH 1/7] ir_to_mesa: Don't assertion fail on remaining GLSL 1.30 ops.

2011-09-27 Thread Eric Anholt
For hardware drivers, we only have ir_to_mesa called for the purposes of potential swrast fallbacks (basically never on a 1.30 driver), which we don't really care about. This will allow 1.30 to be implemented without rewriting swrast for it. --- src/mesa/program/ir_to_mesa.cpp | 12 ++--

Re: [Mesa-dev] [PATCH 2/2] Revert "vbo: Don't discount stride == 0 for testing all varyings in VBOs."

2011-09-27 Thread Jose Fonseca
Makes sense to me. Jose - Original Message - > This reverts commit d631c19db47181129811080bfa772b210d762d4d. > > The commit was broken, and ended up returning false all the time > because nobody in the world binds every single possible vertex array. > On further reflection, we don't want

Re: [Mesa-dev] [PATCH] [RFC] mesa/formats: add rest of integer formats.

2011-09-27 Thread Eric Anholt
eOn Tue, 27 Sep 2011 20:54:44 +0100, Dave Airlie wrote: > From: Dave Airlie > > This is taken from reading EXT_texture_integer + EXT_texture_rg in > combination, > > Comments on necessity of each format, naming of formats and bugs in the > formats tables please. > > Is there any formats I've

[Mesa-dev] [PATCH] [RFC] mesa/formats: add rest of integer formats.

2011-09-27 Thread Dave Airlie
From: Dave Airlie This is taken from reading EXT_texture_integer + EXT_texture_rg in combination, Comments on necessity of each format, naming of formats and bugs in the formats tables please. Is there any formats I've missed? will look at actually using this info in another step, just want to

[Mesa-dev] [PATCH] mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.

2011-09-27 Thread Eric Anholt
From: Brian Paul Now that we can zero-copy generate the mipmaps into brand new glTexImage()-generated storage using MapTextureImage(), we no longer need to allocate image->Data in mipmap generate. This requires deleting the drivers' old overrides of the miptree tracking after calling _mesa_gener

Re: [Mesa-dev] MapTextureImage for glGetTexImage

2011-09-27 Thread Eric Anholt
On Fri, 23 Sep 2011 15:04:13 -0600, Brian Paul wrote: Non-text part: multipart/mixed > On 09/22/2011 07:24 PM, Brian Paul wrote: > > On Thu, Sep 22, 2011 at 6:14 PM, Eric Anholt wrote: > >> Here's an extract of what I had in one of my branches for mti, with a > >> slight cleanup to reduce diffs i

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Paul Berry
\On 27 September 2011 11:21, Chad Versace wrote: > On 09/27/2011 09:48 AM, Dave Airlie wrote: > >> This patch allows one to override the version of the OpenGL context by >> setting the environment variable MESA_GL_VERSION_OVERRIDE. >> >> v2 >> --- >> - [brianp] Change variable

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Chad Versace
On 09/27/2011 09:48 AM, Dave Airlie wrote: This patch allows one to override the version of the OpenGL context by setting the environment variable MESA_GL_VERSION_OVERRIDE. v2 --- - [brianp] Change variable name to MESA_GL_VERSION_OVERRIDE. - [brianp] Document in envvars.html. - [idr, kwg] Remov

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Chad Versace
On 09/27/2011 09:29 AM, Ian Romanick wrote: On 09/26/2011 01:50 PM, Chad Versace wrote: [idr and kwg, I see your point. I've removed the overrides for GLES1 and GLES2.] It is necessary to manually set the GL version to 3.0 in order to run Piglit tests using glGetUniform*(). This patch allows o

[Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-27 Thread Paul Berry
This patch implements proper support for gl_ClipVertex by causing the new VS backend to populate the clip distance VUE slots using VERT_RESULT_CLIP_VERTEX when appropriate, and by using the untransformed clip planes in ctx->Transform.EyeUserPlane rather than the transformed clip planes in ctx->Tran

[Mesa-dev] [PATCH 1/2] mesa: Add a gl_vert_result for gl_ClipVertex.

2011-09-27 Thread Paul Berry
Before this patch, clip planes didn't work properly in Mesa when using vertex shaders, because Mesa assigned both gl_ClipVertex and gl_Position to the same gl_vert_result (VERT_RESULT_HPOS). As a result, backends couldn't distinguish between the two variables, so any shader that wrote different va

Re: [Mesa-dev] [PATCH] gallium: move border color to be a color union

2011-09-27 Thread Brian Paul
On 09/27/2011 03:10 AM, Dave Airlie wrote: From: Dave Airlie EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. Signed-off-by: Dave Airlie I haven't look at what the gallium docs say about border colors but yo

Re: [Mesa-dev] [PATCH] glsl 1.30: Fix numerical instabilities in asinh

2011-09-27 Thread Eric Anholt
On Mon, 26 Sep 2011 16:19:55 -0700, Paul Berry wrote: > The formula we were previously using for asinh: > > asinh x = ln(x + sqrt(x * x + 1)) > > is numerically unstable: when x is a large negative value, the quantity > > x + sqrt(x * x + 1) > > is a small positive value (on the order

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Allow SIMD16 with control flow on Ivybridge.

2011-09-27 Thread Eric Anholt
On Mon, 26 Sep 2011 23:57:39 -0700, Kenneth Graunke wrote: > The check was designed to forbid it on old generations (Gen5/Ironlake), > not on new ones. It just works on Gen7/Ivybridge. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |2 +- > 1 files

Re: [Mesa-dev] [PATCH 1/7] i965: Use 4 bits to store nr_userclip in brw_clip.h.

2011-09-27 Thread Eric Anholt
On Mon, 26 Sep 2011 14:28:25 -0700, Kenneth Graunke wrote: > On 09/25/2011 09:21 AM, Paul Berry wrote: > > Since the i965 driver supports 8 clipping planes now, we need 4 bits > > to store the number of user clipping planes, not 3. > > > > In theory this isn't strictly necessary, since brw_clip.

Re: [Mesa-dev] [PATCH] glsl 1.30: Fix numerical instabilities in asinh

2011-09-27 Thread Kenneth Graunke
On 09/26/2011 04:19 PM, Paul Berry wrote: The formula we were previously using for asinh: asinh x = ln(x + sqrt(x * x + 1)) is numerically unstable: when x is a large negative value, the quantity x + sqrt(x * x + 1) is a small positive value (on the order of 1/(2|x|)). Since the lo

Re: [Mesa-dev] [PATCH] RFC: refactor out dri2 proto code into libdri2

2011-09-27 Thread Eric Anholt
On Thu, 22 Sep 2011 15:36:07 -0500, Rob Clark wrote: > Since I was working on some extensions to DRI2 protocol for handling > video, it occurred to me that it might be easier to extend the > protocol if there weren't N different copies of dri2.c floating around > in various different src trees..

Re: [Mesa-dev] [PATCH] glsl 1.30: Fix numerical instabilities in asinh

2011-09-27 Thread Paul Berry
On 27 September 2011 10:12, Chad Versace wrote: > On 09/26/2011 04:19 PM, Paul Berry wrote: > >> The formula we were previously using for asinh: >> >> asinh x = ln(x + sqrt(x * x + 1)) >> >> is numerically unstable: when x is a large negative value, the quantity >> >> x + sqrt(x * x + 1)

Re: [Mesa-dev] [PATCH] glsl 1.30: Fix numerical instabilities in asinh

2011-09-27 Thread Chad Versace
On 09/26/2011 04:19 PM, Paul Berry wrote: The formula we were previously using for asinh: asinh x = ln(x + sqrt(x * x + 1)) is numerically unstable: when x is a large negative value, the quantity x + sqrt(x * x + 1) is a small positive value (on the order of 1/(2|x|)). Since the lo

Re: [Mesa-dev] [PATCH 17/19] i965: After emitting a HiZ buffer, mark that it needs a HiZ resolve

2011-09-27 Thread Chad Versace
On 09/26/2011 02:38 PM, Eric Anholt wrote: On Fri, 23 Sep 2011 17:37:47 -0700, Chad Versace wrote: Signed-off-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_misc_state.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Dave Airlie
This patch allows one to override the version of the OpenGL context by setting the environment variable MESA_GL_VERSION_OVERRIDE. v2 --- - [brianp] Change variable name to MESA_GL_VERSION_OVERRIDE. - [brianp] Document in envvars.html. - [idr, kwg] Remove over

Re: [Mesa-dev] [PATCH 16/19] i965: Manipulate state batches for HiZ operation meta-ops

2011-09-27 Thread Chad Versace
On 09/26/2011 01:15 PM, Eric Anholt wrote: On Fri, 23 Sep 2011 17:37:46 -0700, Chad Versace wrote: That's a pretty terse commit message :) Signed-off-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_draw.c |3 ++ src/mesa/drivers/dri/i965/gen6_clip_state.c | 17 +

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-27 Thread Ian Romanick
On 09/26/2011 03:05 PM, Eric Anholt wrote: On Mon, 26 Sep 2011 11:38:10 -0400, Matt Turner wrote: On Mon, Sep 26, 2011 at 11:29 AM, Eric Anholt wrote: On Sun, 25 Sep 2011 15:36:02 -0400, Matt Turner wrote: diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index cfd8926..dd7c68c 1

Re: [Mesa-dev] [PATCH 15/19] i965: Change type of brw_context.primitive from GLenum to hardware primitive

2011-09-27 Thread Chad Versace
On 09/26/2011 12:05 PM, Eric Anholt wrote: On Fri, 23 Sep 2011 17:37:45 -0700, Chad Versace wrote: For example, GL_TRIANLES is converted to _3DPRIM_TRILIST. missing a "G" Thanks. -static const GLenum reduced_prim[GL_POLYGON+1] = { - GL_POINTS, - GL_LINES, - GL_LINES, - GL_LINES,

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Kenneth Graunke
On 09/27/2011 08:42 AM, Chad Versace wrote: On 09/26/2011 01:57 PM, Brian Paul wrote: On 09/26/2011 02:50 PM, Chad Versace wrote: [idr and kwg, I see your point. I've removed the overrides for GLES1 and GLES2.] It is necessary to manually set the GL version to 3.0 in order to run Piglit test

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Ian Romanick
On 09/26/2011 01:50 PM, Chad Versace wrote: [idr and kwg, I see your point. I've removed the overrides for GLES1 and GLES2.] It is necessary to manually set the GL version to 3.0 in order to run Piglit tests using glGetUniform*(). This patch allows one to override the version of the OpenGL cont

Re: [Mesa-dev] [PATCH 10/19] intel: Add function intel_renderbuffer_hiz_alloc

2011-09-27 Thread Chad Versace
On 09/26/2011 02:19 PM, Eric Anholt wrote: On Fri, 23 Sep 2011 17:37:40 -0700, Chad Versace wrote: This function allocates the HiZ region and initializes the HiZ control state for a depthbuffer. It is wise to define the logic for HiZ region allocation in a single location, since when MSAA arri

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Chad Versace
On 09/26/2011 01:57 PM, Brian Paul wrote: On 09/26/2011 02:50 PM, Chad Versace wrote: [idr and kwg, I see your point. I've removed the overrides for GLES1 and GLES2.] It is necessary to manually set the GL version to 3.0 in order to run Piglit tests using glGetUniform*(). This patch allows o

Re: [Mesa-dev] [PATCH 1/7] i965: Use 4 bits to store nr_userclip in brw_clip.h.

2011-09-27 Thread Paul Berry
On 26 September 2011 15:09, Kenneth Graunke wrote: > On 09/25/2011 09:21 AM, Paul Berry wrote: > > Since the i965 driver supports 8 clipping planes now, we need 4 bits > > to store the number of user clipping planes, not 3. > > > > In theory this isn't strictly necessary, since brw_clip.h is only

Re: [Mesa-dev] Reminder: FOSDEM2012 speakers due Okt 1st.

2011-09-27 Thread Luc Verhaegen
On Mon, Sep 26, 2011 at 06:51:39PM +0200, Daniel Vetter wrote: > On Mon, Sep 26, 2011 at 07:21:42AM +0200, Luc Verhaegen wrote: > > As stated in an email sent a week and a half ago, i need 6 "we will be > > there nomatter what" speakers for FOSDEM this year before i go and talk > > to the FOSDEM o

[Mesa-dev] [PATCH] gallium: move border color to be a color union

2011-09-27 Thread Dave Airlie
From: Dave Airlie EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. Signed-off-by: Dave Airlie --- src/gallium/auxiliary/draw/draw_llvm.c |2 +- src/gallium/auxiliary/util/u_dump_state.c

Re: [Mesa-dev] Help for a beginner

2011-09-27 Thread Romain Failliot
Hi Eric, I tried to email you to have more information about the VS5 task (dead code elimination), but your email address on your page (http://dri.freedesktop.org/wiki/EricAnholt) was wrong :/ > I'd definitely recommend working on a texturing format extension for > your hardware as a great way to