mesa.git
14 years agoi965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.
Eric Anholt [Tue, 12 Oct 2010 18:36:56 +0000 (11:36 -0700)]
i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.

Fixes glsl-fs-i2b.

14 years agoglsl: Fix incorrect assertion
Ian Romanick [Tue, 12 Oct 2010 19:50:29 +0000 (12:50 -0700)]
glsl: Fix incorrect assertion

This assertion was added in commit f1c1ee11, but it did not notice
that the array is accessed with 'size-1' instead of 'size'.  As a
result, the assertion was off by one.  This caused failures in at
least glsl-orangebook-ch06-bump.

14 years agomesa: Validate assembly shaders when GLSL shaders are used
Ian Romanick [Tue, 12 Oct 2010 17:51:47 +0000 (10:51 -0700)]
mesa: Validate assembly shaders when GLSL shaders are used

If an GLSL shader is used that does not provide all stages and
assembly shaders are provided for the missing stages, validate the
assembly shaders.

Fixes bugzilla #30787 and piglit tests glsl-invalid-asm0[12].

NOTE: this is a candidate for the 7.9 branch.

14 years agollvmpipe: make sure intrinsics code is guarded with PIPE_ARCH_SSE
Keith Whitwell [Tue, 12 Oct 2010 17:26:41 +0000 (18:26 +0100)]
llvmpipe: make sure intrinsics code is guarded with PIPE_ARCH_SSE

14 years agost/xorg: Fix typo
Thomas Hellstrom [Tue, 12 Oct 2010 16:22:36 +0000 (18:22 +0200)]
st/xorg: Fix typo

Pointed out by Jakob Bornecrantz.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agoir_to_mesa: assorted clean-ups, const qualifiers, new comments
Brian Paul [Tue, 12 Oct 2010 15:26:39 +0000 (09:26 -0600)]
ir_to_mesa: assorted clean-ups, const qualifiers, new comments

14 years agogallivm: Name anonymous union.
José Fonseca [Tue, 12 Oct 2010 15:07:38 +0000 (16:07 +0100)]
gallivm: Name anonymous union.

14 years agost/xlib: add some comments
Brian Paul [Tue, 12 Oct 2010 14:54:54 +0000 (08:54 -0600)]
st/xlib: add some comments

14 years agoglsl2: fix signed/unsigned comparison warning
Brian Paul [Tue, 12 Oct 2010 14:54:16 +0000 (08:54 -0600)]
glsl2: fix signed/unsigned comparison warning

14 years agollmvpipe: improve mm_mullo_epi32
José Fonseca [Tue, 12 Oct 2010 13:15:59 +0000 (14:15 +0100)]
llmvpipe: improve mm_mullo_epi32

Apply Jose's suggestions for a small but measurable improvement in
isosurf.

14 years agost/xorg: Don't try to remove invalid fbs
Thomas Hellstrom [Tue, 12 Oct 2010 09:10:59 +0000 (11:10 +0200)]
st/xorg: Don't try to remove invalid fbs

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agoxorg/vmwgfx: Don't hide HW cursors when updating them
Thomas Hellstrom [Tue, 12 Oct 2010 12:10:50 +0000 (14:10 +0200)]
xorg/vmwgfx: Don't hide HW cursors when updating them

Gets rid of annoying cursor flicker

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agost/xorg: Add a customizer option to get rid of annoying cursor update flicker
Thomas Hellstrom [Tue, 12 Oct 2010 09:59:45 +0000 (11:59 +0200)]
st/xorg: Add a customizer option to get rid of annoying cursor update flicker

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agoxorg/vmwgfx: Make vmwarectrl work also on 64-bit servers
Thomas Hellstrom [Tue, 12 Oct 2010 09:07:38 +0000 (11:07 +0200)]
xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agost/xorg: Don't try to use option values before processing options
Thomas Hellstrom [Tue, 12 Oct 2010 08:26:07 +0000 (10:26 +0200)]
st/xorg: Don't try to use option values before processing options

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agoRevert "llvmpipe: try to keep plane c values small"
Keith Whitwell [Tue, 12 Oct 2010 12:20:39 +0000 (13:20 +0100)]
Revert "llvmpipe: try to keep plane c values small"

