Re: [Mesa-dev] [PATCH] dri2: add code to flush function of DRI2_Flush extension

2011-08-15 Thread Michel Dänzer
On Mon, 2011-08-15 at 19:32 +0800, Cooper Yuan wrote: > Hi All, please review this changelist that's going to enable > eglWaitClient() which has the same effect with glFinish according to > specification. > before, egl applications using pixmap or pbuffer flicker always > because of no flush. >

[Mesa-dev] [PATCH 3/3] glapi: Build libmesa_glapi on Android

2011-08-15 Thread Chad Versace
The libmesa_glapi.so on Android is analogous to the libglapi.so on Linux. libmesa_glapi uses the shared glapi. The libname is libmesa_glapi, rather than libglapi, due to conventions of the Android build system. Names of intermediate libraries should be prefixed by the project name in order to prev

[Mesa-dev] [PATCH 2/3] mapi: Add -o option to mapi_abi.py

2011-08-15 Thread Chad Versace
The -o option specifies the output file. If not specifified, output is printed to stdout. This is to pacify the Android build system, whose built-in rules for generated files become grumpy when shell redirection is used. Note: This is in preparation for porting i965 to Android. CC: Chia-I Wu , Si

[Mesa-dev] [PATCH 1/3] mesa: Add toplevel Android.mk

2011-08-15 Thread Chad Versace
This is the first step in porting libGLES* and libEGL to Android. The toplevel makefile doesn't build anything yet; it just defines common variables. Also, in order to prevent cluttering of Mesa's toplevel directory, create the 'android' directory into which auxillary files needed by the Android

[Mesa-dev] [PATCH 0/3] Build libglapi on Android

2011-08-15 Thread Chad Versace
This is the first step in porting i965 to Android, initially to Gingerbread. Android is ubiquituous now, and the platform's importance can't be denied. The Intel drivers really should support it. The patch series just builds libglapi. After this series undergoes review, I will then post a patch s

[Mesa-dev] [PATCH] i965/fs: Fix 32-bit integer multiplication.

2011-08-15 Thread Eric Anholt
The MUL opcode does a 16bit * 32bit multiply, and we need to do the MACH to get the top 16bit * 32bit added in. Fixes fs-op-mult-int-*, fs-op-mult-ivec* --- src/mesa/drivers/dri/i965/brw_fs_emit.cpp|5 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 18 +- 2 files c

Re: [Mesa-dev] hardware xvmc video decoding with nouveau

2011-08-15 Thread Younes Manton
Hi, I tried to give some thought to how this interface would work for decoders that can't or would prefer not to support multiple decode buffers, and most of the scenarios I came up with seem to work out, so overall I'm not opposed to it. Even though I still think this can be done by each driver w

Re: [Mesa-dev] [PATCH] mesa: Remove use of fpu_control.h

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 16:55:45 -0700, Chad Versace wrote: > Remove the inclusion of fpu_control.h from compiler.h. Since Bionic lacks > fpu_control.h, this fixes the Android build. > > Also remove the sole use of the fpu_control bits, which was in debug.c. > Those were brianp's debug bits, and he

Re: [Mesa-dev] [PATCH 18/37] mesa: Convert texstore.c to accessing textures using MapTextureImage.

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/15/2011 11:53 AM, Eric Anholt wrote: > From: Brian Paul > > This continues to allocate texImage->Data as before, so > drivers calling these functions need to use that when present. > --- > src/mesa/main/texstore.c | 336 > +++

Re: [Mesa-dev] [PATCH 8/9] mesa: Add partial constant propagation pass for Mesa IR

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 16:17:20 -0700, Ian Romanick wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 08/15/2011 01:44 PM, Eric Anholt wrote: > > On Mon, 15 Aug 2011 12:02:42 -0700, "Ian Romanick" > > wrote: > >> From: Ian Romanick > >> > >> This cleans up some code generated by the

[Mesa-dev] [PATCH] mesa: Remove use of fpu_control.h

2011-08-15 Thread Chad Versace
Remove the inclusion of fpu_control.h from compiler.h. Since Bionic lacks fpu_control.h, this fixes the Android build. Also remove the sole use of the fpu_control bits, which was in debug.c. Those were brianp's debug bits, and he approved of their removal. CC: Eric Anholt CC: Brian Paul Signed

Re: [Mesa-dev] [PATCH] mesa: Do not include fpu_control.h

2011-08-15 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/15/2011 01:58 PM, Brian Paul wrote: > On 08/15/2011 02:54 PM, Eric Anholt wrote: >> On Mon, 15 Aug 2011 11:26:51 -0700, Chad Versace >> wrote: >>> Remove the inclusion of fpu_control.h from compiler.h. Since compiler.h >>> uses no symbol from f

