[Mesa-dev] [PULL demos] eglut: Add wayland support

2012-05-02 Thread zhiwen . wu
The following changes since commit ebe0ddf657903bef32a161dc66254fbf8725f986: util: add gl_wrap.h and glu_wrap.h to libutil_la_SOURCES (2012-04-23 08:21:43 -0600) Alex Wu (2): eglut: Add wayland support opengles2: Add es2gears_wayland target configure.ac | 14

[Mesa-dev] [PATCH demos 1/2] eglut: Add wayland support

2012-05-02 Thread zhiwen . wu
From: Alex Wu zhiwen...@linux.intel.com This patch adds wayland support for eglut, so that the demos based on eglut can run on wayland platform. --- configure.ac | 14 src/egl/eglut/Makefile.am | 15 - src/egl/eglut/eglut_wayland.c | 135

[Mesa-dev] [PATCH demos 2/2] opengles2: Add es2gears_wayland target

2012-05-02 Thread zhiwen . wu
From: Alex Wu zhiwen...@linux.intel.com Since we already have wayland support in eglut, add a target for es2geares_wayland. --- src/egl/opengles2/Makefile.am |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/egl/opengles2/Makefile.am

[Mesa-dev] [PATCH] mesa/main: Add primitive restart support to glArrayElement

2012-05-02 Thread Jordan Justen
When primitive restart is enabled, and glArrayElement is called with the restart index value, then call glPrimitiveRestartNV. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com Reviewed-by: Brian Paul bri...@vmware.com ---

[Mesa-dev] [PATCH] i965: fix wrong cube/3D texture layout

2012-05-02 Thread Yuanhan Liu
Fix wrong cube/3D texture layout for the tailing levels whose width or height is smaller than the align unit. From 965 B-spec http://intellinuxgraphics.org/VOL_1_graphics_core.pdf at page 135: All of the LOD=0 q-planes are stacked vertically, then below that, the LOD=1 qplanes are stacked

Re: [Mesa-dev] [PULL demos] eglut: Add wayland support

2012-05-02 Thread Kristian Høgsberg
On Wed, May 02, 2012 at 02:52:03PM +0800, zhiwen...@linux.intel.com wrote: The following changes since commit ebe0ddf657903bef32a161dc66254fbf8725f986: util: add gl_wrap.h and glu_wrap.h to libutil_la_SOURCES (2012-04-23 08:21:43 -0600) Thanks, that's a good start. There are still a few

Re: [Mesa-dev] [PATCH 1/4 v2] glsl: consolidate code

2012-05-02 Thread Brian Paul
On 05/01/2012 05:04 PM, nobled wrote: And lay the groundwork for GL_ARB_debug_output. --- src/glsl/glsl_parser_extras.cpp | 33 +++-- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp

Re: [Mesa-dev] [PATCH 2/4 v2] mesa: add _mesa_shader_debug()

2012-05-02 Thread Brian Paul
On 05/01/2012 05:04 PM, nobled wrote: This should be the one entrypoint libglsl needs for GL_ARB_debug_output. --- src/mesa/main/errors.c | 34 ++ src/mesa/main/errors.h |4 2 files changed, 38 insertions(+), 0 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 3/4 resend] glsl: add gl_context member

2012-05-02 Thread Brian Paul
On 05/01/2012 05:04 PM, nobled wrote: --- src/glsl/glsl_parser_extras.cpp |3 ++- src/glsl/glsl_parser_extras.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 6a4ab4a..3d99cc5 100644 ---

Re: [Mesa-dev] [PATCH] mesa/main: Add primitive restart support to glArrayElement

2012-05-02 Thread Brian Paul
On 05/02/2012 01:12 AM, Jordan Justen wrote: When primitive restart is enabled, and glArrayElement is called with the restart index value, then call glPrimitiveRestartNV. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Jordan Justenjordan.l.jus...@intel.com Reviewed-by: Brian

[Mesa-dev] [PATCH 1/6] dri: add driWarnImmutableTexture()

2012-05-02 Thread nobled
This warns about trying to respecify a texture marked immutable by GL_ARB_texture_storage. --- src/mesa/drivers/dri/common/dri_util.c | 14 ++ src/mesa/drivers/dri/common/dri_util.h |3 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git

