Commit Graph

31227 Commits

Author SHA1 Message Date
Francisco Jerez 52e3f0949d st/dri2: Flush FRAME instead of RENDER_CACHE on buffer invalidation. 2010-02-17 23:15:48 +01:00
Francisco Jerez f455ca6490 st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME).
So far the frontbuffer was only being flushed on st_glFlush and
st_glFinish, however, a co-state tracker may need to make sure that
any frontbuffer changes are already on its way to the actual front.

The dri2 state tracker will need this for event-driven GL applications
to resize properly (It could also be done calling "dri_flush_frontbuffer",
but that way we would flush unnecessarily in the double-buffered case).

Additionally this patch avoids flushing the mesa rendering cache if
PIPE_FLUSH_RENDER_CACHE wasn't specified.
2010-02-17 23:15:48 +01:00
Ian Romanick 7ccbeb41ac Merge commit '381d5e209815235911c4aab516037c868c8f695f'
This merges the patches from the series "[PATCH 00/14] More
client-side GLX house cleaning" that were posted to the mesa3d-dev
mailing list.  See
http://marc.info/?l=mesa3d-dev&m=126582985214612&w=2

Patches 01 through 04 eliminate a bunch of annoying warnings that I
get when building Mesa.

Patch 05 fixes an inconsistency between the implementation of
glXSwapIntervalMESA and the spec.  I chose to favor the code over the
spec in this case.  This also eliminated a warning.

Patches 06 through 12 clean up the way that context creation is
performed on the client.  When support for GLX_SGIX_fbconfig and the
related GLX 1.3 functions was added, I refactored a bunch
nuts-and-bolts of context creation to CreateContext.  The refactor was
a good idea, I just didn't do it right.

Patches 13 and 14 update glxgears_fbconfig to use GLX 1.3 interfaces.
2010-02-17 11:40:38 -08:00
Brian Paul 0583c29313 progs/demos: update GL version test to accept GL 3.x 2010-02-17 09:02:33 -07:00
Brian Paul 5b392ff49a glsl/apps: print usage info if insufficient args 2010-02-17 08:59:02 -07:00
Brian Paul 6b4a553dd3 st/mesa: replace conditional with assertion
Core Mesa will not call ctx->Driver.CheckQuery() if the Ready flag
is already set.
2010-02-17 08:29:01 -07:00
Chia-I Wu f4542477cf progs/openvg: Add .gitignore.
Add all OpenVG demos to .gitignore.
2010-02-17 22:32:10 +08:00
Chia-I Wu 915d60dcf5 progs/es1: Update .gitignore.
Add xegl/bindtex to .gitignore.
2010-02-17 22:32:10 +08:00
Keith Whitwell 0c938143db llvmpipe: use ffs technique for full tiles also
Need to compute two masks here for full and partial 16x16 blocks.
Gives a further good improvement for isosurf particularly:

isosurf  97 -> 108
gears   597 -> 611
2010-02-17 12:12:41 +00:00
Chia-I Wu e16f577142 docs: Update TODOs of egl.html.
Thread-safety is no longer a TODO item.  There are surely bugs to be
fixed though.
2010-02-17 20:00:12 +08:00
Chia-I Wu 4afe24808e egl: Revisit global data locking.
Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle.
Add comments to why certain pathes do not need locking.
2010-02-17 20:00:12 +08:00
Chia-I Wu 655f465467 egl: Always lock a display before using it.
This gives a simple access control to the display.  It is potentially
slow, but a finer grained mutex can always be used in the future.  The
benefit of this simple approach is that drivers need not to worry about
thread-safety.
2010-02-17 20:00:12 +08:00
Chia-I Wu db5ce8b384 egl: Make eglGetDisplay atomic.
Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay.  Remove
unused _eglUnlinkDisplay.
2010-02-17 20:00:12 +08:00
Chia-I Wu 99bcb1f06d egl: Add a mutex to _EGLDisplay.
A display may be shared by multiple threads.  Add a mutex for access
control.
2010-02-17 20:00:11 +08:00
Chia-I Wu b3bb180620 egl: eglGetError should return the status of the last call.
Use macros to record the status of the function call before returning.
This is the only way that eglGetError can return the status of the most
recent function call.
2010-02-17 20:00:11 +08:00
Chia-I Wu 3dee01a692 egl: Always record error code.
The error code denotes the success or failure of the most recent
function call.  A call to _eglError should always update the error code.
2010-02-17 20:00:11 +08:00
Chia-I Wu aed7358e54 egl: Use new error checking macros.
Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
2010-02-17 20:00:11 +08:00
Chia-I Wu f3e03e1277 egl: Add new error checking macros.
Add _EGL_CHECK_* which will replace _EGL_DECLARE_* for error checking.
Move _eglCheck* earlier in the file so that the macros and the functions
are grouped together.
2010-02-17 20:00:10 +08:00
Keith Whitwell 31c816731e llvmpipe: rework do_block_16 to use bitmasks and ffs
Some nice speedups:
   gears:  547 -> 597
   isosurf: 83 -> 98

