José Fonseca [Fri, 1 May 2009 17:52:54 +0000 (18:52 +0100)]
mesa: Make _mesa_share_state thread safe.
José Fonseca [Fri, 1 May 2009 17:49:22 +0000 (18:49 +0100)]
wgl: Implement ShareLists.
Ben Skeggs [Thu, 7 May 2009 23:22:16 +0000 (09:22 +1000)]
nouveau: respect GALLIUM_STATE_TRACKERS_DIRS
Ben Skeggs [Thu, 7 May 2009 23:11:17 +0000 (09:11 +1000)]
nouveau: remove dri1 code now we're using the dri state tracker
Ben Skeggs [Thu, 7 May 2009 23:04:10 +0000 (09:04 +1000)]
nouveau: use dri state tracker for dri1
Brian Paul [Thu, 7 May 2009 20:33:18 +0000 (14:33 -0600)]
mesa: make the array object save/remove functions static
Brian Paul [Thu, 7 May 2009 20:26:17 +0000 (14:26 -0600)]
mesa: clean-up vertex array object VBO unbinding and delete/refcounting
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
Brian Paul [Thu, 7 May 2009 20:15:24 +0000 (14:15 -0600)]
demos: delete vertex array objects upon exit
Brian Paul [Thu, 7 May 2009 19:52:26 +0000 (13:52 -0600)]
mesa: reference counting for gl_array_object
Every kind of object that can be shared by multiple contexts should be
refcounted.
Brian Paul [Thu, 7 May 2009 19:36:20 +0000 (13:36 -0600)]
mesa: array object comments
Brian Paul [Thu, 7 May 2009 19:30:39 +0000 (13:30 -0600)]
mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
Brian Paul [Thu, 7 May 2009 19:10:48 +0000 (13:10 -0600)]
mesa: fix comments, s/texture/buffer/
Brian Paul [Thu, 7 May 2009 17:01:02 +0000 (11:01 -0600)]
vbo: in glDraw[Range]Element() code, check for out of bounds indexes
No-op the bad drawing command rather than go out of bounds and render
garbage. Print a warning to alert the developer to the bad drawing call.
Brian Paul [Wed, 6 May 2009 21:39:51 +0000 (15:39 -0600)]
mesa: remove unused gl_buffer_object::OnCard field
Brian Paul [Wed, 6 May 2009 21:23:09 +0000 (15:23 -0600)]
mesa: added gl_buffer_object::Written flag (for debug purposes)
The flag is set when we data has been written into the buffer object.
Brian Paul [Wed, 6 May 2009 21:17:25 +0000 (15:17 -0600)]
mesa: Compute gl_client_array->_MaxElement during array validation
Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but
if the VBO was reallocated the size could change.
New _NEW_BUFFER_OBJECT state flag.
Brian Paul [Wed, 6 May 2009 21:12:01 +0000 (15:12 -0600)]
mesa: GLvector4f:: flags is a GLbitfield, update comments too.
Brian Paul [Wed, 6 May 2009 21:09:18 +0000 (15:09 -0600)]
mesa: add storage_count field to GLvector4f. Useful for debugging.
Brian Paul [Wed, 6 May 2009 19:02:38 +0000 (13:02 -0600)]
mesa: use array->BufferObj instead of ctx->Array.ArrayBufferObj
No difference, but a little more understandable.
Brian Paul [Wed, 6 May 2009 19:00:35 +0000 (13:00 -0600)]
mesa: added _ElementSize field to gl_client_array
Will be handy for bounds checking later...
Brian Paul [Wed, 6 May 2009 18:56:15 +0000 (12:56 -0600)]
mesa: use local var to make code a bit more concise
Brian Paul [Wed, 6 May 2009 18:48:21 +0000 (12:48 -0600)]
mesa: fix/add comments
Brian Paul [Wed, 6 May 2009 16:54:34 +0000 (10:54 -0600)]
mesa: use _mesa_sizeof_type() in vbo split code
Brian Paul [Wed, 6 May 2009 16:36:33 +0000 (10:36 -0600)]
mesa: vbo code reformatting, clean-up, comments
Brian Paul [Wed, 6 May 2009 15:56:26 +0000 (09:56 -0600)]
mesa: add GL_DOUBLE case in _mesa_sizeof_type()
Brian Paul [Wed, 6 May 2009 15:51:56 +0000 (09:51 -0600)]
mesa: in vbo split code, map buffers read-only, not write-only
And use GL_ELEMENT_ARRAY_BUFFER where appropriate.
Brian Paul [Wed, 6 May 2009 15:01:47 +0000 (09:01 -0600)]
mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT
Brian Paul [Wed, 6 May 2009 15:45:24 +0000 (09:45 -0600)]
tnl: added some clip debug/print code (disabled)
Brian Paul [Tue, 5 May 2009 17:11:25 +0000 (11:11 -0600)]
mesa: reformatting, updated comments, const-correctness
Brian Paul [Tue, 5 May 2009 00:22:19 +0000 (18:22 -0600)]
tnl: replace 0x3f with CILP_FRUSTUM_BITS
Brian Paul [Wed, 6 May 2009 14:16:42 +0000 (08:16 -0600)]
i965: relAddr local var (to make debug/test a little easier)
Brian Paul [Thu, 7 May 2009 15:46:53 +0000 (09:46 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Thu, 7 May 2009 15:43:15 +0000 (09:43 -0600)]
swrast: fix span clipping bug
If a horizontal span of pixels was located at x < 0 we could sometimes
read/write outside of renderbuffer bounds.
Brian Paul [Thu, 7 May 2009 15:36:21 +0000 (09:36 -0600)]
mesa: unmap buffer objects during context tear-down
Eric Anholt [Thu, 7 May 2009 04:44:13 +0000 (21:44 -0700)]
i965: Remove bad constant buffer constant-reg-already-loaded optimization.
Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime. Fixes a regression in my
GLSL program for idr's class since
b58b3a786aa38dcc9d72144c2cc691151e46e3d5.
Eric Anholt [Wed, 6 May 2009 20:58:57 +0000 (13:58 -0700)]
intel: Unmap buffers if needed at DeleteBuffer time.
This fixes a crash in glean's pbo test, which tripped over the assert when a
context was destroyed while a buffer was still mapped (Mesa doesn't call
UnmapBuffer in that case). Regression in
c6bde8873fbda6d8467600b7491d8543c75b0509
Brian Paul [Wed, 6 May 2009 18:38:11 +0000 (12:38 -0600)]
mesa: remove unnecessary buffer size check
Brian Paul [Wed, 6 May 2009 18:37:10 +0000 (12:37 -0600)]
mesa: code consolidation in glDraw[Range]Elements() validation
Brian Paul [Wed, 6 May 2009 18:27:38 +0000 (12:27 -0600)]
mesa: new comments, minor reformatting
Brian Paul [Wed, 6 May 2009 18:23:28 +0000 (12:23 -0600)]
mesa: use elementBuf local var instead of ctx->Array.ElementArrayBufferObj
Makes no real difference, but more consistant.
Eric Anholt [Wed, 6 May 2009 17:51:58 +0000 (10:51 -0700)]
i965: Remove the forced lack of caching for renderbuffer surface state.
This snuck in with the multi-draw-buffers commit, and is a major penalty
to performance. It doesn't appear to be required, as the only dependency
the surface BO has is on the state key (and if there's some other dependency,
it should just be in the key).
This brings openarena performance up to almost 2% faster than Mesa 7.4.
Eric Anholt [Wed, 6 May 2009 14:58:40 +0000 (07:58 -0700)]
i965: Remove _NEW_PROGRAM from brw_wm_surfaces setup dependencies.
This was a leftover from the brw_wm_constant_buffer change.
Brian Paul [Wed, 6 May 2009 14:45:55 +0000 (08:45 -0600)]
mesa: be smarter about allocating vert/frag program constants
Try to re-use constants/literals more often to make best use of the
constant buffer space.
See bug 21354.
Eric Anholt [Wed, 6 May 2009 00:16:15 +0000 (17:16 -0700)]
i965: Split WM constant buffer update from other WM surfaces.
This can avoid re-uploading constant data when it isn't necessary, and is
a step towards not updating other surfaces just because constants change.
It also brings the upload of the constant buffer next to the creation.
This brings openarena performance up another 4%, to 91% of the Mesa 7.4 branch.
Eric Anholt [Tue, 5 May 2009 21:05:54 +0000 (14:05 -0700)]
i965: Disentangle VS constant surface state from WM surface state.
Also, only create VS surface state if there's a VS constant buffer to be
uploaded, and set the contents of the buffer at the same time as creation.
Eric Anholt [Tue, 5 May 2009 20:07:33 +0000 (13:07 -0700)]
i965: Don't create constant buffers if they won't be used.
Really, the creation and upload of constants should be in the same place,
since they should only happen together, and a state flag should be
triggered by them so that we don't thrash state around so much for just
updating constants. But this still recovers openarena performance by
another 19%, leaving us 16% behind Mesa 7.4 branch.
Brian Paul [Tue, 5 May 2009 22:29:04 +0000 (16:29 -0600)]
mesa: only use fallback texture when using shaders, not fixed-function (take two)
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. For fixed function, the texture
unit is truly disabled/ignored.
Fixes glean fbo test regression.
Brian Paul [Tue, 5 May 2009 22:30:30 +0000 (16:30 -0600)]
Revert "mesa: only use fallback texture when using shaders, not fixed-function"
This reverts commit
a0edbfb28fb2e670c657d52190a7e8b1ccf4f46e.
This patch didn't completely fix the problem. The next patch will.
Brian Paul [Tue, 5 May 2009 22:29:04 +0000 (16:29 -0600)]
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.
Brian Paul [Tue, 5 May 2009 22:21:20 +0000 (16:21 -0600)]
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.
Brian Paul [Tue, 5 May 2009 22:17:55 +0000 (16:17 -0600)]
mesa: minor simplification in enable_texture(), updated comments
Brian Paul [Tue, 5 May 2009 16:13:13 +0000 (10:13 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Tue, 5 May 2009 15:39:39 +0000 (09:39 -0600)]
gallium: remove redundant cube face #defines
Brian Paul [Tue, 5 May 2009 16:11:51 +0000 (10:11 -0600)]
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.
Keith Whitwell [Tue, 5 May 2009 12:00:44 +0000 (13:00 +0100)]
progs/trivial: add test for vertex program invarient transform
Keith Whitwell [Tue, 5 May 2009 11:12:28 +0000 (12:12 +0100)]
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.
Keith Whitwell [Fri, 1 May 2009 17:20:42 +0000 (18:20 +0100)]
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.
José Fonseca [Fri, 1 May 2009 15:30:08 +0000 (16:30 +0100)]
wgl: Implemente SwapLayerBuffers.
José Fonseca [Fri, 1 May 2009 15:12:17 +0000 (16:12 +0100)]
scons: Don't use deprecated Options.
José Fonseca [Thu, 30 Apr 2009 12:10:58 +0000 (13:10 +0100)]
util: Limit the stack walk to avoid referencing undefined memory.
Keith Whitwell [Thu, 30 Apr 2009 12:09:34 +0000 (13:09 +0100)]
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.
Keith Whitwell [Thu, 30 Apr 2009 11:35:59 +0000 (12:35 +0100)]
progs/trivial: add vbo-noninterleaved test
José Fonseca [Thu, 30 Apr 2009 11:24:08 +0000 (12:24 +0100)]
wgl: Include alpha bits in pixel format's cColorBits field.
Keith Whitwell [Thu, 30 Apr 2009 09:59:19 +0000 (10:59 +0100)]
gallium/draw: cope with unused vertex_elements
Keith Whitwell [Wed, 29 Apr 2009 13:21:41 +0000 (14:21 +0100)]
trivial: add line-flat.c
José Fonseca [Tue, 28 Apr 2009 18:46:56 +0000 (19:46 +0100)]
wgl: UINT_PTR null value is an integral type, so return 0 instead of NULL.
José Fonseca [Tue, 28 Apr 2009 17:53:52 +0000 (18:53 +0100)]
pb: Save the stack backtrace when creating/mapping a debug buffer.
José Fonseca [Tue, 28 Apr 2009 16:07:01 +0000 (17:07 +0100)]
pb: Dump the fenced buffer sizes.
Stephane Marchesin [Tue, 5 May 2009 10:03:38 +0000 (12:03 +0200)]
nv04: small fix again
Stephane Marchesin [Tue, 5 May 2009 09:29:58 +0000 (11:29 +0200)]
Fix an nv04 bug (thanks Mhopf).
Brian Paul [Mon, 4 May 2009 17:14:35 +0000 (11:14 -0600)]
mesa: also print program params/constants when dumping shaders to disk
Brian Paul [Mon, 4 May 2009 17:13:35 +0000 (11:13 -0600)]
mesa: remove some unfinished/devel code
Brian Paul [Mon, 4 May 2009 13:52:55 +0000 (07:52 -0600)]
glx: replace Xmalloc() calls with Xcalloc()
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
Brian Paul [Fri, 1 May 2009 23:52:23 +0000 (17:52 -0600)]
draw: added some inf/nan debug code (disabled)
Brian Paul [Thu, 23 Apr 2009 16:24:19 +0000 (10:24 -0600)]
gallium/glx: say we're direct rendering
Brian Paul [Sat, 2 May 2009 00:31:04 +0000 (18:31 -0600)]
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.
Brian Paul [Sat, 2 May 2009 00:21:02 +0000 (18:21 -0600)]
Merge branch 'mesa_7_5_branch'
Brian Paul [Sat, 2 May 2009 00:17:34 +0000 (18:17 -0600)]
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.
Brian Paul [Sat, 2 May 2009 00:04:07 +0000 (18:04 -0600)]
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.
Brian Paul [Fri, 1 May 2009 22:44:04 +0000 (16:44 -0600)]
st: if st_swapbuffers() is called for single-buffered visual don't crash
Furthermore, return pointer(s) to the front color buffer(s).
Brian Paul [Fri, 1 May 2009 18:28:57 +0000 (12:28 -0600)]
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.
Brian Paul [Fri, 1 May 2009 18:48:46 +0000 (12:48 -0600)]
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.
Brian Paul [Fri, 1 May 2009 18:25:42 +0000 (12:25 -0600)]
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.
Brian Paul [Fri, 1 May 2009 18:12:43 +0000 (12:12 -0600)]
mesa: fix comment
Brian Paul [Fri, 1 May 2009 17:57:00 +0000 (11:57 -0600)]
Merge branch 'mesa_7_5_branch'
Tom Fogal [Wed, 29 Apr 2009 04:03:12 +0000 (21:03 -0700)]
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.
Brian Paul [Fri, 1 May 2009 16:50:04 +0000 (10:50 -0600)]
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...
Zack Rusin [Fri, 1 May 2009 16:50:38 +0000 (12:50 -0400)]
actually add debug to the debug config
José Fonseca [Tue, 24 Mar 2009 19:18:06 +0000 (19:18 +0000)]
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.
Ian Romanick [Tue, 28 Apr 2009 17:08:57 +0000 (10:08 -0700)]
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>
Brian Paul [Fri, 1 May 2009 16:15:21 +0000 (10:15 -0600)]
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.
Brian Paul [Fri, 1 May 2009 15:37:14 +0000 (09:37 -0600)]
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
Brian Paul [Fri, 1 May 2009 15:30:32 +0000 (09:30 -0600)]
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?
Brian Paul [Fri, 1 May 2009 15:24:19 +0000 (09:24 -0600)]
docs: initial 7.6 release notes page
Brian Paul [Fri, 1 May 2009 15:22:20 +0000 (09:22 -0600)]
mesa: bump version to 7.6 (devel)
Brian Paul [Fri, 1 May 2009 15:19:59 +0000 (09:19 -0600)]
mesa: remove -devel suffix from version
Brian Paul [Fri, 1 May 2009 15:15:14 +0000 (09:15 -0600)]
configs: bump MESA_MINOR to 5
Brian Paul [Thu, 30 Apr 2009 23:27:51 +0000 (17:27 -0600)]
docs: fix typo
Corbin Simpson [Fri, 1 May 2009 14:29:14 +0000 (07:29 -0700)]
radeon: Don't even bother with things too big to fit into our card.
Corbin Simpson [Fri, 1 May 2009 13:01:52 +0000 (06:01 -0700)]
r300-gallium, radeon-winsys: Hide radeon_cs from r300 pipe.