This reverts commit fc427d2343.
At least xorg uses this, and just because something is not used in
OpenGL is *never* a valid reason to remove functionality from Gallium.
If something lacks a test, go add a test, don't remove features.
The macros give warnings when compiled with -pedantic. This commit is
based on a patch by Brian Paul, with minor changes to add do {} while(0)
and rename the check macros.
The optimized Z-test functions assumed that the array of incoming quads
are adjacent, but that's not always true. The fragment shader can cull
intermediate quads, for example.
Now these Z-test functions can cope with non-adjacent quads. A little bit
of performance is probably lost, but it's probably not worth worring about.
This fixes broken glBitmap() Z testing, among other things.
(cherry picked from commit d437d905e6)
Issue a whole bunch of queries then get the results and render.
Draw the test object in red instead of orange if the result was not
ready when we first queried it.
This reverts commit d6f55492af.
It's both not portable and not safe to trap & exit on ERR. This will
need to use a more invasive approach that tests return code only for
selected, important commands.
We probably don't want to propagate this condition to the pipe driver,
this reverts commit f455ca6490 and the
dri_update_buffer flush altogether until an agreement is reached.
Undoes part of commit f455ca6 which would permit pipe->flush() to be
called while the VBO module still had its buffers mapped. Some
drivers care deeply about this. Sorry for not spotting this earlier.
This uses a stamp mechanisms to mark the DRI drawable as invalid.
Instead of immediately updating the buffers we just bump the drawable
stamp and call out to DRI2GetBuffers "later".
"Later" used to be at LOCK_HARDWARE time, and this patch brings back
callouts at the points where we used to call LOCK_HARDWARE. A new function,
intel_prepare_render(), is called where we used to call LOCK_HARDWARE,
and if the buffers are invalid, we call out to DRI2GetBuffers there.
This lets us invalidate buffers only when notified instead of on
every glViewport() call. If the loader calls the DRI invalidate
entrypoint, we disable viewport triggered buffer invalidation.
Additionally, we can clean up the old viewport mechanism a bit,
since we can just invalidate the buffers and not worry about
reentrancy and whatnot.