[Mesa-dev] [PATCH] gallivm: Remove TargetMachine from createMCInstPrinter when using llvm-3.0

2011-07-07 Thread Tobias Droste
llvm-3.0svn revision 134525 removed the TargetMachine parameter from createMCInstPrinter Signed-off-by: Tobias Droste --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/

Re: [Mesa-dev] Building internal glsl_compiler with builtin_function.o instead of builtin-stubs.o?

2011-07-07 Thread Kenneth Graunke
On 07/07/2011 06:13 PM, Dan McCabe wrote: > Is there a good reason not to build the internal glsl_compiler (in > mesa/src/glsl) and link it with builtin_function.o? It is currently > being built with builtin_stubs.o. Ian changed that in bf9850db to kludge around some kind of linker errors he was g

[Mesa-dev] [PATCH 2/2] r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP

2011-07-07 Thread Vadim Girlin
SUB & LRP instructions should toggle NEG bit instead of setting it, otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1" Signed-off-by: Vadim Girlin --- src/gallium/drivers/r600/r600_shader.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/driver

[Mesa-dev] [PATCH 1/2] r600g: introduce r600_bc_src_set_abs helper and fix LOG

2011-07-07 Thread Vadim Girlin
LOG instruction should use absolute values of source operand. Signed-off-by: Vadim Girlin --- src/gallium/drivers/r600/r600_shader.c | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r6

Re: [Mesa-dev] [PATCH 2/2] r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP

2011-07-07 Thread Vadim Girlin
On Thu, 2011-07-07 at 21:19 +0200, Henri Verbeet wrote: > Not necessarily wrong, but I think "bc_src->neg = !bc_src->neg;" would > be the more common way to write this. I agree with your comments for both patches. I'll change them as you suggested and resend. Thanks for reviewing. __

[Mesa-dev] Building internal glsl_compiler with builtin_function.o instead of builtin-stubs.o?

