summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
Commit message (Collapse)AuthorAgeFilesLines
* glx: Fix another case of confusing driContext and dri2_context *Eric Anholt2010-07-231-1/+1
|
* glx: Correctly look up the dri2 context pointer for SetTexBuffer.Eric Anholt2010-07-231-1/+1
| | | | | | | gc->driContext points at the second member of the dri2 context. The dri2 context is just a subclass of the GLX context. Fixes piglit tfp testcase.
* glx: Don't destroy context with XID 0Kristian Høgsberg2010-07-231-1/+2
| | | | | We use XID 0 to indicate the context has already been destroyed, but it's currently bound.
* glx: zero out drawable structs after allocationKristian Høgsberg2010-07-231-0/+1
|
* glx: Refactor and simplify context creationKristian Høgsberg2010-07-231-4/+7
| | | | | This lets us better separate context creation between the different backends.
* glx: Move context destroy to context vtableKristian Høgsberg2010-07-231-2/+9
|
* glx: Don't try to swap a front buffer if we don't have one.Eric Anholt2010-07-231-1/+2
| | | | Fixes glean glsl1 since 7b7845a076c933e096ac511b4184141ba194449a
* glx: Drop screen argument to GetGLXDRIDrawableKristian Høgsberg2010-07-221-3/+3
| | | | We'll just get it from the returned drawable when we need it.
* glx: Move WaitGL, WaitX, UseXFont to context vtable functionsKristian Høgsberg2010-07-221-9/+12
|
* glx: Allocate the __GLXcontext in the DRI driversKristian Høgsberg2010-07-221-17/+23
|
* glx: Move __driContext field out of __GLXcontextRecKristian Høgsberg2010-07-211-3/+3
|
* glx/dri2: Fix dri2CopySubBuffer() again.Michel Dänzer2010-07-201-3/+4
| | | | | | | Only refresh the fake front buffer if there is one, and only destroy the region once. Fixes X11 protocol errors reported by 'mcgreg' on IRC.
* glx: Move DRI CopySubBuffer extension to DRI1 codeKristian Høgsberg2010-07-191-1/+1
| | | | We do this in the X server for DRI2.
* glx: Move driver_configs to DRI screen privatesKristian Høgsberg2010-07-191-1/+3
|
* glx: Don't use __glXInitialize() when we might be holding __glXLock()Kristian Høgsberg2010-07-191-5/+2
|
* glx: Workaround mismatch in signedness between extensions and protocolKristian Høgsberg2010-07-191-7/+32
| | | | | The DRI2 protocol for ust, msc and sbc are unsigned but the extensions talk about int64_t. Do a little dance to make the compiler shut up.
* glx: Move __DRIdrawable pointers to DRI drawable privatesKristian Høgsberg2010-07-191-21/+27
|
* glx: Move __driScreen into the dri screen privatesKristian Høgsberg2010-07-191-11/+11
|
* glx: Move DRI1 specific extensions and code to DRI1 screen privateKristian Høgsberg2010-07-191-3/+5
|
* glx: Move DRI2 extensions to DRI2 screen privateKristian Høgsberg2010-07-191-34/+73
|
* glx: Add screen privates for dri drivers and moved some fields thereKristian Høgsberg2010-07-191-53/+77
| | | | | | GLXscreenConfigs is badly named and a dumping ground for a lot of stuff. This patch creates private screen structs for the dri drivers and moves some of their fields over there.
* glx: Rename various DRI structs away from obnoxious __GLXfooRec conventionKristian Høgsberg2010-07-191-36/+32
| | | | Enough is enough.
* glx: Factor out common code from dri2WaitGL() and dri2WaitX()Kristian Høgsberg2010-07-191-28/+19
|
* glx: Dont use dri2WaitX() to update fake frontKristian Høgsberg2010-07-191-3/+3
| | | | This saves a superfluous flush and a create/destryo region.
* glx: Fix drawable lookup in DRI2 event handlerKristian Høgsberg2010-07-191-2/+38
| | | | | | DRI2 events are sent to the X drawable ID used to create the DRI2 drawable, not the GLX drawable ID. So when an event comes in, we need to look up the __GLXDRIdrawable by its X drawable ID, which needs a new hash table.
* glx: Invalidate drawable in glXBindTexImageEXT() if we don't get eventsKristian Høgsberg2010-05-211-0/+9
| | | | | When we don't get invalidate events, we need to invalidate a drawable before using it for tfp to make sure we have uptodate buffers.
* glx: Split tfp functions out to context vtableKristian Høgsberg2010-05-211-0/+36
| | | | | This introduces a new per-context vtable, which lets us clean up all the #ifdef's a bit and move the DRI2 specific implementation into dri2_glx.c.
* dri2_glx: Put the invalidate b/c code back inKristian Høgsberg2010-05-181-6/+13
| | | | | | | | | | The backwards compatibility code calls the DRI driver invalidate hook on swap buffer and flush front buffer. This lets the DRI driver rely on invalidate callbacks and drop the glViewport() hack, even if the server doesn't send invalidate events. This is essentially a revert of 2d00d16da7f5d2255cb37b48edaf4cbb9ca7e930, except that we now also pass the __DRI_USE_INVALIDATE extension even when the server doesn't have DRI2 invalidate events.
* dri2_glx: Terminate loader extension list outside #ifdefKristian Høgsberg2010-05-181-1/+1
|
* glx: Provide the __DRI_USE_INVALIDATE extension to the driver when we canKristian Høgsberg2010-05-111-14/+25
| | | | | | | When we have DRI2 protocol at least 2.3, we get an event from the server when the back buffers get invalidated. When that's the case let the driver know that it can rely on invalidate instead of the glViewport polling.
* glx: Only call DRI2 invalidate when necessaryKristian Høgsberg2010-05-101-12/+4
| | | | | | | | | We only need this when the server may have swapped the buffers or when we receive an invalidate event from the server. The default behaviour is still that the DRI driver will invalidate its own buffers when glViewport is called. https://bugs.freedesktop.org/show_bug.cgi?id=27277
* Merge branch '7.8'Brian Paul2010-04-281-1/+1
|\ | | | | | | | | | | | | Conflicts: src/glx/dri2_glx.c src/glx/glx_pbuffer.c
| * glx: Initialize have_back.Pierre Willenbrok2010-04-271-0/+1
| | | | | | | | Signed-off-by: Brian Paul <[email protected]>
| * apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston2010-04-271-1/+1
| | | | | | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* | Initialize have_back.Pierre Willenbrock2010-04-271-0/+1
| | | | | | | | | | | | There is a user somewhere that tests it before its initial set. Signed-off-by: Eric Anholt <[email protected]>
* | Merge branch '7.8'Michel Dänzer2010-04-231-0/+2
|\|
| * glx/dri2: Fix build with dri2proto which doesn't define X_DRI2SwapInterval.Michel Dänzer2010-04-231-0/+2
| |
* | DRI2/GLX: check for vblank_mode in DRI2 GLX codeJesse Barnes2010-04-221-2/+39
|/ | | | | Re-add support for the vblank_mode environment and configuration variable. Useful for benchmarking and app control.
* DRI2: check for swapAvailable before using swap interval protocolJesse Barnes2010-04-191-1/+7
| | | | This should have been part of the last change...
* DRI2: synchronize swap interval with server at startup timeJesse Barnes2010-04-191-1/+6
| | | | | | | In the direct rendered case, we need to tell the server our initial swap interval. If we don't, the local and server values will be out of sync, since the server and client defaults may be different (as they were before this patch).
* Initialize DRI2 swap interval to 0Michael Schmidt2010-04-141-0/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=27628
* GLX/DRI2: pass GLX drawable ID to dri2InvalidateBuffersJesse Barnes2010-04-011-2/+2
| | | | | | | | The IDs will be the same in the case where an X window is used directly as a GLX drawable, but will fail if a new GLX drawable is created explicitly, as with glxgears_fbconfig. Fixes fdo bug #27190.
* Revert accidental commits from the xquartz treeJeremy Huddleston2010-04-011-1/+1
| | | | | | | | | | | This reverts commit 9aadc793f3db64cefa0b08f18abad424a659dacc. This reverts commit 69ea4e7718efb60b6b0d795a355cebd6712ceac1. This reverts commit dbe8b013936d977ec63d6607bfd2fc6772d29787. This reverts commit 23215ef4d60a86d9f3b3fdc08e3fdadc59e98890. This reverts commit 9495e3703062d1ddaf3161f4efc23f0b51284d9b. This reverts commit 0594cf70883b64692ba617d85f4f9b4e636e5c2b. This reverts commit 86a7978d37393ee34f876569ac06ffdb8d7289ae. This reverts commit 437902ce978cde9a0e1aa260f12dc232a8501c42.
* apple: Change ifdefs for DRI to be DRI && !APPLEJeremy Huddleston2010-04-011-1/+1
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* glx/dri2: Fix debug build with old dri2proto.Michel Dänzer2010-03-301-0/+13
| | | | | Apparently the higher compiler optimization level in non-debug builds was eliminating the unused functions referencing the unresolved DRI2 symbols...
* glx: Move initialization of ext_list_first_time to where it's storage is ↵Brian Paul2010-03-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | allocated Move the initialization of ext_list_first_time from all of the DRI loader's CreateScreen routines, to where the storage for the screen config is allocated. It needs to get set in the screen-config even if DRI is forced off using LIBGL_ALWAYS_INDIRECT, so that psc->direct_support is initialized correctly, otherwise __glXExtensionBitIsEnabled() always returns FALSE Specifically, this causes a problem with an X server which advertises GLX<=1.2, and the GLX_SGIX_fbconfig extension. glXGetFBConfigFromVisualSGIX() uses __glXExtensionBitIsEnabled() to check if the GLX_SGIX_fbconfig extension is available, but that function won't return correct information because that data has never been initialized, because ext_list_first_time was never set... Signed-off-by: Jon TURNEY <[email protected]> Signed-off-by: Brian Paul <[email protected]> (cherry picked from commit 96ab4d2b84178209ee59017458d9964b32b7e183)
* DRI2: expose OML_sync_control if possibleJesse Barnes2010-03-051-0/+3
| | | | | If the server supports the OML related protocol, enable support for the extension.
* dri2: Event driven buffer validation.Francisco Jerez2010-02-161-14/+28
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Retire miniglx and move the actual glx code up to src/glxKristian Høgsberg2010-02-091-0/+666