Re: [Mesa-dev] [PATCH] Add initial Haiku build support

2011-12-22 Thread Maarten Lankhorst
Hey Alexander, On 12/21/2011 07:16 PM, Alexander von Gluck wrote: > > * Doesn't reintroduce legacy drivers > * Adds Haiku mklib code > * Removes some broken PIPE_OS_HAIKU defines > * Removes an NDEBUG ifdef in link_uniforms.cpp, > there is an item that uses the union without > checking NDEBUG

[Mesa-dev] [PATCH] vbo: count min/max_index before vbo->draw_prims

2011-12-22 Thread Yuanhan Liu
For the case that index data is stored in element array buffer object, and user called glMultiDrawElements, count the min/max_index before calling vbo->draw_prims. vbo_get_minmax_index() isn't friendly to this case. So do it while building the prim info. Signed-off-by: Yuanhan Liu --- src/mesa/v

Re: [Mesa-dev] [PATCH 1/3] vl: Only initialize vlc once

2011-12-22 Thread Christian König
Hi Maarten, On 21.12.2011 21:52, Maarten Lankhorst wrote: It would be nice if you inlined patches for easier reviewing. :) Well I can try, but I can't promise that Thunderbird isn't badly fucking up all whitespaces, newest version of the patch is in-lined below. I'm spotting an overflow that

[Mesa-dev] [PATCH] glsl_to_tgsi: v2 Invalidate and revalidate uniform backing storage

2011-12-22 Thread Vadim Girlin
If glUniform1i and friends are going to dump data directly in driver-allocated, the pointers have to be updated when the storage moves. This should fix the regressions seen with commit 7199096. I'm not sure if this is the only place that needs this treatment. I'm a little uncertain about the var

[Mesa-dev] [Bug 44061] New: dri/nouveau: Build error with clang

2011-12-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44061 Bug #: 44061 Summary: dri/nouveau: Build error with clang Classification: Unclassified Product: Mesa Version: git Platform: All URL: http://lists.freedesktop.org/archives/m

Re: [Mesa-dev] [PATCH] mesa: consolidate texstore functions

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 12:48 PM, Jose Fonseca wrote: > Looks like a nice cleanup. > > I wonder if it wouldn't be more future proof to explicit add cases for > GL_TEXTURE_2D, cube face, etc., and have default be an assertion failure. Yeah, that's probably a good idea. -Brian ___

[Mesa-dev] [PATCH] mesa: consolidate texstore functions

2011-12-22 Thread Brian Paul
From: Brian Paul The code for storing 1D, 2D and 3D tex images (whole or sub-images) was all pretty similar. This consolidates those six paths. v2: rework switch statement to catch unexpected targets --- src/mesa/main/texstore.c | 484 +++--- 1 files ch

Re: [Mesa-dev] [PATCH] mesa: consolidate texstore functions

2011-12-22 Thread Jose Fonseca
Looks good to me. Jose - Original Message - > From: Brian Paul > > The code for storing 1D, 2D and 3D tex images (whole or sub-images) > was > all pretty similar. This consolidates those six paths. > > v2: rework switch statement to catch unexpected targets > --- > src/mesa/main/texs