This reverts commit 9773722c2b09d5f0615a47cecf4347859474dc56.

Looks like there are some floor/rounding issues here that need
to be better understood.

14 years agogallivm: don't branch on KILLs near end of shader
Keith Whitwell [Sun, 10 Oct 2010 07:39:48 +0000 (08:39 +0100)]
gallivm: don't branch on KILLs near end of shader

14 years agor600g: add missing file to sconscript
Keith Whitwell [Tue, 5 Oct 2010 22:15:44 +0000 (23:15 +0100)]
r600g: add missing file to sconscript

14 years agogallium: move sse intrinsics debug helpers to u_sse.h
Keith Whitwell [Tue, 12 Oct 2010 12:02:28 +0000 (13:02 +0100)]
gallium: move sse intrinsics debug helpers to u_sse.h

14 years agollvmpipe: Fix MSVC build.
José Fonseca [Tue, 12 Oct 2010 11:27:55 +0000 (12:27 +0100)]
llvmpipe: Fix MSVC build.

MSVC doesn't accept more than 3 __m128i arguments.

14 years agollvmpipe: fix typo in last commit
Keith Whitwell [Tue, 12 Oct 2010 10:51:28 +0000 (11:51 +0100)]
llvmpipe: fix typo in last commit

14 years agollvmpipe: try to keep plane c values small
Keith Whitwell [Tue, 12 Oct 2010 10:02:19 +0000 (11:02 +0100)]
llvmpipe: try to keep plane c values small

Avoid accumulating more and more fixed point bits.

14 years agollvmpipe: add debug helpers for epi32 etc
Keith Whitwell [Mon, 11 Oct 2010 17:20:02 +0000 (18:20 +0100)]
llvmpipe: add debug helpers for epi32 etc

14 years agollvmpipe: try to do more of rast_tri_3_16 with intrinsics
Keith Whitwell [Mon, 11 Oct 2010 15:30:14 +0000 (16:30 +0100)]
llvmpipe: try to do more of rast_tri_3_16 with intrinsics

There was actually a large quantity of scalar code in these functions
previously.  This tries to move more into intrinsics.

Introduce an sse2 mm_mullo_epi32 replacement to avoid sse4 dependency
in the new rasterization code.

14 years agollvmpipe: Do not dispose the execution engine.
José Fonseca [Mon, 11 Oct 2010 18:45:52 +0000 (19:45 +0100)]
llvmpipe: Do not dispose the execution engine.

The engine is a global owned by gallivm module.

14 years agonouveau: Get larger push buffers.
Francisco Jerez [Tue, 28 Sep 2010 20:51:28 +0000 (22:51 +0200)]
nouveau: Get larger push buffers.

Useful to amortize the command submission/reloc overhead (e.g. etracer
goes from 72 to 109 FPS on nv4b).

14 years agodri/nouveau: Initialize tile_flags when allocating a render target.
Francisco Jerez [Sat, 9 Oct 2010 21:26:34 +0000 (23:26 +0200)]
dri/nouveau: Initialize tile_flags when allocating a render target.

14 years agor600g: fix typo in vertex sampling on r600
Dave Airlie [Mon, 11 Oct 2010 23:41:02 +0000 (09:41 +1000)]
r600g: fix typo in vertex sampling on r600

fixes https://bugs.freedesktop.org/show_bug.cgi?id=30771

Reported-by: Kevin DeKorte
14 years agoi965: Always use the new FS backend on gen6.
Eric Anholt [Mon, 11 Oct 2010 22:30:58 +0000 (15:30 -0700)]
i965: Always use the new FS backend on gen6.

