Re: [Mesa-dev] [PATCH 2/2] glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

2011-10-18 Thread Bryan Cain
Looks good to me. Bryan On 10/18/2011 05:20 PM, Kenneth Graunke wrote: > Setting MaxIfDepth to UINT_MAX effectively means "don't lower anything." > > Explicitly checking for this common case allows us to avoid walking the > IR, computing nesting levels, and so on. > > Signed-off-by: Kenneth Graun

Re: [Mesa-dev] [PATCH] mesa: Fix multithreaded buffer object refcounting.

2011-10-18 Thread Mathias Fröhlich
Hi Brian, On Tuesday, October 18, 2011 17:05:53 Brian Paul wrote: > This was brought up a few weeks ago by someone else. I had posted the > start of a patch to fix it. I'm attaching an updated version that I > think is pretty clean. But there's a few lines missing and it's > totally untested.

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread Zhao, Juan J
I think you'd like this file: To be more concrete: mesa/src/egl/wayland/wayland-drm/wayland-drm.xml > -Original Message- > From: mesa-dev-bounces+juan.j.zhao=intel@lists.freedesktop.org > [mailto:mesa-dev-bounces+juan.j.zhao=intel@lists.freedesktop.org] On > Behalf Of Zhao, Juan J

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread chris
Oops, yes i use the wrong branch of 7.11rc4 from git repository. After pull the newest version, it is compiled succesfully. wl_drm_create is removed since this commit: commit b89bca6d8b84e7922f44258c41e37997775f98c9 Author: Chia-I Wu Date: Wed Sep 7 21:42:56 2011 +0800 st/egl: track serve

Re: [Mesa-dev] mesa: handle PBO access error in display list mode

2011-10-18 Thread Yuanhan Liu
On Mon, Oct 17, 2011 at 08:24:38AM -0600, Brian Paul wrote: > On 10/15/2011 08:05 PM, Liu Aleaxander wrote: > > From 98d4600d74829d16045dd577855b7c9f25e762c2 Mon Sep 17 00:00:00 2001 > >From: Yuanhan Liu > >Date: Sun, 16 Oct 2011 09:13:10 +0800 > >Subject: [PATCH] mesa: handle PBO access error in d

[Mesa-dev] [PATCH] mesa: handle PBO access error in display list mode

2011-10-18 Thread Yuanhan Liu
Simply generate GL_INVALID_OPERATION error at display list mode. As explained by Brian, we are going to access PBO data at compile time. No need to defer the error at execution time. Signed-off-by: Yuanhan Liu --- src/mesa/main/dlist.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread Zhao, Juan J
It's in wayland's source code. > -Original Message- > From: mesa-dev-bounces+juan.j.zhao=intel@lists.freedesktop.org > [mailto:mesa-dev-bounces+juan.j.zhao=intel@lists.freedesktop.org] On > Behalf Of chris > Sent: Wednesday, October 19, 2011 10:48 AM > To: Kristian Høgsberg > Cc: m

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread chris
Dear Kristian, I have found no drm.xml in mesa code. Do you means wayland-drm.xml under "src/egl/wayland/wayland-drm/protocol". At 2011-10-18 23:55:18,"Kristian Høgsberg" wrote: >2011/10/18 chris : >> Dear >> >> Could anyone tell me where is the "wl_drm_create" function defined? I can't >> find

[Mesa-dev] [PATCH 2/2] i965: use a cast to silence a signed/unsigned comparison warning

2011-10-18 Thread Brian Paul
From: Brian Paul --- .../drivers/dri/i965/brw_vec4_reg_allocate.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 1ace91f..6de7682 100644 --- a/src/mes

[Mesa-dev] [PATCH 1/2] i965: silence signed/unsigned comparison warning

2011-10-18 Thread Brian Paul
From: Brian Paul --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |3 ++- 1 files changed, 2 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 e003020..0ea6d31 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [PATCH] glsl-fs-normalmatrix: New test program for gl_NormalMatrix.

2011-10-18 Thread Eric Anholt
From: tom fogal v2: lots of hacking by anholt to make it look more like a normal piglit test and make all results visible at once. --- tests/all.tests |1 + tests/shaders/CMakeLists.gl.txt |1 + tests/shaders/glsl-fs-normalmatrix.c | 166 +++

[Mesa-dev] Fix and cleaned up testcase

2011-10-18 Thread Eric Anholt
There was stuff in the testcase that looked quite unusual (red instead of green for success, not showing all the results at once, etc.) for a piglit test, so I hacked up the testcase quite a bit. It was an interesting bug, and luckily an easy little fix. I'd love to get your review/ack on the tes

