Commit graph

23921 commits

Author SHA1 Message Date
Brian Paul
a0edbfb28f mesa: only use fallback texture when using shaders, not fixed-function
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.

Fixes glean fbo test regression.
2009-05-05 16:29:04 -06:00
Brian Paul
01e16befd4 mesa: only use fallback texture when using shaders, not fixed-function
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.

Fixes glean fbo test regression.
2009-05-05 16:21:20 -06:00
Brian Paul
c0d3761c16 mesa: minor simplification in enable_texture(), updated comments 2009-05-05 16:17:55 -06:00
Roland Scheidegger
5f8381724e r200: fix some cube map issues
remove the r100-ism of swapping cube faces which doesn't apply to r200,
and also use precalculated offsets.
Note that cube textures will still not work on r100 and r200 since mipmap
layout is level-first order (for r300) whereas r100/r200 require
face-first (and possibly also 2k alignment for face at least with tiling).
2009-05-05 21:01:36 +02:00
Roland Scheidegger
3503af07c4 r200: fix another section size mismatch 2009-05-05 20:17:37 +02:00
Brian Paul
b3fc832ac7 Merge branch 'mesa_7_5_branch' 2009-05-05 10:13:13 -06:00
Brian Paul
95b7771ea7 gallium: remove redundant cube face #defines 2009-05-05 10:13:11 -06:00
Brian Paul
79ada8c633 gallium: fix texcoords for cubemap mipmap generation
We need to use (s,t,r) cubemap coords when sampling from the cubemap texture
so the rendered quad gets texture samples from the correct cube face.
2009-05-05 10:11:51 -06:00
Roland Scheidegger
b2577937b6 r200: fix CS section size mismatch (bug 21565) 2009-05-05 17:45:50 +02:00
Keith Whitwell
077c904b76 progs/trivial: add test for vertex program invarient transform 2009-05-05 13:14:54 +01:00
Keith Whitwell
113403ef51 mesa: more complete fix for transform_invarient glitches
Add a new flag mvp_with_dp4 in the context, and use that to switch
both ffvertex.c and programopt.c vertex transformation code to
either DP4 or MUL/MAD implementations.
2009-05-05 13:14:53 +01:00
Keith Whitwell
22b417b75c mesa/main: set PREFER_DP4 to match position_invarient code
This is a quick fix for z fighting in quake4 caused by the mismatch
between vertex transformation here and in the position_invarient code.
Full fix would be to make this driver-tunable and adjust both
position_invarient and ffvertex_prog.c code to respect driver
preferences.
2009-05-05 13:14:52 +01:00
José Fonseca
c6bfb4c559 wgl: Implemente SwapLayerBuffers. 2009-05-05 13:14:51 +01:00
José Fonseca
e9fb90ab88 scons: Don't use deprecated Options. 2009-05-05 13:14:51 +01:00
José Fonseca
3537c3420d util: Limit the stack walk to avoid referencing undefined memory. 2009-05-05 13:14:50 +01:00
Keith Whitwell
b865501bda gallium/tgsi: hack around linker/archiver breakage
Add a dummy function which exists only so that tgsi_text_translate()
doesn't get magic-ed out of the libtgsi.a archive by the build system.
Don't remove unless you know this has been fixed - check on
mingw/scons builds as well.
2009-05-05 13:14:49 +01:00
Keith Whitwell
5f2569a1b9 progs/trivial: add vbo-noninterleaved test 2009-05-05 13:14:48 +01:00
José Fonseca
6b89c35c9f wgl: Include alpha bits in pixel format's cColorBits field. 2009-05-05 13:14:47 +01:00
Keith Whitwell
c6b3c2f34b gallium/draw: cope with unused vertex_elements 2009-05-05 13:14:46 +01:00
Keith Whitwell
4d548bd069 trivial: add line-flat.c 2009-05-05 13:14:45 +01:00
José Fonseca
ccec9f76d5 wgl: UINT_PTR null value is an integral type, so return 0 instead of NULL. 2009-05-05 13:14:44 +01:00
José Fonseca
a47f15ba1d pb: Save the stack backtrace when creating/mapping a debug buffer. 2009-05-05 13:14:42 +01:00
José Fonseca
4fd6f296f8 pb: Dump the fenced buffer sizes. 2009-05-05 13:14:38 +01:00
Stephane Marchesin
8edb50ff1e nv04: small fix again 2009-05-05 12:03:38 +02:00
Stephane Marchesin
39ebeead56 Fix an nv04 bug (thanks Mhopf). 2009-05-05 11:29:58 +02:00
Dave Airlie
f616995e5e radeon/r200: enable all the optional drm support bits 2009-05-05 10:51:44 +10:00
Brian Paul
f95c0c06c0 mesa: also print program params/constants when dumping shaders to disk 2009-05-04 11:14:35 -06:00
Brian Paul
27dbdb1684 mesa: remove some unfinished/devel code 2009-05-04 11:13:35 -06:00
Maciej Cencora
0b22615c2c r300: set proper texture row alignment for IGP chips
Looks like r400 based IGP chips require 64 byte alignment
2009-05-04 12:09:36 -04:00
Brian Paul
dd4c142e90 glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized.  Reported by Chris Clayton.
2009-05-04 07:52:55 -06:00
Brian Paul
986d4a9ec6 draw: added some inf/nan debug code (disabled) 2009-05-01 18:35:59 -06:00
Brian Paul
08bc3d1750 gallium/glx: say we're direct rendering 2009-05-01 18:35:59 -06:00
Brian Paul
62043b2757 mesa: in glReadBufer() set _NEW_BUFFERS, not _NEW_PIXEL
Since GL_READ_BUFFER is historically part of the gl_pixel_attrib group
it made sense to signal changes with _NEW_PIXEL.  But now with FBOs it's
also part of the framebuffer state.

