[Mesa-dev] [Bug 42154] New: g++: error: swrast_dri.so.tmp: No such file or directory on build for radeon 600g

2011-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=42154 Bug #: 42154 Summary: g++: error: swrast_dri.so.tmp: No such file or directory on build for radeon 600g Classification: Unclassified Product: Mesa Version: git Platfor

[Mesa-dev] [Bug 37253] SIGSEGV in dri2FlushFrontBuffer/MakeContextCurrent

2011-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37253 --- Comment #9 from Fabio Pedretti 2011-10-24 02:58:24 PDT --- Is this still an issue? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the

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

2011-10-24 Thread Brian Paul
On 10/23/2011 01:32 PM, Mathias Fröhlich wrote: Hi, On Sunday, October 23, 2011 17:55:52 Brian Paul wrote: Reviewed-by: Brian Paul I think it would be really good to have even a simple, single-threaded piglit test for this (glPush, glDeleteBufferObj, glPop). Could you write one? Pushing th

Re: [Mesa-dev] [PATCH 1/2] mesa: Avoid ABA problem on buffer object bind.

2011-10-24 Thread Brian Paul
On 10/23/2011 01:20 PM, Mathias Fröhlich wrote: Hi, On Sunday, October 23, 2011 17:53:53 Brian Paul wrote: Looks good. Just minor things: In other places where we have a field like this it's called DeletePending. The comment you added in _mesa_DeleteBuffersARB() is a bit hard to understand.

Re: [Mesa-dev] [PATCH] gallium: implement WGL_ARB_create_context

2011-10-24 Thread Jose Fonseca
Looks good to me. Just a few minor requests: - The APIENTRY keyword in stw_create_context_attribs() is unnecessary given it is an internal API. - Please move the stw_create_context_attribs() immediately after DrvCreateLayerContext so that the code doesn't move around so much, and the diff is cl

[Mesa-dev] [PATCH 1/2] util: handle failed mapping in u_upload_alloc_buffer()

2011-10-24 Thread Brian Paul
From: Brian Paul --- src/gallium/auxiliary/util/u_upload_mgr.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 9bcc1bb..aef4d40 100644 --- a/src/gallium/auxiliary/util/u_up

[Mesa-dev] [PATCH 2/2] util: handle failed mapping in u_upload_alloc()

2011-10-24 Thread Brian Paul
From: Brian Paul --- src/gallium/auxiliary/util/u_upload_mgr.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index aef4d40..a2319d0 100644 --- a/src/gallium/auxiliary/util/u_uplo

Re: [Mesa-dev] [PATCH] intel: Kill intel_mipmap_level::nr_images

2011-10-24 Thread Roland Scheidegger
Am 23.10.2011 02:25, schrieb Kenneth Graunke: > On 10/21/2011 08:45 PM, Chad Versace wrote: >> For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and >> 'depth' fields of intel_mipmap_level were identical. In the exceptional >> case, nr_images == 6 and depth == 1. >> >> It is simp

Re: [Mesa-dev] [PATCH 1/2] util: handle failed mapping in u_upload_alloc_buffer()

2011-10-24 Thread Jose Fonseca
Both patches look good to me. Jose - Original Message - > From: Brian Paul > > --- > src/gallium/auxiliary/util/u_upload_mgr.c |7 ++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c > b/src/gallium/auxiliary/util/u

Re: [Mesa-dev] [PATCH] intel: Kill intel_mipmap_level::nr_images

2011-10-24 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/2011 10:12 AM, Roland Scheidegger wrote: > Am 23.10.2011 02:25, schrieb Kenneth Graunke: >> On 10/21/2011 08:45 PM, Chad Versace wrote: >>> For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and >>> 'depth' fields of intel_mip

[Mesa-dev] [PATCH] mesa: Fix memory leak in out-of-memory path.

2011-10-24 Thread Vinson Lee
Fixes Coverity resource leak defect. --- src/mesa/main/pack.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 092e541..ecdeaf5 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -3717,6 +3717,7 @@ _mesa_unpack_

Re: [Mesa-dev] [PATCH] mesa: Fix memory leak in out-of-memory path.

