mesa.git
14 years agoDrop GLframebuffer typedef and just use struct gl_framebuffer
Kristian Høgsberg [Tue, 12 Oct 2010 16:02:01 +0000 (12:02 -0400)]
Drop GLframebuffer typedef and just use struct gl_framebuffer

14 years agoRename GLvisual and __GLcontextModes to struct gl_config
Kristian Høgsberg [Tue, 12 Oct 2010 15:58:47 +0000 (11:58 -0400)]
Rename GLvisual and __GLcontextModes to struct gl_config

14 years agogl: Remove unused GLcontextModes fields
Kristian Høgsberg [Tue, 12 Oct 2010 15:40:05 +0000 (11:40 -0400)]
gl: Remove unused GLcontextModes fields

14 years agoGet rid of GL/internal/glcore.h
Kristian Høgsberg [Tue, 12 Oct 2010 14:34:03 +0000 (10:34 -0400)]
Get rid of GL/internal/glcore.h

__GLcontextModes is always only used as an implementation internal struct
at this point and we shouldn't install glcore.h anymore.  Anything that
needs __GLcontextModes should just include the struct in its headers files
directly.

14 years agogallivm: only use lp_build_conv 4x4f -> 1x16 ub fastpath with sse2
Roland Scheidegger [Wed, 13 Oct 2010 13:26:37 +0000 (15:26 +0200)]
gallivm: only use lp_build_conv 4x4f -> 1x16 ub fastpath with sse2

This is relying on lp_build_pack2 using the sse2 pack intrinsics which
handle clamping.
(Alternatively could have make it use lp_build_packs2 but it might
not even produce more efficient code than not using the fastpath
in the first place.)

14 years agor600g: fix stencil export for evergreen harder
Dave Airlie [Wed, 13 Oct 2010 08:50:37 +0000 (18:50 +1000)]
r600g: fix stencil export for evergreen harder

14 years agor600g: fix relative addressing when splitting constant accesses
Stephan Schmid [Mon, 11 Oct 2010 13:49:56 +0000 (15:49 +0200)]
r600g: fix relative addressing when splitting constant accesses

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agor600g: add missing eg reg definition
Dave Airlie [Wed, 13 Oct 2010 07:45:10 +0000 (17:45 +1000)]
r600g: add missing eg reg definition

14 years agor600g: evergreen add stencil export bit
Dave Airlie [Wed, 13 Oct 2010 07:40:32 +0000 (17:40 +1000)]
r600g: evergreen add stencil export bit

14 years agor600g: use blitter for hw copy region
Dave Airlie [Wed, 13 Oct 2010 01:17:44 +0000 (11:17 +1000)]
r600g: use blitter for hw copy region

at the moment depth copies are failing (piglit depth-level-clamp)
so use the fallback for now until get some time to investigate.

14 years agor600g: drop all use of unsigned long
Dave Airlie [Wed, 13 Oct 2010 01:08:44 +0000 (11:08 +1000)]
r600g: drop all use of unsigned long

this changes size on 32/64 bit so is definitely no what you want to use here.

14 years agor600g: fix transfer stride.
Dave Airlie [Wed, 13 Oct 2010 00:14:55 +0000 (10:14 +1000)]
r600g: fix transfer stride.

fixes segfaults

14 years agor600g: remove bpt and start using pitch_in_bytes/pixels.
Dave Airlie [Wed, 13 Oct 2010 01:03:18 +0000 (11:03 +1000)]
r600g: remove bpt and start using pitch_in_bytes/pixels.

this mirror changes in r300g, bpt is kinda useless when it comes to some
of the non-simple texture formats.

14 years agor600g: rename pitch in texture to pitch_in_bytes
Dave Airlie [Wed, 13 Oct 2010 01:02:52 +0000 (11:02 +1000)]
r600g: rename pitch in texture to pitch_in_bytes

14 years agor600g: use common texture object create function
Dave Airlie [Tue, 12 Oct 2010 00:51:03 +0000 (10:51 +1000)]
r600g: use common texture object create function

14 years agor600g: split out miptree setup like r300g
Dave Airlie [Mon, 11 Oct 2010 23:53:17 +0000 (09:53 +1000)]
r600g: split out miptree setup like r300g