Now _NEW_PIXEL strictly indicates pixels transfer state changes.

This change avoids framebuffer state validation when any random bit of
pixel-transfer state is set.

DRI drivers updated too:  don't check _NEW_COLOR when updating framebuffer
state.  I think that was just copied from the Xlib driver because we care
about dither enable/disable state there.
2009-05-01 18:31:04 -06:00
Brian Paul
a7ef5b76d6 Merge branch 'mesa_7_5_branch' 2009-05-01 18:21:02 -06:00
Brian Paul
0a56a49687 st: create renderbuffer's pipe_surface in st_render_texture()
Previously we created the pipe_surface during framebuffer validation.
But if we did a glCopyTex[Sub]Image() before anything else we wouldn't yet
have the surface.  This fixes that.
2009-05-01 18:17:34 -06:00
Brian Paul
63f0130980 mesa: fix state validation bug for glCopyTex[Sub]Image()
We need to make sure the framebuffer state is up to date to make sure we
read pixels from the right buffer when doing a texture image copy.
2009-05-01 18:04:07 -06:00
Brian Paul
602833b107 st: if st_swapbuffers() is called for single-buffered visual don't crash
Furthermore, return pointer(s) to the front color buffer(s).
2009-05-01 16:44:04 -06:00
Brian Paul
b57b6c2d2c xlib winsys: use new st_swapbuffers() function
The front/back buffer pointers are truly swapped (when there is an actual
front buffer).

This fixes some issues seen with apps/tests that draw to both the front
and back color buffers.  The true swap allows us to avoid the (potentially)
slow surface_copy() call in update_framebuffer_state() and is cleaner
overall.
2009-05-01 12:54:20 -06:00
Brian Paul
3f52a853f7 st: when creating an on-demand front color buffer, init to back buffer image
When we create a new front color buffer (user called glDrawBuffer(GL_FRONT))
initialize it to the contents of the back buffer.  Any previous call to
SwapBuffers() would have done that in effect, so make it reality.
2009-05-01 12:54:16 -06:00
Brian Paul
b85b315ebb st: added st_renderbuffer::defined flag
Indicates whether there's defined image contents, or garbage/don't care.
This is set when we draw into a renderbuffer and cleared when we resize/
reallocate a renderbuffer or do a buffer swap (back buffer becomes undefined).

We use this to determine whether the front color buffer has been drawn to,
and whether to display its contents upon glFlush/Finish(), when the new
st_swapbuffers() function is used.
2009-05-01 12:25:42 -06:00
Brian Paul
30b3d80091 mesa: fix comment 2009-05-01 12:12:43 -06:00
Brian Paul
06cd826fcb Merge branch 'mesa_7_5_branch' 2009-05-01 11:57:00 -06:00
Tom Fogal
36edcebb90 Fix symbol list for mangled Mesa on Darwin.
When building mangled Mesa on Darwin, the exported symbols are
named `_mgluWhatever' instead of simply `_gluWhatever'.  When
using a list of exported symbols via the system ld's
`-exported_symbols_list' command line option (as done by mklib),
this resulted in error messages about exporting symbols which do
not exist.

Fortunately the file format accepts simple wildcards.  This throws
a wildcard so that the symbol list will match both the mangled and
non-mangled names, preventing the warning and actually exporting
the correct symbols in one shot.
2009-05-01 11:55:50 -06:00
Brian Paul
3534539557 set: new st_swapbuffers() which does a true front/back buffer swap
The pointers to the front/back renderbuffers are exchanged.
This new function isn't actually used yet...
2009-05-01 11:24:08 -06:00
Zack Rusin
fbceedd2de actually add debug to the debug config 2009-05-01 12:51:01 -04:00
José Fonseca
293f576db7 egl_xlib: Pass RTLD_LAZY to dlopen.
dlopen manpage mandates that either RTLD_LAZY or RTLD_NOW flags must be
passed. Not doing so was causing a NULL return on debian unstable x86-64.
2009-05-01 12:51:01 -04:00
Ian Romanick
2085cf2462 Test either GL_FRONT_LEFT or GL_FRONT for front-buffer rendering
For non-stereo visuals, which is all we support, we treat
GL_FRONT_LEFT as GL_FRONT.  However, they are technically different,
and they have different enum values.  Test for either one to determine
if we're in front-buffer rendering mode.

This fix was suggested by Pierre Willenbrock.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-05-01 09:49:06 -07:00
Brian Paul
cd6734288d st: when double buffered, only create front color buffer on demand
Before we always created the front color buffer, even if was never used.
This can save some memory.
2009-05-01 10:19:00 -06:00
Brian Paul
b9196c1fa3 Merge branch 'const-buffer-changes'
Conflicts:

	src/mesa/drivers/dri/i965/brw_curbe.c
	src/mesa/drivers/dri/i965/brw_vs_emit.c
	src/mesa/drivers/dri/i965/brw_wm_glsl.c
2009-05-01 09:37:14 -06:00
Brian Paul
3f25219c7b mesa: create/use a fallback texture when bound texture is incomplete
When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1).  Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.

Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces.  If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).

Todo: create a fallback texture for each type of texture target?
2009-05-01 09:30:32 -06:00