summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* configure: set HAVE_foo_PLATFORM as applicableEmil Velikov2017-05-191-5/+0
| | | | | | | | | | Rather than having multiple places that define the macros, do it just once in configure. Makes existing code a bit shorter and easier to manage as we fix the VL targets with follow-up commits. Cc: [email protected] 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]>
* configure: rename remaining HAVE_EGL_PLATFORM_* guardsEmil Velikov2017-05-191-3/+3
| | | | | | | | | Analogous to others earlier, these will be used to control the platform for more than the EGL driver. Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: add g_egldispatchstubs.h to the release tarballEmil Velikov2017-05-191-1/+2
| | | | | Fixes: ce562f9e3fa ("EGL: Implement the libglvnd interface for EGL (v3)") Signed-off-by: Emil Velikov <[email protected]>
* egl/android: fix segfault within swap_buffersTapani Pälli2017-05-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | Function droid_swap_buffers may get called without dri2_surf->buffer set, in these cases we don't have a back buffer set either. Patch fixes segfault seen with 3DMark that uses android.opengl.GLSurfaceView for rendering it's UI. backtrace: #00 pc 00013f88 /system/lib/egl/libGLES_mesa.so (droid_swap_buffers+104) #01 pc 000117b2 /system/lib/egl/libGLES_mesa.so (dri2_swap_buffers+50) #02 pc 000058b2 /system/lib/egl/libGLES_mesa.so (eglSwapBuffers+386) #03 pc 00011329 /system/lib/libEGL.so (eglSwapBuffersWithDamageKHR+553) #04 pc 000118e7 /system/lib/libEGL.so (eglSwapBuffers+55) #05 pc 000754dc /system/lib/libandroid_runtime.so Note, this is v1 as v2 caused dEQP regressions. Fixes: 2acc69d ("EGL/Android: Add EGL_EXT_buffer_age extension") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]> Cc: "17.1" <[email protected]>
* egl/wayland: Ensure we get a back bufferDaniel Stone2017-05-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9ca6711faa03 changed the Wayland winsys to only block for the frame callback inside SwapBuffers, rather than get_back_bo. get_back_bo would perform a single non-blocking Wayland event dispatch, to try to find any release events which we had pulled off the wire but not actually processed. The blocking dispatch was moved to SwapBuffers. This removed a guarantee that we would've processed all events inside get_back_bo(), and introduced a failure whereby the server could've sent a buffer release event, but we wouldn't have read it. In clients unconstrained by SwapInterval (rendering ~as fast as possible), which were being displayed directly without composition (buffer release delayed), this could lead to get_back_bo() failing because there were no free buffers available to it. The drawing rightly failed, but this was papered over because of the path in eglSwapBuffers() which attempts to guarantee a BO, in order to support calling SwapBuffers twice in a row with no rendering actually having been performed. Since eglSwapBuffers will perform a blocking dispatch of Wayland events, a buffer release would have arrived by that point, and we could then choose a buffer to post to the server. The effect was that frames were displayed out-of-order, since we grabbed a frame with random past content to display to the compositor. Ideally get_back_bo() failing should store a failure flag inside the surface and cause the next SwapBuffers to fail, but for the meantime, restore the correct behaviour such that get_back_bo() no longer fails. Signed-off-by: Daniel Stone <[email protected]> Reported-by: Eero Tamminen <[email protected]> Acked-by: Pekka Paalanen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98833 Fixes: 9ca6711faa03 ("Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"")
* egl/wayland: Use per-surface event queuesDaniel Stone2017-05-192-27/+68
| | | | | | | | | | | | | | | | | | | | During display initialisation, we need a separate event queue to handle the registry events, which is correctly handled. But we also need separate per-surface event queues to handle swapchain-related events, such as surface frame events and buffer release events. This avoids two surfaces from the same EGLDisplay, both current on separate threads, dispatching each other's events. Create separate per-surface event queues, create wl_surface and wl_drm proxy wrapper objects per surface, so we eliminate the race around sending events to the wrong queue. swrast buffers do not need a dedicated proxy wrapper, as the wl_shm_pool used to create the wl_buffers, being transient, can itself be assigned to a queue. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Fixes: 36b9976e1f99 ("egl/wayland: Avoid race conditions when on non-main thread") Cc: [email protected]
* egl/wayland: Don't open-code roundtripDaniel Stone2017-05-191-25/+1
| | | | | | | | | | wl_display_roundtrip_queue() exists and can replace roundtrip(). The API was introduced with wayland 1.6, while we currently require 1.11. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [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]>
* Android: push driver build details to driver makefilesRob Herring2017-05-111-9/+9
| | | | | | | | | | | | | src/gallium/targets/dri/Android.mk contains lots of conditional for individual drivers. Let's move these details into the individual driver makefiles. In the process, align the make driver conditionals with automake (i.e. HAVE_GALLIUM_*). Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: add the radeon winsys for radeonsi] Signed-off-by: Emil Velikov <[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-087-52/+4
| | | | | | | | | 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-083-35/+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/android: Set EGLSurface.Lost to EGL_TRUE/EGL_FALSENicolas Boichat2017-05-041-2/+2
| | | | | | | | | Lost is an EGLBoolean, so we should assign it to EGL_TRUE/EGL_FALSE, not true/false. Fixes: e5eace58684 ("egl/android: Mark surface as lost when dequeueBuffer fails") Fixes: 0212db35040 ("egl/android: Cancel any outstanding ANativeBuffer in surface destructor") Reviewed-by: Chad Versace <[email protected]>
* egl/android: Mark surface as lost when dequeueBuffer failsChad Versace2017-05-041-0/+10
| | | | | | | | | | | | | | | This ensures that future calls to eglSwapBuffers and eglMakeCurrent emit an error. This patch is part of a series for fixing android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on Chrome OS x86 devices. 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/android: Cancel any outstanding ANativeBuffer in surface destructorChad Versace2017-05-041-4/+9
| | | | | | | | | | | | | | | | | | | That is, call ANativeWindow::cancelBuffer in droid_destroy_surface(). This should prevent application deadlock when the app destroys the EGLSurface after EGL has acquired a buffer from SurfaceFlinger (ANativeWindow::dequeueBuffer) but before EGL has released it (ANativeWindow::enqueueBuffer). This patch is part of a series for fixing android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface on Chrome OS x86 devices. 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: 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]>
* eg: explicitly size dri2_to_egl_attribute_map[]Emil Velikov2017-05-041-1/+1
| | | | | | | | | This way we'll get an implicit zero initialization of the remaining members, as required by dri2_add_config(). Fixes: e5efaeb85c3 ("egl: polish dri2_to_egl_attribute_map[]") Cc: Tomasz Figa <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/platform/drm: Don't take display ownership until gbm is initializedAdam Jackson2017-05-041-1/+1
| | | | | | | | | | If the gbm_create_device() call here actually did fail, any subsequent eglTerminate on the display would segfault. Cc: <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attributeAdam Jackson2017-05-043-8/+14
| | | | | | | | | | 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: polish dri2_to_egl_attribute_map[]Emil Velikov2017-04-291-50/+18
| | | | | | | | Annotate the array as static const and use C99 initialiser to populate it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl: add gitignoreElie TOURNIER2017-04-221-0/+2
| | | | | | | | | Since commit ce562f9e3fa, two new files are generated. We don't want to track them. Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Revert "android: fix segfault within swap_buffers"Tapani Pälli2017-04-211-8/+0
| | | | | | | | | This reverts commit 4d4558411db166d2d66f8cec9cb581149dbe1597. This was a wrong call, while it fixed issue with 3DMark it actually introduced regression elsewhere. Signed-off-by: Tapani Pälli <[email protected]>
* EGL: Implement the libglvnd interface for EGL (v3)Kyle Brenneman2017-04-1713-26/+3491
| | | | | | | | | | | | | | | | | | | | | | | | 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]>
* Android: drop Android 4.4 (KitKat) supportRob Herring2017-03-221-4/+0
| | | | | | | | | | | Any users of KitKat are likely using an older version of Mesa and KitKat support adds complexity to the make files. Dropping support allows removing the MESA_LOLLIPOP_BUILD make variable in various make files. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: kill off {MESA_}ANDROID_VERSION defines aka Android 4.1 and olderRob Herring2017-03-223-28/+3
| | | | | | | | | The Android version defines are only needed for versions less than 4.2 which aren't really supported or tested. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: clean-up trailing '\' in make variablesRob Herring2017-03-221-2/+2
| | | | | | | | | Fixed with the following command: perl -pe 'BEGIN{undef $/;} s/ \\\n\n/\n\n/smg' $(find . -name 'Android.*') Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: consistently use ifndef guards over pragma onceEmil Velikov2017-03-221-1/+4
| | | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Vedran Miletić <[email protected]> Acked-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* android: fix segfault within swap_buffersTapani Pälli2017-03-171-0/+8
| | | | | | | | | | | | | | | | | | | | Function droid_swap_buffers may get called without dri2_surf->buffer set, in these cases we don't have a back buffer set either. Patch fixes segfault seen with 3DMark that uses android.opengl.GLSurfaceView for rendering it's UI. backtrace: #00 pc 00013f88 /system/lib/egl/libGLES_mesa.so (droid_swap_buffers+104) #01 pc 000117b2 /system/lib/egl/libGLES_mesa.so (dri2_swap_buffers+50) #02 pc 000058b2 /system/lib/egl/libGLES_mesa.so (eglSwapBuffers+386) #03 pc 00011329 /system/lib/libEGL.so (eglSwapBuffersWithDamageKHR+553) #04 pc 000118e7 /system/lib/libEGL.so (eglSwapBuffers+55) #05 pc 000754dc /system/lib/libandroid_runtime.so v2: do like other backends, call get_back_bo (Emil Velikov) Fixes: 2acc69d ("EGL/Android: Add EGL_EXT_buffer_age extension") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Implement __DRI_BACKGROUND_CALLABLEEric Anholt2017-03-165-1/+22
| | | | | | | | | 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]>
* egl/drm: Use modifiers for backbuffer creationBen Widawsky2017-03-151-4/+15
| | | | | | | | | Split into a separate patch from the previous patch as requested by Emil. Requested-by: Emil Velikov <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* wayland: move .gitignore where applicableEmil Velikov2017-03-131-0/+0
| | | | | | | | Strictly speaking things work as-is, but let's move the file alongside the artefacts it references. Analogous to all other places in mesa. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* wayland-egl/wayland-egl-symbols-check: do not mandate bashEmil Velikov2017-03-101-1/+1
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andreas Boll <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/egl-symbols-check: do not mandate bashEmil Velikov2017-03-101-1/+1
| | | | | | | | There's nothing bash specific in the script. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andreas Boll <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* EGL/Android: Add EGL_EXT_buffer_age extensionXiaosong Wei2017-03-042-1/+59
| | | | | | | | This patch implements the EGL_EXT_buffer_age extension for Android. https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt Reviewed-by: Tapani Pälli <[email protected]> Acked-by: Emil Velikov <[email protected]>
* egl/wayland: Don't use DRM format codes for SHMDaniel Stone2017-03-011-6/+15
| | | | | | | | | | | | | | | | | | The wl_drm interface (akin to X11's DRI2) uses the standard set of DRM FourCC format codes. wl_shm copies this, except for ARGB8888/XRGB8888, which use their own definitions. Make sure we only use wl_shm format codes when we're working with wl_shm. Otherwise, using swrast with 32bpp formats would fail with an error. Cc: [email protected] Signed-off-by: Daniel Stone <[email protected]> (v1) Fixes: cb5e799448 ("egl/wayland: unify dri2_wl_create_surface implementations") v2: [Emil Velikov: move to dri2_wl_create_window_surface] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (IRC)
* egl: Ensure ResetNotificationStrategy matches for shared contexts.Kenneth Graunke2017-03-011-0/+14
| | | | | | | | | | Fixes: dEQP-EGL.functional.robustness.negative_context.invalid_robust_shared_context_creation Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: [email protected]
* egl/dri3: implement query surface hookBrendan King2017-02-281-0/+20
| | | | | | | | | | | | | | This is a DRI3 version of a change made for DRI2 (4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"), that fixed failures in dEQP-EGL.functional.resize.surface_size.grow and dEQP-EGL.functional.resize.surface_size.shrink. Cc: Tapani Pälli <[email protected]> Cc: Mark Janes <[email protected]> Cc: Chad Versace <[email protected]> Signed-off-by: Brendan King <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: "17.0" <[email protected]>
* check: add support for running test as standaloneEric Engestrom2017-02-261-0/+5
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* check: make any failure fatalEric Engestrom2017-02-261-0/+1
| | | | | | | Previously, only the last error code was returned. Using `set -e` makes the script quit on any unhandled error. Signed-off-by: Eric Engestrom <[email protected]>
* check: mark two tests are requiring bashEric Engestrom2017-02-261-1/+1
| | | | | | | Requirement was removed just before pushing, but it's actually needed for heredocs (`<<<`). Signed-off-by: Eric Engestrom <[email protected]>