just a cleanup step towards tiling

14 years agor600g: add copy into tiled texture
Dave Airlie [Tue, 12 Oct 2010 01:54:16 +0000 (11:54 +1000)]
r600g: add copy into tiled texture

14 years agor600g: the vs/ps const arrays weren't actually being used.
Dave Airlie [Wed, 13 Oct 2010 05:56:12 +0000 (15:56 +1000)]
r600g: the vs/ps const arrays weren't actually being used.

completely removed them.

14 years agor600g: reduce size of context structure.
Dave Airlie [Wed, 13 Oct 2010 05:22:04 +0000 (15:22 +1000)]
r600g: reduce size of context structure.

this thing will be in the cache a lot, so having massive big struct
arrays inside it won't be helping anyone.

14 years agotdfx: Silence unused variable warning on non-debug builds.
Vinson Lee [Wed, 13 Oct 2010 05:15:53 +0000 (22:15 -0700)]
tdfx: Silence unused variable warning on non-debug builds.

Fixes this GCC warning.
tdfx_texman.c: In function 'tdfxTMMoveOutTM_NoLock':
tdfx_texman.c:897: warning: unused variable 'shared'

14 years agor600g: store samplers/views across blit when we need to modify them
Dave Airlie [Tue, 12 Oct 2010 03:24:01 +0000 (13:24 +1000)]
r600g: store samplers/views across blit when we need to modify them

also fixup framebuffer state copies to avoid bad state.

14 years agor600g: fix scissor/cliprect confusion
Dave Airlie [Wed, 13 Oct 2010 04:23:36 +0000 (14:23 +1000)]
r600g: fix scissor/cliprect confusion

gallium calls them scissors, but r600 hw like r300 is better off using
cliprects to implement them as we can turn them on/off a lot easier.

14 years agor600g: fix depth0 setting
Dave Airlie [Tue, 12 Oct 2010 04:43:44 +0000 (14:43 +1000)]
r600g: fix depth0 setting

14 years agor300: Silence uninitialized variable warning.
Vinson Lee [Wed, 13 Oct 2010 05:02:27 +0000 (22:02 -0700)]
r300: Silence uninitialized variable warning.

Fixes this GCC warning.
r300_state.c: In function 'r300InvalidateState':
r300_state.c:2247: warning: 'hw_format' may be used uninitialized in this function
r300_state.c:2247: note: 'hw_format' was declared here

14 years agomesa: reformatting, comments, code movement
Brian Paul [Wed, 13 Oct 2010 00:57:43 +0000 (18:57 -0600)]
mesa: reformatting, comments, code movement

14 years agodraw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELS
Brian Paul [Wed, 13 Oct 2010 00:38:22 +0000 (18:38 -0600)]
draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELS

There's no apparent reason for the former to exist.  And they didn't
even have the same value.

14 years agogallivm: remove newlines
Brian Paul [Wed, 13 Oct 2010 00:37:30 +0000 (18:37 -0600)]
gallivm: remove newlines

14 years agogallivm: fix different handling of [non]normalized coords in linear soa path
Roland Scheidegger [Wed, 13 Oct 2010 00:34:08 +0000 (02:34 +0200)]
gallivm: fix different handling of [non]normalized coords in linear soa path

There seems to be no reason for it, so do same math for both
(except the scale mul, of course).

14 years agomesa: remove assertion w/ undeclared variable texelBytes
Brian Paul [Wed, 13 Oct 2010 00:32:06 +0000 (18:32 -0600)]
mesa: remove assertion w/ undeclared variable texelBytes

14 years agost/mesa: enable stencil shader export extension if supported
Dave Airlie [Tue, 5 Oct 2010 23:36:56 +0000 (09:36 +1000)]
st/mesa: enable stencil shader export extension if supported

14 years agoglsl: add support for shader stencil export
Dave Airlie [Tue, 5 Oct 2010 23:36:02 +0000 (09:36 +1000)]
glsl: add support for shader stencil export

This adds proper support for the GL_ARB_shader_stencil_export extension
to the GLSL compiler. Thanks to Ian for pointing out where I need to add things.