2011-10-24 Thread Brian Paul
On 10/24/2011 01:00 PM, Vinson Lee wrote: Fixes Coverity resource leak defect. --- src/mesa/main/pack.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 092e541..ecdeaf5 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/m

Re: [Mesa-dev] [PATCH] intel: Kill intel_mipmap_level::nr_images

2011-10-24 Thread Ian Romanick
On 10/24/2011 10:12 AM, Roland Scheidegger wrote: Am 23.10.2011 02:25, schrieb Kenneth Graunke: On 10/21/2011 08:45 PM, Chad Versace wrote: For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and 'depth' fields of intel_mipmap_level were identical. In the exceptional case, nr_i

[Mesa-dev] [PATCH] g3dvl: Remove unused loop variable.

2011-10-24 Thread Vinson Lee
Fixes Coverity uninitialized scalar variable defect. --- src/gallium/auxiliary/vl/vl_mpeg12_decoder.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 7e7fa99..d4b8ae0 100644

[Mesa-dev] [PATCH] glsl: Generate an error for array-of-array declarations

2011-10-24 Thread Ian Romanick
From: Ian Romanick Other parts of the code already caught things like 'float x[4][2]'. However, nothing caught 'float [4] x[2]'. Fixes piglit test array-multidimensional-new-syntax.vert. Signed-off-by: Ian Romanick --- src/glsl/ast_to_hir.cpp | 12 1 files changed, 12 insertion

Re: [Mesa-dev] [PATCH] TransformFeedback: Assign transform feedback varying slots in linker.

2011-10-24 Thread Marek Olšák
Hi Dan, I have written this function to parse expressions of the form "name[x]" for parsing the list of transform feedback varyings with indexing. It's good enough to pass the piglit tests, but I am not sure whether it's good enough for GLSL 1.3. I use this code to query locations of indexed varyi

[Mesa-dev] [PATCH] glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.

2011-10-24 Thread Eric Anholt
This matches the usual convention for extension builtin variables. --- src/glsl/builtin_variables.h |6 +++--- src/glsl/ir_variable.cpp | 12 ++-- src/mesa/main/ff_fragment_shader.cpp |6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/

Re: [Mesa-dev] [PATCH] intel: Kill intel_mipmap_level::nr_images

2011-10-24 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2011 11:45 PM, Eric Anholt wrote: > On Fri, 21 Oct 2011 20:45:59 -0700, Chad Versace wrote: >> For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and >> 'depth' fields of intel_mipmap_level were identical. In the exceptional

[Mesa-dev] [PATCH] intel: Kill dead code in intel_miptree_copy_teximage()