2011-07-07 Thread Dan McCabe
Is there a good reason not to build the internal glsl_compiler (in mesa/src/glsl) and link it with builtin_function.o? It is currently being built with builtin_stubs.o. I can understand why builtin_compiler uses builtin_stubs.o instead of builtin_function.o (to avoid conflicts while building

[Mesa-dev] [PATCH 2/2] i965: Fix fp-dst-aliasing-[12].vpfp.

2011-07-07 Thread Eric Anholt
There's no pretty way to avoid the overwriting of the src operands, so just use a temporary destination and rely on the MOV optimization. --- src/mesa/drivers/dri/i965/brw_wm_fp.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i

Re: [Mesa-dev] [PATCH] intel: add null src pointer check in intel_region_reference()

2011-07-07 Thread Eric Anholt
On Thu, 7 Jul 2011 17:31:47 -0600, Brian Paul wrote: > Fixes segfault when running cubemap demo on i945. This happened > when intel_region_reference() was called in i915_set_draw_region() > with depth_region=NULL. Whoops, managed to drop that check in the cleanup. Thanks! Reviewed-by: Eric An

[Mesa-dev] [PATCH 2/3] fp-lit-src-equals-dst: Convert to readback before glutSwapBuffers().

2011-07-07 Thread Eric Anholt
--- tests/shaders/fp-lit-src-equals-dst.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/shaders/fp-lit-src-equals-dst.c b/tests/shaders/fp-lit-src-equals-dst.c index 11d495d..e59b3b3 100644 --- a/tests/shaders/fp-lit-src-equals-dst.c +++ b/tests/shaders/fp-li

[Mesa-dev] [PATCH 1/3] fp-lit-src-equals-dst: Convert to using piglit_probe_pixel_rgba().

2011-07-07 Thread Eric Anholt
--- tests/shaders/fp-lit-src-equals-dst.c | 33 ++--- 1 files changed, 10 insertions(+), 23 deletions(-) diff --git a/tests/shaders/fp-lit-src-equals-dst.c b/tests/shaders/fp-lit-src-equals-dst.c index 464dbcc..11d495d 100644 --- a/tests/shaders/fp-lit-src-equals-ds

[Mesa-dev] [PATCH 1/2] i965: Fix fp-lit-src-equals-dst.

2011-07-07 Thread Eric Anholt
We were stomping over the source for the body of the LIT instruction when doing the MOV of 1.0 to the uninteresting channels. --- src/mesa/drivers/dri/i965/brw_wm_fp.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_f

[Mesa-dev] [PATCH 3/3] fp-dst-aliasing-*: Tests for DST with a src = dst

2011-07-07 Thread Eric Anholt
The 965 driver was failing while breaking it down into channel-wise operations and overwriting the operands. --- tests/all.tests |2 ++ tests/shaders/generic/fp-dst-aliasing-1.vpfp | 16 tests/shaders/generic/fp-dst-aliasing-2.vpfp | 16 +++

[Mesa-dev] [PATCH] intel: add null src pointer check in intel_region_reference()

2011-07-07 Thread Brian Paul
Fixes segfault when running cubemap demo on i945. This happened when intel_region_reference() was called in i915_set_draw_region() with depth_region=NULL. --- src/mesa/drivers/dri/intel/intel_regions.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri

Re: [Mesa-dev] glsl: Improvements to lower_jumps.cpp

2011-07-07 Thread Paul Berry
On 6 July 2011 15:03, Paul Berry wrote: > On 6 July 2011 12:18, Ian Romanick wrote: >> >> One other question: does this series cause any piglit regressions on >> platforms that require flow-control lowering (e.g., i915 or r300)? > > I don't know.  I will try to get ahold of a test platform when I

[Mesa-dev] [Bug 39017] [bisected] Segfault in Gallium drivers in Mupen64Plus

2011-07-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39017 Thomas Hellström changed: What|Removed |Added AssignedTo|mesa-dev@lists.freedesktop. |mar...@gmail.com |o

Re: [Mesa-dev] [PATCH 2/2] r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP

2011-07-07 Thread Henri Verbeet
On 7 July 2011 06:20, Vadim Girlin wrote: > +static inline void r600_bc_src_toggle_neg(struct r600_bc_alu_src *bc_src) > +{ > +       bc_src->neg = 1 - bc_src->neg; > +} > + Not necessarily wrong, but I think "bc_src->neg = !bc_src->neg;" would be the more common way to write this. ___

Re: [Mesa-dev] [PATCH 1/2] r600g: introduce r600_bc_src_set_abs helper and fix LOG

2011-07-07 Thread Henri Verbeet
On 7 July 2011 06:20, Vadim Girlin wrote: > -static void r600_bc_src(struct r600_bc_alu_src *bc_src, > +static inline void r600_bc_src(struct r600_bc_alu_src *bc_src, This looks like an unrelated change. Personally I think "inline" is best left up to the compiler to decide in the majority of cases

Re: [Mesa-dev] [PATCH 06/11] glsl: Refactor logic for determining whether to lower return statements.

2011-07-07 Thread Kenneth Graunke
On 07/07/2011 09:56 AM, Paul Berry wrote: > On 7 July 2011 01:16, Kenneth Graunke wrote: >> What exactly is the difference between lowering returns in "main" and >> lowering them in other subroutines? void vs. non-void is definitely >> different, but I don't see why main is special. Looking at t

Re: [Mesa-dev] [PATCH 07/11] glsl: Lower unconditional return statements.

2011-07-07 Thread Kenneth Graunke
On 07/07/2011 09:41 AM, Paul Berry wrote: > On 7 July 2011 01:13, Kenneth Graunke wrote: >>>visit_block(&ir->body); >>> >>> + /* If the body ended in an unconditional return of non-void, >>> + * then we don't need to lower it because an unconditional >>> + * return of non-

Re: [Mesa-dev] [PATCH 06/11] glsl: Refactor logic for determining whether to lower return statements.

2011-07-07 Thread Paul Berry
On 7 July 2011 01:16, Kenneth Graunke wrote: > What exactly is the difference between lowering returns in "main" and > lowering them in other subroutines?  void vs. non-void is definitely > different, but I don't see why main is special.  Looking at the code, it > doesn't actually seem to use lowe

Re: [Mesa-dev] [PATCH 1/5] i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.

2011-07-07 Thread Eric Anholt
On Thu, 7 Jul 2011 00:49:13 -0700, Kenneth Graunke wrote: > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dri/i965/brw_misc_state.c | 15 +-- > src/mesa/drivers/dri/i965/brw_structs.h|9 - > 2 files changed, 5 insertions(+), 19 deletions(-) > > diff --g

Re: [Mesa-dev] [PATCH 2/5] i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.

2011-07-07 Thread Eric Anholt
On Thu, 7 Jul 2011 00:49:14 -0700, Kenneth Graunke wrote: > This is a little different from most because it's a single DWord; > there's no length field. Remove the struct definition, too? pgpM6vgcmoWSv.pgp Description: PGP signature ___ mesa-dev mai

Re: [Mesa-dev] [PATCH 07/11] glsl: Lower unconditional return statements.

2011-07-07 Thread Paul Berry
On 7 July 2011 01:13, Kenneth Graunke wrote: >>        visit_block(&ir->body); >> >> +      /* If the body ended in an unconditional return of non-void, >> +       * then we don't need to lower it because an unconditional >> +       * return of non-void at the end of a function is what returns >>

[Mesa-dev] [Bug 38842] Various valid GLX attributes are rejected by MESA glxChooseFBConfig

2011-07-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38842 --- Comment #4 from Jonathan Kirkham 2011-07-07 09:30:59 PDT --- The change I have submitted above works, i.e. configs are returned when these attributes. Unfortunately the values of the attributes has been effectively thrown away. I do not kn

[Mesa-dev] [Bug 38842] Various valid GLX attributes are rejected by MESA glxChooseFBConfig

2011-07-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38842 --- Comment #3 from Jonathan Kirkham 2011-07-07 09:22:52 PDT --- Apologies the change should have read : case GLX_MAX_PBUFFER_WIDTH: parselist +=2; //skip break; case GLX_MAX_PBUFFER_HEIGHT: pa

[Mesa-dev] [Bug 38842] Various valid GLX attributes are rejected by MESA glxChooseFBConfig

2011-07-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38842 --- Comment #2 from Jonathan Kirkham 2011-07-07 09:21:33 PDT --- This solves the immediate problem that the attributes are rejected, however, I do not believe this change is solving the real problem. In this patch if the attribute GLX_MAX_PBUF

Re: [Mesa-dev] [PATCH] mesa/st: Fix piglit read-front with new drawable invalidation

2011-07-07 Thread Jakob Bornecrantz
On Thu, Jul 7, 2011 at 3:08 PM, Thomas Hellstrom wrote: > When the state tracker adds a front buffer, nothing triggers a validate > drawable call, since the state tracker manager is never notified. > > Force a validate drawable call by invalidating the framebuffer's stamp, so > that the window sys

[Mesa-dev] [PATCH] mesa/st: Fix piglit read-front with new drawable invalidation

2011-07-07 Thread Thomas Hellstrom
When the state tracker adds a front buffer, nothing triggers a validate drawable call, since the state tracker manager is never notified. Force a validate drawable call by invalidating the framebuffer's stamp, so that the window system's renderbuffer (if any) is picked up. This fixes bug 38988 ht

Re: [Mesa-dev] [PATCH 00/13] Floating-point depth buffers

2011-07-07 Thread Brian Paul
On Wed, Jul 6, 2011 at 10:43 PM, Marek Olšák wrote: > On Wed, Jul 6, 2011 at 5:49 PM, Brian Paul wrote: >> On 06/30/2011 06:29 PM, Marek Olšák wrote: >>> >>> Hi, >>> >>> this patch series implements ARB_depth_buffer_float in Mesa and Gallium. >>> There is complete r600g/r600-r700 support in my pr

Re: [Mesa-dev] [PATCH 0/5] i965: die structs die!

2011-07-07 Thread Kenneth Graunke
On 07/07/2011 01:12 AM, Zou, Nanhai wrote: Hi, What is the intention of switching struct-style command to OUT_BATCH style? Thanks Zou Nanhai Several reasons: 1) Better code generation. Eric has told me that GCC generates pretty sub-optimal code for packed-bit structs, and using OUT

Re: [Mesa-dev] [PATCH 09/11] glsl: Use foreach_list in lower_jumps.cpp

2011-07-07 Thread Kenneth Graunke
On 07/05/2011 03:07 PM, Paul Berry wrote: The visitor class in lower_jumps.cpp never removes or replaces the instruction being visited, but it frequently alters or removes the instructions that follow it. Therefore, in order to be safe, it needs to iterate through exec_lists using foreach_list r

Re: [Mesa-dev] [PATCH 02/11] glsl: Make ir_reader able to read plain (return) statements.

2011-07-07 Thread Kenneth Graunke
On 07/05/2011 03:07 PM, Paul Berry wrote: Previously ir_reader was only able to handle return of non-void. This patch is necessary in order to allow optimization passes to be tested in isolation. --- src/glsl/ir_reader.cpp | 24 +--- 1 files changed, 13 insertions(+), 11

Re: [Mesa-dev] [PATCH 05/11] glsl: Add explanatory comments to lower_jumps.cpp.

2011-07-07 Thread Kenneth Graunke
On 07/05/2011 03:07 PM, Paul Berry wrote: No functional change. --- src/glsl/lower_jumps.cpp | 336 -- 1 files changed, 322 insertions(+), 14 deletions(-) Wow. Just wow. Thanks for doing this. Reviewed-by: Kenneth Graunke _

Re: [Mesa-dev] [PATCH 06/11] glsl: Refactor logic for determining whether to lower return statements.

2011-07-07 Thread Kenneth Graunke
On 07/05/2011 03:07 PM, Paul Berry wrote: Previously, do_lower_jumps.cpp determined whether to lower return statements in ir_lower_jumps_visitor::should_lower_jumps(). Moved this logic to ir_lower_jumps_visitor::visit(ir_function_signature *), so that it can be used in determining whether to low

Re: [Mesa-dev] [PATCH 0/5] i965: die structs die!

2011-07-07 Thread Zou, Nanhai
Hi, What is the intention of switching struct-style command to OUT_BATCH style? Thanks Zou Nanhai >>-Original Message- >>From: mesa-dev-bounces+nanhai.zou=intel@lists.freedesktop.org >>[mailto:mesa-dev-bounces+nanhai.zou=intel@lists.freedesktop.org] On >>Behalf Of Kennet

Re: [Mesa-dev] [PATCH 07/11] glsl: Lower unconditional return statements.

2011-07-07 Thread Kenneth Graunke
On 07/05/2011 03:07 PM, Paul Berry wrote: Previously, lower_jumps.cpp only lowered return statements that appeared inside of an if statement. Without this patch, lower_jumps.cpp might not lower certain return statements, causing some back-ends to fail (as in bug #36669). Fixes unit test test_lo

[Mesa-dev] [PATCH 5/5] i965: Remove unused structures for command packets.

2011-07-07 Thread Kenneth Graunke
We simply emit these using OUT_BATCH and bitshifting, as it results in better compiled code than packed structures. Since our documentation is public, it's not terribly useful to keep these around for reference. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_structs.h | 441 -

[Mesa-dev] [PATCH 4/5] i965: Convert system instruction pointer to OUT_BATCH style.

2011-07-07 Thread Kenneth Graunke
Also rename it from CMD_STATE_INSN_POINTER to CMD_STATE_SIP to match the documentation. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h|2 +- src/mesa/drivers/dri/i965/brw_misc_state.c | 17 - 2 files changed, 5 insertions(+), 14 deletions(-)

[Mesa-dev] [PATCH 3/5] i965: Convert PIPELINE_SELECT to OUT_BATCH style.

2011-07-07 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_misc_state.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index fba292d..73d2746 100644 --- a/src/mes

[Mesa-dev] [PATCH 2/5] i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.

2011-07-07 Thread Kenneth Graunke
This is a little different from most because it's a single DWord; there's no length field. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_misc_state.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state

[Mesa-dev] [PATCH 1/5] i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.

2011-07-07 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_misc_state.c | 15 +-- src/mesa/drivers/dri/i965/brw_structs.h|9 - 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 0/5] i965: die structs die!

2011-07-07 Thread Kenneth Graunke
This patch series converts a few of the remaining struct-style command submissions to OUT_BATCH style and then removes a ton of unused structs. Keeping the structures in the codebase is misleading, since (a) you might presume that they're actually used for something (they aren't), and (b) they may