It's now much more correct for gen6 than the old backend, with just 2
regressions I've found (one of which is common with pre-gen6 and will
be fixed by an array splitting IR pass).

This does leave the old Mesa IR backend getting used still when we
don't have GLSL IR, but the plan is to get GLSL IR input to the driver
for the ARB programs and fixed function by the next release.

14 years agoi965: Fix gen6 pixel_[xy] setup to avoid mixing int and float src operands.
Eric Anholt [Mon, 11 Oct 2010 22:24:12 +0000 (15:24 -0700)]
i965: Fix gen6 pixel_[xy] setup to avoid mixing int and float src operands.

Pre-gen6, you could mix int and float just fine.  Now, you get goofy
results.

Fixes:
glsl-arb-fragment-coord-conventions
glsl-fs-fragcoord
glsl-fs-if-greater
glsl-fs-if-greater-equal
glsl-fs-if-less
glsl-fs-if-less-equal

14 years agoi965: Don't compute-to-MRF in gen6 VS math.
Eric Anholt [Mon, 11 Oct 2010 20:56:29 +0000 (13:56 -0700)]
i965: Don't compute-to-MRF in gen6 VS math.

There was code to do this for pre-gen6 already, this just enables it
for gen6 as well.

14 years agoi965: Expand uniform args to gen6 math to full registers to get hstride == 1.
Eric Anholt [Mon, 11 Oct 2010 20:42:11 +0000 (13:42 -0700)]
i965: Expand uniform args to gen6 math to full registers to get hstride == 1.

This is a hw requirement in math args.  This also is inefficient, as
we're calculating the same result 8 times, but then we've been doing
that on pre-gen6 as well.  If we're doing math on uniforms, though,
we'd probably be better served by having some sort of mechanism for
precalculating those results into another uniform value to use.

Fixes 7 piglit math tests.

14 years agoi965: Don't compute-to-MRF in gen6 math instructions.
Eric Anholt [Mon, 11 Oct 2010 20:38:38 +0000 (13:38 -0700)]
i965: Don't compute-to-MRF in gen6 math instructions.

14 years agoi965: Add a couple of checks for gen6 math instruction limits.
Eric Anholt [Mon, 11 Oct 2010 20:30:12 +0000 (13:30 -0700)]
i965: Add a couple of checks for gen6 math instruction limits.

14 years agoi965: Don't consider gen6 math instructions to write to MRFs.
Eric Anholt [Mon, 11 Oct 2010 20:19:47 +0000 (13:19 -0700)]
i965: Don't consider gen6 math instructions to write to MRFs.

This was leftover from the pre-gen6 cleanups.  One tests regresses
where compute-to-MRF now occurs.

14 years agoglsl: Changes in generated file glsl_lexer.cpp
Chad Versace [Fri, 8 Oct 2010 19:05:02 +0000 (12:05 -0700)]
glsl: Changes in generated file glsl_lexer.cpp

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agoglsl: Add lexer rules for uint and uvecN (N=2..4)
Chad Versace [Fri, 8 Oct 2010 19:03:40 +0000 (12:03 -0700)]
glsl: Add lexer rules for uint and uvecN (N=2..4)

Commit for generated file glsl_lexer.cpp follows this commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agoglsl: Add glsl_type::uvecN_type for N=2,3
Chad Versace [Thu, 7 Oct 2010 23:05:39 +0000 (16:05 -0700)]
glsl: Add glsl_type::uvecN_type for N=2,3

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agointel_extensions: Add ability to set GLSL version via environment
Chad Versace [Thu, 7 Oct 2010 23:04:30 +0000 (16:04 -0700)]
intel_extensions: Add ability to set GLSL version via environment

Add ability to set the GLSL version used by the GLcontext by setting the
environment variable INTEL_GLSL_VERSION. For example,
    env INTEL_GLSL_VERSION=130 prog args
If the environment variable is missing, the GLSL versions defaults to 120.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agor200: revalidate after radeon_update_renderbuffers
Daniel Vetter [Sun, 10 Oct 2010 15:04:42 +0000 (17:04 +0200)]
r200: revalidate after radeon_update_renderbuffers