2011-10-24 Thread Chad Versace
Kill the code paths taken when src_mt is null. It is never null, otherwise there would be a segfault on line 4 of this function: GLuint width = src_mt->level[level].width; (Some interleaved lines in the diff make the real diff non-obvious. All I did was delete some code and then left-shifted w

Re: [Mesa-dev] [PATCH] glsl: Generate an error for array-of-array declarations

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 12:29 PM, Ian Romanick wrote: > From: Ian Romanick > > Other parts of the code already caught things like 'float x[4][2]'. > However, nothing caught 'float [4] x[2]'. > > Fixes piglit test array-multidimensional-new-syntax.vert. > > Signed-off-by: Ian Romanick > --- > src/glsl/a

Re: [Mesa-dev] [PATCH] glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 01:44 PM, Eric Anholt wrote: > This matches the usual convention for extension builtin variables. "I like the color of your bike shed." Reviewed-by: Kenneth Graunke ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.fre

[Mesa-dev] [PATCH 0/4] Fix bug #41980... no, really!

2011-10-24 Thread Ian Romanick
The patch series fixes two issues: 1. Possibility that uniforms could become unused in later optimization passes and get removed. 2. Fields of structures were not enumerated. The first two patches, which have previously been sent to the list, fix the first problem. The second two patches fix th

[Mesa-dev] [PATCH 1/4] glsl: Add uniform_locations_assigned parameter to do_dead_code opt pass

2011-10-24 Thread Ian Romanick
From: Ian Romanick Setting this flag prevents declarations of uniforms from being removed from the IR. Since the IR is directly used by several API functions that query uniforms in shaders, uniform declarations cannot be removed after the locations have been set. However, it should still be saf

[Mesa-dev] [PATCH 3/4] linker: Add uniform_field_visitor class to process leaf fields of a uniform

2011-10-24 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/glsl/Makefile |1 + src/glsl/link_uniforms.cpp | 116 src/glsl/linker.h | 45 + 3 files changed, 162 insertions(+), 0 deletions(-) create mode 100644 src

[Mesa-dev] [PATCH 2/4] linker: Eliminate more dead code after demoting shader inputs and outputs

2011-10-24 Thread Ian Romanick
From: Ian Romanick Consider the following vertex shader and fragment shader: // vertex shader varying vec4 v; uniform vec4 u; void main() { gl_Position = vec4(0.0); v = u; } // fragment shader void main() { gl_FragColor = vec4(0.0); } Since the fragment shader does not use 'v', it is demoted

[Mesa-dev] [PATCH 4/4] ir_to_mesa: Use uniform_field_visitor to add all struct fields to parameter list

2011-10-24 Thread Ian Romanick
From: Ian Romanick Previously the uniform was passed as single, whole structure to _mesa_add_parameter. This was completely bogus and resulted in a DataType of 0 (instead of a valid GLSL type enum). Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Cc: Br

[Mesa-dev] [PATCH 04/33] intel: Return error value from intel_batchbuffer_flush().

2011-10-24 Thread Eric Anholt
This will let the caller do something sensible on error, if it cares. --- src/mesa/drivers/dri/intel/intel_batchbuffer.c | 14 ++ src/mesa/drivers/dri/intel/intel_batchbuffer.h |4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/intel/int

[Mesa-dev] [PATCH 01/33] i915: Move the always_flush_cache code to triangle emit.

2011-10-24 Thread Eric Anholt
This could have broken always_flush_cache on i965, since reserved_space doesn't reflect the size of the workaround flushes, and we might run out of space. This should make always_flush_cache more useful on pre-i965, anyway (since the point is to flush around each draw call, even within a batchbuff

[Mesa-dev] [PATCH 02/33] intel: Add an interface for saving/restoring the batchbuffer state.

2011-10-24 Thread Eric Anholt
This will be used to avoid the prepare() step in the i965 driver's state setup. Instead, we can just speculatively emit the primitive into the batchbuffer, then check if the batch is too big, rollback and flush, and replay the primitive. --- src/mesa/drivers/dri/intel/intel_batchbuffer.c | 21 +

[Mesa-dev] i965 batch rollback: no more prepare() vs emit().

2011-10-24 Thread Eric Anholt
I did do some testing by making libdrm claim a smaller aperture size and thus trigger the rollback code, which caught one bug. Generally, piglit doesn't trigger rollback at all, which is a bit concerning from a testing coverage standpoint. For people reviewing, I think the interesting part to rev

[Mesa-dev] [PATCH 03/33] i965: Add a note about an unsafe-looking state check.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_draw.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index c02b2bc..c3755d5 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 10/33] i965/gen4: Move CC VP to emit() time, since it's only needed by CC's emit().

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_cc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c index c8ef8db..d1804e3 100644 --- a/src/mesa/drivers/dri/i965/brw_cc.c +++ b/src/mesa/drivers/dri/i965/brw_cc.

[Mesa-dev] [PATCH 05/33] i965: Use the batch save/reset code to avoid needing the BO validate step.

2011-10-24 Thread Eric Anholt
We were doing the BO validate step in prepare() (brw_validate_state()) hooks of atoms so that we could check_aperture before emitting the relocation trees during brw_upload_state() that would actually make the batchbuffer reference too much memory to be executed. Now that all relocations occur in

[Mesa-dev] [PATCH 06/33] i965: Remove the validated BO list, now that it's unused.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_context.h | 13 - src/mesa/drivers/dri/i965/brw_curbe.c |2 -- src/mesa/drivers/dri/i965/brw_draw_upload.c |8 ++-- src/mesa/drivers/dri/i965/brw_misc_state.c| 17 - src/mesa/drivers/d

[Mesa-dev] [PATCH 07/33] i965: Check Fallback again after upload.

2011-10-24 Thread Eric Anholt
As we move state to emit() time from prepare() time, a couple of the places that flag fallbacks will move here. --- src/mesa/drivers/dri/i965/brw_draw.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 11/33] i965/gen7: Fold prepare() and emit() of SF CLIP/VP state together.