[Mesa-dev] [PATCH] glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.

2011-10-18 Thread Eric Anholt
A driver trying to set up builtin uniforms is faced with a problem: How do I walk the ir_variable structure (representing an array of structs, or array of matrices, or struct, or whatever), and set up driver structures so that dereference of that uniform gets the corresponding ParameterValues[] ent

[Mesa-dev] [PATCH 3/3] i965: Remove copy and pasted gen7_wm_constants state atom.

2011-10-18 Thread Kenneth Graunke
Now that this is identical to gen6_wm_constants, just use that instead. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_state_upload.c |2 +- src/mesa/drivers/dri/i965/gen7_wm_state.c| 55 -- 2 files changed, 1 insertions(+), 56 deletions(-) di

[Mesa-dev] [PATCH 2/3] i965: Use AUB_TRACE_WM_CONSTANTS in gen7_prepare_wm_push_constants.

2011-10-18 Thread Kenneth Graunke
This makes it match gen6_prepare_wm_push_constants. For some reason, it had been using AUB_TRACE_NO_TYPE. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen7_wm_state.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_stat

[Mesa-dev] [PATCH 1/3] i965: Fix incorrect dirty bit in gen6_prepare_wm_push_constants.

2011-10-18 Thread Kenneth Graunke
We definitely want CACHE_NEW_WM_PROG, not CACHE_NEW_VS_PROG. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen6_wm_state.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_wm_

Re: [Mesa-dev] [PATCH 5/5] intel: Remove intel_renderbuffer::hiz_region

2011-10-18 Thread Eric Anholt
On Mon, 17 Oct 2011 07:40:28 -0700, Chad Versace wrote: > Replace it with intel_renderbuffer::region::hiz::region. > > Signed-off-by: Chad Versace > --- > src/mesa/drivers/dri/i965/brw_misc_state.c | 27 + > src/mesa/drivers/dri/intel/intel_context.c | 10 -- > s

Re: [Mesa-dev] [PATCH] mesa: Skip mipmap generation if there is no source image.

2011-10-18 Thread Brian Paul
On 10/18/2011 04:09 PM, Eric Anholt wrote: The spec doesn't explicitly mandate this behavior, but it seems like the only sensible thing to do (as opposed to assertion failing or segfaulting). v2: Do the early return before calling into the driver function. Bugzilla: https://bugs.freedesktop.org

Re: [Mesa-dev] [PATCH 4/5] intel: Add function intel_renderbuffer_hiz_alloc

2011-10-18 Thread Eric Anholt
On Mon, 17 Oct 2011 07:40:27 -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 arrives that logic will become more comp

Re: [Mesa-dev] [PATCH 6/9] glsl: parser now aware of UBO

2011-10-18 Thread Eric Anholt
This patch is inconsistent with whitespace compared to surrounding code. I won't review it further. pgp98yoP1zVu0.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa

Re: [Mesa-dev] [PATCH 3/9] mesa : advertise GL_ARB_Uniform_Buffer_Object extension

2011-10-18 Thread Eric Anholt
On Mon, 17 Oct 2011 00:37:16 +0200, vlj wrote: > --- > src/glsl/glsl_lexer.ll |3 ++- > src/glsl/glsl_parser_extras.cpp |1 + > src/glsl/glsl_parser_extras.h |2 ++ > 3 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_l

Re: [Mesa-dev] [PATCH 1/9] glapi: Add Uniform Buffer Object API

2011-10-18 Thread Eric Anholt
On Mon, 17 Oct 2011 00:37:14 +0200, vlj wrote: > --- > src/mapi/glapi/gen/ARB_Uniform_Buffer_Object.xml | 115 > ++ > src/mapi/glapi/gen/Makefile |1 + > src/mapi/glapi/gen/gl_API.xml|2 +- > 3 files changed, 117 insertions(+)

[Mesa-dev] [PATCH 2/2] glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

2011-10-18 Thread Kenneth Graunke
Setting MaxIfDepth to UINT_MAX effectively means "don't lower anything." Explicitly checking for this common case allows us to avoid walking the IR, computing nesting levels, and so on. Signed-off-by: Kenneth Graunke Cc: Bryan Cain Cc: Ian Romanick --- src/glsl/lower_if_to_cond_assign.cpp |

[Mesa-dev] [PATCH 1/2] i965: Set MaxIfDepth to UINT_MAX on Gen6+ and 16 on prior generations.

