[Mesa-dev] [PATCH] mesa: attach ElementArrayBufferObj to vertex array object

2011-11-22 Thread Yuanhan Liu
This would make ElementArrayBufferObj data per vertex array object. I did't find something to support this at the spec page[0]. But I did find something that somehow support this at opengl wiki page[1]. NOTE: with my test, both NV and ATI's closed source opengl implementation would attach the Elel

[Mesa-dev] [PATCH] mesa : move bindbuffer{base, range} from transformfeedback.c

2011-11-22 Thread Vincent Lejeune
BindBuffer* functions are part of tfb extension. They are however used by others extensions such as uniform buffer object. This patch moves the BindBuffer* definition to to bufferobj.c where it acts as a dispatcher calling original tfb function ; BindBuffer* functions can be used by

Re: [Mesa-dev] [PATCH] st/mesa: fix accum buffer allocation in st_renderbuffer_alloc_storage()

2011-11-22 Thread Jose Fonseca
- Original Message - > If the gallium driver doesn't support PIPE_FORMAT_R16G16B16A16_SNORM > the call to st_choose_renderbuffer_format() would fail and we'd > generate > an GL_OUT_OF_MEMORY error. We'd never get to the subsequent code > that > handles software/malloc-based renderbuffers

[Mesa-dev] [PATCH 1/2] st/mesa: add color varyings to MaxVarying

2011-11-22 Thread Marek Olšák
The linker now adds color varyings to the number of used varyings and checks against that limit. --- src/mesa/state_tracker/st_extensions.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensio

[Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Marek Olšák
These are different from hardware limits, because some drivers can correctly handle higher values than they report in most cases, either due to driver-specific compiler optimizations, or due to just how the hardware works internally. The problem with the linker is that it artifically reduces drive

Re: [Mesa-dev] [PATCH] glsl: disable resource checking in the linker until it's done right

2011-11-22 Thread Marek Olšák
On Mon, Nov 21, 2011 at 7:54 PM, Ian Romanick wrote: > NAK with extreme prejudice.  Technically speaking, these are app bugs. I > absolutely will not disable all correct behavior to work around broken apps. You are picturing a perfect world that doesn't exist. The world doesn't evolve around some

Re: [Mesa-dev] [PATCH] glsl: disable resource checking in the linker until it's done right

2011-11-22 Thread Jose Fonseca
- Original Message - > NAK with extreme prejudice. Technically speaking, these are app > bugs. > > I absolutely will not disable all correct behavior to work around > broken > apps. The problem is the following shaders will correctly link, but > completely explode: > > uniform float arra

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Jose Fonseca
Marek, I think we should take one of two approaches here: - aim for a short-term workaround, without gallium interface changes: - e.g., provide to GLSL compiler infinite/huge limits, while advertising to the app the pipe driver ones - or detect the wine process and advertise bigger limits in

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Marek Olšák
On Tue, Nov 22, 2011 at 4:05 PM, Jose Fonseca wrote: > Marek, > > I think we should take one of two approaches here: > - aim for a short-term workaround, without gallium interface changes: >  - e.g., provide to GLSL compiler infinite/huge limits, while advertising to > the app the pipe driver one

Re: [Mesa-dev] [PATCH] glsl: disable resource checking in the linker until it's done right

2011-11-22 Thread Brian Paul
On 11/22/2011 07:20 AM, Marek Olšák wrote: On Mon, Nov 21, 2011 at 7:54 PM, Ian Romanick wrote: NAK with extreme prejudice. Technically speaking, these are app bugs. I absolutely will not disable all correct behavior to work around broken apps. You are picturing a perfect world that doesn't

Re: [Mesa-dev] [PATCH] linker: Remove erroneous multiply by 4 in uniform usage calculation

2011-11-22 Thread Kai Wasserbäch
Dear Ian, Ian Romanick schrieb am 21.11.2011 20:51: > From: Ian Romanick > > The old count_uniform_size::num_shader_uniforms was actually > calculating the number of components used. Multiplying by 4 when > setting gl_shader::num_uniform_components caused us to count 4x as > many uniform compone

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Jose Fonseca
- Original Message - > On Tue, Nov 22, 2011 at 4:05 PM, Jose Fonseca > wrote: > > Marek, > > > > I think we should take one of two approaches here: > > - aim for a short-term workaround, without gallium interface > > changes: > >  - e.g., provide to GLSL compiler infinite/huge limits, whil

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Marek Olšák
On Tue, Nov 22, 2011 at 6:04 PM, Jose Fonseca wrote: > - Original Message - >> On Tue, Nov 22, 2011 at 4:05 PM, Jose Fonseca >> wrote: >> > Marek, >> > >> > I think we should take one of two approaches here: >> > - aim for a short-term workaround, without gallium interface >> > changes: >

Re: [Mesa-dev] [PATCH 1/6] glsl: finish up ARB_conservative_depth

2011-11-22 Thread Marek Olšák
On Mon, Nov 21, 2011 at 8:01 PM, Ian Romanick wrote: > On 11/19/2011 07:42 AM, Marek Olšák wrote: >> >> On Fri, Nov 18, 2011 at 9:44 PM, Ian Romanick  wrote: >>> >>> On 11/18/2011 11:27 AM, Marek Olšák wrote: >>> >>> This patch also needs to change the _mesa_glsl_supported_extensions table >>> in

Re: [Mesa-dev] [PATCH] mesa: attach ElementArrayBufferObj to vertex array object

2011-11-22 Thread Brian Paul
On 11/22/2011 01:38 AM, Yuanhan Liu wrote: This would make ElementArrayBufferObj data per vertex array object. I did't find something to support this at the spec page[0]. But I did find something that somehow support this at opengl wiki page[1]. NOTE: with my test, both NV and ATI's closed sourc

[Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Anuj Phogat
From: Anuj Phogat Hi Brian, >I think something like this would be simpler: > > @@ -1629,7 +1629,9 @@ texture_error_check( struct gl_context *ctx, > target != GL_TEXTURE_2D_ARRAY && > target != GL_PROXY_TEXTURE_2D_ARRAY && > target != GL_TEXTURE_RECTANGLE_ARB && > - target != GL_PROXY_TEXT

[Mesa-dev] [Bug 42930] [r300g, bisected] EVE online only shows black screen

2011-11-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=42930 Niels P. changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Mesa-dev] [Bug 42930] [r300g, bisected] EVE online only shows black screen

2011-11-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=42930 --- Comment #13 from Ian Romanick 2011-11-22 11:57:27 PST --- Fixed by the following commit in Mesa master: commit 151867b422d07b9e5845e95c2ebc30567809edc5 Author: Ian Romanick Date: Mon Nov 21 11:42:37 2011 -0800 linker: Remove erroneo

[Mesa-dev] [PATCH] glsl: fix linker error message context for frag shader output.

2011-11-22 Thread Dave Airlie
From: Dave Airlie A later error prints this properly, fix this case to do the same. Signed-off-by: Dave Airlie --- src/glsl/linker.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 3527088..b2068b2 100644 --- a/src/g

[Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F

2011-11-22 Thread Marek Olšák
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122 --- src/mesa/main/format_unpack.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 6e2ce7a..52f224a 100644 --- a/src/mesa/main/format_u

Re: [Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F

2011-11-22 Thread Patrick Baggett
On Tue, Nov 22, 2011 at 2:07 PM, Marek Olšák wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122 > --- > src/mesa/main/format_unpack.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_un

Re: [Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Kenneth Graunke
On 11/22/2011 11:42 AM, Anuj Phogat wrote: [snip] > I agree. This is simpler to read and _mesa_is_cube_map_face() can be reused > in mesa. Posting an updated patch with your suggestions. > > > I haven't tested this so the logic might be incorrect. > It worked as it is. Just defined a new funct

Re: [Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F

2011-11-22 Thread Marek Olšák
On Tue, Nov 22, 2011 at 9:13 PM, Patrick Baggett wrote: > > > On Tue, Nov 22, 2011 at 2:07 PM, Marek Olšák wrote: >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122 >> --- >>  src/mesa/main/format_unpack.c |   10 ++ >>  1 files changed, 10 insertions(+), 0 deletions(-) >>

Re: [Mesa-dev] [PATCH] glsl: fix linker error message context for frag shader output.

2011-11-22 Thread Ian Romanick
On 11/22/2011 11:57 AM, Dave Airlie wrote: From: Dave Airlie A later error prints this properly, fix this case to do the same. Signed-off-by: Dave Airlie Other than the one additional change suggested below, Reviewed-by: Ian Romanick --- src/glsl/linker.cpp |4 +++- 1 files changed

Re: [Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Brian Paul
On 11/22/2011 01:21 PM, Kenneth Graunke wrote: On 11/22/2011 11:42 AM, Anuj Phogat wrote: [snip] I agree. This is simpler to read and _mesa_is_cube_map_face() can be reused in mesa. Posting an updated patch with your suggestions. > I haven't tested this so the logic might be incorrect.

Re: [Mesa-dev] reworking pipe_video_decoder / pipe_video_buffer

2011-11-22 Thread Younes Manton
2011/11/21 Christian König : > On 16.11.2011 15:38, Maarten Lankhorst wrote: >> If the decode_bitstream interface is changed to get all bitstream buffers >> at the same time, >> there wouldn't be overhead to doing it like this. For a single picture >> it's supposed to stay constant, >> so for vdpau

[Mesa-dev] [PATCH] i915: Fix build since hiz merge.

2011-11-22 Thread Eric Anholt
--- There are regressions that look hiz-related on gm45 as well. On 915, while this gets things building, it'still in bad shape. Glean pixelformats, for example, segfaults at: 759 colorRegion = irb ? irb->mt->region : NULL; of i915_vtbl.c. Tossing in some assertion, it's that irb->m

Re: [Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F

2011-11-22 Thread Eric Anholt
On Tue, 22 Nov 2011 21:43:53 +0100, Marek Olšák wrote: > On Tue, Nov 22, 2011 at 9:13 PM, Patrick Baggett > wrote: > > > > > > On Tue, Nov 22, 2011 at 2:07 PM, Marek Olšák wrote: > >> > >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122 > >> --- > >>  src/mesa/main/format_unpack.c |

Re: [Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F

2011-11-22 Thread Kai Wasserbäch
Dear Marek, Marek Olšák schrieb am 22.11.2011 21:07: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122 > --- > src/mesa/main/format_unpack.c | 10 ++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > [...] I saw your patch and as I reported the referenced bug, I went

[Mesa-dev] [Bug 43122] piglit: spec/ARB_depth_buffer_float/fbo-depth-GL_DEPTH_COMPONENT32F-{blit, {read, draw, copy}pixels}

2011-11-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43122 --- Comment #7 from Kai 2011-11-22 13:32:50 PST --- Just for reference: a fix has been proposed: -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=ema

[Mesa-dev] [PATCH] mesa: Allow generic attributes for glGetActiveAttrib and GL_ACTIVE_ATTRIBUTES

2011-11-22 Thread Ian Romanick
From: Ian Romanick Page 77 (page 91 of the PDF) says about glGetActiveAttrib: "The returned attribute name can be the name of a generic attribute or a conventional attribute (which begin with the prefix "gl_", see the OpenGL Shading Language specification for a complete list)."

[Mesa-dev] [Bug 43138] [glsl] fail to get the active attribute with function glGetProgramiv

2011-11-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43138 Ian Romanick changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #5 from Ian Romanick

Re: [Mesa-dev] [PATCH] i915: Fix build since hiz merge.

2011-11-22 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/22/2011 01:04 PM, Eric Anholt wrote: > --- > > There are regressions that look hiz-related on gm45 as well. On 915, > while this gets things building, it'still in bad shape. Glean > pixelformats, for example, segfaults at: > > 759 col

[Mesa-dev] [PATCH] mesa: initial data structures for Uniform Buffer Objects

2011-11-22 Thread Vincent Lejeune
v2:Big cleanup of data structures used --- src/mesa/main/config.h|4 ++ src/mesa/main/mtypes.h| 18 src/mesa/main/shaderobj.c | 29 - src/mesa/program/prog_parameter.h |1 + src/mesa/program/prog_uniform.c |4 ++ src/mesa/pr

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Ian Romanick
On 11/22/2011 07:54 AM, Marek Olšák wrote: On Tue, Nov 22, 2011 at 4:05 PM, Jose Fonseca wrote: Marek, I think we should take one of two approaches here: - aim for a short-term workaround, without gallium interface changes: - e.g., provide to GLSL compiler infinite/huge limits, while adverti

Re: [Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Anuj Phogat
On Tue 22 Nov 2011 12:21:09 PM PST, Kenneth Graunke wrote: On 11/22/2011 11:42 AM, Anuj Phogat wrote: [snip] I agree. This is simpler to read and _mesa_is_cube_map_face() can be reused in mesa. Posting an updated patch with your suggestions. > I haven't tested this so the logic might be

Re: [Mesa-dev] [PATCH 3/3] mesa: Track fixed-function fragment shader as a shader

2011-11-22 Thread Ian Romanick
On 11/17/2011 08:24 AM, Eric Anholt wrote: On Wed, 16 Nov 2011 11:08:23 -0800, "Ian Romanick" wrote: From: Ian Romanick Previously the fixed-function fragment shader was tracked as a gl_program. This means that it shows up in the driver as a Mesa IR program instead of as a GLSL IR program. I

Re: [Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Kenneth Graunke
On 11/22/2011 03:34 PM, Anuj Phogat wrote: > On Tue 22 Nov 2011 12:21:09 PM PST, Kenneth Graunke wrote: >> On 11/22/2011 11:42 AM, Anuj Phogat wrote: >> [snip] >>> I agree. This is simpler to read and _mesa_is_cube_map_face() can >>> be reused >>> in mesa. Posting an updated patch with your sug

Re: [Mesa-dev] reworking pipe_video_decoder / pipe_video_buffer

2011-11-22 Thread Maarten Lankhorst
On 11/22/2011 10:00 PM, Younes Manton wrote: > 2011/11/21 Christian König : >> On 16.11.2011 15:38, Maarten Lankhorst wrote: >>> If the decode_bitstream interface is changed to get all bitstream buffers >>> at the same time, >>> there wouldn't be overhead to doing it like this. For a single picture

[Mesa-dev] [PATCH 1/2] mesa: silence signed/unsigned comparison warnings

2011-11-22 Thread Brian Paul
--- src/mesa/main/uniform_query.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 33ba53c..dbaeacb 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -648,7 +648

[Mesa-dev] [PATCH 2/2] mesa: remove unused gl_texture_object::DriverData field

2011-11-22 Thread Brian Paul
--- src/mesa/main/mtypes.h |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 96a4426..e8866c6 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1342,15 +1342,6 @@ struct gl_texture_object

[Mesa-dev] [PATCH 1/5] i915: remove occurances of _DD_NEW_x flags

2011-11-22 Thread Brian Paul
Just use the corresponding _NEW_x flags intead. The _DD_NEW_x flags will be removed in a following patch. --- src/mesa/drivers/dri/i915/intel_tris.h | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_tris.h b/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 2/5] mesa: define _MESA_NEW_SEPARATE_SPECULAR

2011-11-22 Thread Brian Paul
This will replace the soon-to-be-removed _DD_NEW_SEPARATE_SPECULAR flag. --- src/mesa/main/mtypes.h |6 ++ src/mesa/main/state.c |4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index e8866c6..c94a065 100644 --- a/

[Mesa-dev] [PATCH 3/5] swrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/

2011-11-22 Thread Brian Paul
--- src/mesa/swrast/s_context.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 98702f0..310c315 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -309,7 +309,7 @@ _swrast_upda

[Mesa-dev] [PATCH 4/5] tnl: stop using _DD_NEW_x flags

2011-11-22 Thread Brian Paul
--- src/mesa/tnl/t_vertex.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index 6582949..580f95d 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -269,7 +269,8 @@ void *_tnl_get_vertex( struct gl_co

[Mesa-dev] [PATCH 5/5] mesa: remove _DD_NEW_x flags

2011-11-22 Thread Brian Paul
They're no longer used anywhere. --- src/mesa/main/mtypes.h | 21 - 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index c94a065..2b47147 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3101

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Marek Olšák
On Tue, Nov 22, 2011 at 11:11 PM, Ian Romanick wrote: > All of this discussion is largely moot.  The failure that you're so angry > about was caused by a bug in the check, not by the check itself. That bug > has already been fixed (commit 151867b). > > The exact same check was previously performed

Re: [Mesa-dev] [PATCH] i915: Fix build since hiz merge.

2011-11-22 Thread Eric Anholt
On Tue, 22 Nov 2011 13:44:59 -0800, Chad Versace wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/22/2011 01:04 PM, Eric Anholt wrote: > > --- > > > > There are regressions that look hiz-related on gm45 as well. On 915, > > while this gets things building, it'still in bad sha

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Kenneth Graunke
On 11/22/2011 07:27 PM, Marek Olšák wrote: > On Tue, Nov 22, 2011 at 11:11 PM, Ian Romanick wrote: >> All of this discussion is largely moot. The failure that you're so angry >> about was caused by a bug in the check, not by the check itself. That bug >> has already been fixed (commit 151867b). >

Re: [Mesa-dev] [PATCH 00/10] Make gl_array_object use an array of gl_client_attribs

2011-11-22 Thread Mathias Fröhlich
Hi, On Thursday, November 17, 2011 00:47:22 Brian Paul wrote: > On 11/11/2011 10:07 AM, Mathias Fröhlich wrote: > > Hi all, > > > > following a patch series to make gl_array_object use a VERT_ATTRIB_* > > indexed array of gl_client_array structs. > > Since we have already 33 client arrays in an

[Mesa-dev] [PATCH] i965: Set SURFACE_STATE vertical alignment bit on Ivybridge.

2011-11-22 Thread Kenneth Graunke
See intel_vertical_texture_alignment_unit() in intel_tex_layout.c; certain surface types require setting this to VALIGN_4. Analogous to commit dd0e46c4102976b7d317104ecd1bb565ac34613a on Gen6. Fixes piglit test fbo-generatemipmap-formats with the GL_ARB_depth_texture and GL_EXT_packed_depth_stenc

[Mesa-dev] Question about the texture's reference count processing in _mesa_update_texture

2011-11-22 Thread zhigang gong
Hi guys, I have a question about the internal implementation of glDrawArrays or any rendering functions. In the code path, it calls to _mesa_update_texture(), and if there is really a complete texture, it will call _mesa_reference_texobj to set it to _Current, and increase the texture object's ref