By calling radeon_draw_buffers (which sets the necessary flags
in radeon->NewGLState) and revalidating if NewGLState is non-zero
in r200TclPrimitive. This fixes an assert in libdrm (the color-/
depthbuffer was changed but not yet validated) and and stops the
kernel cs checker from complaining about them (when they're too
small).

Thanks to Mario Kleiner for the hint to call radeon_draw_buffer
(instead of my half-broken hack).

v2: Also fix the swtcl r200 path.

Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
14 years agoi965: Compute to MRF in the new FS backend.
Eric Anholt [Fri, 8 Oct 2010 21:00:14 +0000 (14:00 -0700)]
i965: Compute to MRF in the new FS backend.

This didn't produce a statistically significant performance difference
in my demo (n=4) or nexuiz (n=3), but it still seems like a good idea
and is recommended by the HW team.

14 years agoi965: Give the FB write and texture opcodes the info on base MRF, like math.
Eric Anholt [Fri, 8 Oct 2010 22:11:42 +0000 (15:11 -0700)]
i965: Give the FB write and texture opcodes the info on base MRF, like math.

14 years agoi965: Give the math opcodes information on base mrf/mrf len.
Eric Anholt [Fri, 8 Oct 2010 21:35:34 +0000 (14:35 -0700)]
i965: Give the math opcodes information on base mrf/mrf len.

This is progress towards enabling a compute-to-MRF pass.

14 years agoi965: Move FS backend structures to a header.
Eric Anholt [Sun, 10 Oct 2010 22:42:37 +0000 (15:42 -0700)]
i965: Move FS backend structures to a header.

It's time to start splitting some of this up.

14 years agoi965: Reduce register interference checks for changed FS_OPCODE_DISCARD.
Eric Anholt [Sun, 10 Oct 2010 19:13:35 +0000 (12:13 -0700)]
i965: Reduce register interference checks for changed FS_OPCODE_DISCARD.

While I don't know of any performance changes from this (once extra
reg available out of 128), it makes the generated asm a lot cleaner
looking.

14 years agoi965: Split FS_OPCODE_DISCARD into two steps.
Eric Anholt [Sun, 10 Oct 2010 18:54:05 +0000 (11:54 -0700)]
i965: Split FS_OPCODE_DISCARD into two steps.

Having the single opcode write then read the reg meant that single
instruction opcodes had to consider their source regs to interfere
with their dest regs.

14 years agollvmpipe: Use lp_tgsi_info.
José Fonseca [Thu, 2 Sep 2010 15:30:23 +0000 (16:30 +0100)]
llvmpipe: Use lp_tgsi_info.

14 years agogallivm: More detailed analysis of tgsi shaders.
José Fonseca [Thu, 2 Sep 2010 14:54:07 +0000 (15:54 +0100)]
gallivm: More detailed analysis of tgsi shaders.

To allow more optimizations, in particular for direct textures.

14 years agotgsi: Export some names for some tgsi enums.
José Fonseca [Thu, 2 Sep 2010 14:52:44 +0000 (15:52 +0100)]
tgsi: Export some names for some tgsi enums.

Useful to give human legible names in other cases.

14 years agogallium: Define C99 restrict keyword where absent.
José Fonseca [Sun, 22 Aug 2010 16:27:56 +0000 (17:27 +0100)]
gallium: Define C99 restrict keyword where absent.

14 years agogallivm: Eliminate unsigned integer arithmetic from texture coordinates.
José Fonseca [Sun, 10 Oct 2010 22:55:24 +0000 (23:55 +0100)]
gallivm: Eliminate unsigned integer arithmetic from texture coordinates.

SSE support for 32bit and 16bit unsigned arithmetic is not complete, and
can easily result in inefficient code.

In most cases signed/unsigned doesn't make a difference, such as for
integer texture coordinates.