[Mesa-dev] [PATCH] mesa: Add partial constant propagation pass for Mesa IR

2011-08-15 Thread Ian Romanick
From: Ian Romanick This cleans up some code generated by the IR-to-Mesa pass for i915. In particular, some shaders involving arrays of constant matrices result in really bad code. v2: Silence several warnings from merging the gl_constant_value work. Fix DP[23] folding. Add support for a bunch m

Re: [Mesa-dev] [PATCH 8/9] mesa: Add partial constant propagation pass for Mesa IR

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/15/2011 01:44 PM, Eric Anholt wrote: > On Mon, 15 Aug 2011 12:02:42 -0700, "Ian Romanick" > wrote: >> From: Ian Romanick >> >> This cleans up some code generated by the IR-to-Mesa pass for i915. >> In particular, some shaders involving arrays

Re: [Mesa-dev] [PATCH 2/2] i965/fs: Don't double-convert integer/boolean uniforms.

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 15:02:32 -0700, Kenneth Graunke wrote: > When ctx->Const.NativeIntegers is set, Core Mesa loads integer/boolean > uniforms directly, rather than loading the floating point equivalent. > So, when that's set, we don't need to perform any conversions. > > Unfortunately, we can't

Re: [Mesa-dev] [PATCH 1/2] mesa, glsl_to_tgsi: Add new gl_context::NativeIntegers flag.

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 15:02:31 -0700, Kenneth Graunke wrote: > Previously, native integer support was based on whether the driver > advertised GLSL 1.30 or not. However, drivers that natively support > integers may wish to do so for older GLSL versions as well. Adding this > new opt-in flag allow

