mesa.git
15 years agomesa: Return 0 for cube map face of non-cubemap framebuffer attachments.
Eric Anholt [Fri, 25 Jul 2008 19:40:16 +0000 (12:40 -0700)]
mesa: Return 0 for cube map face of non-cubemap framebuffer attachments.

Fixes some oglconform fbo testcases.

15 years agointel: If a tex image doesn't fit in the object's tree, make a temporary tree.
Eric Anholt [Fri, 25 Jul 2008 19:17:58 +0000 (12:17 -0700)]
intel: If a tex image doesn't fit in the object's tree, make a temporary tree.

Previously, we would just store the data as malloced memory hanging off the
object, which would get memcpyed in at validate time.  This broke an
oglconform render-to-texture test, since validate wasn't called but a miptree
was expected.

15 years agointel: Add a little span cache to spead up readpixels by cutting syscalls.
Eric Anholt [Wed, 23 Jul 2008 16:17:07 +0000 (09:17 -0700)]
intel: Add a little span cache to spead up readpixels by cutting syscalls.

15 years agointel-gem: Use pread/pwrite for span access.
Eric Anholt [Tue, 22 Jul 2008 22:20:07 +0000 (15:20 -0700)]
intel-gem: Use pread/pwrite for span access.

This will avoid clflushing entire buffers for small acesses, such as those
commonly used by regression tests.

15 years agointel: improve 2d batchbuffer debug output.
Eric Anholt [Wed, 16 Jul 2008 18:13:35 +0000 (11:13 -0700)]
intel: improve 2d batchbuffer debug output.

15 years agointel: Fix CopyTexSubImage's src tiling arg for the blit.
Eric Anholt [Wed, 16 Jul 2008 17:34:39 +0000 (10:34 -0700)]
intel: Fix CopyTexSubImage's src tiling arg for the blit.

Didn't hurt 915, but needed for 965.

15 years agointel: move renderbuffer mapping to separate functions.
Eric Anholt [Tue, 15 Jul 2008 21:26:19 +0000 (14:26 -0700)]
intel: move renderbuffer mapping to separate functions.

This lets us avoid duplicated code for doing so, including the depthstencil
paths that aren't covered by SpanRenderStart/Finish.  Those paths were
missing the span funcs setup, leading to a null dereference in the fbotexture
demo.

15 years agointel-gem: Bump driver date
Ian Romanick [Fri, 18 Jul 2008 19:40:04 +0000 (12:40 -0700)]
intel-gem: Bump driver date

Bump the driver date and insert the string "GEM".  When running tests,
this make it much easier to know that the right driver is being used.

15 years agoRemove redundant initalization of MaxTextureUnits
Ian Romanick [Wed, 9 Jul 2008 15:57:02 +0000 (08:57 -0700)]
Remove redundant initalization of MaxTextureUnits

15 years agointel-gem: Disable spantmp sse/mmx functions when tile swizzling.
Eric Anholt [Tue, 15 Jul 2008 20:14:18 +0000 (13:14 -0700)]
intel-gem: Disable spantmp sse/mmx functions when tile swizzling.

Those functions rely on being able to treat the GET_PTR returned value as an
array indexed by x, but that's not the case for our tiling.

Bug #16387

15 years agoi915: fix build after previous commit.
Eric Anholt [Mon, 14 Jul 2008 20:55:37 +0000 (13:55 -0700)]
i915: fix build after previous commit.

15 years agodrm-gem: Use new GEM ioctls for tiling state, and support new swizzle modes.
Eric Anholt [Fri, 11 Jul 2008 21:16:36 +0000 (14:16 -0700)]
drm-gem: Use new GEM ioctls for tiling state, and support new swizzle modes.

15 years agointel: span rendering requires just a flush before starting, not finish.
Eric Anholt [Wed, 2 Jul 2008 18:49:10 +0000 (11:49 -0700)]
intel: span rendering requires just a flush before starting, not finish.

The dri_bo_map()s that follow will take care of idling the hardware as needed.

15 years agointel-gem: Emit an MI_FLUSH at glFlush() so frontbuffer rendering is flushed.
Eric Anholt [Wed, 2 Jul 2008 18:16:30 +0000 (11:16 -0700)]
intel-gem: Emit an MI_FLUSH at glFlush() so frontbuffer rendering is flushed.

