aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/dri3_glx.c
Commit message (Collapse)AuthorAgeFilesLines
* glx: set the loader_logger early and for everyoneEmil Velikov2020-04-011-2/+0
| | | | | | | | | | | | | | | Currently we set the logger only for DRI3. Even though it's used nearly everywhere. For platforms where we don't the function is effectively a no-op. With this in place, LIBGL_DEBUG=verbose works across the board. Fixes: d971a4230d5 ("loader: Factor out the common driver opening logic from each loader.") Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4084>
* glx: print FPS with 2 decimal placesMarek Olšák2020-02-101-1/+1
| | | | | | | | useful if FPS is low. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3590> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3590>
* Revert "glx: Implement GLX_EXT_no_config_context"Adam Jackson2019-09-261-1/+0
| | | | | | This reverts commit 0d635ccc912d7122f35f81eec27d8b2c0a2a7a28. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1207
* glx: Implement GLX_EXT_no_config_contextAdam Jackson2019-09-231-0/+1
| | | | | | | | | | This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may now be created without reference to an fbconfig, in which case it is treated as compatible with any fbconfig (and thus any GLX drawable). Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102 Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx: drop unnecessary pointer deref for function callsEric Engestrom2019-08-041-4/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* glx: Fix error message when no driverName is availableCaio Marcelo de Oliveira Filho2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | | Just provide a "(null)" literal in case driverName is NULL. In file included from ../src/glx/dri3_glx.c:76: ../src/glx/dri3_glx.c: In function ‘dri3_create_screen’: ../src/glx/dri_common.h:70:36: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 70 | #define CriticalErrorMessageF(...) dri_message(_LOADER_FATAL, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/glx/dri3_glx.c:1002:4: note: in expansion of macro ‘CriticalErrorMessageF’ 1002 | CriticalErrorMessageF("failed to load driver: %s\n", driverName); | ^~~~~~~~~~~~~~~~~~~~~ ../src/glx/dri3_glx.c:1002:50: note: format string is defined here 1002 | CriticalErrorMessageF("failed to load driver: %s\n", driverName); | ^~ cc1: some warnings being treated as errors Reviewed-by: Kenneth Graunke <[email protected]>
* dri3: Return the current swap interval from glXGetSwapIntervalMESA().Eric Anholt2019-04-011-2/+1
| | | | | | | | | We were caching only the value set with glXSwapIntervalSGI(), missing out on the default setting of the swap interval by the loader. This fixes glxgears's warning about being vblank synchronized by default. Fixes: 9777c4234b0e ("loader: drop the [gs]et_swap_interval callbacks") Reviewed-by: Ian Romanick <[email protected]>
* glx: add support for GLX_ARB_create_context_no_error (v3)Grigori Goronzy2019-03-121-0/+11
| | | | | | | | | v2: Only reject no-error contexts for too-old GL if we're actually trying to create a no-error context (Adam Jackson) v3: Fix share contexts (Adam Jackson) Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Move DRI extensions pointer loading to driOpenDriver().Eric Anholt2018-11-161-7/+1
| | | | | | | | | | | The only thing you do with a dri driver handle is get the extensions pointer, so just fold it in to simplify the callers. v2: Add the declaration of driGetDriverExtensions() that got lost in a rebase. Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> (v1)
* x11: Only report supported DRI3/Present versionsDaniel Stone2018-03-301-6/+16
| | | | | | | | | | | | | The version passed to QueryVersion requests is the version that the client supports. We were just passing in whatever version of XCB was present on the system, which may not be a version that Mesa actually explicitly supports, e.g. it might bring unwanted semantics. Set specific protocol versions which we support, and only pass those. Signed-off-by: Daniel Stone <[email protected]> Fixes: 7aeef2d4efd ("dri3: allow building against older xcb (v3)") Reviewed-by: Emil Velikov <[email protected]>
* dri3: Don't fail on version mismatchDaniel Stone2018-03-201-2/+6
| | | | | | | | | | | | | The previous commit to make DRI3 modifier support optional, breaks with an updated server and old client. Make sure we never set multibuffers_available unless we also support it locally. Make sure we don't call stubs of new-DRI3 functions (or empty branches) which will never succeed. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 7aeef2d4efdc ("dri3: allow building against older xcb (v3)")
* egl/x11: Re-allocate buffers if format is suboptimalLouis-Francis Ratté-Boulianne2018-03-091-1/+3
| | | | | | | | | | If PresentCompleteNotify event says the pixmap was presented with mode PresentCompleteModeSuboptimalCopy, it means the pixmap could possibly have been flipped instead if allocated with a different format/modifier. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/x11: Support DRI3 v1.1Louis-Francis Ratté-Boulianne2018-03-091-1/+9
| | | | | | | | | | | | Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* glx/dri: Add a driconf option to disable GLX_SGI_video_syncThomas Hellstrom2018-03-081-1/+5
| | | | | | | | | | | Drivers on virtual hardware don't want to expose this extension to GLX compositors, similarly to GLX_OML_sync_control, since that significantly increases latency. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Deepak Rawat <[email protected]>
* loader_dri3/glx/egl: Reinstate the loader_dri3_vtable get_dri_screen callbackThomas Hellstrom2018-02-201-0/+11
| | | | | | | | | | | | | | | Removing this callback caused rendering corruption in some multi-screen cases, so it is reinstated but without the drawable argument which was never used by implementations and was confusing since the drawable could have been created with another screen. Cc: "17.3 18.0" [email protected] Fixes: 5198e48a0d (loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105013 Reported-by: Daniel van Vugt <[email protected]> Tested-by: Timo Aaltonen <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx/dri3: Remove unused deviceName variableVadym Shovkoplias2017-12-011-4/+1
| | | | | | | | | deviceName string is declared, assigned and freed but actually never used in dri3_create_screen() function. Fixes: 2d94601582e ("Add DRI3+Present loader") Signed-off-by: Vadym Shovkoplias <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glx/dri3: Fix passing renderType into glXCreateContextAdam Jackson2017-11-131-1/+2
| | | | | | | | | | Without this, trying to create a GLX_RGBA_FLOAT_TYPE_ARB context would fail, because GLX_RGBA_TYPE would be a mismatch with the fbconfig. Cc: [email protected] Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* Revert "glx: Implement GLX_EXT_no_config_context (v2)"Adam Jackson2017-11-091-1/+0
| | | | | | Pushed ahead of things actually working. This reverts commit 5293b96b160b904c0e53cbce93679c3aa090f846.
* glx: Implement GLX_EXT_no_config_context (v2)Adam Jackson2017-11-091-0/+1
| | | | | | | | | | This more or less ports EGL_KHR_no_config_context to GLX. v2: Enable the extension only for those backends that support it. Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102 Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx: Prepare the DRI backends for GLX_EXT_no_config_contextAdam Jackson2017-11-091-2/+3
| | | | | | | | | | | This should be safe as these backends already support the EGL version of this extension. DRI1 is not affected because it does not support GLX_ARB_create_context anyway. DRI-Windows is not prepared to implement this as there's no equivalent WGL extension, and wglCreateContextAttribs seems to really want the HDC's pixel format to be set. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx: Implement GLX_ARB_context_flush_controlNeil Roberts2017-11-061-2/+12
| | | | | | | Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Neil Roberts <[email protected]>
* loader_dri3/glx/egl: Optionally use a blit context for blitting operationsThomas Hellstrom2017-08-171-0/+1
| | | | | | | | | | | | | The code was relying on us always having a current context for client local image blit operations. Otherwise the blit would be skipped. However, glxSwapBuffers, for example, doesn't require a current context and that was a common problem in the dri1 era. It seems the problem has resurfaced with dri3. If we don't have a current context when we want to blit, try creating a private dri context and maintain a context cache of a single context. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callbackThomas Hellstrom2017-08-171-11/+0
| | | | | | | | | | | It's not very usable since in the rare, but definitely existing case that we don't have a current context, it will return NULL. Presumably it will always be safe to use the dri screen the drawable was created with for operations on that drawable. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader: drop the [gs]et_swap_interval callbacksEmil Velikov2017-08-041-18/+1
| | | | | | | | | | Having two callbacks to manage a single int seems like an overkill. Use a cached copy and update that when needed. Signed-off-by: Emil Velikov <[email protected]> --- Might want to look if the dimensions dance in .query_surface ... speaking of which close to nobody implements that ...
* glx/dri3: Implement the flush_swapbuffers methodThomas Hellstrom2017-08-031-1/+29
| | | | | | | | Provide a dri3 implementation for the image loader extension method. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* loader: remove clamp_swap_interval()Eric Engestrom2017-08-011-7/+0
| | | | | | | | | | As of last commit, no invalid swap interval can be stored, so there's no need to sanitize the values when reading them anymore. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* dri: Optionally turn off a couple of GLX extensions based on driconf optionsThomas Hellstrom2017-06-071-2/+9
| | | | | | | | | | | | With GLX_EXT_buffer_age turned on, gnome-shell will use full-screen damage with GLX, which severely hurts performance with architectures that emulate page-flips with copies. Like vmware. We would like to be able to turn off that extension. Similarly, typically the GLX_OML_sync_control doesn't make much sense on a virtual architecture since we don't really sync to the host's vertical retrace. We'd like to be able to turn it off as well. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri3/GLX: Fix drawable invalidation v2Thomas Hellstrom2017-06-071-0/+6
| | | | | | | | | | | | | | | | | | | A number of internal VMware apitrace traces image comparisons fail with dri3 because the viewport transformation becomes incorrect after an X drawable resize. The incorrect viewport transformation sometimes persist until the second draw-call after a swapBuffer. Comparing with the dri2 glx code there are a couple of places where dri2 invalidates the drawable in the absence of server-triggered invalidation, where dri3 doesn't do that. When these invalidation points are added to dri3, the image comparisons become correct. v2: Addressed review comment by Michel Dänzer. Cc: <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-and-tested-by: Michel Dänzer <[email protected]>
* glx: implement __DRIbackgroundCallableExtension.isThreadSafeGregory Hainaut2017-05-291-1/+11
| | | | | | | | | | | | | | | v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) v4: DRI3 doesn't hit X through GL call so it is always safe Signed-off-by: Gregory Hainaut <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx: Implement __DRI_BACKGROUND_CALLABLEPaul Berry2017-03-161-0/+14
| | | | | | | | | | | v2: Marek: Add DRI3 support. v3: (Timothy Arceri) use C99 initializers. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* glx: don't expose systemTimeExtension for DRI2/DRI3/DRISWEmil Velikov2017-03-151-1/+0
| | | | | | Used/applicable to only dri1 drivers. Signed-off-by: Emil Velikov <[email protected]>
* glx: guard swap-interval functions against destroyed drawablesNicolai Hähnle2017-02-061-0/+4
| | | | | | | | | | | | | | | | The GLX specification says about glXDestroyPixmap: "The storage for the GLX pixmap will be freed when it is not current to any client." So arguably, functions like glXSwapIntervalMESA can be called after glXDestroyPixmap has been called for the currently bound GLXPixmap. In that case, the GLXDRIDrawable no longer exists, and so we just skip those calls. Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx/dri3: guard in_current_context against a disappeared drawableNicolai Hähnle2017-02-061-0/+4
| | | | | | Cc: 17.0 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glx/dri3: handle NULL pointers in loader-to-DRI3 drawable conversionNicolai Hähnle2017-02-061-0/+2
| | | | | | | | | | | | | With a subsequent patch, we might see NULL loaderPrivates, e.g. when a DRIdrawable is flushed whose corresponding GLXDRIdrawable was destroyed. This resulted in a crash, since the loader vs. DRI3 drawable structures have a non-zero offset. Fixes glx-visuals-{depth,stencil} -pixmap Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri3: Fix MakeCurrent without a default framebufferFredrik Höglund2017-01-051-4/+10
| | | | | | | | | | In OpenGL 3.0 and later it is legal to make a context current without a default framebuffer. This has been broken since DRI3 support was introduced. Cc: "13.0 12.0" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* loader: remove loader_get_driver_for_fd() driver_typeEmil Velikov2016-10-181-1/+1
| | | | | | | | | | | | | | Reminiscent from the pre-loader days, were we had multiple instances of the loader logic in separate places and one could build a "GALLIUM_ONLY" version. Since that is no longer the case and the loaders (glx/egl/gbm) do not (and should not) require to know any classic/gallium specific we can drop the argument and the related code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* loader/dri3: constify the loader_dri3_vtableEmil Velikov2016-10-141-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* loader/dri3: add get_dri_screen() to the vtableMartin Peres2016-10-071-0/+11
| | | | | | | | | This allows querying the current active screen from the loader's common code. Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* dri3: Check for dummyContext to see if the glx_context is validStefan Dirsch2016-04-271-6/+2
| | | | | | | | | | | | According to the comments in src/glx/glxcurrent.c __glXGetCurrentContext() always returns a valid pointer. If no context is made current, it will contain dummyContext. Thus a test for NULL will always fail. https://lists.freedesktop.org/archives/mesa-dev/2016-April/113962.html Signed-off-by: Stefan Dirsch <[email protected]> Reviewed-by: Egbert Eich <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx: implement GLX part of interop interface (v2)Marek Olšák2016-04-201-0/+5
| | | | v2: - use const
* glx: update to updated version of EXT_create_context_es2_profileIlia Mirkin2016-02-031-1/+6
| | | | | | | | | | | | | | | | | | | | The EXT spec has been updated to: - logically combine the es2_profile and es_profile exts - allow any legal version to be requested dEQP tests request a specific ES version when using GLX, so this allows dEQP upstream to run against GLX with the appropriate X server patch (which had similar disabling logic). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Adam Jackson <[email protected]> (v3) v1 -> v2: - distinguish between DRI_API_GLES{,2,3} - add GLX_EXT_create_context_es_profile client-side support v2 -> v3: - fix error in computing mask
* glx/dri3: a drawable might not be bound at wait timeIlia Mirkin2015-12-211-2/+4
| | | | | | | | A trace of Alien Isolation hit this on nouveau. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]> Cc: "11.0 11.1" <[email protected]>
* glx/dri3: Convert to use dri3 helper in loader libraryBoyan Ding2015-11-171-1282/+125
| | | | | | | | | | | | v2: From Martin Peres - convert to the new drawable interface - delete dead code after the dropping of some vfuncs - delete the width and height attributes since they are found in the helper Signed-off-by: Boyan Ding <[email protected]> Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri3_open: don't leak the replyGuillaume Desmottes2015-07-111-0/+2
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90073 Signed-off-by: Guillaume Desmottes <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glx/dri3: Add additional check for gpu offloading caseAxel Davy2015-05-111-0/+5
| | | | | | | | | | | | | | | Checks blitImage is implemented. Initially having the __DRIimageExtension extension at version 9 at least meant blitImage was supported. However some implementation do advertise version >= 9 without implementing it. CC: 10.5 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* glx: report which DRI version is used when in verbose debug modeMartin Peres2015-05-071-0/+2
| | | | | | | | This should make it more obvious in bug reports while also removing any sort of guesswork for developers. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* glx/dri3: Don't fail on glXSwapBuffersMscOML(dpy, window, 0, 0, 0) (v2)Mario Kleiner2014-12-141-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | glXSwapBuffersMscOML() with target_msc=divisor=remainder=0 gets translated into target_msc=divisor=0 but remainder=1 by the mesa api. This is done for server DRI2 where there needs to be a way to tell the server-side DRI2ScheduleSwap implementation if a call to glXSwapBuffers() or glXSwapBuffersMscOML(dpy,window,0,0,0) was done. remainder = 1 was (ab)used as a flag to tell the server to select proper semantic. The DRI3/Present backend ignored this signalling, treated any target_msc=0 as glXSwapBuffers() request, and called xcb_present_pixmap with invalid divisor=0, remainder=1 combo. The present extension responded kindly to this with a BadValue error and dropped the request, but mesa's DRI3/Present backend doesn't check for error codes. From there on stuff went downhill quickly for the calling OpenGL client... This patch fixes the problem. v2: Change comments to be more clear, with reference to relevant spec, as suggested by Eric Anholt. Cc: "10.3 10.4" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)Mario Kleiner2014-12-141-1/+13
| | | | | | | | | | | | | | | | | | | | | | Restores proper immediate tearing swap behaviour for OpenGL bufferswap under DRI3/Present. Cc: "10.3 10.4" <[email protected]> v2: Add Frank Binns signed off by for his original earlier patch from April 2014, which is identical to this one, and Chris Wilsons reviewed tag from May 2014 for that patch, ergo also for this one. v3: Incorporate comment about triple buffering as suggested by Axel Davy, and reference to relevant spec provided by Eric Anholt. Signed-off-by: Frank Binns <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx/dri3: Track separate (ust, msc) for PresentPixmap vs. PresentNotifyMsc (v2)Mario Kleiner2014-12-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent calls to glXGetSyncValuesOML() and glXWaitForMscOML() from overwriting the (ust,msc) values of the last successfull swapbuffers call (PresentPixmapCompleteNotify event), as glXWaitForSbcOML() relies on those values corresponding to the most recent completed swap, not to whatever was last returned from the server. Problematic call sequence without this patch would have been, e.g., glXSwapBuffers() ... wait ... swap completes -> PresentPixmapComplete event -> (ust,msc) updated to reflect swap completion time and count. ... wait for at least 1 video refresh cycle/vblank increment. glXGetSyncValuesOML() -> PresentNotifyMsc event overwrites (ust,msc) of swap completion with (ust,msc) of most recent vblank glXWaitForSbcOML() -> Returns sbc of last completed swap but (ust,msc) of last completed vblank, not of last completed swap. -> Client is confused. Do this by tracking a separate set of (ust, msc) for the dri3_wait_for_msc() call than for the dri3_wait_for_sbc() call. This makes the glXWaitForSbcOML() call robust again and restores consistent behaviour with the DRI2 implementation. Fixes applications originally written and tested against DRI2 which also rely on this not regressing under DRI3/Present, e.g., Neuro-Science software like Psychtoolbox-3. This patch fixes the problem. v2: Rename vblank_msc/ust to notify_msc/ust as suggested by Axel Davy for better clarity. Cc: "10.3 10.4" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly. (v2)Mario Kleiner2014-12-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | targetSBC == 0 is a special case, which asks the function to block until all pending OpenGL bufferswap requests have completed. Currently the function just falls through for targetSBC == 0, returning bogus results. This breaks applications originally written and tested against DRI2 which also rely on this not regressing under DRI3/Present, e.g., Neuro-Science software like Psychtoolbox-3. This patch fixes the problem. v2: Simplify as suggested by Axel Davy. Add comments proposed by Eric Anholt. Cc: "10.3 10.4" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Eric Anholt <[email protected]>