So remove uint_coord_type and uint_coord_bld to avoid inefficient
operations to sneak in the future.

14 years agollvmpipe: Remove outdated comment about stencil testing.
José Fonseca [Sun, 10 Oct 2010 22:36:14 +0000 (23:36 +0100)]
llvmpipe: Remove outdated comment about stencil testing.

14 years agor600g: don't run with scissors.
Dave Airlie [Mon, 11 Oct 2010 06:20:56 +0000 (16:20 +1000)]
r600g: don't run with scissors.

This could probably be done much nicer, I've spent a day chasing
a coherency problem in the kernel, that turned out to be incorrect
scissor setup.

14 years agor600g: add TXL opcode support.
Dave Airlie [Mon, 11 Oct 2010 02:18:05 +0000 (12:18 +1000)]
r600g: add TXL opcode support.

fixes glsl1-2D Texture lookup with explicit lod (Vertex shader)

14 years agor600g: enable vertex samplers.
Dave Airlie [Mon, 11 Oct 2010 01:58:27 +0000 (11:58 +1000)]
r600g: enable vertex samplers.

We need to move the texture sampler resources out of the range of the vertex attribs.

We could probably improve this using an allocator but this is the simple answer for now.

makes mesa-demos/src/glsl/vert-tex work.

14 years agor600g: evergreen has no request size bit in texture word4
Dave Airlie [Fri, 8 Oct 2010 00:17:51 +0000 (10:17 +1000)]
r600g: evergreen has no request size bit in texture word4

14 years agor600g: fix input/output Z export mixup for evergreen.
Dave Airlie [Thu, 7 Oct 2010 23:51:09 +0000 (09:51 +1000)]
r600g: fix input/output Z export mixup for evergreen.

14 years agogallivm: Pass texture coords derivates as scalars.
José Fonseca [Sun, 10 Oct 2010 18:51:35 +0000 (19:51 +0100)]
gallivm: Pass texture coords derivates as scalars.

We end up treating them as scalars in the end, and it saves some
instructions.

14 years agogallivm: Use variables instead of Phis in loops.
José Fonseca [Sun, 10 Oct 2010 18:05:05 +0000 (19:05 +0100)]
gallivm: Use variables instead of Phis in loops.

With this commit all explicit Phi emission is now gone.

14 years agogallivm: Allow to disable bri-linear filtering with GALLIVM_DEBUG=no_brilinear runtim...
José Fonseca [Sun, 10 Oct 2010 17:47:24 +0000 (18:47 +0100)]
gallivm: Allow to disable bri-linear filtering with GALLIVM_DEBUG=no_brilinear runtime option

14 years agogallivm: Fix a long standing bug with nested if-then-else emission.
José Fonseca [Sun, 10 Oct 2010 17:45:14 +0000 (18:45 +0100)]
gallivm: Fix a long standing bug with nested if-then-else emission.

We can't patch true-block at end-if time, as there is no guarantee that
the block at the beginning of the true stanza is the same at the end of
the true stanza -- other control flow elements may have been emitted half
way the true stanza.

Although this bug surfaced recently with the commit to skip mip filtering
when lod is an integer the bug was always there, although probably it
was avoided until now: e.g., cubemap selection nests if-then-else on the
else stanza, which does not suffer from the same problem.

14 years agodri/nv10: Fake fast Z clears for pre-nv17 cards.
Francisco Jerez [Sat, 9 Oct 2010 23:39:13 +0000 (01:39 +0200)]
dri/nv10: Fake fast Z clears for pre-nv17 cards.

14 years agodri/nouveau: Minor cleanup.
Francisco Jerez [Sat, 9 Oct 2010 23:45:23 +0000 (01:45 +0200)]
dri/nouveau: Minor cleanup.

14 years agogallivm: Cleanup the rest of the flow module.
José Fonseca [Sat, 9 Oct 2010 20:39:14 +0000 (21:39 +0100)]
gallivm: Cleanup the rest of the flow module.