We have something similar in the X Server that covers X Server rendering, this
is the equivalent here for rendering to the front buffer.  If we cared about
avoiding this at glFlush time, we could only do this when some actual
frontbuffer rendering had occurred.

Bug #16392.

15 years agointel-gem: Fix y-tile swizzling for our G965 with swizzle_mode=1.
Eric Anholt [Wed, 2 Jul 2008 17:21:44 +0000 (10:21 -0700)]
intel-gem: Fix y-tile swizzling for our G965 with swizzle_mode=1.

Apparently in Y mode we get bit 6 ^ bit 9.  The reflect demo in 'd' mode now
displays correctly.

15 years agointel-gem: Fix Y-tiling span setup.
Eric Anholt [Wed, 2 Jul 2008 16:10:21 +0000 (09:10 -0700)]
intel-gem: Fix Y-tiling span setup.

The boolean that the server gives us for whether the region is tiled was
getting used as the enum for what tiling mode.  Instead, guess the correct
tiling in screen setup.

Also, fix the Y-tiling pitch setup.  The pitch to the next tile in Y is
32 scanlines, not 8.

15 years agointel-gem: Move bit 6 x tiling swizzle to a driconf option, and add new mode.
Eric Anholt [Tue, 1 Jul 2008 22:09:24 +0000 (15:09 -0700)]
intel-gem: Move bit 6 x tiling swizzle to a driconf option, and add new mode.

It turns out that it's not just deviceID dependent, and there's some additional
undefined factor that determines the bit 6 swizzling.  It's now controllable
with swizzle_mode=[012] until we get a response on how to automatically detect.

15 years agointel: Fix locking when doing intel_region_cow().
Eric Anholt [Thu, 26 Jun 2008 22:34:27 +0000 (15:34 -0700)]
intel: Fix locking when doing intel_region_cow().

This was broken in the merge of 965 blit support.  It tried to lock only
when things were already locked.

15 years agointel: Replace sprinkled intel_batchbuffer_flush with MI_FLUSH or nothing.
Eric Anholt [Thu, 26 Jun 2008 20:45:31 +0000 (13:45 -0700)]
intel: Replace sprinkled intel_batchbuffer_flush with MI_FLUSH or nothing.

Most of these were to ensure that caches got synchronized between 2d (or meta)
rendering and later use of the target as a source, such as for texture
miptree setup.  Those are replaced with intel_batchbuffer_emit_mi_flush(),
which just drops an MI_FLUSH.  Most of the remainder were to ensure that
REFERENCES_CLIPRECTS batchbuffers got flushed before the lock was dropped.
Those are now replaced by automatically flushing those when dropping the lock.

15 years agoMerge commit 'origin/master' into drm-gem
Eric Anholt [Tue, 24 Jun 2008 21:08:08 +0000 (14:08 -0700)]
Merge commit 'origin/master' into drm-gem

15 years agointel: Fix glCopyPixels when x or y are < 0 in hw coordinates.
Eric Anholt [Tue, 24 Jun 2008 21:04:11 +0000 (14:04 -0700)]
intel: Fix glCopyPixels when x or y are < 0 in hw coordinates.

Nothing would get drawn as the negative coordinates broke the rectangle
intersection code that used unsigned ints.  Tested with copypix demo and
sliding the copy to the upper left.

15 years agoi965: Use the shared intel_pixel_copy.c.
Eric Anholt [Tue, 24 Jun 2008 20:18:40 +0000 (13:18 -0700)]
i965: Use the shared intel_pixel_copy.c.

This disables the textured copy implementation on 965, which didn't appear
to work (mesa copypix demo, disable the blit path, move so that regions don't
overlap and textured is used, and you get garbage).  If we resurrect this for
i965, I'd rather it used the 915-style metaops instead.  Current metaops code
left in place so that whoever picks it up has a reference.

15 years agointel: Same pixel function init for everyone now.
Eric Anholt [Tue, 24 Jun 2008 18:49:21 +0000 (11:49 -0700)]
intel: Same pixel function init for everyone now.

