summaryrefslogtreecommitdiffstats
path: root/src/egl/main
Commit message (Collapse)AuthorAgeFilesLines
* egl: fold _eglError() + return EGL_FALSEEmil Velikov2017-06-263-60/+30
| | | | | | | | | | | The function _eglError() already explicitly returns EGL_FALSE, explicitly to simplify the callers. Make use of it. While EGL_FALSE is numerically identical to false, NULL, EGL_NO_FOO, storage is not the same so we cannot use it for "everything". Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: drop _eglInitImage() return typeEmil Velikov2017-06-262-11/+5
| | | | | | | | | Function cannot fail and always returns true. v2: Inline the one line function in the header Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/display: make platform detection thread-safeEric Engestrom2017-06-161-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Imagine there are 2 threads that both call _eglGetNativePlatform() simultaneously: - thread 1 completes the first "if (native_platform == _EGL_INVALID_PLATFORM)" check and is preempted to do something else - thread 2 executes the whole function, does "native_platform = _EGL_NATIVE_PLATFORM" and just before returning it's preempted - thread 1 wakes up and calls _eglGetNativePlatformFromEnv() which returns _EGL_INVALID_PLATFORM because no env vars are set, updates native_platform and then gets preempted again - thread 2 wakes up and returns wrong _EGL_INVALID_PLATFORM Solve this by doing the detection in a local var and only overwriting the global one at the end, if no other thread has updated it since. This means the platform detected in the thread might not be the platform returned by the function, but this is a different issue that will need to be discussed when this becomes possible. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101252 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Grazvydas Ignotas <[email protected]> Acked-by: Emil Velikov <[email protected]>
* egl/display: only detect the platform onceEric Engestrom2017-06-161-14/+17
| | | | | | | | | | | | | | My refactor missed the fact that `native_platform` is static. Add the proper guard around the detection code, as it might not be necessary, and only print the debug message when a detection was actually performed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101252 Fixes: 7adb9b094894a512c019 ("egl/display: remove unnecessary code and make it easier to read") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Grazvydas Ignotas <[email protected]> Acked-by: Emil Velikov <[email protected]>
* egl/android: support for EGL_KHR_partial_updateHarish Krupo2017-06-117-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the EGL_KHR_partial_update extension for android platform. It passes 36/37 tests in dEQP for EGL_KHR_partial_update. 1 test not supported. v2: add fallback for eglSetDamageRegionKHR (Tapani) v3: The native_window_set_surface_damage call is available only from Android version 6.0. Reintroduce the ANDROID_VERSION guard and advertise extension only if version is >= 6.0. (Emil Velikov) v4: use newly introduced ANDROID_API_LEVEL guard rather than ANDROID_VERSION guard to advertise the extension.The extension is advertised only if ANDROID_API_LEVEL >= 23 (Android 6.0 or greater). Add fallback function for platforms other than Android. Fix possible math overflow. (Emil Velikov) Return immediately when n_rects is 0. Place function's entrypoint in alphabetical order. (Eric Engestrom) v5: Replace unnecessary calloc with malloc (Eric) Check for BAD_ALLOC error (Emil) Check for error in native_window_set_damage_region. (Emil, Tapani, Eric). Signed-off-by: Harish Krupo <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: fix _eglQuerySurface in EGL_BUFFER_AGE_EXT caseTapani Pälli2017-06-091-1/+5
| | | | | | | | | | | | | | | | | | Specification states that in case of error, value should not be written, patch changes buffer age queries to return -1 in case of error so that we can skip changing the value. In addition, small change to droid_query_buffer_age to return 0 in case buffer does not have a back buffer available. Fixes: dEQP-EGL.functional.negative_partial_update.not_postable_surface Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: [email protected]
* egl: advertise EGL_EXT_image_dma_buf_import_modifiersVarad Gautam2017-05-301-0/+1
| | | | | | | | | v2: check for DRIimageExtension version 15 (Jason Ekstrand) Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: implement eglQueryDmaBufModifiersEXTVarad Gautam2017-05-303-0/+26
| | | | | | | | | | | | | | | | | | | query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: move format check to the driver instead of making format queries here and then checking. v3: Check DRIimageExtension version before query (Daniel Stone) v4: - move to DRIimageExtension version 15, check queryDmaBufModifiers before calling (Jason Ekstrand) - pass external_only to the driver instead of setting as EGL_TRUE here (Emil Velikov, Daniel Stone) Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: implement eglQueryDmaBufFormatsEXTVarad Gautam2017-05-303-0/+23
| | | | | | | | | | | | | | allow egl clients to query the dmabuf formats supported on this platform. v2: return EGLBoolean. v3: Check DRIimageExtension version before querying (Daniel Stone). v4: move to DRIimageExtension version 15, error checking (Jason Ekstrand). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/dri2: Create EGLImages with dmabuf modifiersVarad Gautam2017-05-302-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | Allow creating EGLImages with dmabuf format modifiers when target is EGL_LINUX_DMA_BUF_EXT for EGL_EXT_image_dma_buf_import_modifiers. v2: - clear modifier assembling and error label name (Eric Engestrom) v3: - remove goto jumps within switch-case (Emil Velikov) - treat zero as valid modifier (Daniel Stone) - ensure same modifier across all dmabuf planes (Emil Velikov) v4: - allow modifiers to add extra planes (Louis-Francis Ratté-Boulianne) v5: - fix error checking, some cleanups (Jason Ekstrand) - pass single copy of the modifier to createImageFromDmaBufs2 Signed-off-by: Pekka Paalanen <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/main: add support for fourth plane tokensPekka Paalanen2017-05-303-2/+22
| | | | | | | | | | | | | | | The EGL_EXT_dma_buf_import_modifiers extension adds support for a fourth plane, just like DRM KMS API does. Bump maximum dma_buf plane count to four. v2: prevent attribute tokens from being parsed if EXT_image_dma_buf_import_modifiers is not suported. (Emil Velikov) Signed-off-by: Pekka Paalanen <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl: introduce DMA_BUF_MAX_PLANESPekka Paalanen2017-05-301-3/+5
| | | | | | | | | | Rather than hardcoding 3, use a #define. Makes it easier to bump this later to 4. Signed-off-by: Pekka Paalanen <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl: error out on eglCreateWaylandBufferFromImageWLEmil Velikov2017-05-291-1/+2
| | | | | | | | | | | | | Currently f one does the silly thing by probing the entry point w/o checking the extension they will attempt to use the extension even though it cannot work. That is due our of of an assert which gets removed in release builds. Simply error out if the extension is not enabled. Thus we can apply some cleanups with next commits. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* configure: update remaining --with-egl-platforms referencesEmil Velikov2017-05-191-1/+1
| | | | | | | | Rename the remaining references to omit the egl part. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: Partially revert 23c86c74, fix eglMakeCurrentChad Versace2017-05-181-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regressions in Android CtsVerifier.apk on Intel Chrome OS devices due to incorrect error handling in eglMakeCurrent. See below on how to confirm the regression is fixed. This partially reverts commit 23c86c74cc450a23848b85cfe914376caede1cdf Author: Chad Versace <[email protected]> Subject: egl: Emit error when EGLSurface is lost The problem with commit 23c86c74 is that, once an EGLSurface became lost, the app could never unbind the bad surface. Each attempt to unbind the bad surface with eglMakeCurrent failed with EGL_BAD_CURRENT_SURFACE. Specificaly, the bad commit added the error handling below. #2 and #3 were right, but #1 was wrong. 1. eglMakeCurrent emits EGL_BAD_CURRENT_SURFACE if the calling thread has unflushed commands and either previous surface is no longer valid. 2. eglMakeCurrent emits EGL_BAD_NATIVE_WINDOW if either new surface is no longer valid. 3. eglSwapBuffers emits EGL_BAD_NATIVE_WINDOW if the swapped surface is no longer valid. Whe I wrote the bad commit, I misunderstood the EGL spec language for #1. The correct behavior is, if I understand correctly now, is below. This patch doesn't implement the correct behavior, though, it just reverts the broken behavior. - Assume a bound EGLSurface is no longer valid. - Assume the bound EGLContext has unflushed commands. - The app calls eglMakeCurrent. The spec requires eglMakeCurrent to implicitly flush. After flushing, eglMakeCurrent emits EGL_BAD_CURRENT_SURFACE and does *not* alter the thread's current bindings. - If the app calls eglMakeCurrent again, and the app inserts no commands into the GL command stream between the two eglMakeCurrent calls, then this second eglMakeCurrent succeeds without emitting an error. How to confirm this fixes the regression: Download android-cts-verifier-7.1_r5-linux_x86-x86.zip from source.android.com, unpack, and `adb install CtsVerifier.apk`. Run test "Projection Cube". Click the Pass button (a green checkmark). Then run test "Projection Widget". Confirm that widgets are visible and that logcat does not complain about eglMakeCurrent failure. Then confirm there are no regressions in the cts-traded module that commit 263243b1 fixed: cts-tf > run cts --skip-preconditions --skip-device-info \ -m CtsCameraTestCases \ -t android.hardware.camera2.cts.RobustnessTest Tested with Chrome OS board "reef". Fixes: 23c86c74 (egl: Emit error when EGLSurface is lost) Acked-by: Tapani Pälli <[email protected]> Cc: "17.1" <[email protected]> Cc: Tomasz Figa <[email protected]> Cc: Nicolas Boichat <[email protected]> Cc: Emil Velikov <[email protected]>
* egl: fix android logger compilationTapani Pälli2017-05-151-5/+5
| | | | | | | | | | | | 1ce5853 broken compilation since LOG_ERROR is not defined and also macro expansion won't work as planned (expands to 'ANDROID_egl2alog[level]') v2: append 'ANDROID' to egl2alog table and use LOG_PRI (suggested by Chih-Wei Huang) Fixes: 1ce5853 ("egl: simplify the Android logger") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: simplify the Android loggerEmil Velikov2017-05-111-27/+7
| | | | | | | | | | Drop the unsupported pre-JellyBean macros and use a simple egl2android mapping. With this we loose the explicit abort() provided by LOG_FATAL, although Mesa already already calls exit(1) in case of a fatal errors. Suggested-by: Rob Herring <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Herring <[email protected]>
* egl: Fix -Wint-to-pointer-castChad Versace2017-05-081-1/+1
| | | | | | | | | | | | | main/egldisplay.c: In function '_eglParseX11DisplayAttribList': main/egldisplay.c:491:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] display->Options.Platform = (void *)value; The fix: cast to uinptr_t before void*. ^ Fixes: ddb99127 egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute Cc: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: use designated initializersEmil Velikov2017-05-081-8/+7
| | | | | | | | All the compilers used to build Mesa support them. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: drop unneeded sentinel from level_strings[]Emil Velikov2017-05-081-2/+2
| | | | | | | | | | The array is local so we already know its size. v2: Correct loop condition (Bartosz) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove suprous header eglcompiler.hEmil Velikov2017-05-084-51/+2
| | | | | | | | | The header is used only to provide STATIC_ASSERT. The latter is already available in utils/macros.h so use that instead and kill of the header. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unneeded else statement in _eglInitLoggerEmil Velikov2017-05-081-3/+0
| | | | | | | | | The variable level is already initialized to -1 which is already interpreted as FALLBACK_LOG_LEVEL. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove no longer needed logger infraEmil Velikov2017-05-082-49/+6
| | | | | | | | | | As of last commit nobody requires anything else but the _eglDefaultLogger(). As such use it directly and simplify the implementation. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: fold Android logger into main/Emil Velikov2017-05-081-0/+36
| | | | | | | | Will allow us to greatly simplify a lot of the code in egllog.c Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unused _eglSetLogLevel()Emil Velikov2017-05-082-25/+0
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: avoid dereferencing a null displayEric Engestrom2017-05-081-1/+3
| | | | | | Fixes: ddb99127a6f6c ("egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* egl: Emit error when EGLSurface is lostChad Versace2017-05-043-0/+42
| | | | | | | | | | | | | | | | | | | | | | Add a new bool, _EGLSurface::Lost, and check it in eglMakeCurrent and eglSwapBuffers. The EGL 1.5 spec says that those functions emit errors when the native surface is no longer valid. This patch just updates core EGL. No driver sets _EGLSurface::Lost yet. I discovered that Mesa failed to detect lost surfaces while debugging an Android CTS camera test, android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface. This patch doesn't fix the test though, though, because the test expects EGL_BAD_SURFACE when the surface becomes lost, and this patch actually complies with the EGL spec. If I interpreted the EGL spec correctly, EGL_BAD_NATIVE_WINDOW or EGL_BAD_CURRENT_SURFACE is the correct error. Cc: [email protected] Cc: Tomasz Figa <[email protected]> Cc: Tapani Pälli <[email protected]> Reviewed-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attributeAdam Jackson2017-05-042-7/+13
| | | | | | | | | | Introduce _egl_display::Options::Platforms for private storage. For X11 platforms we can use it for the screen number as set by EGL_PLATFORM_X11_SCREEN_EXT. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl: initialise dummy_thread via _eglInitThreadInfoEmil Velikov2017-04-291-9/+4
| | | | | | | | | | | Considering we cannot make dummy_thread a constant we might as well, initialise by the same function that handles the actual thread info. This way we don't need to worry about mismatch between the initialiser and initialising function. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* EGL: Implement the libglvnd interface for EGL (v3)Kyle Brenneman2017-04-177-5/+285
| | | | | | | | | | | | | | | | | | | | | | | | The new interface mostly just sits on top of the existing library. The only change to the existing EGL code is to split the client extension string into platform extensions and everything else. On non-glvnd builds, eglQueryString will just concatenate the two strings. The EGL dispatch stubs are all generated. The script is based on the one used to generate entrypoints in libglvnd itself. v2: [Kyle] - Rebased against master. - Reworked the EGL makefile to use separate libraries - Made the EGL code generation scripts work with Python 2 and 3. - Change gen_egl_dispatch.py to use argparse for the command line arguments. - Assorted formatting and style cleanup in the Python scripts. v3: [Emil Velikov] - Rebase - Remove separate glvnd glx/egl configure toggles Signed-off-by: Emil Velikov <[email protected]>
* egl: Implement __DRI_BACKGROUND_CALLABLEEric Anholt2017-03-162-1/+4
| | | | | | | | | v2: (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]>
* eglapi: replace linear entrypoint search with binary searchEric Engestrom2017-02-241-13/+24
| | | | | | | Tested with dEQP-EGL.functional.get_proc_address.* Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: move entrypoints list out to its own fileEric Engestrom2017-02-242-77/+78
| | | | | | | | This will allow us to make sure the list is always sorted in the next commit. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: sort entrypoints listEric Engestrom2017-02-241-37/+37
| | | | | | | | Let's make that comment true. If will also be necessary in a couple commits (using bsearch). Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: use macro to map entrypoints to functionsEric Engestrom2017-02-241-74/+75
| | | | | | | As of the last 3 commits, there's a function for each entrypoint. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: add entrypoint for eglClientWaitSyncKHREric Engestrom2017-02-241-7/+24
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: add entrypoint for eglDestroySyncKHREric Engestrom2017-02-241-7/+21
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* eglapi: add entrypoint for eglDestroyImageKHREric Engestrom2017-02-241-7/+21
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: _eglFilterArray's filter is always non-nullEmil Velikov2017-02-161-18/+9
| | | | | | | Drop the extra handling and assert() if things change in the future. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: remove duplicate 0 assignmentEric Engestrom2017-02-151-3/+0
| | | | | | | The memset on the line before already takes care of this. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* egl: Emit correct error when robust context creation failsChad Versace2016-12-271-12/+26
| | | | | | | | | | | | | | | | | Fixes dEQP-EGL.functional.create_context_ext.robust_* on Intel with GBM. If the user sets the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR in EGL_CONTEXT_FLAGS_KHR when creating an OpenGL ES context, then EGL_KHR_create_context spec requires that we unconditionally emit EGL_BAD_ATTRIBUTE because that flag does not exist for OpenGL ES. When creating an OpenGL context, the spec requires that we emit EGL_BAD_MATCH if we can't support the request; that error is generated in the egl_dri2 layer where the driver capability is actually checked. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99188 Cc: [email protected] Reviewed-by: Tapani Pälli <[email protected]>
* egl: Check config's surface types in eglCreate*Surface()Chad Versace2016-12-201-0/+10
| | | | | | | | | | | If the provided EGLConfig does not support the requested surface type, then emit EGL_BAD_MATCH. Fixes dEQP-EGL.functional.negative_api.create_pbuffer_surface on GBM. Cc: "13.0" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl: Fix crashes in eglCreate*Surface()Chad Versace2016-12-141-2/+2
| | | | | | | | | | | | | Don't dereference a null EGLDisplay. Fixes tests dEQP-EGL.functional.negative_api.create_pbuffer_surface dEQP-EGL.functional.negative_api.create_pixmap_surface Reviewed-by: Mark Janes <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99038 Cc: "13.0" <[email protected]>
* egl: add and enable EGL_KHR_config_attribsEmil Velikov2016-12-092-0/+7
| | | | | | | Extension is already implemented in the main code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: unexport _eglConvertIntsToAttribsEric Engestrom2016-12-092-4/+1
| | | | | | | | Nobody else makes use of this function. We can always re-export it if someone ever needs it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: rename static functions to match conventionEric Engestrom2016-12-091-9/+9
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: add EGL_ANDROID_native_fence_syncRob Clark2016-12-016-6/+62
| | | | | | | | | | With fixes from Chad squashed in, plus fixes for issues that Rafael found while writing piglit tests. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: un-fallthrough sync attr parsingRob Clark2016-12-011-3/+3
| | | | | | | | | | Doesn't work so well when you start having more than one possible attrib. Prep-work for next patch. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: initialize SyncCondition after attr parsingRob Clark2016-12-011-1/+2
| | | | | | | | | | | Reduce the noise in the next patch. For EGL_SYNC_NATIVE_FENCE_ANDROID the sync condition is conditional on EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: fix helper function nameEric Engestrom2016-11-171-4/+4
| | | | | | | | | I introduced this code last month, but didn't follow the naming convention. Fix this. Fixes: 0a606a400fe382a9bc72 ("egl: add eglSwapBuffersWithDamageKHR") Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>