[Mesa-dev] [PATCH 2/6] swrast: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/swrast/swrast.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 22d71bf..70bbcb8 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++

[Mesa-dev] [PATCH 3/6] intel: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/intel/intel_tex_image.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 094d3cd..264cfc1 100644 ---

[Mesa-dev] [PATCH 4/6] nouveau_vieux: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/nouveau/nouveau_texture.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c index a2e96aa..8954666 100644 ---

[Mesa-dev] [PATCH 5/6] radeon: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/drivers/dri/radeon/radeon_texstate.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index 87f12d5..932b706 100644 ---

[Mesa-dev] [PATCH 6/6] st/mesa: don't modify immutable textures

2012-05-02 Thread nobled
--- src/mesa/state_tracker/st_manager.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index d54b7ed..5a1fb73 100644 --- a/src/mesa/state_tracker/st_manager.c +++

[Mesa-dev] build error in mesa out-of-tree-builds with wayland support

2012-05-02 Thread Sven Joachim
I'm seeing the following error when building Mesa git master out-of-tree with wayland support: , | Making all in dri2 | make[5]: Entering directory `/usr/local/src/deb-src/mesa/mesa/build/dri/src/egl/drivers/dri2' | CC egl_dri2.lo | In file included from egl_dri2.h:40:0, |

[Mesa-dev] [PATCH] dri2proto: Fix documented opcodes

2012-05-02 Thread Chad Versace
Fix the documented opcodes in dri2proto.txt to be consistent with the actual opcode values in dri2proto.h and in xcb/proto:src/dri2.xml. (It looks like the opcodes were incorrect due to copy-paste errors). CC: Kristian Høgsberg k...@bitplanet.net Signed-off-by: Chad Versace

[Mesa-dev] [PATCH] gbm: Add gbm_bo_write entry point

2012-05-02 Thread Kristian Høgsberg
This new gbm entry point allows writing data into a gbm bo. The bo has to be created with the GBM_BO_USE_WRITE flag, and it's only required to work for GBM_BO_USE_CURSOR_64X64 bos. The gbm API is designed to be the glue layer between EGL and KMS, but there was never a mechanism initialize a

Re: [Mesa-dev] [PATCH] dri2proto: Fix documented opcodes

2012-05-02 Thread Kristian Høgsberg
On Wed, May 2, 2012 at 3:03 PM, Chad Versace chad.vers...@linux.intel.com wrote: Fix the documented opcodes in dri2proto.txt to be consistent with the actual opcode values in dri2proto.h and in xcb/proto:src/dri2.xml. (It looks like the opcodes were incorrect due to copy-paste errors). Looks

[Mesa-dev] [PATCH 00/10] i965/gen6: Begin implementing MSAA.

2012-05-02 Thread Paul Berry
This patch series provides preliminary support for MSAA (multisample antialiasing) in i965/gen6. The key difficulty in implementing MSAA is that we have to allow the user to blit between arbitrary combinations of MSAA and non-MSAA renderbuffers. In particular, we need to be able to blit from an

[Mesa-dev] [PATCH 02/10] intel: Work around differences between C and C++ scoping rules.

2012-05-02 Thread Paul Berry
In C++, if a struct is defined inside another struct, or its name is first seen inside a struct or function, the struct is nested inside the namespace of the struct or function it appears in. In C, all structs are visible from toplevel. This patch explicitly moves the decalartions of

[Mesa-dev] [PATCH 03/10] i965/hiz: Make void pointer type casts explicit

2012-05-02 Thread Paul Berry
Previous to this patch, gen6_hiz.c contained two implicit type casts from void * to a a non-void pointer type. This is allowed in C but not in C++. This patch makes the type casts explicit, so that gen6_hiz.c can be converted into a C++ file. --- src/mesa/drivers/dri/i965/gen6_hiz.c | 12

[Mesa-dev] [PATCH 04/10] i965/hiz: Convert gen{6,7}_hiz.c to C++