15 years agointel: Avoid glBitmap software fallback for blending when no blending occurs.
Eric Anholt [Tue, 24 Jun 2008 18:44:42 +0000 (11:44 -0700)]
intel: Avoid glBitmap software fallback for blending when no blending occurs.

Mesa demos tend to leave blending on but in GL_ONE/GL_ZERO, or
GL_SRC_ALPHA/GL_ONE_MINUS_SRC_ALPHA with a source alpha of 1.0.

15 years agointel: Merge check_blit_fragment_ops between i915/i965.
Eric Anholt [Tue, 24 Jun 2008 18:34:42 +0000 (11:34 -0700)]
intel: Merge check_blit_fragment_ops between i915/i965.

Both had some useful bits for the other.

15 years agointel: Note reasons for blit pixel op fallbacks under INTEL_DEBUG=pix.
Eric Anholt [Tue, 24 Jun 2008 17:50:10 +0000 (10:50 -0700)]
intel: Note reasons for blit pixel op fallbacks under INTEL_DEBUG=pix.

15 years agoi915: Add support for accelerated glBitmap, shared from 965.
Eric Anholt [Tue, 24 Jun 2008 16:37:07 +0000 (09:37 -0700)]
i915: Add support for accelerated glBitmap, shared from 965.

15 years agoi915: Fix read != draw drawable for glCopyPixels.
Eric Anholt [Tue, 24 Jun 2008 16:48:23 +0000 (09:48 -0700)]
i915: Fix read != draw drawable for glCopyPixels.

Taken from commit bad6e175cf59cce630c37d73f6e71f3a4de50ae6.

15 years agoi915: Allow accelerated pixel ops to be disabled with INTEL_NO_BLIT.
Eric Anholt [Tue, 24 Jun 2008 16:41:58 +0000 (09:41 -0700)]
i915: Allow accelerated pixel ops to be disabled with INTEL_NO_BLIT.

This matches 965.

15 years agoi915: Accumulate the VB into a local buffer and subdata it in.
Eric Anholt [Mon, 23 Jun 2008 22:44:10 +0000 (15:44 -0700)]
i915: Accumulate the VB into a local buffer and subdata it in.

This lets GEM use pwrite, for an additional 4% or so speedup.

15 years agoi915: Convert to using VBs instead of inline prims.
Eric Anholt [Fri, 20 Jun 2008 22:00:44 +0000 (15:00 -0700)]
i915: Convert to using VBs instead of inline prims.

15 years agoEnsure all objects are built when installing DRI
Dan Nicholson [Mon, 23 Jun 2008 03:29:45 +0000 (20:29 -0700)]
Ensure all objects are built when installing DRI

15 years agoDon't make libmesa.a or libglapi.a depend on asm_subdirs
Dan Nicholson [Mon, 23 Jun 2008 03:26:20 +0000 (20:26 -0700)]
Don't make libmesa.a or libglapi.a depend on asm_subdirs

Since the asm_subdirs target does not actually create a file, make will
always consider that it needs to be rebuilt. If libmesa.a and libglapi.a
have asm_subdirs as a prerequisite, then they will always need to be
rebuilt, too. The correct order will be preserved by the default target,
though.

This should fix #16358.

15 years agoCreate $(TOP)/$(LIB_DIR) for install, too
Dan Nicholson [Mon, 23 Jun 2008 03:19:35 +0000 (20:19 -0700)]
Create $(TOP)/$(LIB_DIR) for install, too