2011-10-24 Thread Eric Anholt
The prepare() only made state for its emit(), not anybody else. --- src/mesa/drivers/dri/i965/gen7_viewport_state.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.

[Mesa-dev] [PATCH 09/33] i965: Move push constants setup to emit() time.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/gen6_vs_state.c |6 +++--- src/mesa/drivers/dri/i965/gen6_wm_state.c |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c index f2c2e2b..c7b3ff2 100644

[Mesa-dev] [PATCH 12/33] i965/gen4: Move unit state setup to emit() time.

2011-10-24 Thread Eric Anholt
It is only needed in time for brw_psp_urb_cbs(), which is also an emit(). --- src/mesa/drivers/dri/i965/brw_clip_state.c |4 ++-- src/mesa/drivers/dri/i965/brw_gs_state.c |4 ++-- src/mesa/drivers/dri/i965/brw_sf_state.c |4 ++-- src/mesa/drivers/dri/i965/brw_state_upload.c |

[Mesa-dev] [PATCH 14/33] i965/gen4: Fold WM surface state prepare()/emit() together.

2011-10-24 Thread Eric Anholt
These produce BRW_NEW_SURFACES (used by binding table emit()) and BRW_NEW_NR_WM_SURFACES (used by WM unit emit()). Fixes a bug where with no texturing and no color buffer, we wouldn't consider the null renderbuffer in nr_surfaces. This was harmless because nr_surfaces is only used for the prefetc

[Mesa-dev] [PATCH 15/33] i965/gen7: Fold WM surface state prepare()/emit() together.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 56 +++-- 1 files changed, 18 insertions(+), 38 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index 4741e76..69433c0 100644 --- a/src/mesa/d

[Mesa-dev] [PATCH 08/33] i965/gen6: Move setup of CC state batches to emit time.

2011-10-24 Thread Eric Anholt
This is part of a series trying to eliminate the separate prepare() hook in state upload. The prepare() hook existed to support the check_aperture in between calculating state updates and setting up the batch, but there should be no reason for that any more. --- src/mesa/drivers/dri/i965/gen6_cc.

[Mesa-dev] [PATCH 17/33] i965: Fold prepare() and emit() of VS surface state setup together.

2011-10-24 Thread Eric Anholt
This rearranges the code a bit, and makes the upload of the binding table take only as many surfaces as there are in use. --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 62 +- 1 files changed, 25 insertions(+), 37 deletions(-) diff --git a/src/mesa/drivers/dri/i965/b

[Mesa-dev] [PATCH 13/33] i965: Move sampler state to emit() time.

2011-10-24 Thread Eric Anholt
This is consumed by the WM unit, which is already at emit(). --- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |4 ++-- src/mesa/drivers/dri/i965/gen7_sampler_state.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state

[Mesa-dev] [PATCH 20/33] i965/gen4: Move URB fence recalculate to emit() time.

2011-10-24 Thread Eric Anholt
This is used by the unit state, which is at emit() time. --- src/mesa/drivers/dri/i965/brw_urb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c index cef44b5..7643dc2 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 18/33] i965: Move VS pull constant upload to emit() time.

2011-10-24 Thread Eric Anholt
Only needed by the emit() for VS surfaces. --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 0237b58..f838daa 10

[Mesa-dev] [PATCH 16/33] i965: Move WM pull constant setup to emit() time.

2011-10-24 Thread Eric Anholt
It's needed by the WM surface state setup, which is now emit(). --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c inde

[Mesa-dev] [PATCH 19/33] i965: Fold the gen6/7 URB state prepare()/emit() together.

2011-10-24 Thread Eric Anholt
No other unit cares about the prepare state, unlike gen4-5. --- src/mesa/drivers/dri/i965/gen6_urb.c | 12 +++- src/mesa/drivers/dri/i965/gen7_urb.c | 12 +++- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drive

[Mesa-dev] [PATCH 22/33] i965/gen4: Fold push constant prepare()/emit() together.

2011-10-24 Thread Eric Anholt
While other units need to know about our constant buffer offsets, nothing else cared about which particular BO other than the emit() half. --- src/mesa/drivers/dri/i965/brw_curbe.c | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 21/33] i965/gen6: Move viewport state setup to emit() time.