14 years agogallivm: Simplify if/then/else implementation.
José Fonseca [Sat, 9 Oct 2010 20:14:05 +0000 (21:14 +0100)]
gallivm: Simplify if/then/else implementation.

No need for for a flow stack anymore.

14 years agogallivm: Factor out the SI->FP texture size conversion for SoA path too
José Fonseca [Sat, 9 Oct 2010 19:26:11 +0000 (20:26 +0100)]
gallivm: Factor out the SI->FP texture size conversion for SoA path too

14 years agogallivm: Remove support for Phi generation.
José Fonseca [Sat, 9 Oct 2010 19:14:03 +0000 (20:14 +0100)]
gallivm: Remove support for Phi generation.

Simply rely on mem2reg pass. It's easier and more reliable.

14 years agogallivm: Use varilables instead of Phis for cubemap selection.
José Fonseca [Sat, 9 Oct 2010 18:53:21 +0000 (19:53 +0100)]
gallivm: Use varilables instead of Phis for cubemap selection.

14 years agogallivm: Don't generate Phis for execution mask.
José Fonseca [Sat, 9 Oct 2010 11:55:31 +0000 (12:55 +0100)]
gallivm: Don't generate Phis for execution mask.

14 years agogallivm: Special bri-linear computation path for unmodified rho.
José Fonseca [Sat, 9 Oct 2010 11:12:03 +0000 (12:12 +0100)]
gallivm: Special bri-linear computation path for unmodified rho.

14 years agogallivm: Less code duplication in log computation.
José Fonseca [Sat, 9 Oct 2010 11:11:20 +0000 (12:11 +0100)]
gallivm: Less code duplication in log computation.

14 years agoutil: Defined M_SQRT2 when not available.
José Fonseca [Sat, 9 Oct 2010 11:10:07 +0000 (12:10 +0100)]
util: Defined M_SQRT2 when not available.

14 years agogallivm: Handle code have ret correctly.
José Fonseca [Sat, 9 Oct 2010 11:08:25 +0000 (12:08 +0100)]
gallivm: Handle code have ret correctly.

Stop disassembling on unconditional backwards jumps.

14 years agollvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.
José Fonseca [Wed, 6 Oct 2010 20:01:38 +0000 (21:01 +0100)]
llvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.

14 years agollvmpipe: simplified SSE2 swz/unswz routines
Keith Whitwell [Fri, 1 Oct 2010 14:13:51 +0000 (15:13 +0100)]
llvmpipe: simplified SSE2 swz/unswz routines

We've been using these in the linear path for a while now.  Based on
Chris's SSSE3 code, but using only sse2 opcodes.  Speed seems to be
identical, but code is simpler & removes dependency on SSE3.

Should be easier to extend to other rgba8 formats.

14 years agollvmpipe: clean up shader pre/postamble, try to catch more early-z
Keith Whitwell [Sat, 9 Oct 2010 10:28:00 +0000 (11:28 +0100)]
llvmpipe: clean up shader pre/postamble, try to catch more early-z

Specifically, can do early-depth-test even when alpahtest or
kill-pixel are active, providing we defer the actual z write until the
final mask is avaialable.

Improves demos/fire.c especially in the case where you get close to
the trees.

14 years agollvmpipe: try to be sensible about whether to branch after mask updates
Keith Whitwell [Thu, 7 Oct 2010 14:01:07 +0000 (15:01 +0100)]
llvmpipe: try to be sensible about whether to branch after mask updates

Don't branch more than once in quick succession.  Don't branch at the
end of the shader.

14 years agogallivm: simpler uint8->float conversions
Keith Whitwell [Wed, 6 Oct 2010 18:09:03 +0000 (19:09 +0100)]
gallivm: simpler uint8->float conversions

LLVM seems to finds it easier to reason about these than our
mantissa-manipulation code.

14 years agogallivm: prefer blendvb for integer arguments
Keith Whitwell [Wed, 6 Oct 2010 18:10:30 +0000 (19:10 +0100)]
gallivm: prefer blendvb for integer arguments