If `make install' is run without running `make' first, the $(LIB_DIR)
will not be created. This also changes the mkdir a little bit so that it
isn't run if necessary and added `-p' so that it is immune to races.

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:55:24 +0000 (10:55 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:52:40 +0000 (10:52 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:52:32 +0000 (10:52 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:49:45 +0000 (10:49 -0600)]
replace __inline and __inline__ with INLINE macro

15 years ago#undef DEBUG to silence warnings
Brian Paul [Sat, 21 Jun 2008 16:49:40 +0000 (10:49 -0600)]
#undef DEBUG to silence warnings

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:34:38 +0000 (10:34 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:34:00 +0000 (10:34 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:30:01 +0000 (10:30 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:27:36 +0000 (10:27 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agoreplace __inline and __inline__ with INLINE macro
Brian Paul [Sat, 21 Jun 2008 16:24:43 +0000 (10:24 -0600)]
replace __inline and __inline__ with INLINE macro

15 years agos/inline/INLINE
Brian Paul [Sat, 21 Jun 2008 16:20:54 +0000 (10:20 -0600)]
s/inline/INLINE

15 years agoremove old comments
Brian Paul [Sat, 21 Jun 2008 16:20:31 +0000 (10:20 -0600)]
remove old comments

15 years agoSolaris port of Mesa 7.1 with autoconf support
Alan Coopersmith [Sat, 21 Jun 2008 00:58:53 +0000 (17:58 -0700)]
Solaris port of Mesa 7.1 with autoconf support

Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
15 years agoRename quad function to quadr to avoid clash with Solaris quad typedef
Daniel Zhu [Sat, 21 Jun 2008 00:51:39 +0000 (17:51 -0700)]
Rename quad function to quadr to avoid clash with Solaris quad typedef

Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
15 years agoMake minstall work with Solaris /bin/sh
Alan Coopersmith [Fri, 6 Jun 2008 23:09:10 +0000 (16:09 -0700)]
Make minstall work with Solaris /bin/sh

Solaris /bin/sh doesn't set $PWD for you

Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
15 years agoFix builds with compilers other than gcc 3.0 & newer
Alan Coopersmith [Fri, 6 Jun 2008 23:06:09 +0000 (16:06 -0700)]
Fix builds with compilers other than gcc 3.0 & newer

Add #include "glheader.h" for definition of __builtin_expect for compilers
that don't support it.

Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
15 years agoadded pointer to beta/release candidates
Brian Paul [Sat, 21 Jun 2008 16:14:22 +0000 (10:14 -0600)]
added pointer to beta/release candidates

15 years agoR300: 1002:5657 is actually RV410
Alex Deucher [Sat, 21 Jun 2008 14:52:49 +0000 (10:52 -0400)]
R300: 1002:5657 is actually RV410

See bug 14289

15 years agor200: fix typo in r200TryDrawPixels parameter validation (bug 16406)
Roland Scheidegger [Sat, 21 Jun 2008 00:50:11 +0000 (02:50 +0200)]
r200: fix typo in r200TryDrawPixels parameter validation (bug 16406)

16 years agomesa: tweak mipmap level selection for cube maps
Brian Paul [Thu, 19 Jun 2008 20:34:52 +0000 (14:34 -0600)]
mesa: tweak mipmap level selection for cube maps

This is just a hack.  After we convert the 3D texcoord into a face plus 2D
texcoord we need to recompute the partial derivatives and mipmap LOD.
But we don't have the info to do that.  Adjusting the original mipmap
level by -1 seems to give somewhat better results than before though.

16 years agoi915: Note the non-PBO fallback for textured drawpixels under DEBUG_PIXEL.
Eric Anholt [Wed, 18 Jun 2008 21:35:59 +0000 (14:35 -0700)]
i915: Note the non-PBO fallback for textured drawpixels under DEBUG_PIXEL.

16 years agoi915: Restore the accelerated PBO pixel path functions after GEM changes.
Eric Anholt [Wed, 18 Jun 2008 21:19:18 +0000 (14:19 -0700)]
i915: Restore the accelerated PBO pixel path functions after GEM changes.

The fencing code is not required, and waiting on the fences defeated one of
the purposes of the extension, which is to allow asynchronous readpixels.

16 years agoMerge commit 'origin/master' into drm-gem
Eric Anholt [Wed, 18 Jun 2008 21:07:38 +0000 (14:07 -0700)]
Merge commit 'origin/master' into drm-gem

16 years agoi915: Bug #14313: Fix accelerated (PBO) ReadPixels.
Eric Anholt [Wed, 18 Jun 2008 20:50:13 +0000 (13:50 -0700)]
i915: Bug #14313: Fix accelerated (PBO) ReadPixels.

Refactoring of mine in 02d5ba849197e19843dad164239b51f18fb16faf broke it
by failing to understand that the masking was about sign extension.

16 years agoi965: add support for Intel 4 series chipsets
Xiang, Haihao [Wed, 18 Jun 2008 07:33:33 +0000 (15:33 +0800)]
i965: add support for Intel 4 series chipsets

16 years agomesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z...
Brian Paul [Tue, 17 Jun 2008 22:44:04 +0000 (16:44 -0600)]
mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z unpacking

16 years ago[intel] Fix no_rast option on non-965.
Eric Anholt [Tue, 17 Jun 2008 21:14:02 +0000 (14:14 -0700)]
[intel] Fix no_rast option on non-965.

The no_rast fallback was getting partially overwritten by later TNL init,
resulting in a segfault when things were in a mixed-up state.

16 years ago[intel-gem] Bug #16326: Fix X tile unswizzling on 965.
Eric Anholt [Tue, 17 Jun 2008 18:15:59 +0000 (11:15 -0700)]
[intel-gem] Bug #16326: Fix X tile unswizzling on 965.

Apparently a bit gets flipped in the addressing for some rows of each tile.

16 years agoassorted glide driver fixes
Wilfried Holzke [Tue, 17 Jun 2008 16:07:47 +0000 (10:07 -0600)]
assorted glide driver fixes

16 years agoglu: silence warnings
Brian Paul [Tue, 17 Jun 2008 15:01:32 +0000 (09:01 -0600)]
glu: silence warnings

16 years agomesa: make mm.c use unsigned ints for offsets.
Dave Airlie [Tue, 17 Jun 2008 06:29:45 +0000 (16:29 +1000)]
mesa: make mm.c use unsigned ints for offsets.

If you have a GPU using this code and it has the offsets up in this space,
this fails.

16 years agor300: Make LOD bias a persistent environment variable.
Corbin Simpson [Mon, 16 Jun 2008 18:37:32 +0000 (11:37 -0700)]
r300: Make LOD bias a persistent environment variable.
Per airlied's suggestion.

16 years agoCompute/setup fog coordinates even if vertex program is enabled.
H. Verbeet [Mon, 16 Jun 2008 16:40:32 +0000 (10:40 -0600)]
Compute/setup fog coordinates even if vertex program is enabled.

Only when fog's enabled, of course.
In the usual case, this is just a pass-through operation.

16 years agomesa: allocate pixel zoom arrays on heap, not stack
Brian Paul [Mon, 16 Jun 2008 16:03:05 +0000 (10:03 -0600)]
mesa: allocate pixel zoom arrays on heap, not stack

Fixes stack overflow on Windows.

16 years agoDon't compute vertex fog when fragment program is active.
H. Verbeet [Mon, 16 Jun 2008 15:40:26 +0000 (09:40 -0600)]
Don't compute vertex fog when fragment program is active.

16 years agor300: Fix new incarnation of bug 3195.
Corbin Simpson [Mon, 16 Jun 2008 08:21:42 +0000 (01:21 -0700)]
r300: Fix new incarnation of bug 3195.
tests/bug_3195 doesn't render right, but at least it doesn't segfault this way.

16 years agor300: Forgot to clear old state before writing new state.
Corbin Simpson [Mon, 16 Jun 2008 08:02:16 +0000 (01:02 -0700)]
r300: Forgot to clear old state before writing new state.
Oooops. Hehe.

16 years agor300: Enable LOD bias state emission.
Corbin Simpson [Mon, 16 Jun 2008 06:54:32 +0000 (23:54 -0700)]
r300: Enable LOD bias state emission.
Properly set t->filter_1 for r300_state to emit.
Expect buggies as people see LOD bias enabled for the first time...

16 years agoOops, misordered a few instructions.
Corbin Simpson [Mon, 16 Jun 2008 00:30:07 +0000 (17:30 -0700)]
Oops, misordered a few instructions.
Not like it matters, though, since it's not taking effect yet.

16 years agor300: Unbreak LOD biasing, a bit.
Corbin Simpson [Mon, 16 Jun 2008 00:14:07 +0000 (17:14 -0700)]
r300: Unbreak LOD biasing, a bit.
Needs a bit more work on submission.

16 years agoNo more drivers/xorg
Dan Nicholson [Sun, 15 Jun 2008 16:06:27 +0000 (09:06 -0700)]
No more drivers/xorg

Don't try to clean in xorg since GLcore is gone.

16 years agor5xx: Enable fragment.position, partial ARB_shadow.
Corbin Simpson [Sun, 15 Jun 2008 02:32:33 +0000 (19:32 -0700)]
r5xx: Enable fragment.position, partial ARB_shadow.
I don't like PROGRAM_BUILTIN; could we either patch Mesa or just use a different constant?

16 years agor5xx: Detangle FP fallback and translation switches.
Corbin Simpson [Sun, 15 Jun 2008 00:51:04 +0000 (17:51 -0700)]
r5xx: Detangle FP fallback and translation switches.
r5xx should fallback if it encounters a bad FP.
TODO: Re-enable the dumb shader so we don't have to completely fallback.

16 years agor300: Add radeonTransformALU and fix a bug in r300_fragprog DPH
Nicolai Haehnle [Sat, 14 Jun 2008 21:09:15 +0000 (23:09 +0200)]
r300: Add radeonTransformALU and fix a bug in r300_fragprog DPH

This new generic transform replaces "special" instructions by more generic
variants. Hopefully, we will be able to share this code between r300 and r500.

16 years agor300_fragprog: Use less complex instructions
Nicolai Haehnle [Sat, 14 Jun 2008 18:26:10 +0000 (20:26 +0200)]
r300_fragprog: Use less complex instructions

MOV, ADD and MUL do not fit the hardware as well as MAD, but they are less
complex and thus leave more room for future optimizations.

16 years agor5xx: More FP rewriting; fix texrect FP insts.
Corbin Simpson [Sat, 14 Jun 2008 15:56:03 +0000 (08:56 -0700)]
r5xx: More FP rewriting; fix texrect FP insts.

16 years agor5xx: New FP code, take two.
Corbin Simpson [Sat, 14 Jun 2008 14:21:40 +0000 (07:21 -0700)]
r5xx: New FP code, take two.
Add the code emission source file, and comment out unneeded tex de-swizzling.

16 years agor5xx: FP refactor, take one.
Corbin Simpson [Sat, 14 Jun 2008 14:03:08 +0000 (07:03 -0700)]
r5xx: FP refactor, take one.
Yes, I know it's massive. Imagine how I felt, auditing 3000 lines of code.

16 years agor3xx/r5xx: Don't force aniso.
Corbin Simpson [Sat, 14 Jun 2008 11:37:09 +0000 (04:37 -0700)]
r3xx/r5xx: Don't force aniso.
*Pulls paper bag down over head*

16 years agor300: Implement GL_ARB_shadow and GL_EXT_shadow_funcs
Nicolai Haehnle [Sat, 14 Jun 2008 02:07:51 +0000 (04:07 +0200)]
r300: Implement GL_ARB_shadow and GL_EXT_shadow_funcs

16 years agotexenvprogram: Mark textures using ARB_shadow as ShadowSamplers
Nicolai Haehnle [Sat, 14 Jun 2008 00:28:58 +0000 (02:28 +0200)]
texenvprogram: Mark textures using ARB_shadow as ShadowSamplers

Since ARB_fragment_program and friends are defined to ignore the setting of
the GL_TEXTURE_COMPARE_FUNC parameter, we have to explicitly enable the
shadow comparison by marking the texture unit in ShadowSamplers when
appropriate.

16 years agor300: Add radeonCompilerDump for debugging
Nicolai Haehnle [Sat, 14 Jun 2008 01:34:09 +0000 (03:34 +0200)]
r300: Add radeonCompilerDump for debugging

16 years agor300_fragprog: Refactor TEX transformation
Nicolai Haehnle [Fri, 13 Jun 2008 23:46:19 +0000 (01:46 +0200)]
r300_fragprog: Refactor TEX transformation

Streamlining source and destination registers, as well as texcoord scaling for
RECT textures is now done in a radeon_program based transformation.

The idea is that this will allow us to optimize away unnecessary indirections
more easily.

16 years agor300: Add radeon_program and trivial refactoring of r300_fragprog to use it
Nicolai Haehnle [Fri, 13 Jun 2008 21:46:04 +0000 (23:46 +0200)]
r300: Add radeon_program and trivial refactoring of r300_fragprog to use it

The idea/hope is that radeon_program will serve as an intermediate
representation for r3xx up to r6xx fragment and vertex programs.
Right now, it is nothing more than a simplistic wrapper around Mesa's
prog_instruction, together with the notion of clauses, taken from r6xx docs.

The clauses will eventually be used to represent the nodes that are used in
r300 family fragment programs.

16 years agor300: Do not include r300_fragprog.h from r300_context.h and other cleanups
Nicolai Haehnle [Fri, 13 Jun 2008 20:09:37 +0000 (22:09 +0200)]
r300: Do not include r300_fragprog.h from r300_context.h and other cleanups

16 years agor300_fragprog: Remove dead declarations, move NOP declarations into source
Nicolai Haehnle [Fri, 13 Jun 2008 20:03:26 +0000 (22:03 +0200)]
r300_fragprog: Remove dead declarations, move NOP declarations into source

16 years agor300_fragprog: Refactoring and cleanup
Nicolai Haehnle [Fri, 13 Jun 2008 19:43:09 +0000 (21:43 +0200)]
r300_fragprog: Refactoring and cleanup

Refactor so that r300_pfs_compile_state "owns"/holds a pointer to
r300_fragment_program instead of the other way round. This is more natural from
an object orientation point of view.

Move the compiled hardware state into r300_fragment_program_code, in
anticipation of on-the-fly program recompilation based on external OpenGL
state.

16 years agor300_fragprog: Remove dead code
Nicolai Haehnle [Fri, 13 Jun 2008 18:03:17 +0000 (20:03 +0200)]
r300_fragprog: Remove dead code

16 years agor300/r500: Separate fragprog compiler structures
Nicolai Haehnle [Fri, 13 Jun 2008 18:49:52 +0000 (20:49 +0200)]
r300/r500: Separate fragprog compiler structures

r500 code still used r300_pfs_compile_state, which contains some fields that
really only make sense on r3xx type hardware. In order to allow both fragprog
implementations to go forward without disturbing each other, I've pushed this
structure down into the respective r[3|5]00_fragprog.c

16 years agor300: Fix depth texture GL_LUMINANCE vs. GL_INTENSITY mixup
Nicolai Haehnle [Fri, 13 Jun 2008 16:41:16 +0000 (18:41 +0200)]
r300: Fix depth texture GL_LUMINANCE vs. GL_INTENSITY mixup

16 years agor300: Reenable t->filter_1 (though currently not used)
Nicolai Haehnle [Sat, 7 Jun 2008 12:17:56 +0000 (14:17 +0200)]
r300: Reenable t->filter_1 (though currently not used)

16 years agoglx: load swrast_dri.so
George Sapountzis [Fri, 13 Jun 2008 12:54:08 +0000 (15:54 +0300)]
glx: load swrast_dri.so

caveats:

- does not work with old (i.e. libGLcore) xserver:

- made unbindContext a noop

- extensions:

  GLX_SGI_make_current_read
  GLX_EXT_texture_from_pixmap
  GLX_MESA_copy_sub_buffer

16 years agodri/swrast: make unbind a noop
George Sapountzis [Fri, 13 Jun 2008 12:52:32 +0000 (15:52 +0300)]
dri/swrast: make unbind a noop

This is for loading swrast_dri.so from libGL.

MakeContextCurrent() seems to unbind the context right after binding it and
DRI drivers also have a noop DriverAPI.UnbindContext ...

16 years agodri/swrast: add OpenGL 2.1 functions
George Sapountzis [Fri, 13 Jun 2008 12:48:34 +0000 (15:48 +0300)]
dri/swrast: add OpenGL 2.1 functions

16 years agoglx: use ErrorMessageF
George Sapountzis [Fri, 13 Jun 2008 12:48:06 +0000 (15:48 +0300)]
glx: use ErrorMessageF

16 years agosilly bug: it's PROGRAM_VARYING
Zack Rusin [Thu, 12 Jun 2008 23:41:54 +0000 (19:41 -0400)]
silly bug: it's PROGRAM_VARYING