2011-10-24 Thread Eric Anholt
Only the emit() for the pointers into the batch later in this file cares. --- src/mesa/drivers/dri/i965/gen6_viewport_state.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_s

[Mesa-dev] [PATCH 24/33] i965: Move program compile to emit() time.

2011-10-24 Thread Eric Anholt
Only 4 other prepare() functions are left, which don't rely on this. --- src/mesa/drivers/dri/i965/brw_clip.c |5 +++-- src/mesa/drivers/dri/i965/brw_gs.c |5 +++-- src/mesa/drivers/dri/i965/brw_sf.c |5 +++-- src/mesa/drivers/dri/i965/brw_vs.c |2 +- src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 23/33] i965/gen4: Move CURBE offset calculation to emit() time.

2011-10-24 Thread Eric Anholt
This is consumed by the unit state. --- src/mesa/drivers/dri/i965/brw_curbe.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index 86a39d9..93ee709 100644 --- a/src/mesa/drivers/dri/i965/brw_c

[Mesa-dev] [PATCH 33/33] i965: Remove the prepare() hook from state atoms.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_context.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 71bb015..c092438 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers

[Mesa-dev] [PATCH 30/33] i965: Remove state upload code for calling prepare() now that there are none.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_state_upload.c | 23 +++ 1 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 3479dfc..620c629 100644 --- a/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 31/33] i965: Merge brw_validate_state() and brw_upload_state() together.

2011-10-24 Thread Eric Anholt
They were called back-to-back at this point. --- src/mesa/drivers/dri/i965/brw_draw.c |7 --- src/mesa/drivers/dri/i965/brw_state.h|1 - src/mesa/drivers/dri/i965/brw_state_upload.c | 16 +--- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a

[Mesa-dev] [PATCH 28/33] i965: Finally, move the global fallbacks check to emit() time.

2011-10-24 Thread Eric Anholt
This was the last prepare() function, and it's the first state atom, so it must be ready to move. --- src/mesa/drivers/dri/i965/brw_fallback.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallbac

[Mesa-dev] [PATCH 29/33] i965: Remove some old texturing debug code.

2011-10-24 Thread Eric Anholt
It caught one possible bug I recall in my time working on the driver, and we haven't been setting it for non-fixed-function since the new FS backend came along. The bug it caught was likely a confusion about sampler mappings, which we have tests for these days. --- src/mesa/drivers/dri/i965/brw_c

[Mesa-dev] [PATCH 25/33] i965: Move the WM input sizes calculation to emit() time.

2011-10-24 Thread Eric Anholt
It's used for program compile. --- src/mesa/drivers/dri/i965/brw_vs_constval.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs_constval.c b/src/mesa/drivers/dri/i965/brw_vs_constval.c index 013a9cc..8b7993a 100644 --- a/src/mesa/drivers/d

[Mesa-dev] [PATCH 32/33] i965: Remove the memcpy()ed atoms array now that everything is emit()-based.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_context.h |4 ++-- src/mesa/drivers/dri/i965/brw_state_upload.c | 17 +++-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 7886766..71b

[Mesa-dev] [PATCH 27/33] i965: Move index buffer upload to emit() time.

2011-10-24 Thread Eric Anholt
It's consumed by the brw_emit_index_buffer() code at emit() time. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 112c9f0..b7

[Mesa-dev] [PATCH 26/33] i965: Do a hack job of merging VB prepare()/emit() together.

2011-10-24 Thread Eric Anholt
I don't really want to touch this impenetrable code in this series, so just call the one function from the other, since no other atom cares about them. --- src/mesa/drivers/dri/i965/brw_draw_upload.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i9

Re: [Mesa-dev] [PATCH] TransformFeedback: Assign transform feedback varying slots in linker.

2011-10-24 Thread Dan McCabe
On 10/23/2011 01:19 PM, Marek Olšák wrote: On Sat, Oct 22, 2011 at 2:14 AM, Dan McCabe wrote: Modify the linker to assign additional slots for varying variables used by transform feedback. This is done after other varyings are already assigned slots. Since this is done after previous varying s

[Mesa-dev] [PATCH 0/8] Interpolation qualifier support for i965