2011-10-18 Thread Kenneth Graunke
Commit 488fe51cf823ccd137c667f1e92dd86f8323b723 converted the EmitNoIfs flag to MaxIfDepth, an unsigned integer saying "flatten if-statements nested beyond this depth." Unfortunately, i965 left this initialized to 0, which made ir_to_mesa attempt to flatten all if-statements. We didn't notice rig

[Mesa-dev] [PATCH] mesa: Skip mipmap generation if there is no source image.

2011-10-18 Thread Eric Anholt
The spec doesn't explicitly mandate this behavior, but it seems like the only sensible thing to do (as opposed to assertion failing or segfaulting). v2: Do the early return before calling into the driver function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40308 --- src/mesa/main/fbo

Re: [Mesa-dev] [PATCH] i965: setup address rounding enable bits

2011-10-18 Thread Eric Anholt
On Mon, 17 Oct 2011 11:52:05 +0800, Yuanhan Liu wrote: > On Sat, Oct 15, 2011 at 08:59:52AM +0800, Liu Aleaxander wrote: > > On Sat, Oct 15, 2011 at 2:11 AM, Eric Anholt wrote: > > > On Thu, 13 Oct 2011 11:34:34 +0800, Yuanhan Liu > > > wrote: > > >> The patch(based on the reading of the emula

Re: [Mesa-dev] [PATCH 0/6] More shader API internal house cleaning

2011-10-18 Thread Kenneth Graunke
On 10/07/2011 05:06 PM, Ian Romanick wrote: > This should be the last batch of internal clean-ups before the "real" > work. I should be able to send some cleaned up uniform rework patches > (as discuessed at XDC last month) next week. > > ___ > mesa-dev

Re: [Mesa-dev] Fixed function fragment shader to GLSL

2011-10-18 Thread Eric Anholt
On Tue, 18 Oct 2011 11:39:16 -0700 (PDT), Jakob Bornecrantz wrote: > - Original Message - > > Here's this patch series again, part of the kill-Mesa-IR goal we have > > for next release. It's been no regressions for me for a while, I was > > just trying to track down a 2% performance regr

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread Benjamin Franzke
2011/10/18 chris : > Dear > > Could anyone tell me where is the "wl_drm_create" function defined? I can't > find it anywhere, no definition can be found. No google information can be > searched! Why? Seems like you're compiling mesa 7.11 again wayland master, but they are incompatible. The wl_drm_

Re: [Mesa-dev] [PATCH 1/2] mesa: Round the argument to PixelStoref instead of truncating.

2011-10-18 Thread Brian Paul
On 10/18/2011 01:31 PM, Eric Anholt wrote: From the GL 2.1 specification, page 114 (page 128 of the PDF): "The version of PixelStore that takes a floating-point value may be used to set any type of parameter; if the parameter is boolean, then it is set to FALSE if the passed va

Re: [Mesa-dev] Fixed function fragment shader to GLSL

2011-10-18 Thread Kenneth Graunke
On 10/18/2011 11:39 AM, Jakob Bornecrantz wrote: > - Original Message - >> Here's this patch series again, part of the kill-Mesa-IR goal we have >> for next release. It's been no regressions for me for a while, I was >> just trying to track down a 2% performance regression on gen6. It >>

[Mesa-dev] [PATCH 1/2] mesa: Round the argument to PixelStoref instead of truncating.

2011-10-18 Thread Eric Anholt
>From the GL 2.1 specification, page 114 (page 128 of the PDF): "The version of PixelStore that takes a floating-point value may be used to set any type of parameter; if the parameter is boolean, then it is set to FALSE if the passed value is 0.0 and TRUE otherwise, while if the

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

2011-10-18 Thread Eric Anholt
v2: Avoid the C99 rounding functions, because I don't trust get/setting the C99 rounding mode from inside our library not having other side effects. Instead, open-code roundEven() behavior around Mesa's IROUND, which we're already testing for C99 rounding mode safety. Fixes glsl-1.30/compiler/bui

Re: [Mesa-dev] Fixed function fragment shader to GLSL

2011-10-18 Thread Jakob Bornecrantz
- Original Message - > Here's this patch series again, part of the kill-Mesa-IR goal we have > for next release. It's been no regressions for me for a while, I was > just trying to track down a 2% performance regression on gen6. It > turns out that on my gen4 system, it's no performance r

[Mesa-dev] [PATCH] i965: Enable faster workaround-free math on Ivybridge.

2011-10-18 Thread Kenneth Graunke
According to the documentation, Ivybridge's math instruction works in SIMD16 mode for the fragment shader, and no longer forbids align16 mode for the vertex shader. The documentation claims that SIMD16 mode isn't supported for INT DIV, but empirical evidence shows that it works fine. Presumably t

Re: [Mesa-dev] mesa,swrast,vbo,meta: Prepare for HiZ on i965

2011-10-18 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/2011 08:19 AM, Brian Paul wrote: > On 10/17/2011 08:27 AM, Chad Versace wrote: >> HiZ is near completion on i965, and it requires some preliminary changes to >> core Mesa. No big changes here; a quick bugfix, redeclaring functions as >> non-st

[Mesa-dev] [Bug 41969] The Mesa meta save/restore code doesn't always save the active program

2011-10-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41969 Chad Versace changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Mesa-dev] [PATCH] mesa: Remove unnecessary and incorrect TexEnv parameter validation.