Others like gloss unchanged.  Could do further work in this direction.
2010-02-17 11:12:04 +00:00
Michal Krol cb66e9f2b4 glsl/pp: Remove sl_pp_get_extension_state().
Parse extension tokens to track current state of extension enables.
2010-02-17 11:22:01 +01:00
Michal Krol 27a68bd14a glsl/cl: Parse layout qualifiers only when an appropriate extension enabled. 2010-02-17 11:21:59 +01:00
Michal Krol a21215a74e glsl/cl: Properly emit layout qualifier list. 2010-02-17 11:21:58 +01:00
Vinson Lee ba0ac64f06 glsl: Silence unused value warning. 2010-02-17 02:10:49 -08:00
Vinson Lee 7eaf33ad03 progs/redbook: Fix memory leaks on error paths. 2010-02-17 01:57:14 -08:00
Johannes Obermayr 41b19c279a nouveau: fix legacy dri driver build 2010-02-17 16:16:50 +10:00
Brian Paul de5928a615 sl/pp: re-do extension testing code
The #extension directive should not effect which extension preprocessor
symbols are defined/undefined; only whether/how the compiler accepts
language features defined by the extension.
2010-02-16 10:43:36 -07:00
Francisco Jerez f7aea808a4 nv40: Fix incorrect so_new() numbering. 2010-02-16 18:37:43 +01:00
Francisco Jerez 8bd62dbd7c nv40: Implement PIPE_CAP_MAX_COMBINED_SAMPLERS. 2010-02-16 18:36:47 +01:00
Kristian Høgsberg 846cf49522 glx: Fix a couple of warnings 2010-02-16 10:38:50 -05:00
Kristian Høgsberg 215d0dae61 glx: Only register wire handlers for the events the server supports 2010-02-16 10:38:50 -05:00
Francisco Jerez f845e4ff1b st/dri2: Use event-driven buffer validation. 2010-02-16 10:38:50 -05:00
Francisco Jerez 88a560691b dri/nouveau: Use event driven buffer validation. 2010-02-16 10:38:50 -05:00
Francisco Jerez 61d26bc82e dri2: Event driven buffer validation.
When a buffer invalidation event is received from the X server, the
"invalidate" hook of the DRI2 flush extension is executed: A generic
implementation (dri2InvalidateDrawable) is provided that just bumps
the "pStamp" sequence number in __DRIdrawableRec.

For old servers not supporting buffer invalidation events, the
invalidate hook will be called before flushing the fake front/back
buffer (that's typically once per frame -- not a lot worse than the
situation we were in before).

No effort has been made on preserving backwards compatibility with
version 2 of the flush extension, but I think it's acceptable because
AFAIK no released stack is making use of it.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-16 10:38:50 -05:00
Kristian Høgsberg 925b901ba3 dri2: Allocate cliprect as part of the __DRIdrawableRec 2010-02-16 10:38:50 -05:00
Kristian Høgsberg 97ec6076f5 glx: Move GetGLXDRIDrawable() prototype to glxclient.h 2010-02-16 10:38:49 -05:00
Kristian Høgsberg aa0cd707af configure.ac: Lower require dri2proto version to 2.1
Additions after 2.1 are implemented in a conditional way and will be
supported if available.
2010-02-16 10:38:49 -05:00
Brian Paul 107a2ec9ee mesa: Lock mutex around _mesa_HashLookup linked list chase.
Remove const qualifier from _mesa_HashLookup() table parameter to
avoid LOCK/UNLOCK warnings in the function body.

Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 3094adb3caeb90124359db2356df3bf8ee94800a)
2010-02-16 08:21:38 -07:00
Brian Paul 693f4af63d mesa: Test for failed malloc in _mesa_HashInsert.
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 7c7247ddbf6e3f7f93e44c1cb52490044f1a2215)
2010-02-16 08:21:28 -07:00
José Fonseca b0f9717105 Revert "progs/redbook: Temporarily disable the demos that extensions not part of windows to fix build."
This reverts commit 1587eff1b6.
2010-02-16 11:23:18 +00:00
Michal Krol fa8acb0528 glsl/pp: Do not try to enable extension `all'. 2010-02-16 10:04:58 +01:00
Ben Skeggs 828f545274 nv50: use hw idx buffers where we can 2010-02-16 15:57:59 +10:00
Brian Paul c6e63f3cc2 progs/redbook: use glew 2010-02-15 18:04:39 -07:00
Ben Skeggs bd3829b5f5 nouveau: fix for latest libdrm 2010-02-16 10:21:05 +10:00
José Fonseca 33cf477c37 wgl: Be lenient when sharing contexts.
My first reading of MS docs was wrong. It says:

  All rendering contexts of a shared display list must use an identical
  pixel format. Otherwise the results depend on the implementation of
  OpenGL used.

That is, it is OK to share contexts with different pixel formats.

Adobe Premiere Pro tries to do that: share lists between a rgbx8 and a
rgba8 pixel format.
2010-02-15 21:48:13 +00:00
José Fonseca 1587eff1b6 progs/redbook: Temporarily disable the demos that extensions not part of windows to fix build. 2010-02-15 21:47:20 +00:00
José Fonseca 8c7d39cc83 scons: A less magic way of not building progs by default.
The problem with the old way is that passing 'progs/subdir' as argument
would fail.
2010-02-15 20:48:24 +00:00
Michal Krol ee67167358 glsl/pp: Fix handling of if/elif/else cases.
Once if/elif evalutes to true, all subsequent conditions are always false.
2010-02-15 21:33:22 +01:00
Brian Paul b90f265fbf progs/redbook: test image for new redbook tests 2010-02-15 09:55:44 -07:00
Brian Paul ce65a8debe progs/redbook: add additional tests for GL 1.4 2010-02-15 09:55:01 -07:00
Brian Paul 3be1c11001 docs: document glMultiDrawElements() fix
(cherry picked from commit ab6bcef99a53217db752659ace105ddfd9b25ebb)
2010-02-15 08:57:34 -07:00