2011-10-24 Thread Paul Berry
This patch series adds support for the GLSL 1.30 interpolation qualifiers 'flat', 'noperspective', and 'smooth' to i965 Gen6+. There was already some support in Mesa core for these qualifiers, however, it did not distinguish correctly between 'smooth' and no interpolation qualifier at all, and it

[Mesa-dev] [PATCH 1/8] glsl: Distinguish between no interpolation qualifier and 'smooth'

2011-10-24 Thread Paul Berry
Previously, we treated the 'smooth' qualifier as equivalent to no qualifier at all. However, this is incorrect for the built-in color variables (gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor). For those variables, if there is no qualifier at all, interpolation sho

[Mesa-dev] [PATCH 2/8] glsl: add ir_variable::determine_interpolation_mode() function.

2011-10-24 Thread Paul Berry
This function determines how a variable should be interpolated based both on interpolation qualifiers and the current shade model. --- src/glsl/ir.cpp | 15 +++ src/glsl/ir.h | 11 +++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir.cpp b/src/g

[Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-24 Thread Paul Berry
This patch adds the bitfields InterpOverridesFlat, InterpOverridesSmooth, and InterpOverridesNoperspective to gl_fragment_program. These bitfields keep track of which fragment shader inputs are overridden with the GLSL "flat", "smooth", and "noperspective" interpolation qualifiers. For GLSL fragm

[Mesa-dev] [PATCH 4/8] i965/fs: Fix split_virtual_grfs() when delta_xy not in a virtual register.

2011-10-24 Thread Paul Berry
This patch modifies the special case in fs_visitor::split_virtual_grfs() that prevents splitting from being applied to the delta_x/delta_y register pair (this register pair needs to remain contiguous so that it can be used by the PLN instruction). When gen>=6, this register pair is in a fixed loca

[Mesa-dev] [PATCH 5/8] i965/gen6+: Parameterize barycentric interpolation modes.

2011-10-24 Thread Paul Berry
This patch modifies the fragment shader back-end so that instead of using a single delta_x/delta_y register pair to store barycentric coordinates, it uses an array of such register pairs, one for each possible intepolation mode. When setting up the WM, we intstruct it to only provide the barycentr

[Mesa-dev] [PATCH 6/8] i965/fs: use determine_interpolation_mode().

2011-10-24 Thread Paul Berry
This patch changes how fs_visitor::emit_general_interpolation() decides what kind of interpolation to do. Previously, it used the shade model to determine how to interpolate colors, and used smooth interpolation on everything else. Now it uses ir_variable::determine_interpolation_mode(), so that

[Mesa-dev] [PATCH 7/8] i965/gen6+: Rename GEN6_CLIP_BARYCENTRIC_ENABLE.

2011-10-24 Thread Paul Berry
The name was misleading. The actual effect of the bit is to cause the clipper to emit *non-perspective* barycentric coordinate information (which is only needed when doing noperspective interpolation). --- src/mesa/drivers/dri/i965/brw_defines.h |2 +- 1 files changed, 1 insertions(+), 1 dele

[Mesa-dev] [PATCH 8/8] i965/gen6+: Add support for noperspective interpolation.

2011-10-24 Thread Paul Berry
This required the following changes: - WM setup now makes the appropriate set of barycentric coordinates (perspective vs. noperspective) available to the fragment shader, based on whether the shader requires perspective interpolation, noperspective interpolation, both, or neither. - The fra

[Mesa-dev] [PATCH] pp: Fix memory leak on error path.

2011-10-24 Thread Vinson Lee
Fixes Coverity resource leak defect. --- src/gallium/auxiliary/postprocess/pp_program.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index c287af5..1a8a584 100644 --- a/sr

[Mesa-dev] [PATCH 1/4] i965: Remove "single threaded" INTEL_DEBUG mode.

2011-10-24 Thread Kenneth Graunke
According to the docs for 3DSTATE_PS (Gen7+) and 3DSTATE_WM (Gen6), there is a platform dependent value for the minimum number of pixel shader threads. It may also vary based on whether WIZ Hashing is on. For example, Ivybridge requires at least 4 threads if WIZ hashing is disabled, and 8 if it's

[Mesa-dev] [PATCH 2/4] i965: Rename (vs|wm)_max_threads to max_(vs|wm)_threads for consistency.

2011-10-24 Thread Kenneth Graunke
The inconsistency between vs_max_threads and max_vs_entries was rather annoying. I could never seem to remember which one was reversed, which made it harder to find quickly. "Max __ Threads" seems more natural. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 28

[Mesa-dev] [PATCH 3/4] i965: Add new brw_context::max_gs_threads constant.

2011-10-24 Thread Kenneth Graunke
These are correct to the best of my knowledge, gleaned from a variety of internal sources. Sadly, the Sandybridge PRM has incorrect limits. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c |7 +++ src/mesa/drivers/dri/i965/brw_context.h |1 + 2 files change

[Mesa-dev] [PATCH 4/4] i965: Add more #defines for Gen6+ 3DSTATE_GS fields.

2011-10-24 Thread Kenneth Graunke
These should be useful for doing transform feedback on Sandybridge. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH] pp: Fix memory leak on error path.