2012-05-02 Thread Paul Berry
This patch converts the files gen6_hiz.c and gen7_hiz.c to C++, in preparation for expanding the HiZ code to support arbitrary blits. The new files are called gen6_blorp.cpp and gen7_blorp.cpp to reflect the expanded role that this code will serve--blorp stands for BLit Or Resolve Pass. ---

[Mesa-dev] [PATCH 05/10] i965/hiz: Convert gen{6, 7}_hiz.h to gen{6, 7}_blorp.h

2012-05-02 Thread Paul Berry
This patch renames the gen6_hiz.h and gen7_hiz.h files to correspond to the renames of the corresponding .cpp files (see previous commit). --- src/mesa/drivers/dri/i965/brw_vtbl.c |4 ++-- src/mesa/drivers/dri/i965/gen6_blorp.cpp |2 +-

[Mesa-dev] [PATCH 06/10] i965: Parameterize HiZ code to prepare for adding blitting.

2012-05-02 Thread Paul Berry
This patch groups together the parameters used by the HiZ functions into a new data structure, brw_hiz_resolve_params, rather than passing each parameter individually between the HiZ functions. This data structure is a subclass of brw_blorp_params, which represents the parameters of a

[Mesa-dev] [PATCH 07/10] i965: split gen{6,7}_blorp_exec functions into manageable chunks.

2012-05-02 Thread Paul Berry
This patch splits up the gen6_blorp_exec and gen7_blorp_exec functions, which were very long, into simple component functions. With a few exceptions, there is one function per state packet. This will allow blit functionality to be added without significantly complicating the code. ---

[Mesa-dev] [PATCH 1/6] Extend ir_constant::zero to handle more types.

2012-05-02 Thread Olivier Galibert
Signed-off-by: Olivier Galibert galib...@pobox.com --- src/glsl/ir.cpp | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 1ba8751..d0a6d09 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -716,12 +716,27 @@

[Mesa-dev] [PATCH 2/6] Add a variable context to constant_expression_value().

2012-05-02 Thread Olivier Galibert
Signed-off-by: Olivier Galibert galib...@pobox.com --- src/glsl/ast_function.cpp |2 +- src/glsl/ir.h | 31 +++--- src/glsl/ir_constant_expression.cpp | 42 +-- 3 files changed, 44 insertions(+), 31

[Mesa-dev] [PATCH 4/6] Add methods to copy parts of on ir_constant into another.

2012-05-02 Thread Olivier Galibert
- copy_masked_offset copies part of a constant into another, assign-like. - copy_offset copies a constant into (a subset of) another, funcall-return like. These methods are to be used to trace through assignments and function calls when computing a constant expression. Signed-off-by:

[Mesa-dev] [PATCH 5/6] Add an origin pointer in the function signature object to the object with the function body for builtins.

2012-05-02 Thread Olivier Galibert
Signed-off-by: Olivier Galibert galib...@pobox.com --- src/glsl/ir.cpp |1 + src/glsl/ir.h |3 +++ src/glsl/ir_clone.cpp |1 + 3 files changed, 5 insertions(+) diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index a6f1b18..afe1d43 100644 --- a/src/glsl/ir.cpp +++

[Mesa-dev] [PATCH 6/6] Change ir_function_signature::constant_expression_value to run through the function.