14 years agogallivm: specialized x8z24 depthtest path
Keith Whitwell [Wed, 6 Oct 2010 17:21:56 +0000 (18:21 +0100)]
gallivm: specialized x8z24 depthtest path

Avoid unnecessary masking of non-existant stencil component.

14 years agollvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs
Keith Whitwell [Thu, 7 Oct 2010 18:01:12 +0000 (19:01 +0100)]
llvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs

Better than GALLIVM_DEBUG if you're only interested in fragment shaders.

14 years agollvmpipe: store zero into all alloca'd values
Keith Whitwell [Thu, 7 Oct 2010 18:49:20 +0000 (19:49 +0100)]
llvmpipe: store zero into all alloca'd values

Fixes slowdown in isosurf with earlier versions of llvm.

14 years agollvmpipe: use alloca for fs color outputs
Keith Whitwell [Thu, 7 Oct 2010 17:59:54 +0000 (18:59 +0100)]
llvmpipe: use alloca for fs color outputs

Don't try to emit our own phi's, let llvm mem2reg do it for us.

14 years agollvmpipe: defer attribute interpolation until after mask and ztest
Keith Whitwell [Wed, 6 Oct 2010 21:25:48 +0000 (22:25 +0100)]
llvmpipe: defer attribute interpolation until after mask and ztest

Don't calculate 1/w for quads which aren't visible...

14 years agollvmpipe: Prevent z > 1.0
José Fonseca [Wed, 6 Oct 2010 19:42:30 +0000 (20:42 +0100)]
llvmpipe: Prevent z > 1.0

The current interpolation schemes causes precision loss.

Changing the operation order helps, but does not completely avoid the
problem.

The only short term solution is to clamp z to 1.0.

This is unfortunate, but probably unavoidable until interpolation is
improved.

14 years agogallivm: Do size computations simultanously for all dimensions (AoS).
José Fonseca [Sat, 9 Oct 2010 08:34:31 +0000 (09:34 +0100)]
gallivm: Do size computations simultanously for all dimensions (AoS).

Operate simultanouesly on <width, height, depth> vector as much as possible,
instead of doing the operations on vectors with broadcasted scalars.

Also do the 24.8 fixed point scalar with integer shift of the texture size,
for unnormalized coordinates.

AoS path only for now -- the same thing can be done for SoA.

14 years agollvmpipe: fix rasterization of vertical lines on pixel boundaries
Zack Rusin [Thu, 7 Oct 2010 20:26:17 +0000 (16:26 -0400)]
llvmpipe: fix rasterization of vertical lines on pixel boundaries

14 years agoi965: Initialize member variables.
Vinson Lee [Fri, 8 Oct 2010 23:40:29 +0000 (16:40 -0700)]
i965: Initialize member variables.

Fixes these GCC warnings.
brw_wm_fp.c: In function 'search_or_add_const4f':
brw_wm_fp.c:92: warning: 'reg.Index2' is used uninitialized in this function
brw_wm_fp.c:84: note: 'reg.Index2' was declared here
brw_wm_fp.c:92: warning: 'reg.RelAddr2' is used uninitialized in this function
brw_wm_fp.c:84: note: 'reg.RelAddr2' was declared here

14 years agoi965: Silence unused variable warning on non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 23:30:59 +0000 (16:30 -0700)]
i965: Silence unused variable warning on non-debug builds.

Fixes this GCC warning.
brw_vs.c: In function 'do_vs_prog':
brw_vs.c:46: warning: unused variable 'ctx'

14 years agoi965: Silence unused variable warning on non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 23:02:59 +0000 (16:02 -0700)]
i965: Silence unused variable warning on non-debug builds.

Fixes this GCC warning.
brw_eu_emit.c: In function 'brw_math2':
brw_eu_emit.c:1189: warning: unused variable 'intel'