2011-10-24 Thread Jose Fonseca
Looks good. Jose - Original Message - > Fixes Coverity resource leak defect. > --- > src/gallium/auxiliary/postprocess/pp_program.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/gallium/auxiliary/postprocess/pp_program.c > b/src/gallium/auxiliary/po

Re: [Mesa-dev] [PATCH 0/4] Fix bug #41980... no, really!

2011-10-24 Thread Brian Paul
On 10/24/2011 03:16 PM, Ian Romanick wrote: The patch series fixes two issues: 1. Possibility that uniforms could become unused in later optimization passes and get removed. 2. Fields of structures were not enumerated. The first two patches, which have previously been sent to the list, fix the

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-24 Thread Brian Paul
On 10/24/2011 03:38 PM, Paul Berry wrote: This patch adds the bitfields InterpOverridesFlat, InterpOverridesSmooth, and InterpOverridesNoperspective to gl_fragment_program. These bitfields keep track of which fragment shader inputs are overridden with the GLSL "flat", "smooth", and "noperspectiv

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-24 Thread Paul Berry
On 24 October 2011 15:58, Brian Paul wrote: > On 10/24/2011 03:38 PM, Paul Berry wrote: > >> This patch adds the bitfields InterpOverridesFlat, >> InterpOverridesSmooth, and InterpOverridesNoperspective to >> gl_fragment_program. These bitfields keep track of which fragment >> shader inputs are

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-24 Thread Paul Berry
On 24 October 2011 16:37, Paul Berry wrote: > On 24 October 2011 15:58, Brian Paul wrote: > >> On 10/24/2011 03:38 PM, Paul Berry wrote: >> >>> This patch adds the bitfields InterpOverridesFlat, >>> InterpOverridesSmooth, and InterpOverridesNoperspective to >>> gl_fragment_program. These bitfie

[Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border stripping into a core Mesa option.

2011-10-24 Thread Eric Anholt
We wanted to reuse this in the Intel driver. --- src/mesa/main/mtypes.h | 14 src/mesa/main/teximage.c | 57 +-- src/mesa/state_tracker/st_cb_texture.c | 58 ++-- src/mesa/state_tracker/st_extensio

[Mesa-dev] [PATCH 2/3] intel: Enable stripping of texture borders.

2011-10-24 Thread Eric Anholt
This replaces software rendering of textures with the deprecated 1-pixel border (which is always bad, since mipmapping is rather broken in swrast, and GLSL 1.30 is unsupported) with hardware rendering that just pretends there was never a border (so you have potential seams on apps that actually int

Re: [Mesa-dev] [PATCH 1/4] i965: Remove "single threaded" INTEL_DEBUG mode.

2011-10-24 Thread Eric Anholt
On Mon, 24 Oct 2011 15:01:30 -0700, Kenneth Graunke wrote: > According to the docs for 3DSTATE_PS (Gen7+) and 3DSTATE_WM (Gen6), > there is a platform dependent value for the minimum number of pixel > shader threads. It may also vary based on whether WIZ Hashing is on. > > For example, Ivybridg

[Mesa-dev] [PATCH 3/3] intel: Drop texture border support code.

2011-10-24 Thread Eric Anholt
--- src/mesa/drivers/dri/i965/brw_fallback.c| 16 +- src/mesa/drivers/dri/intel/intel_mipmap_tree.c |4 -- src/mesa/drivers/dri/intel/intel_tex.c | 12 ++- src/mesa/drivers/dri/intel/intel_tex_image.c| 36 +- src/mesa/drivers/dri/inte

Re: [Mesa-dev] [PATCH 4/4] i965: Add more #defines for Gen6+ 3DSTATE_GS fields.

2011-10-24 Thread Eric Anholt
On Mon, 24 Oct 2011 15:01:33 -0700, Kenneth Graunke wrote: > These should be useful for doing transform feedback on Sandybridge. the rest of this series is also Reviewed-by: Eric Anholt pgpXZsZcDeI8p.pgp Description: PGP signature ___ mesa-dev mail

Re: [Mesa-dev] [PATCH] intel: Kill dead code in intel_miptree_copy_teximage()

2011-10-24 Thread Eric Anholt
On Mon, 24 Oct 2011 14:03:38 -0700, Chad Versace wrote: > Kill the code paths taken when src_mt is null. It is never null, otherwise > there would be a segfault on line 4 of this function: > GLuint width = src_mt->level[level].width; > > (Some interleaved lines in the diff make the real diff

Re: [Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border stripping into a core Mesa option.

2011-10-24 Thread Brian Paul
On Mon, Oct 24, 2011 at 5:15 PM, Eric Anholt wrote: > We wanted to reuse this in the Intel driver. > --- >  src/mesa/main/mtypes.h                 |   14 >  src/mesa/main/teximage.c               |   57 +-- >  src/mesa/state_tracker/st_cb_texture.c |   58 > ++

Re: [Mesa-dev] [PATCH 4/4] ir_to_mesa: Use uniform_field_visitor to add all struct fields to parameter list

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 02:16 PM, Ian Romanick wrote: > From: Ian Romanick > > Previously the uniform was passed as single, whole structure to > _mesa_add_parameter. This was completely bogus and resulted in a > DataType of 0 (instead of a valid GLSL type enum). > > Signed-off-by: Ian Romanick > Bugzill

Re: [Mesa-dev] [PATCH 3/4] linker: Add uniform_field_visitor class to process leaf fields of a uniform

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 02:16 PM, Ian Romanick wrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/glsl/Makefile |1 + > src/glsl/link_uniforms.cpp | 116 > > src/glsl/linker.h | 45 + > 3 files cha

[Mesa-dev] [PATCH] ralloc: Add new [v]asprintf_rewrite_tail functions.

2011-10-24 Thread Kenneth Graunke
This can be useful if you want to create a bunch of temporary strings with a common prefix. For example, when iterating over uniform structure fields, one might want to create temporary strings like "pallete.primary", "palette.outline", and "pallette.shadow". This could be done by overwriting the

[Mesa-dev] [PATCH 3/4 v2] linker: Add uniform_field_visitor class to process leaf fields of a uniform

2011-10-24 Thread Kenneth Graunke
From: Ian Romanick Signed-off-by: Ian Romanick Signed-off-by: Kenneth Graunke --- src/glsl/Makefile |1 + src/glsl/link_uniforms.cpp | 85 src/glsl/linker.h | 44 +++ 3 files changed, 130 insertions(+),

[Mesa-dev] segfault after enabling kde desktop effects

2011-10-24 Thread Knut Petersen
Hi everybody! Enabling kde desktop effects fails most of the time with a segfault. os: linux kernel: 3.1 xorg: git, 10-24-2011 mesa: last commit c9bb1bdc4859af001f0bc9a931eaf53266b49c0c dmesg: no related entry Xorg.0.log: no related entry mobo: AOpen i915GMm-hfs gpu: i915GM cpu: Pentium M (Do

[Mesa-dev] [PATCH] Fix max texture levels on nv50

2011-10-24 Thread Adel Gadllah
Hi, The attached patch fixes the texture limits on nv50 to match what the hardware is actually capable off. - From: Adel Gadllah Date: Mon, 24 Oct 2011 19:41:03 +0200 Subject: [PATCH] Fix max texture levels on nv50 MAX_TEXTURE_2D_LEVELS and MAX_TEXTURE_CUBE_LEVELS are supposed to be 14 not