Re: [Mesa-dev] [PATCH 05/37] meta: added _mesa_meta_decompress_texture_image()

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 16:05:51 -0600, Brian Paul wrote: > On Mon, Aug 15, 2011 at 3:43 PM, Ian Romanick wrote: > >> +   /* Create/bind FBO/renderbuffer */ > >> +   if (decompress->FBO == 0) { > >> +      _mesa_GenFramebuffersEXT(1, &decompress->FBO); > >> +      _mesa_GenRenderbuffersEXT(1, &decomp

Re: [Mesa-dev] [PATCH 05/37] meta: added _mesa_meta_decompress_texture_image()

2011-08-15 Thread Brian Paul
On Mon, Aug 15, 2011 at 3:43 PM, Ian Romanick wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 08/15/2011 11:53 AM, Eric Anholt wrote: >> From: Brian Paul >> >> Decompress a texture by drawing quad with the texture. >> --- >>  src/mesa/drivers/common/meta.c |  200 >> +

[Mesa-dev] [PATCH 2/2] i965/fs: Don't double-convert integer/boolean uniforms.

2011-08-15 Thread Kenneth Graunke
When ctx->Const.NativeIntegers is set, Core Mesa loads integer/boolean uniforms directly, rather than loading the floating point equivalent. So, when that's set, we don't need to perform any conversions. Unfortunately, we can't properly support native integers until the new vertex shader backend l

[Mesa-dev] [PATCH 1/2] mesa, glsl_to_tgsi: Add new gl_context::NativeIntegers flag.

2011-08-15 Thread Kenneth Graunke
Previously, native integer support was based on whether the driver advertised GLSL 1.30 or not. However, drivers that natively support integers may wish to do so for older GLSL versions as well. Adding this new opt-in flag allows them to do so. Currently disabled by default on all drivers, which

Re: [Mesa-dev] [PATCH 01/37] mesa: add gl_texture_image::Face, Level fields

2011-08-15 Thread Brian Paul
On Mon, Aug 15, 2011 at 3:43 PM, Ian Romanick wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > This series is huge, so I'm going to review it in batches.  I've > reviewed 01/37 through 10/37, inclusive.  I'm sending replies with > comments to 01/37 and 05/37.  The rest look good and ge

Re: [Mesa-dev] [PATCH 05/37] meta: added _mesa_meta_decompress_texture_image()

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/15/2011 11:53 AM, Eric Anholt wrote: > From: Brian Paul > > Decompress a texture by drawing quad with the texture. > --- > src/mesa/drivers/common/meta.c | 200 > > src/mesa/drivers/common/meta.h |

Re: [Mesa-dev] [PATCH 01/37] mesa: add gl_texture_image::Face, Level fields

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This series is huge, so I'm going to review it in batches. I've reviewed 01/37 through 10/37, inclusive. I'm sending replies with comments to 01/37 and 05/37. The rest look good and get my R-b. On 08/15/2011 11:53 AM, Eric Anholt wrote: > From: Bri

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Dan McCabe
On 08/15/2011 10:45 AM, Paul Berry wrote: On 15 August 2011 10:11, Dan McCabe wrote: You might also want to consider implementing quotient = int((float(x) + 0.5 * float(y)) * reciprocal(float(y))); This rounds the result to the nearest integer rather then flooring the result and is arguabl

Re: [Mesa-dev] [PATCH 4/4] i965/fs: Use proper register type for MATH instruction GRF temporaries.

2011-08-15 Thread Eric Anholt
On Thu, 11 Aug 2011 17:38:38 -0700, Kenneth Graunke wrote: > The MATH instruction unfortunately only operates on GRF registers with > an HStride of 1, so we often need to create a temporary GRF. For > integer division and modulus, we need to use an integer register. > > Signed-off-by: Kenneth G

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Implement integer quotient and remainder math operations.

2011-08-15 Thread Eric Anholt
On Thu, 11 Aug 2011 17:38:37 -0700, Kenneth Graunke wrote: > Prior to this patch, POW was the only two-operand math operation, so a > few cases needed to be updated. > > Signed-off-by: Kenneth Graunke > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp > b/src/mesa/dr

Re: [Mesa-dev] [PATCH] mesa: Do not include fpu_control.h

2011-08-15 Thread Brian Paul
On 08/15/2011 02:54 PM, Eric Anholt wrote: On Mon, 15 Aug 2011 11:26:51 -0700, Chad Versace wrote: Remove the inclusion of fpu_control.h from compiler.h. Since compiler.h uses no symbol from fpu_control.h, the removal is safe. Since Bionic lacks fpu_control.h, its inclusion breaks the Android

Re: [Mesa-dev] [PATCH] mesa: Do not include fpu_control.h

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 11:26:51 -0700, Chad Versace wrote: > Remove the inclusion of fpu_control.h from compiler.h. Since compiler.h > uses no symbol from fpu_control.h, the removal is safe. > > Since Bionic lacks fpu_control.h, its inclusion breaks the Android build. I think this means that the o

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

2011-08-15 Thread Kenneth Graunke
On 08/15/2011 01:41 PM, Kenneth Graunke wrote: > The new repo is up now (thanks Eric!): > git://git.freedesktop.org/git/mesa/glw Apparently what I meant to say was: git://anongit.freedesktop.org/mesa/glw ___ mesa-dev mailing list mesa-dev@lists.freedesk

Re: [Mesa-dev] [PATCH 1/9] ir_to_mesa: Implement ir_unop_logic_not using 1-x

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 12:02:35 -0700, "Ian Romanick" wrote: > From: Ian Romanick > > Since our logic values are 0.0 (false) and 1.0 (true), 1.0 - x > accurately implements logical not. This series is: Reviewed-by: Eric Anholt except for the one patch with comments. pgpa2jWy0wGYQ.pgp Descript

Re: [Mesa-dev] [PATCH 8/9] mesa: Add partial constant propagation pass for Mesa IR

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 12:02:42 -0700, "Ian Romanick" wrote: > From: Ian Romanick > > This cleans up some code generated by the IR-to-Mesa pass for i915. > In particular, some shaders involving arrays of constant matrices > result in really bad code. I'm curious what sort of constructs led to this

[Mesa-dev] [PATCH] Implementing varying packing

2011-08-15 Thread Vincent Lejeune
This optimisation pass will look for and pack together float, vec2, vec3 varyings in fragment shaders and transform the vertex shader accordingly. It might improve performance depending on the hardware. --- src/glsl/Makefile |1 + src/glsl/SConscript|1 + src/glsl/linker.c

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

2011-08-15 Thread Kenneth Graunke
On 08/08/2011 08:04 AM, Brian Paul wrote: > On 08/05/2011 06:21 PM, Kenneth Graunke wrote: >> 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

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Don't convert float/int/bool uniforms for GLSL 1.30.

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/11/2011 05:38 PM, Kenneth Graunke wrote: > Core Mesa now loads float/integer/boolean uniform data for drivers that > claim to support GLSL 1.30, thanks to Bryan Cain's recent work. When we > run in "1.30 mode," we need to avoid double conversion

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/12/2011 10:38 AM, Paul Berry wrote: > This patch fixes a bug when lowering an integer division: > > x/y > > to a multiplication by a reciprocal: > > int(float(x)*reciprocal(float(y))) > > If x was a a plain int and y was an ivecN, the low

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

2011-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/05/2011 05:16 PM, Paul Berry wrote: > 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 >

Re: [Mesa-dev] [RFC PATCH 1/2] i965: Implement the actual tables for texture alignment units.

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 12:21:06 -0700, Kenneth Graunke wrote: > I implemented functions for horizontal/vertical alignment units separately > because I find it easier to read that way...especially with all the > corner-cases. > > Regresses piglit test "fbo-generatemipmap-formats GL_ARB_depth_texture

[Mesa-dev] [PATCH 2/2] i965: Use proper texture alignment units for cubemaps on Gen5+.

2011-08-15 Thread Kenneth Graunke
While align_h is normally 2, it isn't always. In particular, for S3TC textures, it needs to be 4. intel_vertical_texture_alignment_unit exists to implement the sundry rules surrounding alignment units, so we ought to use it. Fixes skybox errors in Quake 4. Bugzilla: https://bugs.freedesktop.org

[Mesa-dev] [RFC PATCH 1/2] i965: Implement the actual tables for texture alignment units.

2011-08-15 Thread Kenneth Graunke
I implemented functions for horizontal/vertical alignment units separately because I find it easier to read that way...especially with all the corner-cases. Regresses piglit test "fbo-generatemipmap-formats GL_ARB_depth_texture" on Sandybridge: the 1x1 quad is 0.0 rather than 0.5. This is caused

[Mesa-dev] [PATCH 9/9] mesa: Bump instruction execution limit to 65536

2011-08-15 Thread Ian Romanick
From: Ian Romanick Shader Model 3.0[1] requires that shaders be able to execute at least 65536 instructions. Bump Mesa maxExec to that limit. This allows several vertex shaders in the OpenGL ES 2.0 conformance test suite to run to completion. 1: http://en.wikipedia.org/wiki/High_Level_Shader_L

[Mesa-dev] [PATCH 8/9] mesa: Add partial constant propagation pass for Mesa IR

2011-08-15 Thread Ian Romanick
From: Ian Romanick This cleans up some code generated by the IR-to-Mesa pass for i915. In particular, some shaders involving arrays of constant matrices result in really bad code. --- src/mesa/SConscript |1 + src/mesa/program/prog_opt_constant_fold.c | 243 +++

[Mesa-dev] [PATCH 7/9] ir_to_mesa: Emit a MAD(b, -a, b) for !a && b

2011-08-15 Thread Ian Romanick
From: Ian Romanick !a && b occurs frequently when nexted if-statements have been flattened. It should also be possible use a MAD for (a && b) || c, though that would require a MAD_SAT. --- src/mesa/program/ir_to_mesa.cpp | 52 +++ 1 files changed, 52 insert

[Mesa-dev] [PATCH 6/9] ir_to_mesa: Implement ir_binop_all_equal using DP4 w/SGE

2011-08-15 Thread Ian Romanick
From: Ian Romanick The operation ir_binop_all_equal is !(a.x != b.x || a.y != b.y || a.z != b.z || a.w != b.w). Logical-or is implemented using addition (followed by clampling to [0,1]) on values of 0.0 and 1.0. Replacing the logical-or operators with addition gives !bool((int(a.x != b.x) + int

[Mesa-dev] [PATCH 5/9] ir_to_mesa: Implement ir_binop_any_nequal using DP4 w/saturate or DP4 w/SLT

2011-08-15 Thread Ian Romanick
From: Ian Romanick The operation ir_binop_any_nequal is (a.x != b.x) || (a.y != b.y) || (a.z != b.z) || (a.w != b.w), and that is the same as any(bvec4(a.x != b.x, a.y != b.y, a.z != b.z, a.w != b.w)). Implement the any() part the same way the regular ir_unop_any is implemented. --- src/mesa/pr

[Mesa-dev] [PATCH 4/9] ir_to_mesa: Implement ir_unop_any using DP4 w/saturate or DP4 w/SLT

2011-08-15 Thread Ian Romanick
From: Ian Romanick This is just like the ir_binop_logic_or case. The operation ir_unop_any is (a.x || a.y || a.z || a.w). Logical-or is implemented using addition (followed by clampling to [0,1]) on values of 0.0 and 1.0. Replacing the logical-or operators with addition gives (a.x + a.y + a.z

[Mesa-dev] [PATCH 3/9] ir_to_mesa: Make ir_to_mesa_visitor::emit_dp return the instruction

2011-08-15 Thread Ian Romanick
From: Ian Romanick --- src/mesa/program/ir_to_mesa.cpp | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 5442976..3d5ba5b 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/progra

[Mesa-dev] [PATCH 2/9] ir_to_mesa: Implement ir_binop_logic_or using an add w/saturate or add w/SLT

2011-08-15 Thread Ian Romanick
From: Ian Romanick Logical-or is implemented using addition (followed by clampling to [0,1]) on values of 0.0 and 1.0. Replacing the logical-or operators with addition gives a + b which has a result on the range [0, 2]. Previously a SNE instruction was used to clamp the resulting logic value to

[Mesa-dev] [PATCH 1/9] ir_to_mesa: Implement ir_unop_logic_not using 1-x

2011-08-15 Thread Ian Romanick
From: Ian Romanick Since our logic values are 0.0 (false) and 1.0 (true), 1.0 - x accurately implements logical not. --- src/mesa/program/ir_to_mesa.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.c

[Mesa-dev] [PATCH 25/37] mesa: Switch ycbcr glGetTexImage() to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index a4e466c..aeff0da 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c

[Mesa-dev] [PATCH 30/37] mesa: Convert depth glGetTexImage() to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c| 22 +++--- src/mesa/state_tracker/st_cb_texture.c |3 ++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index f5278e8..36a3f42 100644 --

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

2011-08-15 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

[Mesa-dev] [PATCH 32/37] state_tracker: Drop custom glGetTexImage() code.

2011-08-15 Thread Eric Anholt
Fixes regressions in compressed texture mipmap generation, which relies on GetTexImage internally. --- src/mesa/state_tracker/st_cb_texture.c | 33 +-- 1 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/s

[Mesa-dev] [PATCH 33/37] intel: Drop our custom glGetTexImage() code.

2011-08-15 Thread Eric Anholt
The mesa core code uses MapTextureImage() like we need now. --- src/mesa/drivers/dri/intel/intel_tex_image.c | 61 -- 1 files changed, 0 insertions(+), 61 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image

[Mesa-dev] [PATCH 34/37] nouveau: Drop mapping we were doing around glGetTexImage().

2011-08-15 Thread Eric Anholt
It's handled by MapTextureImage() now. --- src/mesa/drivers/dri/nouveau/nouveau_texture.c | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index 38b89de..85eac83 1

[Mesa-dev] [PATCH 23/37] mesa: Switch color-index GetTexImage to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c | 21 +++-- 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index da07800..b98d708 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage

[Mesa-dev] [PATCH 29/37] mesa: add new pixel format unpacking functions

2011-08-15 Thread Eric Anholt
From: Brian Paul Our other unpacking code tends to use a datatype/format combo, while these operate on data with a MESA_FORMAT type. Also note that handling any BaseFormat overrides for channels is up to the caller. --- src/mesa/SConscript |1 + src/mesa/main/format_unpack.c | 150

[Mesa-dev] [PATCH 28/37] mesa: Implement glGetTexImage() of compressed textures using the new metaops.

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 9f64b26..f5278e8 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -42,

[Mesa-dev] [PATCH 27/37] state_tracker: Initialize the metaops code so that Mesa core can use it.

2011-08-15 Thread Eric Anholt
--- src/mesa/state_tracker/st_context.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 6d4bc54..e994e2e 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_con

[Mesa-dev] [PATCH 22/37] mesa: Update comments/assertions about buffer mapping for glGetTexImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul This code is about to stop needing ->Data and using MapTextureImage(). --- src/mesa/main/texgetimage.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 4c8a412..da07800 100644 --- a/src

[Mesa-dev] [PATCH 26/37] mesa: Convert depth/stencil glGetTexImage() to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul Note that the implementation before and after appears to be broken in its handling of Z24_S8 vs S8_Z24. --- src/mesa/main/texgetimage.c| 19 ++- src/mesa/state_tracker/st_cb_texture.c | 11 --- 2 files changed, 22 insertions(+), 8 deletion

[Mesa-dev] [PATCH 24/37] mesa: Switch memcpy fast-path of glGetTexImage() to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index b98d708..a4e466c 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetim

[Mesa-dev] [PATCH 20/37] mesa: Convert GetCompressedTexImage to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul This changes drivers to not map the texture on their own before calling _mesa_get_compressed_teximage(). --- src/mesa/drivers/dri/intel/intel_tex_image.c | 47 +++-- src/mesa/drivers/dri/radeon/radeon_tex_getimage.c | 45 src/mesa/dr

[Mesa-dev] [PATCH 19/37] intel: Remove our custom _mesa_store_compressed_texsubimage2d().

2011-08-15 Thread Eric Anholt
Now that Mesa core knows how to map teximages, we no longer needed the compressed paths here. --- src/mesa/drivers/dri/intel/intel_tex_subimage.c | 116 +++ 1 files changed, 33 insertions(+), 83 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/

[Mesa-dev] [PATCH 35/37] radeon: Drop mapping we were doing around glGetTexImage().

2011-08-15 Thread Eric Anholt
It's handled by MapTextureImage() now. --- src/mesa/drivers/dri/r200/Makefile|1 - src/mesa/drivers/dri/r300/Makefile|1 - src/mesa/drivers/dri/r600/Makefile|1 - src/mesa/drivers/dri/radeon/Makefile |1 - src/mesa/driver

[Mesa-dev] [PATCH 18/37] mesa: Convert texstore.c to accessing textures using MapTextureImage.

2011-08-15 Thread Eric Anholt
From: Brian Paul This continues to allocate texImage->Data as before, so drivers calling these functions need to use that when present. --- src/mesa/main/texstore.c | 336 +++--- 1 files changed, 225 insertions(+), 111 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH 15/37] radeon: Refactor the common texture hook setup to common code.

2011-08-15 Thread Eric Anholt
--- src/mesa/drivers/dri/r200/r200_context.h |2 - src/mesa/drivers/dri/r200/r200_tex.c | 41 ++ src/mesa/drivers/dri/r300/r300_tex.c | 28 ++ src/mesa/drivers/dri/r600/evergreen_tex.c| 28 ++ src/mesa/driver

[Mesa-dev] [PATCH 16/37] radeon: Add MapTextureImage() implementation.

2011-08-15 Thread Eric Anholt
--- src/mesa/drivers/dri/radeon/radeon_texture.c | 77 ++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index d9bc1c0..9964663 100644 --- a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 36/37] intel: Rely on Mesa core for the non-blit glTexSubImage* implementation.

2011-08-15 Thread Eric Anholt
It uses MapTextureImage() now, so we don't need our own mapping. --- src/mesa/drivers/dri/intel/intel_tex_subimage.c | 149 ++- 1 files changed, 65 insertions(+), 84 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_

[Mesa-dev] [PATCH 14/37] swrast: Add implementation of MapTextureImage/UnmapTextureImage.

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/drivers/common/driverfuncs.c |2 + src/mesa/sources.mak |1 + src/mesa/swrast/s_texture.c | 109 + src/mesa/swrast/swrast.h | 14 4 files changed, 126 insertions(+), 0 deletions(

[Mesa-dev] [PATCH 31/37] mesa: Finally, convert RGBA glGetTexImage() to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/texgetimage.c| 103 ++-- src/mesa/state_tracker/st_cb_texture.c | 38 2 files changed, 57 insertions(+), 84 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 36a3f4

[Mesa-dev] [PATCH 21/37] mesa: Convert texture debug dump function to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/main/debug.c | 94 ++-- src/mesa/main/debug.h |2 +- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index e7f6be9..4e05a45 100644 --- a/src/mesa/main/de

[Mesa-dev] [PATCH 08/37] radeon: Fix flushing before writing a teximage's BO when !t->bo.

2011-08-15 Thread Eric Anholt
Before, if we ended up here without a BO for our image, but did choose a miptree that had active rendering in the command buffer, our teximage data would jump ahead of the rendering using the old texture contents. This showed up as breakage in gen-teximage and friends in the following commit. ---

[Mesa-dev] [PATCH 17/37] nouveau: Add MapTextureImage() implementation.

2011-08-15 Thread Eric Anholt
This is untested, but should be close to working since it's basically a copy of nouveau_teximage_map(). --- src/mesa/drivers/dri/nouveau/nouveau_texture.c | 81 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c

[Mesa-dev] [PATCH 10/37] swrast: Remove swrast eject/validate texture image code.

2011-08-15 Thread Eric Anholt
From: Brian Paul No driver used the eject function, or set the validate hook that made that function do anything. --- src/mesa/swrast/s_context.c | 79 --- 1 files changed, 0 insertions(+), 79 deletions(-) diff --git a/src/mesa/swrast/s_context.c b/src/

[Mesa-dev] [PATCH 07/37] Rename some driver FreeTextureImageData functions to FreeTextureImageBuffer.

2011-08-15 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex.c |5 +++-- src/mesa/drivers/dri/unichrome/via_tex.c |6 +++--- src/mesa/state_tracker/st_cb_texture.c |4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/int

[Mesa-dev] [PATCH 13/37] intel: Add implementation of MapTextureImage/UnmapTextureImage.

2011-08-15 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex.c | 84 ++ src/mesa/drivers/dri/intel/intel_tex.h |6 ++ src/mesa/drivers/dri/intel/intel_tex_image.c |4 +- 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c

[Mesa-dev] [PATCH 05/37] meta: added _mesa_meta_decompress_texture_image()

2011-08-15 Thread Eric Anholt
From: Brian Paul Decompress a texture by drawing quad with the texture. --- src/mesa/drivers/common/meta.c | 200 src/mesa/drivers/common/meta.h |6 + 2 files changed, 206 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/s

[Mesa-dev] [PATCH 09/37] mesa: Don't check for image->Data when freeing an image's contents.

2011-08-15 Thread Eric Anholt
All driver implementations of FreeTextureImageBuffer already check that Data != NULL and free it. However, this means that we will also free driver storage if the driver storage wasn't in the form of a Data pointer. This was produced by the following semantic patch: @@ expression C; expression T

[Mesa-dev] [PATCH 04/37] meta: move texcoord setup into setup_texture_coords()

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/drivers/common/meta.c | 259 ++-- 1 files changed, 167 insertions(+), 92 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index f9b4755..19eae42 100644 --- a/src/mesa/drivers/common/meta.

[Mesa-dev] [PATCH 12/37] st/mesa: Add implementation of MapTextureImage.

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/state_tracker/st_cb_texture.c | 45 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 098a4d6..e4be7fb 100644 --- a/src/mesa/state

[Mesa-dev] [PATCH 11/37] mesa: Add driver hooks for texture image mapping/unmapping.

2011-08-15 Thread Eric Anholt
From: Brian Paul ctx->Driver.MapTextureImage() / UnmapTextureImage() will be called by the glTex[Sub]Image(), glGetTexImage() functions, etc. when we're accessing texture data, and also for software rendering when accessing texture data. --- src/mesa/main/dd.h | 19 +++ 1 files

[Mesa-dev] [PATCH 03/37] st/mesa: remove st_texture_image::face, level fields

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/state_tracker/st_cb_texture.c | 30 +++--- src/mesa/state_tracker/st_gen_mipmap.c |1 - src/mesa/state_tracker/st_texture.c|4 ++-- src/mesa/state_tracker/st_texture.h|5 - 4 files changed, 17 insertions(+), 23 delet

[Mesa-dev] [PATCH 06/37] mesa: Rename FreeTexImageData to FreeTextureImageBuffer.

2011-08-15 Thread Eric Anholt
This was produced by sed, except for one hunk in driverfuncs.c where trailing whitespace was dropped. --- src/mesa/drivers/common/driverfuncs.c |2 +- src/mesa/drivers/dri/intel/intel_tex.c |2 +- src/mesa/drivers/dri/intel/intel_tex_image.c |2 +- src/mesa/drivers/d

[Mesa-dev] [PATCH 02/37] intel: use new gl_texture_image:Face, Level fields

2011-08-15 Thread Eric Anholt
From: Brian Paul --- src/mesa/drivers/dri/intel/intel_blit.c |4 +- src/mesa/drivers/dri/intel/intel_fbo.c | 12 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |2 +- src/mesa/drivers/dri/intel/intel_tex.c |5 --- src/mesa/drivers/dri/intel/intel

[Mesa-dev] [PATCH 01/37] mesa: add gl_texture_image::Face, Level fields

2011-08-15 Thread Eric Anholt
From: Brian Paul Several drivers have these fields in their subclasses of gl_texture_image. They'll be useful for core Mesa too... --- src/mesa/main/mtypes.h |2 ++ src/mesa/main/teximage.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/mtypes.h b/s

[Mesa-dev] MapTextureImage patch series for review

2011-08-15 Thread Eric Anholt
Here's my "mti-tested" branch of the map-texture-image-v4 work. It's not regressing on intel or softpipe, and in fact fixes a couple of tests now on those. It is not as complete a rework as map-texture-image-v4, but it's quite a bit of the change and it it should be bisectable (I've had to severa

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

2011-08-15 Thread Paul Berry
Have you had a chance to think about any of these issues, Ian? I'd like to commit this patch series to Mesa. On 5 August 2011 17:16, Paul Berry wrote: > On 2 August 2011 18:27, Ian Romanick wrote: >>> +       * >>> +       * Also, perform implicit conversion of arguments.  Note: to >>> +      

[Mesa-dev] [PATCH] mesa: Do not include fpu_control.h

2011-08-15 Thread Chad Versace
Remove the inclusion of fpu_control.h from compiler.h. Since compiler.h uses no symbol from fpu_control.h, the removal is safe. Since Bionic lacks fpu_control.h, its inclusion breaks the Android build. Signed-off-by: Chad Versace --- src/mesa/main/compiler.h |3 --- 1 files changed, 0 inse

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Paul Berry
On 15 August 2011 10:11, Dan McCabe wrote: > > You might also want to consider implementing >    quotient = int((float(x) + 0.5 * float(y)) * reciprocal(float(y))); > > This rounds the result to the nearest integer rather then flooring the > result and is arguably faster (assuming that common sube

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Dan McCabe
On 08/15/2011 09:48 AM, Paul Berry wrote: On 15 August 2011 08:50, Jose Fonseca wrote: In places you don't have native int division support, you could use one Newton-Raphson iteration step for almost accurate results, assuggested accuracy of SSE2's RCPPS instructions. See for reference the fo

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Paul Berry
On 15 August 2011 08:50, Jose Fonseca wrote: > > In places you don't have native int division support, you could use one > Newton-Raphson iteration step for almost accurate results, assuggested > accuracy of SSE2's RCPPS instructions. See for reference the following > llvmpipe comment: > >  /**

[Mesa-dev] [PATCH] Implementing varying packing

2011-08-15 Thread vlj
From: Vincent Lejeune This optimisation pass will look for and pack together float, vec2, vec3 varyings in fragment shaders and transform the vertex shader accordingly. It might improve performance depending on the hardware. --- src/glsl/Makefile |1 + src/glsl/SConscript|

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Jose Fonseca
- Original Message - > On 13 August 2011 09:58, Kenneth Graunke > wrote: > > On 08/12/2011 10:38 AM, Paul Berry wrote: > >> > >> This patch fixes a bug when lowering an integer division: > >> > >>   x/y > >> > >> to a multiplication by a reciprocal: > >> > >>   int(float(x)*reciprocal(fl

Re: [Mesa-dev] [PATCH] glsl: Fix type error when lowering integer divisions

2011-08-15 Thread Paul Berry
On 13 August 2011 09:58, Kenneth Graunke wrote: > On 08/12/2011 10:38 AM, Paul Berry wrote: >> >> This patch fixes a bug when lowering an integer division: >> >>   x/y >> >> to a multiplication by a reciprocal: >> >>   int(float(x)*reciprocal(float(y))) >> >> If x was a a plain int and y was an iv

Re: [Mesa-dev] GPL'd vl_mpeg12_bitstream.c

2011-08-15 Thread Jose Fonseca
- Original Message - > 2011/8/12 Christian König : > > Am Freitag, den 12.08.2011, 10:49 -0400 schrieb Younes Manton: > >> Sorry, by incompatible I didn't mean that you couldn't use them > >> together, but that one is more restrictive than the other. Like > >> the > >> discussion you quot

[Mesa-dev] [PATCH] dri2: add code to flush function of DRI2_Flush extension

2011-08-15 Thread Cooper Yuan
Hi All, please review this changelist that's going to enable eglWaitClient() which has the same effect with glFinish according to specification. before, egl applications using pixmap or pbuffer flicker always because of no flush. Cooper --- src/gallium/state_trackers/dri/drm/dri2.c |4 1

Re: [Mesa-dev] Mesa (master): egl: Native Display autodetection

2011-08-15 Thread Benjamin Franzke
2011/8/15 Cooper Yuan : > so, export EGL_PLATFORM=drm, is still working, right? Yes, and has a higher priority than the autodetection. > > On Mon, Aug 15, 2011 at 3:47 PM, Benjamin Franzke > wrote: >> >> Module: Mesa >> Branch: master >> Commit: 85fe9484945cb57ffd49df248b0e5057eba6af04 >> URL: >>

Re: [Mesa-dev] [PATCH] dri2: Add __DRI_BUFFER_COUNT token

2011-08-15 Thread Michel Dänzer
On Mon, 2011-08-15 at 09:57 +0200, Benjamin Franzke wrote: > Remove definition from egl_dri2. > Defining this is egl_dri2.h breaks as soon as > a new dri2 buffer token is added like with commit > 4501a5d6e8d00fd0d87625352ed5ba1a8861f72e. > --- > include/GL/internal/dri_interface.h |1 + > src

Re: [Mesa-dev] Mesa (master): egl: Native Display autodetection

2011-08-15 Thread Cooper Yuan
so, export EGL_PLATFORM=drm, is still working, right? On Mon, Aug 15, 2011 at 3:47 PM, Benjamin Franzke < b...@kemper.freedesktop.org> wrote: > Module: Mesa > Branch: master > Commit: 85fe9484945cb57ffd49df248b0e5057eba6af04 > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=85fe9484945cb5

[Mesa-dev] [PATCH] dri2: Add __DRI_BUFFER_COUNT token

2011-08-15 Thread Benjamin Franzke
Remove definition from egl_dri2. Defining this is egl_dri2.h breaks as soon as a new dri2 buffer token is added like with commit 4501a5d6e8d00fd0d87625352ed5ba1a8861f72e. --- include/GL/internal/dri_interface.h |1 + src/egl/drivers/dri2/egl_dri2.h |2 -- 2 files changed, 1 insertions(

  1   2   >