2011-10-18 Thread Kenneth Graunke
For GL_RGB_SCALE and GL_ALPHA_SCALE targets, the API wrapper code attempts to ensure the parameter is 1.0, 2.0, or 4.0. This is unnecessary: set_combiner_scale in texenv.c (called by _mesa_TexEnvfv) already checks this and raises an appropriate error. It's also incorrect: For glTexEnvx, the API v

[Mesa-dev] [Bug 41969] The Mesa meta save/restore code doesn't always save the active program

2011-10-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41969 --- Comment #1 from Neil Roberts 2011-10-18 10:52:06 PDT --- Created attachment 52487 --> https://bugs.freedesktop.org/attachment.cgi?id=52487 meta: Fix saving the active program When saving the active program in _mesa_meta_begin, it was actu

[Mesa-dev] [Bug 41969] New: The Mesa meta save/restore code doesn't always save the active program

2011-10-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41969 Bug #: 41969 Summary: The Mesa meta save/restore code doesn't always save the active program Classification: Unclassified Product: Mesa Version: unspecified Platform:

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread Kristian Høgsberg
2011/10/18 chris : > Dear > > Could anyone tell me where is the "wl_drm_create" function defined? I can't > find it anywhere, no definition can be found. No google information can be > searched! Why? It's defined in the code generated from the drm.xml definition. Kristian

Re: [Mesa-dev] mesa,swrast,vbo,meta: Prepare for HiZ on i965

2011-10-18 Thread Brian Paul
On 10/17/2011 08:27 AM, Chad Versace wrote: HiZ is near completion on i965, and it requires some preliminary changes to core Mesa. No big changes here; a quick bugfix, redeclaring functions as non-static, and adding an extra meta-op flag and some functions to the Driver vtbl. The core Mesa stuf

Re: [Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread Eugeni Dodonov
2011/10/18 chris > Dear > > Could anyone tell me where is the "wl_drm_create" function defined? I can't > find it anywhere, no definition can be found. No google information can be > searched! Why? > It comes from wayland: http://cgit.freedesktop.org/wayland Check out the wayland and wayland-de

Re: [Mesa-dev] [PATCH] mesa: Fix multithreaded buffer object refcounting.

2011-10-18 Thread Brian Paul
On 10/17/2011 10:59 PM, Mathias Fröhlich wrote: Hi, Attached is a change to core mesa. This fixes a potential refcount locking problem with shared OpenGL objects. This change survives a piglit r600 run on my local machine. Please review. This was brought up a few weeks ago by someone else. I

[Mesa-dev] [PATCH] gallium/targets: Add vdpau target for nouveau

2011-10-18 Thread Maarten Lankhorst
Should fall back to shader based decoding (g3dvl) for now. This is probably broken on systems that support xvmc, because nouveau_video_buffer_create has no way to know for what api the buffer is created, so I think this call might need a separate argument as workaround. Signed-off-by: Maarten Lan

[Mesa-dev] implicit declaration of function wl_drm_create

2011-10-18 Thread chris
Dear Could anyone tell me where is the "wl_drm_create" function defined? I can't find it anywhere, no definition can be found. No google information can be searched! Why? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop

[Mesa-dev] sd

2011-10-18 Thread chris
b___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 41221] Mesa 7.11 implementation error: Incomplete OpenGL ES 2.0 support.

2011-10-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=41221 --- Comment #1 from Tapani Pälli 2011-10-18 03:12:42 PDT --- What is the graphics HW used and can you upload the test application as an attachment? Have you tried running es2tri in mesa demos? For me OpenGL ES 2.0 applications compile and run fin