2012-05-02 Thread Olivier Galibert
That removes code duplication with ir_expression::constant_expression_value and builtins/ir/*. Signed-off-by: Olivier Galibert galib...@pobox.com --- src/glsl/ir.h | 15 + src/glsl/ir_constant_expression.cpp | 521 ++- 2 files changed, 156

Re: [Mesa-dev] [PATCH 1/6] Scaffolding for ARB_shader_bit_encoding.

2012-05-02 Thread Ian Romanick
On 04/30/2012 04:19 AM, Olivier Galibert wrote: That adds support for activating the extension. It doesn't actually *do* anything yet, of course. Signed-off-by: Olivier Galibertgalib...@pobox.com --- src/glsl/builtins/tools/generate_builtins.py |1 + src/glsl/glcpp/glcpp-parse.y

Re: [Mesa-dev] [PATCH 2/6] New unary opcodes for ARB_shader_bit_encoding support.

2012-05-02 Thread Ian Romanick
On 04/30/2012 01:40 PM, Kenneth Graunke wrote: On 04/30/2012 04:19 AM, Olivier Galibert wrote: The opcodes are bf2u, bf2i, bi2f and bu2f, with b meaning bitwise conversions. Signed-off-by: Olivier Galibertgalib...@pobox.com I can't say I'm crazy about the names bf2u, bf2i, bi2f, and bu2f. It

Re: [Mesa-dev] [PATCH 6/6] Bitwise conversion operator support in the software renderers.

2012-05-02 Thread Ian Romanick
On 04/30/2012 11:24 AM, Eric Anholt wrote: On Mon, 30 Apr 2012 13:19:06 +0200, Olivier Galibertgalib...@pobox.com wrote: TGSI doesn't need an opcode, since registers are untyped (but beware once doubles come into the scene). Mesa needs two because registers are typed float. They're not going

Re: [Mesa-dev] [PATCH 06/10] i965: Parameterize HiZ code to prepare for adding blitting.

2012-05-02 Thread Chris Forbes
+void +brw_blorp_params::exec(struct intel_context *intel) const +{ + switch (intel-gen) { + case 6: + gen6_blorp_exec(intel, this); + break; + case 7: + gen7_blorp_exec(intel, this); + break; + default: + /* BLORP is not supported before Gen7. */ +

Re: [Mesa-dev] [PATCH 1/6] Scaffolding for ARB_shader_bit_encoding.

2012-05-02 Thread Olivier Galibert
On Wed, May 02, 2012 at 02:17:31PM -0700, Ian Romanick wrote: I've been trying to keep this list alphabetized. Ok. + if (ctx-Const.NativeIntegers) { + ctx-Extensions.ARB_shader_bit_encoding = GL_TRUE; + } + Is this actually true? It seems like there's some GL 3.x hardware

Re: [Mesa-dev] [PATCH 1/2] i965: Fix mipmap offsets for HiZ and separate stencil buffers.

2012-05-02 Thread Paul Berry
On 26 April 2012 16:40, Chad Versace chad.vers...@linux.intel.com wrote: A few comments below. On 04/24/2012 12:23 PM, Paul Berry wrote: When rendering to a miplevel other than 0 within a color, depth, stencil, or HiZ buffer, we need to tell the GPU to render to an offset within the

[Mesa-dev] [PATCH v2] i965: Fix mipmap offsets for HiZ and separate stencil buffers.

2012-05-02 Thread Paul Berry
When rendering to a miplevel other than 0 within a color, depth, stencil, or HiZ buffer, we need to tell the GPU to render to an offset within the buffer, so that the data is written into the correct miplevel. We do this using a coarse offset (in pages), and a fine adjustment (the so-called

Re: [Mesa-dev] build error in mesa out-of-tree-builds with wayland support

2012-05-02 Thread Sven Joachim
On 2012-05-02 21:51 +0200, Kristian Høgsberg wrote: On Wed, May 2, 2012 at 2:09 PM, Sven Joachim svenj...@gmx.de wrote: I'm seeing the following error when building Mesa git master out-of-tree with wayland support: , | Making all in dri2 | make[5]: Entering directory

Re: [Mesa-dev] [PATCH] egl_dri2: Fix out of tree builds with the wayland backend enabled

2012-05-02 Thread Kenneth Graunke
On 05/02/2012 04:04 PM, Robert Hooker wrote: Otherwise it fails like so: CC egl_dri2.lo In file included from egl_dri2.h:40:0, from egl_dri2.c:42: ../../../../../../src/egl/wayland/wayland-drm/wayland-drm.h:8:41: fatal error: wayland-drm-server-protocol.h: No such file

[Mesa-dev] Conflicts between OES/EXT/ARB_framebuffer_object and GL3.0/GLES2

2012-05-02 Thread Chad Versace
Mesa has problems in the way it implements glBindFramebuffer and glBindFramebufferEXT due to both being implemented by an overloaded _mesa_BindFramebufferEXT. This problem causes an Android app [1] to crash, and I want your opinion on how we should fix it. The problem is that in the five specs