[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

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:

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 +

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

2011-08-15 Thread Benjamin Franzke
2011/8/15 Cooper Yuan coopery...@gmail.com: 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 b...@kemper.freedesktop.org wrote: Module: Mesa Branch: master Commit:

[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

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

2011-08-15 Thread Jose Fonseca
- Original Message - 2011/8/12 Christian König deathsim...@vodafone.de: 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

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 kenn...@whitecape.org 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

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 kenn...@whitecape.org 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:  

[Mesa-dev] [PATCH] Implementing varying packing

2011-08-15 Thread vlj
From: Vincent Lejeune v...@ovi.com 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 +

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 jfons...@vmware.com 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

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 zen3d.li...@gmail.com 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

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 stereotype...@gmail.com wrote: On 2 August 2011 18:27, Ian Romanick i...@freedesktop.org wrote: +       * +       * Also, perform implicit conversion

[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 several

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

[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 +-

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 ---

[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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

[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

[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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

[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

[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 21/37] mesa: Convert texture debug dump function to using MapTextureImage().

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 ---

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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

[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

[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 ---

[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 ++

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

[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 -

[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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 +++

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

[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 +++

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 +++

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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 +

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 +++

[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

[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

[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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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

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

2011-08-15 Thread Eric Anholt
From: Brian Paul bri...@vmware.com --- 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 +++

[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 ian.d.roman...@intel.com 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

[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 ian.d.roman...@intel.com 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

[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 ian.d.roman...@intel.com --- 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 ---

[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 ian.d.roman...@intel.com 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

[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 ian.d.roman...@intel.com 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

[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 ian.d.roman...@intel.com !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

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

2011-08-15 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com 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 +

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

2011-08-15 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com 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:

[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

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 kenn...@whitecape.org 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

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 i...@freedesktop.org wrote: + * + * Also, perform implicit conversion of arguments. Note: to + * implicitly convert out parameters, we need to place

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 lowering

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 conversions.

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 Graunkekenn...@whitecape.org wrote: Hey, I'd like to remove libGLw from the main Mesa repository. It never changes,

[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 +

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 i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com 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

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 i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com 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 e...@anholt.net except for the

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

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 c...@chad-versace.us 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

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 Versacec...@chad-versace.us 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

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 kenn...@whitecape.org 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 kenn...@whitecape.org diff --git

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 kenn...@whitecape.org 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.

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 McCabezen3d.li...@gmail.com 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

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:

[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,

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 kenn...@whitecape.org 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

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 kenn...@whitecape.org 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.

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 i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com This cleans up some code generated by the IR-to-Mesa pass for i915. In

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 Versacec...@chad-versace.us wrote: Remove the inclusion of fpu_control.h from compiler.h. Since compiler.h uses no

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 i...@freedesktop.org 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 i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com

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 bri...@vmware.com 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] mesa: Remove use of fpu_control.h

2011-08-15 Thread Eric Anholt
On Mon, 15 Aug 2011 16:55:45 -0700, Chad Versace c...@chad-versace.us 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

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