Re: [Mesa-dev] [PATCH 02/22] swrast: do fast_copy_pixels() with Map/UnmapRenderbuffer()

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 12:58 PM, Eric Anholt wrote: >> -   temp = malloc(width * MAX_PIXEL_BYTES); >> -   if (!temp) { >> -      _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); >> -      return GL_FALSE; >> +      /* different src/dst buffers */ >> +      ctx->Driver.MapRenderbuffer(ctx, srcR

Re: [Mesa-dev] [PATCH 08/22] swrast: rewrite _swrast_read_stencil_span()

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 1:01 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:13 -0700, Brian Paul wrote: >> Use format pack/unpack functions instead of deprecated renderbuffer >> GetRow/PutRow functions. >> --- >>  src/mesa/swrast/s_stencil.c |   31 ++- >>  1 files

Re: [Mesa-dev] [PATCH 11/22] swrast: use _swrast_pixel_address() helper function

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 1:12 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:16 -0700, Brian Paul wrote: >> --- >>  src/mesa/swrast/s_context.h |   12 >>  src/mesa/swrast/s_depth.c   |   18 -- >>  src/mesa/swrast/s_stencil.c |   18 +++--- >>  3 files ch

Re: [Mesa-dev] [PATCH 14/22] swrast: stop using depth/stencil wrappers in CopyPixels code

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 1:20 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:19 -0700, Brian Paul wrote: >> The functions that read depth/stencil values understand all (packed) >> depth/stencil buffer formats now so there's no reason to use the >> wrappers. >> >> Also, improve the format check

[Mesa-dev] Drooping multiple driver support in EGL?

2011-12-22 Thread Chia-I Wu
Hi list, Multiple driver support in EGL is hard to get right, if not impossible. On Linux desktop, we almost always want to use egl_dri2. It allows EGL to loads DRI2 drivers, thus allowing it to share DRI2 drivers with libGL. In one case where the app wants to use OpenVG, libEGL needs to load eg

Re: [Mesa-dev] [PATCH 16/22] swrast: fast_draw_depth_stencil() for glDrawPixels(GL_DEPTH_STENCIL)

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 1:30 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:21 -0700, Brian Paul wrote: >> Stop using deprecated renderbuffer PutRow() function.  Note that we >> aren't using Map/UnmapRenderbuffer() yet because this call is inside >> a swrast_render_start/finish() pair. >> ---

Re: [Mesa-dev] [PATCH 18/22] swrast: refactor fast_draw_rgba_pixels()

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 1:49 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:23 -0700, Brian Paul wrote: >> Use Map/UnmapRenderbuffer() for the special, optimized cases we care about. > > I note that this happens to drop the fast paths for zooming (and > CI8->RGBA, lol).  Totally reasonable, j

Re: [Mesa-dev] [PATCH 1/5] mesa: Save and restore GL_RASTERIZER_DISCARD state during meta ops.

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 2:39 PM, Paul Berry wrote: > During meta-operations (such as _mesa_meta_GenerateMipmap()), we need > to be able to draw even if GL_RASTERIZER_DISCARD is enabled.  This > patch causes _mesa_meta_begin() to save the state of > GL_RASTERIZER_DISCARD and disable it (so that dra

Re: [Mesa-dev] [PATCH 2/5] mesa: Ensure that Paused is reset to false on EndTransformFeedback.

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 2:39 PM, Paul Berry wrote: > If a client calls BeginTransformFeedback(), then > PauseTransformFeedback(), then EndTransformFeedback(), we need to make > sure that the transform feedback object is not left in a "paused" > state, otherwise the next call to BeginTransformFeedb

Re: [Mesa-dev] [PATCH 3/5] mesa: Disable certain error checks when transform feedback is paused

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 2:39 PM, Paul Berry wrote: > When transform feedback is paused, it is legal to change programs or > to perform drawing operations using a drawing mode that doesn't match > the transform feedback mode. > --- >  src/mesa/main/shaderapi.c         |    5 +++-- >  src/mesa/main/

Re: [Mesa-dev] [PATCH] vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 10:36 AM, Marek Olšák wrote: > Hi Brian, > > Is there a reason to set _NEW_ARRAY when transitioning between > DrawArrays and DrawElements? Probably not, actually. I was just being overly paranoid. I can fix that. -Brian ___ me

Re: [Mesa-dev] [PATCH] vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays

2011-12-22 Thread Brian Paul
2011/12/21 Mathias Fröhlich : > > Hi, > > On Wednesday, December 21, 2011 01:58:08 Brian Paul wrote: >> This fixes a regression seen with the isosurf demo when switching between >> glBegin/End and glDrawArrays (do it several times).  The problem was the >> driver wasn't getting _NEW_ARRAY when the

Re: [Mesa-dev] [PATCH 5/5] mesa: Pause transform feedback during meta ops.

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 2:39 PM, Paul Berry wrote: > Fixes piglit tests "EXT_transform_feedback/generatemipmap buffer" and > "EXT_transform_feedback/generatemipmap prims_written" on i965 Gen6. > --- >  src/mesa/drivers/common/meta.c |   13 + >  1 files changed, 13 insertions(+), 0 dele

Re: [Mesa-dev] [PATCH 08/22] swrast: rewrite _swrast_read_stencil_span()

2011-12-22 Thread Eric Anholt
On Thu, 22 Dec 2011 09:31:59 -0700, Brian Paul wrote: > On Wed, Dec 21, 2011 at 1:01 PM, Eric Anholt wrote: > > On Sun, 18 Dec 2011 20:08:13 -0700, Brian Paul wrote: > >>     if ((stencilMask & stencilMax) != stencilMax) { > >>        /* need to apply writemask */ > >>        GLubyte destVals[MA

Re: [Mesa-dev] [PATCH 14/22] swrast: stop using depth/stencil wrappers in CopyPixels code

2011-12-22 Thread Eric Anholt
On Thu, 22 Dec 2011 09:49:33 -0700, Brian Paul wrote: > On Wed, Dec 21, 2011 at 1:20 PM, Eric Anholt wrote: > > On Sun, 18 Dec 2011 20:08:19 -0700, Brian Paul wrote: > >> The functions that read depth/stencil values understand all (packed) > >> depth/stencil buffer formats now so there's no reas

Re: [Mesa-dev] [PATCH 21/22] swrast: stop using _DepthBuffer in triangle code

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 2:16 PM, Eric Anholt wrote: > On Sun, 18 Dec 2011 20:08:26 -0700, Brian Paul wrote: >> The only consequence is we can only use the occlusion_zless_16_triangle() >> function with MESA_FORMAT_Z16. > > I'm not following that conclusion, probably due to ignorance of swrast > s

Re: [Mesa-dev] [PATCH] Move the format and type check before select_tex_image, or it will

2011-12-22 Thread Brian Paul
Your subject line / description seems to be truncated. Can you describe why the change is being made in more detail? Thanks. -Brian On Wed, Dec 21, 2011 at 10:40 PM, wrote: > From: Jian Zhao > > Reported-by: Anuj Phogat > Signed-off-by: Jian Zhao > Reviewed-by: Yuanhan Liu > --- >  src/me

Re: [Mesa-dev] [PATCH 1/2] meta: Disable GL_TEXTURE_EXTERNAL_OES in meta_begin()

2011-12-22 Thread Brian Paul
On Wed, Dec 21, 2011 at 7:34 PM, Chad Versace wrote: > If the meta flag MESA_META_TEXTURE is present, then disable the texture > target GL_TEXTURE_EXTERNAL_OES. > > Signed-off-by: Chad Versace > --- >  src/mesa/drivers/common/meta.c |    2 ++ >  1 files changed, 2 insertions(+), 0 deletions(-) >

[Mesa-dev] [PATCH] swrast: stop using depth/stencil wrappers in CopyPixels code

2011-12-22 Thread Brian Paul
From: Brian Paul The functions that read depth/stencil values understand all (packed) depth/stencil buffer formats now so there's no reason to use the wrappers. Also, improve the format checks in fast_copy_pixels() to catch mismatched depth/stencil cases. v2: fix the test for combined depth+ste

[Mesa-dev] [PATCH] swrast: new fast_draw_depth_stencil() for glDrawPixels(GL_DEPTH_STENCIL)

2011-12-22 Thread Brian Paul
From: Brian Paul Stop using deprecated renderbuffer PutRow() function. Note that we aren't using Map/UnmapRenderbuffer() yet because this call is inside a swrast_render_start/finish() pair. v2: use _mesa_pack_uint_24_8_depth_stencil_row(), per Eric. --- src/mesa/swrast/s_drawpix.c | 56 +

Re: [Mesa-dev] [PATCH 6/8] i965: get the jmp distance by instruction index

2011-12-22 Thread Eric Anholt
On Thu, 22 Dec 2011 10:18:05 +0800, Yuanhan Liu wrote: > On Wed, Dec 21, 2011 at 05:57:35AM -0800, Eric Anholt wrote: > > On Wed, 21 Dec 2011 17:33:41 +0800, Yuanhan Liu > > wrote: > > > If dynamic instruction store size is enabled, while after the brw_JMPI() > > > and before the brw_land_fwd_j

Re: [Mesa-dev] [PATCH] i965: Don't use BRW_DEPTHFORMAT_D24_UNORM_X8_UINT on Gen4.

2011-12-22 Thread Eric Anholt
On Wed, 21 Dec 2011 16:36:45 -0800, Kenneth Graunke wrote: > X8 depth formats weren't supported until Ironlake (Gen 5). > > Fixes GPU hangs introduced in d84a180417d1eabd680554970f1eaaa93abcd41e. > One example test case was "fbo-missing-attachment-blit from". > > Signed-off-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH 0/5] i965 gen6: Fix interactions between transform feedback and meta-ops.

2011-12-22 Thread Eric Anholt
On Wed, 21 Dec 2011 13:39:05 -0800, Paul Berry wrote: > This patch series ensures that meta-ops (such as glClear or > glGenerateMipmapEXT) function properly when transform feedback or > rasterizer discard is enabled. > > Most of the code changes necessary to make this work are in core mesa: > pat

Re: [Mesa-dev] Drooping multiple driver support in EGL?

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 09:01 AM, Chia-I Wu wrote: > Hi list, > > Multiple driver support in EGL is hard to get right, if not impossible. > On Linux desktop, we almost always want to use egl_dri2. It allows EGL > to loads DRI2 drivers, thus allowing it to share DRI2 drivers with > libGL. > > In one case w

Re: [Mesa-dev] [PATCH 0/5] i965 gen6: Fix interactions between transform feedback and meta-ops.

2011-12-22 Thread Kenneth Graunke
On 12/21/2011 01:39 PM, Paul Berry wrote: > This patch series ensures that meta-ops (such as glClear or > glGenerateMipmapEXT) function properly when transform feedback or > rasterizer discard is enabled. > > Most of the code changes necessary to make this work are in core mesa: > patches 1/5 and

Re: [Mesa-dev] [PATCH 4/5] i965 gen6: Implement transform feedback pause/resume functionality.

2011-12-22 Thread Kenneth Graunke
On 12/21/2011 01:39 PM, Paul Berry wrote: > Although i965 gen6 does not yet support ARB_transform_feedback2 or > NV_transform_feedback2, it needs to support pause/resume functionality > so that meta-ops will work correctly. > --- > src/mesa/drivers/dri/i965/brw_draw.c |3 ++- > src/mesa/driver

Re: [Mesa-dev] [PATCH 7/8] i965: call next_insn() before referencing a instruction by index

2011-12-22 Thread Kenneth Graunke
On 12/21/2011 01:33 AM, Yuanhan Liu wrote: [snip] > + int emit_endif = 1; Please use bool and true/false rather than int. > /* In single program flow mode, we can express IF and ELSE instructions > * equivalently as ADD instructions that operate on IP. On platforms > prior > @@ -1219

[Mesa-dev] [PATCH] gallivm: Close a memory leak

2011-12-22 Thread Lauri Kasanen
Hi all This fixes a memory leak of 32 bytes on exit. >From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Thu, 22 Dec 2011 21:28:33 +0200 Subject: [PATCH] gallivm: Close a memory leak As reported by "valgrind --leak-check=full glxgears". Signed-off-

[Mesa-dev] [PATCH] mesa: add back glGetnUniformfv() overflow error reporting

2011-12-22 Thread nobled
The error was erroneously removed in this commit: 719909698c67c287a393d2380278e7b7495ae018 "mesa: Rewrite the way uniforms are tracked and handled" You also aren't even supposed to truncate the output to 'bufSize', so just return like before. Also fixup an old comment and add an assert. --- (Thi

[Mesa-dev] [PATCH 1/3] i965: Rename BRW_NEW_WM_SURFACES to BRW_NEW_SURFACES.

2011-12-22 Thread Paul Berry
The surface states tracked by BRW_NEW_WM_SURFACES are no longer used for just WM. They are also used for vertex texturing and transform feedback. To avoid confusion, this patch renames BRW_NEW_WM_SURFACES to BRW_NEW_SURFACES. --- src/mesa/drivers/dri/i965/brw_context.h |4 ++-- src/

[Mesa-dev] [PATCH 2/3] i965 gen6: Resend binding table pointer after updating SOL bindings.

2011-12-22 Thread Paul Berry
After creating new binding table entries for transform feedback, we need to set the dirty flag BRW_NEW_SURFACES, so that a new binding table pointer will be sent to the hardware. Otherwise the new binding table entries will not take effect. --- src/mesa/drivers/dri/i965/gen6_sol.c |2 ++ 1 fi

[Mesa-dev] [PATCH 3/3] i965 Gen6+: Invalidate VF address-based cache on flush

2011-12-22 Thread Paul Berry
Although there is not much documentation of this fact, there are in fact two separate VF caches: - an "index-based" cache (described in the Sandy Bridge PRM, vol 2 part 1, section 2.1.2 "Vertex Cache"). This cache stores URB handles of vertex shader outputs; its purpose is to avoid redundant

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Kenneth Graunke
On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > Here is the final patch to enable dynamic eu instruction store size: > increase the brw eu instruction store size dynamically instead of just > allocating it statically with a constant limit. This would fix something > that 'GL_MAX_PROGRAM_INSTRUCTIONS_A

Re: [Mesa-dev] [PATCH 0/8] i965: dynamic eu instruction store size

2011-12-22 Thread Kenneth Graunke
On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > Hi, this is a new series of patches for dynamic eu instruction store > size. The first 4 is from Eric. I just grabed it to make it rebase to > current repo. The last 4 patch is from mine which some are based on > those patches from Eric. > > Please help

Re: [Mesa-dev] [PATCH 3/3] i965 Gen6+: Invalidate VF address-based cache on flush

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 02:06 PM, Paul Berry wrote: > Although there is not much documentation of this fact, there are in > fact two separate VF caches: > > - an "index-based" cache (described in the Sandy Bridge PRM, vol 2 > part 1, section 2.1.2 "Vertex Cache"). This cache stores URB > handles of ver

[Mesa-dev] [PATCH] mesa: Add Haiku build support

2011-12-22 Thread kallisti5
From: Alexander von Gluck IV * Add Haiku as a platform to mklib * Fix GLU to allow building static libGLU * Remove a few existing Haiku defines that break the build --- Makefile |1 + acinclude.m4 |2 +- bin/mklib

Re: [Mesa-dev] [PATCH] gallivm: Close a memory leak

2011-12-22 Thread Jose Fonseca
Commited. Thanks. Jose - Original Message - > Hi all > > This fixes a memory leak of 32 bytes on exit. > > From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 > 2001 > From: Lauri Kasanen > Date: Thu, 22 Dec 2011 21:28:33 +0200 > Subject: [PATCH] gallivm: Close a memory l

[Mesa-dev] i965/gen7 transform feedback

2011-12-22 Thread Eric Anholt
Here's today's patch series for gen7 transform feedback. It runs on top of a kernel patch at people.freedesktop.org:~anholt/linux on the gen7-reset-sol branch. I expected it to be easy, but not this easy. Remaining test failures: tessellation polygon flat_lastwarn tessel

[Mesa-dev] [PATCH 4/7] i965/gen7: Move SOL stage disable to gen7_sol_state.c

2011-12-22 Thread Eric Anholt
We'll be growing more code in here as we actually enable the unit. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/Makefile.sources |1 + src/mesa/drivers/dri/i965/brw_state_upload.c |1 + src/mesa/drivers/dri/i965/gen7_disable.c |7 --- src/mesa/drivers/dri/i965/gen

[Mesa-dev] [PATCH 2/7] i965/gen7: Make primitives_written counting work.

2011-12-22 Thread Eric Anholt
The code was relying on gs.prog_data's copy of the number-of-verts-per-prim, which segfaulted on gen7 since it doesn't make a GS program. We can easily calculate that value right here. --- src/mesa/drivers/dri/i965/brw_draw.c | 33 +++-- 1 files changed, 27 insertion

[Mesa-dev] [PATCH 3/7] i965/gen7: Add register definitions for GL_EXT_transform_feedback.

2011-12-22 Thread Eric Anholt
Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h | 76 ++- src/mesa/drivers/dri/intel/intel_reg.h | 15 ++ 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 1/7] i965/gen7: Enable EXT_transform_feedback extension under 3.0 override.

2011-12-22 Thread Eric Anholt
Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/intel/intel_extensions.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 7ab5d90..09ee9ba 100644 --- a/src/mesa/driv

[Mesa-dev] [PATCH 5/7] i965/gen7: Add support for rasterization discard.

2011-12-22 Thread Eric Anholt
Fixes the piglit discard-* tests. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/gen7_sol_state.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index fcda08d..65

[Mesa-dev] [PATCH 6/7] i965/gen7: Add support for transform feedback.

2011-12-22 Thread Eric Anholt
Fixes almost all of the transform feedback piglit tests. Remaining are a few tests related to tesselation for quads/trifans/tristrips/polygons with flat shading. --- src/mesa/drivers/dri/i965/gen7_sol_state.c | 199 ++- 1 files changed, 191 insertions(+), 8 deletions(-)

[Mesa-dev] [PATCH 7/7] i965/gen7: Fix feedback for flat-shaded tristrips versus provoking vertex.

2011-12-22 Thread Eric Anholt
Fixes piglit tesselation triangle_strip flat_last. --- src/mesa/drivers/dri/i965/gen7_sol_state.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index a5e28b6..93ca868 100644 ---

Re: [Mesa-dev] [PATCH 0/8] i965: dynamic eu instruction store size

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 02:37:58PM -0800, Kenneth Graunke wrote: > On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > > Hi, this is a new series of patches for dynamic eu instruction store > > size. The first 4 is from Eric. I just grabed it to make it rebase to > > current repo. The last 4 patch is from

Re: [Mesa-dev] [PATCH 2/7] i965/gen7: Make primitives_written counting work.

2011-12-22 Thread Paul Berry
On 22 December 2011 16:54, Eric Anholt wrote: > The code was relying on gs.prog_data's copy of the > number-of-verts-per-prim, which segfaulted on gen7 since it doesn't > make a GS program. We can easily calculate that value right here. > --- > src/mesa/drivers/dri/i965/brw_draw.c | 33 >

Re: [Mesa-dev] [PATCH 2/7] i965/gen7: Make primitives_written counting work.

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 04:54 PM, Eric Anholt wrote: > The code was relying on gs.prog_data's copy of the > number-of-verts-per-prim, which segfaulted on gen7 since it doesn't > make a GS program. We can easily calculate that value right here. > --- > src/mesa/drivers/dri/i965/brw_draw.c | 33 +++

[Mesa-dev] [PATCH] ff_fragment_shader: Don't generate swizzles for scalar combiner inputs

2011-12-22 Thread Ian Romanick
From: Ian Romanick There are a couple scenarios where the source could be zero and the operand could be either SRC_ALPHA or ONE_MINUS_SRC_ALPHA. For example, if the source was ZERO. This would result in something like (0).w, and a later call to ir_validate would get angry. Signed-off-by: Ian R

Re: [Mesa-dev] [PATCH 5/7] i965/gen7: Add support for rasterization discard.

2011-12-22 Thread Paul Berry
On 22 December 2011 16:54, Eric Anholt wrote: > Fixes the piglit discard-* tests. > > Reviewed-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/gen7_sol_state.c |8 +++- > 1 files changed, 7 insertions(+), 1 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c >

Re: [Mesa-dev] Dropping multiple driver support in EGL?

2011-12-22 Thread Chia-I Wu
[fix subject..] On Fri, Dec 23, 2011 at 2:31 AM, Kenneth Graunke wrote: > On 12/22/2011 09:01 AM, Chia-I Wu wrote: >> Hi list, >> >> Multiple driver support in EGL is hard to get right, if not impossible. >> On Linux desktop, we almost always want to use egl_dri2.  It allows EGL >> to loads DRI2

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 02:33:03PM -0800, Kenneth Graunke wrote: > On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > > Here is the final patch to enable dynamic eu instruction store size: > > increase the brw eu instruction store size dynamically instead of just > > allocating it statically with a const

Re: [Mesa-dev] [PATCH 7/8] i965: call next_insn() before referencing a instruction by index

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 11:09:12AM -0800, Kenneth Graunke wrote: > On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > [snip] > > + int emit_endif = 1; > > Please use bool and true/false rather than int. Yes, right. Will fix it. > > > /* In single program flow mode, we can express IF and ELSE in

Re: [Mesa-dev] [PATCH 3/7] i965/gen7: Add register definitions for GL_EXT_transform_feedback.

2011-12-22 Thread Paul Berry
On 22 December 2011 16:54, Eric Anholt wrote: > Reviewed-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_defines.h | 76 > ++- > src/mesa/drivers/dri/intel/intel_reg.h | 15 ++ > 2 files changed, 89 insertions(+), 2 deletions(-) > > diff --git a/sr

Re: [Mesa-dev] [PATCH 6/7] i965/gen7: Add support for transform feedback.

2011-12-22 Thread Paul Berry
On 22 December 2011 16:54, Eric Anholt wrote: > Fixes almost all of the transform feedback piglit tests. Remaining > are a few tests related to tesselation for > quads/trifans/tristrips/polygons with flat shading. > --- > src/mesa/drivers/dri/i965/gen7_sol_state.c | 199 > +

Re: [Mesa-dev] i965/gen7 transform feedback

2011-12-22 Thread Paul Berry
On 22 December 2011 16:54, Eric Anholt wrote: > Here's today's patch series for gen7 transform feedback. It runs on > top of a kernel patch at people.freedesktop.org:~anholt/linux on the > gen7-reset-sol branch. I expected it to be easy, but not this easy. > This is fantastic, Eric. I'm reall

Re: [Mesa-dev] [PATCH 5/7] i965/gen7: Add support for rasterization discard.

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 06:22 PM, Paul Berry wrote: > On 22 December 2011 16:54, Eric Anholt > wrote: > > Fixes the piglit discard-* tests. > > Reviewed-by: Kenneth Graunke > > --- > src/mesa/drivers/dri/i965/gen7_sol_state.c |

Re: [Mesa-dev] [PATCH 6/7] i965/gen7: Add support for transform feedback.

2011-12-22 Thread Marek Olšák
On Fri, Dec 23, 2011 at 4:22 AM, Paul Berry wrote: > FYI, this assertion should hold true until we implement > ARB_transfrom_feedback3 (which allows holes in the transform feedback > structure).  I think Marek has some plans to implement that for Gallium (not > sure of his timeframe though), so we

Re: [Mesa-dev] [PATCH 6/7] i965/gen7: Add support for transform feedback.

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 04:54 PM, Eric Anholt wrote: > Fixes almost all of the transform feedback piglit tests. Remaining > are a few tests related to tesselation for > quads/trifans/tristrips/polygons with flat shading. > --- > src/mesa/drivers/dri/i965/gen7_sol_state.c | 199 ++-

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Kenneth Graunke
On 12/22/2011 07:04 PM, Yuanhan Liu wrote: > On Thu, Dec 22, 2011 at 02:33:03PM -0800, Kenneth Graunke wrote: >> On 12/21/2011 01:33 AM, Yuanhan Liu wrote: [snip] >>> -#define BRW_EU_MAX_INSN_STACK 5 >>> -#define BRW_EU_MAX_INSN 1 >>> +#define BRW_EU_MAX_INSN_STACK 5 >>> +#define BRW_EU_MAX_I

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 07:51:46PM -0800, Kenneth Graunke wrote: > On 12/22/2011 07:04 PM, Yuanhan Liu wrote: > > On Thu, Dec 22, 2011 at 02:33:03PM -0800, Kenneth Graunke wrote: > >> On 12/21/2011 01:33 AM, Yuanhan Liu wrote: > [snip] > >>> -#define BRW_EU_MAX_INSN_STACK 5 > >>> -#define BRW_EU_MA

Re: [Mesa-dev] [PATCH] vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays

2011-12-22 Thread Mathias Fröhlich
Hi, On Thursday, December 22, 2011 18:30:44 Brian Paul wrote: > I'm not sure if "playback_vertex_list" is more like DRAW_BEGIN_END or > DRAW_ARRAYS. > Maybe add a DRAW_DISPLAY_LIST enum value? It's more like begin/end I think. The begin/end code just sets the array state below the state tracking