14 years agor600g: add shader stencil export support.
Dave Airlie [Wed, 6 Oct 2010 00:14:33 +0000 (10:14 +1000)]
r600g: add shader stencil export support.

14 years agor600g: add support for S8, X24S8 and S8X24 sampler formats.
Dave Airlie [Thu, 7 Oct 2010 03:01:37 +0000 (13:01 +1000)]
r600g: add support for S8, X24S8 and S8X24 sampler formats.

14 years agost/mesa: use shader stencil export to accelerate shader drawpixels.
Dave Airlie [Tue, 5 Oct 2010 23:35:07 +0000 (09:35 +1000)]
st/mesa: use shader stencil export to accelerate shader drawpixels.

If the pipe driver has shader stencil export we can accelerate DrawPixels
using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24
if that isn't supported.

14 years agost/mesa: add option to choose a texture format that we won't render to.
Dave Airlie [Thu, 7 Oct 2010 04:04:03 +0000 (14:04 +1000)]
st/mesa: add option to choose a texture format that we won't render to.

We need a texture to put the drawpixels stuff into, an S8 texture is less
memory/bandwidth than the 32-bit X24S8, but we might not be able to render
directly to an S8, so this lets us specify we won't be rendering to this
texture.

14 years agosoftpipe: add support for shader stencil export capability
Dave Airlie [Tue, 5 Oct 2010 23:32:32 +0000 (09:32 +1000)]
softpipe: add support for shader stencil export capability

this allows softpipe to be used to test shader stencil ref exporting.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agomesa: improve texstore for 8/24 formats and add texstore for S8.
Dave Airlie [Tue, 5 Oct 2010 23:36:15 +0000 (09:36 +1000)]
mesa: improve texstore for 8/24 formats and add texstore for S8.

this improves mesa texstore for 8/24 so it can create S24X8/X24S8 variants
by keeping the depth bits static.

it also adds a texstore for S8 so we can write out an S8 texture to use
in the sampler for accel draw pixels to save memory bw.

The logic seems sound here, I've worked it out a few times on paper, though
it would be good to have some review.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agomesa: add support for FRAG_RESULT_STENCIL.
Dave Airlie [Tue, 5 Oct 2010 23:33:23 +0000 (09:33 +1000)]
mesa: add support for FRAG_RESULT_STENCIL.

this is needed to add support for stencil shader export.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agogallium/util: add S8 tile sampling support.
Dave Airlie [Thu, 7 Oct 2010 05:34:31 +0000 (15:34 +1000)]
gallium/util: add S8 tile sampling support.

14 years agogallium/format: add X32_S8X24_USCALED format.
Dave Airlie [Thu, 7 Oct 2010 06:14:59 +0000 (16:14 +1000)]
gallium/format: add X32_S8X24_USCALED format.

Has similiar use cases to the S8X24 and X24S8 formats.

14 years agogallium/format: add support for X24S8 and S8X24 formats.
Dave Airlie [Tue, 5 Oct 2010 23:30:17 +0000 (09:30 +1000)]
gallium/format: add support for X24S8 and S8X24 formats.

these formats are needed for hw that can sample and write stencil values.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agogallium/tgsi: add support for stencil writes.
Dave Airlie [Tue, 5 Oct 2010 23:28:46 +0000 (09:28 +1000)]
gallium/tgsi: add support for stencil writes.

this adds the capability + a stencil semantic id, + tgsi scan support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoi965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.
Eric Anholt [Tue, 12 Oct 2010 21:39:12 +0000 (14:39 -0700)]
i965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.

There was a check to only do the rebase if we didn't have everything
in VBOs, but nexuiz apparently hands us a mix of VBOs and arrays,
resulting in blocking on the GPU to do a rebase.

Improves nexuiz 800x600, high-settings performance on my Ironlake 41%
(+/- 1.3%), from 14.0fps to 19.7fps.

14 years agointel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.
Eric Anholt [Tue, 12 Oct 2010 21:08:00 +0000 (14:08 -0700)]
intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.

The format selection of the CopyTexSubImage is pretty bogus still, but
this at least avoids software fallbacks in nexuiz, bringing
performance from 7.5fps to 12.8fps on my machine.

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