14 years agoi915: Silence unused variable warning in non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 22:49:02 +0000 (15:49 -0700)]
i915: Silence unused variable warning in non-debug builds.

Fixes this GCC warning.
i915_vtbl.c: In function 'i915_assert_not_dirty':
i915_vtbl.c:670: warning: unused variable 'dirty'

14 years agogallivm: make use of new iround code in lp_bld_conv.
Roland Scheidegger [Fri, 8 Oct 2010 22:35:58 +0000 (00:35 +0200)]
gallivm: make use of new iround code in lp_bld_conv.

Only requires sse2 now.

14 years agogallivm: optimize soa linear clamp to edge wrap mode a bit
Roland Scheidegger [Fri, 8 Oct 2010 22:14:11 +0000 (00:14 +0200)]
gallivm: optimize soa linear clamp to edge wrap mode a bit

Clamp against 0 instead of -0.5, which simplifies things.
The former version would have resulted in both int coords being zero
(in case of coord being smaller than 0) and some "unused" weight value,
whereas now the int coords will be 0 and 1, but weight will be 0, hence the
lerp should produce the same value.
Still not happy about differences between normalized and non-normalized...

14 years agogallivm: avoid unnecessary URem in linear wrap repeat case
Roland Scheidegger [Fri, 8 Oct 2010 19:08:49 +0000 (21:08 +0200)]
gallivm: avoid unnecessary URem in linear wrap repeat case

Haven't looked at what code this exactly generates but URem can't be fast.
Instead of using two URem only use one and replace the second one with
select/add (this is what the corresponding aos code already does).

14 years agogallivm: more linear tex wrap mode calculation simplification
Roland Scheidegger [Fri, 8 Oct 2010 19:06:04 +0000 (21:06 +0200)]
gallivm: more linear tex wrap mode calculation simplification

Rearrange order of operations a bit to make some clamps easier.
All calculations should be equivalent.
Note there seems to be some inconsistency in the clamp to edge case
wrt normalized/non-normalized coords, could potentially simplify this too.

14 years agogallivm: optimize some tex wrap mode calculations a bit
Roland Scheidegger [Fri, 8 Oct 2010 18:57:50 +0000 (20:57 +0200)]
gallivm: optimize some tex wrap mode calculations a bit

Sometimes coords are clamped to positive numbers before doing conversion
to int, or clamped to 0 afterwards, in this case can use itrunc
instead of ifloor which is easier. This is only the case for nearest
calculations unfortunately, except linear MIRROR_CLAMP_TO_EDGE which
for the same reason can use a unsigned float build context so the
ifloor_fract helper can reduce this to itrunc in the ifloor helper itself.

14 years agogallivm: replace sub/floor/ifloor combo with ifloor_fract
Roland Scheidegger [Fri, 8 Oct 2010 16:43:49 +0000 (18:43 +0200)]
gallivm: replace sub/floor/ifloor combo with ifloor_fract

14 years agogallivm: faster iround implementation for sse2
Roland Scheidegger [Fri, 8 Oct 2010 16:38:25 +0000 (18:38 +0200)]
gallivm: faster iround implementation for sse2

sse2 supports round to nearest directly (or rather, assuming default nearest
rounding mode in MXCSR). Use intrinsic to use this rather than round (sse41)
or bit manipulation whenever possible.

14 years agogallivm: fix trunc/itrunc comment
Roland Scheidegger [Fri, 8 Oct 2010 16:31:38 +0000 (18:31 +0200)]
gallivm: fix trunc/itrunc comment

trunc of -1.5 is -1.0 not 1.0...

14 years agoi915: Silence unused variable warning in non-debug builds.
Vinson Lee [Fri, 8 Oct 2010 22:33:44 +0000 (15:33 -0700)]
i915: Silence unused variable warning in non-debug builds.

Fixes this GCC warning.
i830_vtbl.c: In function 'i830_assert_not_dirty':
i830_vtbl.c:704: warning: unused variable 'i830'