src/libANGLE/renderer/gl/glx/DisplayGLX.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi f044aaf8 2024-03-02T00:51:33 Vulkan: Create instance/device without access to Display The feature overrides are now encapsulated in a struct, a reference to which is passed around until features are initialized. Additionally, some window system information needed to decide which extensions to use or workarounds to apply are passed around. This is a step towards decoupling RendererVk from egl::Display for direct use with OpenCL. Bug: angleproject:8564 Change-Id: Id6c5d1c3b38aafcd4397e54cc6cad32bf849eeda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5335823 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8346addb 2024-02-06T15:40:31 Contain X11 includes and free usage of common terms This change undoes workarounds where some terms were avoided so there is no clash with X11 (such as Success, Bool and None). In particular, this helps us make sure we never include the X11 headers in such an unconstrained manner as to clash with our code. Bug: angleproject:8520 Change-Id: I53d9657c5a33164064d2c80a206b96fd52f607f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273491 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org>
Shahbaz Youssefi aa244358 2024-02-06T14:44:39 Reland "Vulkan: Get rid of X11 include in DisplayVkXcb.cpp" This is a reland of commit 8abbe2836bb49faba8a97e2df59058290e1c385a In the reland, the xcb-util dependency is removed. Original change's description: > Vulkan: Get rid of X11 include in DisplayVkXcb.cpp > > Bug: angleproject:8520 > Change-Id: Iaa251b0ba2858873b8d22e8f9e5dae7a2567c95e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273489 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8520 Change-Id: I238e0a6c3b94398c10fa1bc39c5a0b4261797311 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5292774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Liza Burakova e8a3493f 2024-02-14T21:51:00 Initialize DisplayWgpu This change adds basic initialize to DisplayWgpu as well as adding APIs for DisplayGLX and DisplayWgpu. These APIs are necessary to ensure DisplayWgpu doesn't pull in necessary X11 headers that break builds. Bug: angleproject:8477 Change-Id: Icc6d9e7246a741def7a0337a296f9c1f9cec1415 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5259979 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Liza Burakova <liza@chromium.org>
Solti Ho f431641a 2024-02-07T17:27:51 Revert "Vulkan: Get rid of X11 include in DisplayVkXcb.cpp" This reverts commit 8abbe2836bb49faba8a97e2df59058290e1c385a. Reason for revert: https://chromium-review.googlesource.com/c/chromium/src/+/5274193 Original change's description: > Vulkan: Get rid of X11 include in DisplayVkXcb.cpp > > Bug: angleproject:8520 > Change-Id: Iaa251b0ba2858873b8d22e8f9e5dae7a2567c95e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273489 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8520 Change-Id: I91bdd48d8893cbe3a6eed8058c0034a4ef1aed0a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5276987 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Solti Ho <solti@google.com>
Shahbaz Youssefi 8abbe283 2024-02-06T14:44:39 Vulkan: Get rid of X11 include in DisplayVkXcb.cpp Bug: angleproject:8520 Change-Id: Iaa251b0ba2858873b8d22e8f9e5dae7a2567c95e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273489 Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi d8f088e0 2023-08-14T11:07:24 GL: Remove parallel compile/link without driver support This feature was practically disabled everywhere due to various bugs, and is complicating the code. In effect, the code was always spawning a thread for the compilation and link jobs, immediately fail it (due to a workaround), then do the job when compile/link is resolved (much closer to draw time). This leads to bad user experience, but also is racy because the shaders may get recompiled in the meantime and there is little the GL backend could do to stop that (efficiently). After this change, parallel compile/link is either done by the driver (if supported), or it isn't done. This is a partial revert of a100d8f471f79b9f88d387164992cc5bd9c6ee9f. Bug: angleproject:3031 Bug: chromium:922936 Bug: chromium:1184692 Bug: chromium:1202928 Change-Id: I6348bee3249ccb3828bb98ac2a69dc7d305f821c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774785 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roman Lavrov f18b6335 2022-08-29T11:53:01 Replace std::this_thread::get_id() use with a unique thread id. std::this_thread::get_id() gets recycled. It's pthread_self() under the hood on Linux and Android which gets recycled, for example when one thread terminates and another one starts it is likely to return the same value. Bug: angleproject:7602 Change-Id: I83d818bc17ead5cce8bce7f7d88fc1c7c0fa860c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855041 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Antonio Caggiano bf619311 2022-03-01T17:23:38 EGL: Implement isX11 for DisplayGLX This fixes CreatePlatformWindowSurfaceEXT for the GL renderer. Bug: angleproject:6961 Change-Id: Iaec90f5fe81ee605f43d62e6e63a3fbedd314cb4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3497684 Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis e1ff28d4 2021-03-12T13:35:42 GLX: Always call XSync on creation/destruction of WindowSurfaces ANGLE was checking that it had opened the connection before calling XSync upon initialization. However, clients may pass in a connection and ANGLE must sync after creating a GLXWindow with the connection. This wasn't happening and was causing issues in Chrome. Bug: chromium:1172803 Change-Id: Ieb2cbfaa226f6d066030f42d8e25b1d9c34779f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757507 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis e174c358 2021-02-04T15:14:10 GL: Consolidate glGetString calls First step for cacheing the result of glGetString calls is mostly cleanup. Bug: chromium:1173672 Change-Id: I47281a09b9bd5859655d16376977a6eabcfbb3c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676203 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 0be050a4 2020-09-23T15:12:56 Pass GL_VERSION info through ANGLE's GL_RENDERER string Chrome needs ANGLE to pass through the underlying driver vendor and version, which cannot always be determined by the SystemInfo library. This is done by construction GL_RENDERER in the frontend through combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends. Example changes are in the doc: https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing Bug: chromium:1126526 Bug: chromium:1131248 Bug: chromium:1134669 Bug: chromium:1169861 Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 6e9018bd 2020-06-25T12:58:14 GL: Clean up Display code related to multithreading Rename mCurrentData to mCurrentNativeContexts, and clean up some logic to be easier to read. Bug: angleproject:4724 Change-Id: I6fd6d99d4f9a3af808d0baa665edfbdde7fb0500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267424 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis a392a81d 2021-01-06T12:26:44 GLX: Avoid creating child window when X visual ID is specified. ANGLE's GLX backend creates a child ID because the visual of the X window must match that of the GLX window, and we can't always be certain. EGL_ANGLE_x11_visual allows applications to specify the visual ID of the window passed to ANGLE via EGL_X11_VISUAL_ID_ANGLE. When this is the case, we don't need to make a child window. Since Chrome always passes this information, this may help optimize ANGLE's GLX usage in Chrome, because we don't have to poll the parent window to manage the child window's properties. Bug: chromium:1132827 Change-Id: If8082d2d07469905afffab01dde2ec9fca8d4eb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611556 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 937bc82b 2020-12-17T17:57:50 Revert "GLX: Expose EGL_ANGLE_window_fixed_size" This reverts commit fa9b803e078fb833143df7a2b3f88c8694fa8f2f. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1157748 Original change's description: > GLX: Expose EGL_ANGLE_window_fixed_size > > Right now the GLX backend checks for resize on every SwapBuffers > call. If EGL_ANGLE_window_fixed_size is used, it will only resize > when signaled by Chrome. > > Bug: chromium:1132827 > Change-Id: Ia4ddbbbf6dcf13f46ad564208eccc517de8be33c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2572886 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> TBR=syoussefi@chromium.org,jonahr@google.com,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:1132827 Change-Id: I1110c5dd5d806b3c6c59308d4865f0d3aa57fc3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595197 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis fa9b803e 2020-12-03T17:53:12 GLX: Expose EGL_ANGLE_window_fixed_size Right now the GLX backend checks for resize on every SwapBuffers call. If EGL_ANGLE_window_fixed_size is used, it will only resize when signaled by Chrome. Bug: chromium:1132827 Change-Id: Ia4ddbbbf6dcf13f46ad564208eccc517de8be33c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2572886 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill fb82b119 2020-11-22T09:05:06 EGL: Add const to several methods. This is in preparatino for auto-generating the EGL validation header. The auto-generation script will force multiple parameters to const. Bug: angleproject:2621 Change-Id: I04e442c6ff118fd7c296341f12f442901f6fb8c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552979 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 56663dbf 2020-11-19T21:21:19 EGL: Expose device query as a client extension. This matches the extension spec. Previously we were exposing the ext as a normal display extension. The extension should work without needing a display. Because the extension requires a non-null device for every display we also add a MockDevice class to handle back-ends which don't implement any attribute query extensions. By default the device query ext does not expose any way to use devices so this works fine. Bug: angleproject:5372 Change-Id: I474310a86aff6a83bd6f9a6b21c8a07c649f306d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551543 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 96a49a48 2020-10-06T13:34:09 GLX, EGL: Support NV_robustness_video_memory_purge Chrome is showing rendering issues on Linux/Nvidia after returning from the lock screen. This could be related to the fact that Nvidia drivers are not able to guarantee conformance after certain events. By exposing this extension, we can instruct Chrome to reinitialize contexts after they are purged by the driver. If this is not explicitly requested, we can still generate an UnknownContextReset to tell apps to discard the invalid context anyway. Bug: chromium:1113040 Change-Id: Ie99b6356cc27fea33643d61b1d74f4f68a271d70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2453689 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 1da7ac0f 2020-10-13T12:13:36 GLX: Workaround to disable GLX_OML_sync_control support. Some users on Linux/Wayland are reporting issues rendering Chrome unusable when ANGLE exposes GLX_OML_sync_control. This CL adds a new feature to ANGLE to disable this extension, but for now we leave the feature off by default, so users can test it via command line flags. Bug: chromium:1137851 Change-Id: I804ea935fe441c4794b93ee62ca335e78b9e453a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468216 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Ian Elliott 08142700 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: If08626a5310f9b4e3210e1a897a6886248e4d8ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451423 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Kai Ninomiya da61c40e 2020-10-06T01:57:55 Revert "Work-around test runner & DebugAnnotator" This reverts commit e44c94d96a9b65615fe8f5038e124763ac8c45e5. Reason for revert: Breaks build of DisplayGbm on ChromeOS: src/libANGLE/renderer/gl/egl/gbm/DisplayGbm.{h,cpp} First failing builds: https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28amd64-generic%29/1608 https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28kevin%29/2212 Original change's description: > Work-around test runner & DebugAnnotator > > Note: This precedes another CL that needs this change. > > DebugAnnotator uses a global variable. The test runner doesn't change > state between testing different back-ends. This works-around the > problem by setting the global variable when the context is switched. > > Because the GL back-end doesn't have its own DebugAnnotator sub-class, > add a Display* to DisplayImpl::makeCurrent(), so that > DisplayGL::makeCurrent() can install the front-end-Display's > DebugAnnotator. > > Note: the Vulkan back-end gets this fix even though the new > DebugAnnotatorVk class will be added in a follow-on CL. > > Bug: b/162068318 > Bug: b/169243237 > Bug: angleproject:5121 > Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Commit-Queue: Ian Elliott <ianelliott@google.com> TBR=courtneygo@google.com,ianelliott@google.com,jmadill@chromium.org Change-Id: I99df2716951726ead24961dc3d27a7ec63aeda80 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451420 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Ian Elliott e44c94d9 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Trevor David Black e815afbf 2020-09-07T22:09:22 First pass at increasing inclusivity Link to the inclusivity rules https://source.android.com/setup/contribute/respectful-code Bug: b/162834212 Bug: chromium:1097198 Change-Id: Ied5a9e3879d72bff3f77ea6fcda9b82f30c32c2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396737 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor Black <vantablack@google.com>
Peng Huang 4cf2501c 2020-07-27T13:19:27 Add extension EGL_ANGLE_display_semaphore_share_group For sharing semaphores globally. Bug: angleproject:4877 Change-Id: I472e0902fd04ca8350d74e6c0ae6925ee930ccf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2319370 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 4eb2f6dc 2020-06-11T11:30:14 Add basic multithreading support to GLX The first step for true multithreading support is allowing multiple threads to use ANGLE as long as only one thread has a current context at a time. Added a test to MultithreadingTests to reproduce this behavior and implemented it in GLX. Bug: angleproject:4724 Bug: angleproject:4725 Bug: chromium:1087084 Change-Id: I908d3f02f34a681f1c9d0919dd17aee1a489173c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241616 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4e6f6545 2020-04-16T16:31:24 GLX: Support X11 pixmaps Add support for creating EGL pixmaps from X11 pixmaps using GLX. Pixmaps are needed for various external APIs such as VAAPI. Add support for EGL_NOK_texture_from_pixmap to allow binding pixmaps to textures. BUG=angleproject:4560 Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Maksim Sisov 4b2a9cbc 2020-05-21T08:57:02 move duplicated SwapControlData to rendergl_utils. Both DisplayOzone and DisplayGLX have SwapControlData declared and defined. In the future, when both of them will be compiled (DisplayGLX will be required for Ozone/X11), they will result in a compilation error stating about multiple definitions of the struct. Thus, move that rendergl_utils. Bug: chromium:1084458 Change-Id: Ib174d0e8de1ac4773c841fe286175358acb15d79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210702 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Maksim Sisov ba4e2b94 2020-05-21T09:40:37 Type cast EGLNativeDisplayType to _XDisplay* in xcb and glx As we are approaching the point when DisplayGLX will be compiled in Ozone/X11 configuration, we need to resolve compilation errors. Ozone has intptr_t EGLNativeDisplayType whereas X11 requires Display* aka _XDisplay*. We've already done so in Chromium, and it's time to do the same cast in angle. Bug: chromium:1084458 Change-Id: I11b5ae2e10bfa316cbaa882be86af6894cfdbbf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2211761 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 4b94d7bb 2020-03-24T17:23:19 Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based on the original extension GLX_OML_sync_control. However, this new function is not universally implemented. This CL moves it to a new extension, EGL_ANGLE_sync_control_rate, and renames it to eglGetMscRateANGLE. Bug: chromium:1064078 Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Corentin Wallez 0d2c75f4 2020-01-14T19:35:16 DisplayGLX::isValidNativeWindow, avoid X11 exiting the program The previous implementation of the function had an incorrect comment that implied XQueryTree was a great way to check if a Window is valid. Any X11 function taking a Window is a good candidate, what we need to be careful about is X11 exiting the program on any error. Replace it with a call to XGetWindowAttributes while ignoring X11 errors. This fix was found while implementing similar functionality in Dawn. Bug: dawn:269 Change-Id: I777e59cddbe94baf63286d11887b58c63ac2b66c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001301 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jonah Ryan-Davis a829c0b9 2019-11-14T16:49:02 Expose EGL_CHROMIUM_sync_control via GLX_OML_sync_control On GLX, we can expose the EGL_CHROMIUM_sync_control extension by forwarding to GLX_OML_sync_control when it's available. This will help with accurate vsync times for Chrome Bug: 1020252 Change-Id: I9b1e8cf0f8b1a548cc7cc7202fac2d0cdb01d74d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1918104 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jonah Ryan-Davis ac7c876b 2019-09-17T11:20:47 GL: DisplayGLX::makeCurrent should handle drawSurface==0 In this case the draw surface should be unbound, but ANGLE had been skipping this case (and handling it internally). This caused a crash on Linux Intel. Now makeCurrent is actually called on the driver with drawSurface mDummyPbuffer. Bug: chromium:988440 Change-Id: Ifae7a828455eb67e516a47515ec6c24cc36e3c2b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808719 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 78a51911 2019-06-12T14:28:14 Clean up and expose frontend features to egl. gl::Workarounds was used to hold frontend features. Change ownership of this struct from Context to Display, so it can be exposed to egl. Also rename to features and clean up for consistency. Bug: angleproject:1621 Change-Id: I82e98e53873abb7a402c93e60f8a662a7263e0d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1655772 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis f52f2637 2019-05-23T13:52:52 Add EGL_ANGLE_workaround_control extension. This extension is used to query strings from an array based on index, which will be used to query all the information about workarounds in ANGLE. Bug: angleproject:1621 Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 057b76e1 2019-04-12T14:48:59 Implement GL_CHROMIUM_lose_context. This is useful for testing context lost behaviour. BUG=angleproject:3379 Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
jchen10 7d53c60b 2019-02-15T21:06:42 ParallelCompile: use the native extensions This enhances to use the native parallel compile extensions if available. Bug: 873724 Change-Id: I0aaed314accd75e1bfa596b322225b56d729d3a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1475234 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 a100d8f4 2018-12-29T16:39:55 ParallelCompile: add GL backend support For GL backend, at first each worker thread must have a naitve context for its own to work in. These worker contexts have to be shared from the main context, so that all shader and program objects are seen in any context. This extends backend displays to create and destroy the worker contexts. RendererGL manages and allocates them to the worker threads. ShaderImpl has a new compile method added to do the actual glCompile work in worker thread. The ProgramGL's link method is broken down by introducing the LinkEventGL class. Bug: chromium:849576 Change-Id: Idc2c51b4b6c978781ae77810e62c480acc67ebb5 Reviewed-on: https://chromium-review.googlesource.com/c/1373015 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0c667215 2019-01-01T14:40:36 Pass ErrorSet to ContextImpl constructor. This removes the need for the setErrorSet method. Also update some egl::Error TODO bugs. Bug: angleproject:2491 Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17 Reviewed-on: https://chromium-review.googlesource.com/c/1392393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 853f8255 2018-07-09T09:18:50 DisplayImpl: Make waitClient/waitNative non-const. These methods can mutate the display resources. Necessary for getting rid of ProxyContext and for the Vulkan error refactor. Bug: angleproject:2714 Bug: angleproject:2713 Change-Id: Ibffb1a382ecb064daaa7c664f9fc65cbcf927b37 Reviewed-on: https://chromium-review.googlesource.com/1128927 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3cacf69b 2018-06-20T16:49:57 Pass all context creation parameters to DisplayImpl::createContext. Knowing the share context at native context creation time is required if we want to honor the requested share group instead of virtualizing contexts or using global share groups. BUG=angleproject:2464 Change-Id: I1fb4d71de266b3191986b1754e73d474e49445bb Reviewed-on: https://chromium-review.googlesource.com/1108743 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 5da6690f 2018-06-05T12:24:06 Hold RendererGL objects with a shared_ptr. To support both virtualized and unvirtualized contexts, the RendererGL object represents the native context. Update ContexGL and the various DisplayGLs to hold RendererGL with a shared_ptr so that deletion of the renderer happens at the correct time. Update RendererGL to take ownership of FunctionsGL. BUG=angleproject:2464 Change-Id: Id040a8053973d73936c0a7ff0ab5edb1a3f16dc6 Reviewed-on: https://chromium-review.googlesource.com/1085851 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f345cdf3 2018-05-14T15:29:42 DisplayGLX: Close the X display if we own it. BUG=chromium:834269 Change-Id: Ia49f80f4c057ad467428a13e8cd4ca54ad48d5c4 Reviewed-on: https://chromium-review.googlesource.com/1058084 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 6110763f 2018-05-09T11:32:46 Refactor the GL surfaces and framebuffers to not hold renderer objects. BUG=angleproject:2464 Change-Id: I20aabeef3de6cf1fc13a29b6220e040aa83184d7 Reviewed-on: https://chromium-review.googlesource.com/1039986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang e1aa9219 2018-01-08T17:53:05 Create a new DeviceImpl each time one is requested from a DisplayImpl. This makes sure that the Device to DeviceImpl ratio is always 1:1 and avoids any potential double-deletion or unexpected deletion of DeviceImpl objects. BUG=742034 Change-Id: I778068ccd09b7478d3683123456062b94be242a1 Reviewed-on: https://chromium-review.googlesource.com/854627 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 6d94f064 2017-10-21T22:19:40 Add more complete NULL driver for the GL back-end. This implements a NULL driver in OpenGL by stubbing out most of the GL functions in FunctionsGL except a few static "Gets" that are needed for initialization with Chromium and the tests. It is intended to be used for performance testing ONLY and will not have correct behaviour. It also adds a define to enable conditionally excluding the null entry points for implementations that wish to save on a bit of binary size. Also fixes some of the typedefs in functionsgl_typesdefs.h that were turned up after implementing the direct assignment from NULL stub entry point, generated from gl.xml, to the function pointer with type defined from functionsgl_typedefs.h. BUG=angleproject:2188 Change-Id: Ifa1e4739cb471ab6b52a4bf24c16d9eb4b334ac5 Reviewed-on: https://chromium-review.googlesource.com/727530 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 29ddcc99 2017-10-21T16:10:02 Add an auto-generated dispatch table for GL bindings. This will more easily allow us to extend our implementation to make a NULL or "stub" set of bindings. It also exposes a lot more function permutations via extension variations. It might improve the loading speed for bindings obtained via extensions. Instead of generating a list every time an extension is checked, we use a single std::set for a fast query. However because more extensions are checked for more entry points, it might not make a huge difference. This also fixes an issue where the "real" ANGLE GL headers were being propagated to the entry point dispatch table definitions, instead of being in a totally isolated file. This patch adds the missing typedefs to our proxy headers. It also fixes the naming of a few entry points which was inconsistent with the spec. It also makes an XML adjustment to GL_NV_path_rendering to accomodate a hole in the spec where glLoadMatrixfEXT was not ever defined in OpenGL ES. A spec oddity with the TexStorage extension is not resolved - in this case, some methods are only exposed if other extensions are present, but this information is missing from gl.xml. BUG=angleproject:2188 Change-Id: I0fd61dd32de6fadd55fa6bd79295833392d51104 Reviewed-on: https://chromium-review.googlesource.com/726949 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 84a6c5b2 2017-06-21T16:12:58 Perform all glXMakeCurrent in DisplayGLX This allows caching the current surface more efficiently than at the egl layer because we can take advantage of having only one backing context. BUG=angleproject:1651 Change-Id: I62867b16ac5e06901a988dc41a3d4812accdb74c Reviewed-on: https://chromium-review.googlesource.com/543835 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill fe54834f 2017-06-19T11:13:24 Proliferate gl::Context. This enables a few small things: it will enable making the platform a property of the Display rather than a global. The same goes for the global logging annotator. Also it ensures all back-end implementations have access to the GL / EGL state when available. Also introduces a smart pointer helper class to angleutils for objects that prefer to be destroyed with a context (gl::Context/egl::Display) parameter. We were using std::unique_ptr in a few places that would not work well with these objects. BUG=angleproject:1156 Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba Reviewed-on: https://chromium-review.googlesource.com/529706 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 638c7277 2017-06-13T15:50:26 Implement EGL_KHR_surfaceless_context for D3D, GL and NULL backends. Skip all config attributes that have the value of EGL_DONT_CARE. From the EGL 1.5 spec: "If EGL_DONT_CARE is specified as an attribute value, then the attribute will not be checked.". BUG=angleproject:1651 Change-Id: I30c95a1970543fb6f1d4b02d2babf3df61cad543 Reviewed-on: https://chromium-review.googlesource.com/533937 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 80cdc376 2017-04-18T13:27:30 DisplayWGL: try all GL context version from the highest The only way to get a core profile context of the highest version using CreateContextAttrib is to try creationg contexts in decreasing version numbers. It might look that asking for a core context of version (0, 0) works on some driver but it create a _compatibility_ context of the highest version instead which might not be supported on some drivers. BUG=angleproject:1994 Change-Id: Ic8a33243909c54ea5940ee81c9c866b141bea420 Reviewed-on: https://chromium-review.googlesource.com/480739 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 200db9dc 2017-02-24T12:59:26 DisplayGLX: Create a highest version core profile context. Previously the code was hitting a weirdness of glXCreateConfigAttrib where a compatilibility context was created even if the core profile bit was set. BUG=chromium:694877 Change-Id: I17164d620b39a26d73e34e1fc8de0ef66aef80f4 Reviewed-on: https://chromium-review.googlesource.com/446673 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 21534776 2017-02-13T15:21:02 DisplayGL: remove getDriverVersion It was unused and going forward angle_gpu_info_util will be used instead. BUG=angleproject:1874 Change-Id: I262cc36066aa28805d50f3fc4442b08477f9e24d Reviewed-on: https://chromium-review.googlesource.com/442024 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7b4e00d2 2017-02-08T10:43:47 gpu_info_util: Implement GetSystemInfo on Linux BUG=angleproject:1874 Change-Id: Id39c26b806e6a7937517235afe0ca60f5087df5b Reviewed-on: https://chromium-review.googlesource.com/438940 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang ce02f086 2017-02-06T16:46:21 Add an extension to share textures at the display level. BUG=angleproject:1639 Change-Id: If9140142ebce89f33921c13d9d212c17d1894162 Reviewed-on: https://chromium-review.googlesource.com/437618 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c5a2a172 2017-01-13T15:55:07 Add EGL_EXT_pixel_format_float support, enables float EGL surfaces. Add floating point EGL configs for the D3D11 backend. BUG=angleproject:1707 Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf Reviewed-on: https://chromium-review.googlesource.com/428294 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 3311d474 2017-01-02T17:55:02 Display: Add a shared state object. This will allow us to manage the SurfaceSet in the GL layer. BUG=angleproject:1684 Change-Id: Iab8243157710beab2667ef10275571078ce9ae8e Reviewed-on: https://chromium-review.googlesource.com/424228 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a26c6b7c 2016-12-15T11:27:50 Surface: Make the egl::Config part of SurfaceState. This will be accessible to the Impl, so they won't have to store a copy of the pointer. BUG=angleproject:1319 Change-Id: I298a11a243d3d32f4c885273e55162e6862f3e16 Reviewed-on: https://chromium-review.googlesource.com/419697 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2018c0ba 2015-12-08T11:48:51 Add a EGL_ANGLE_d3d_texture_client_buffer extension. Allows creation of pbuffers from D3D texture objects. BUG=540829 BUG=angleproject:1144 Change-Id: If8ea717ef011608cd01357c217837133d726d3ea Reviewed-on: https://chromium-review.googlesource.com/316804 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 9f4583dd 2016-10-19T11:19:51 Add Platform Detection and Tighten the workarounds on Intel GPU This patch intends to add platform detection to ANGLE and tighten the driver bug workarounds on Intel GPU. BUG=angleproject:1548 Change-Id: I1ea57e174f688a175da8b658de4337295037fcab Reviewed-on: https://chromium-review.googlesource.com/399914 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez b920e360 2016-08-03T18:19:41 Implement GL_ARB_create_context_robustness on GLX and WGL BUG=angleproject:1463 Change-Id: I5bdcfd757d6f7d6411558c368fa7a26c8a38c9ba Reviewed-on: https://chromium-review.googlesource.com/365971 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f5207dea 2016-08-05T11:51:40 DisplayGLX: XSync before setting the error handler This mirrors https://codereview.chromium.org/2206973002 BUG=628823 Change-Id: Ifd71d67df174cac3f90097c809fc91046699bed8 Reviewed-on: https://chromium-review.googlesource.com/366790 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9c721c64 2016-08-02T14:56:23 Check for device loss on all applicable EGL entry-points This will make applications aware of device loss on all EGL calls that need to have an initialized display. For that purpose, we track the device loss state at the egl::Display level instead of always querying the implementation. This is correct because at device-loss at the display level is non-recoverable. It also deduplicates the tracking that would have to be done in all the EGL backends. Changes made in this commit: - Cached device loss in egl::Display - Check isDeviceLost in ValidateDisplay - Changed EGL entry-points testing isDeviceLost to explicitely request a testDeviceLost - Add calls to ValidateDisplay to entry-points missing it - Removed unused virtual qualifiers for some robustness methods BUG=angleproject:1463 Change-Id: I92bea81f2ecd5423c445cff31557a4d9783557d5 Reviewed-on: https://chromium-review.googlesource.com/365450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov 07529ff8 2016-06-04T02:19:03 Remove const qualifier from generateConfigs Requested in https://chromium-review.googlesource.com/349353 BUG=angleproject:1362 Change-Id: I989757c2fb8f65d5afcfb177b7f8da1414871e6f Reviewed-on: https://chromium-review.googlesource.com/349694 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez fd08a959 2016-05-24T15:19:33 DisplayGLX: make the Mesa context creation workaround Mesa specific. BUG=598902 Change-Id: Ib2ca69fb3573dbd0df3dafb4caec0500c7a8aa3b Reviewed-on: https://chromium-review.googlesource.com/347071 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 00ed7a1f 2016-05-19T13:13:38 Enable always-available extensions in gl::Context. We can consolidate exposing these extensions in initCaps. Otherwise we have to maintain the lists in every Renderer back-end. Also do the same treatment for select egl::Display extensions. BUG=angleproject:1319 Change-Id: I529dd120c6d2cdbb789bd9dd20491e796e97f3f6 Reviewed-on: https://chromium-review.googlesource.com/345914 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 62baf0cf 2016-05-19T13:13:36 Add a shared egl::SurfaceState struct. This structure can share GL-level properties (immutably) with the implementation. BUG=angleproject:1369 Change-Id: I1e9406f18b6b88bb7db2a8f87b5e6d547cc7ecb1 Reviewed-on: https://chromium-review.googlesource.com/342061 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez aab7e868 2016-04-18T11:47:28 DisplayGLX: Add AMD driver version detection BUG=590870 Change-Id: I8b2548038635182bafa691671bdaa16f12b45694 Reviewed-on: https://chromium-review.googlesource.com/339450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell ec2c0c5e 2016-04-05T13:46:26 Update internal AttributeMap type to EGLAttrib. Newer EGL functions use EGLAttrib to pass in attributes, which can be either 32-bit or 64-bit depending on the system while the old attributes are passed in as EGLints, which are usually 32-bits. To support these newer functions, AttributeMap now uses EGLAttrib internally instead of EGLint, and all the code using AttributeMap has been updated to cast properly. BUG=angleproject:1348 Change-Id: I7c4dd9ef23ea1b1741f3a565502fb5e26bf962d7 Reviewed-on: https://chromium-review.googlesource.com/337162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Corentin Wallez cc068e93 2016-02-29T16:37:04 Add DisplayGL::getDriverVersion and implementation on Linux NVIDIA Some GPU driver bug workarounds should be active only for specific driver version ranges. This adds NVIDIA Linux driver detection using the XNVCtrl X11 extension. BUG=590870 Change-Id: I8cbf692a0c8a6da7473169f29d720bdc2d07663d Reviewed-on: https://chromium-review.googlesource.com/329637 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 541591d5 2016-01-28T14:27:50 Fix some override related warnings. BUG= Change-Id: I9e67ba2165ac87959f319fd2485fe385c60a8ea0 Reviewed-on: https://chromium-review.googlesource.com/324461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7c41df13 2016-02-01T08:55:14 DisplayGLX: fix a SwapControl copy-paste error BUG=angleproject:1304 Change-Id: If0ec8682b1d519bc6460cd6ed82f42c4c1ceb952 Reviewed-on: https://chromium-review.googlesource.com/324930 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f2523eb7 2016-01-28T14:25:04 DisplayGLX: disable the GLES backend on Intel and NVIDIA This is to fix failures in the automated testing while we work on them. BUG=angleproject:1303 Change-Id: I0813b5cf1dca1e329504704c70b9d2b0c34d003b Reviewed-on: https://chromium-review.googlesource.com/324460 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 4c06817a 2016-01-25T15:50:20 Add support for targetting GLES with DisplayGLX. BUG=angleproject:1145 Change-Id: I3072c31f2f743943b2ed9a3b1a020529112d5f71 Reviewed-on: https://chromium-review.googlesource.com/324091 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 436e32ae 2016-01-15T15:53:12 GLX backend: check for child window resizes on eglWaitNative This is the standard way, if not often used, for application to notify the driver of window size changes. Chromium uses it to resize when it is done rendering and swapping so that drivers do not clobber the backbuffer. This fixes black flickering appearing when resizing the Chromium windows with --use-gl=angle. BUG=angleproject:1281 Change-Id: Ic76f3c3ef453eae07eb59122135290411f86764d Reviewed-on: https://chromium-review.googlesource.com/322390 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a433388d 2016-01-14T17:24:50 Implement eglWait* This mostly does nothing except on X11 where it calls the equivalent glXWait*. eglWait* are needed because they are used by Chromium and were triggering an UNREACHABLE(). BUG=angleproject:1281 Change-Id: Iff9c127b16841bc27728304a5ba2caff49ff11b5 Reviewed-on: https://chromium-review.googlesource.com/322360 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 46e6c7a5 2016-01-18T14:42:30 Add stubs for no_error extension. In some cases ANGLE flushes state for FBOs during validation. For testing of the state synching code for FBOs, this makes end-to-end testing impossible. Solve this by partially implementing a hidden no_error extension, hidden to the user by not exposing the extension string, but allowing us to skip validation of some of the FBO methods that require checking for complete FBOs. BUG=angleproject:1280 BUG=angleproject:1260 Change-Id: I708f348ccec6697b974c48cd890ec75a703abe21 Reviewed-on: https://chromium-review.googlesource.com/322210 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez ca311ddb 2015-12-07T15:07:48 Enable and fix the -Wshorten-64-to-32 BUG=angleproject:635 Change-Id: If09014508d5f4dfeb17ac946672a76a98b8ad175 Reviewed-on: https://chromium-review.googlesource.com/316580 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 3d677ea6 2015-11-16T13:38:47 Implement EGL_ANGLE_x11_visual Reland with a fixed tests on AMD. This extension will be used by Chrome to advertise the visual it will use for its windows. Having ANGLE use the same visual will bring several benefits: - A blit will be avoided, and the content of the window might be rendered on the system framebuffer directly. - There will be less latency when resizing windows which will make it much less likely to see a black border when resizing. BUG=522149 Change-Id: I66004b6ac45453330af7c4c810ddf2c26941be42 Reviewed-on: https://chromium-review.googlesource.com/314661 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 5ac60fc2 2015-11-27T13:42:02 Revert "Implement EGL_ANGLE_x11_visual" Fails on Linux AMD: http://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Release%20%28ATI%29/builds/43819 EGLX11VisualHintTest.InvalidWindowVisualID: ../../third_party/angle/src/tests/egl_tests/EGLX11VisualTest.cpp:183: Failure Value of: EGL_TRUE == eglInitialize(display, nullptr, nullptr) Actual: false Expected: true BUG=522149 This reverts commit b28e010aa10b3e4aec3207e767be10ee5ffb25fd. Change-Id: I9a02f2aa3caadd787eb0099c0ddf9d781084fa1c Reviewed-on: https://chromium-review.googlesource.com/314660 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez b28e010a 2015-11-16T13:38:47 Implement EGL_ANGLE_x11_visual This extension will be used by Chrome to advertise the visual it will use for its windows. Having ANGLE use the same visual will bring several benefits: - A blit will be avoided, and the content of the window might be rendered on the system framebuffer directly. - There will be less latency when resizing windows which will make it much less likely to see a black border when resizing. BUG=522149 Change-Id: Icd484c9a948ed5b5b9116247bb50560bffa30667 Reviewed-on: https://chromium-review.googlesource.com/312323 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 50ff85e5 2015-11-11T14:22:21 DisplayGLX: add support for complete lack of extensions We thought we could rely on GLX_create_context_attrib being present but this is not the case with VM drivers. Instead we fallback to creating contexts with glXCreateContext that doesn't offer control on which version and profile the context will have. Likewise we may not always be able to use the multisample but we can safely assume that the number of samples and sample buffers are zero in this case. BUG=angleproject:1206 Change-Id: I888c69e609764994baf86386c9683b3edeb320f7 Reviewed-on: https://chromium-review.googlesource.com/312230 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 67bc1021 2015-11-06T14:30:15 GLX backend: fallback to lesser swap_control extensions Re-reland with a warning fix. We would like to use the EXT_swap_control extension to specify the swap interval of each drawable independently. However open source drivers do not expose this extension and instead expose the MESA and SGI versions that have a global swap interval. This commit changes the code to use the best swap_control extension it can, potentially changing the swap interval on each swap buffers on lesser extensions. BUG=angleproject:1206 Change-Id: I7ecf1eed6808672f277d0242d65f90d7851d2a32 Reviewed-on: https://chromium-review.googlesource.com/312322 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 2075102d 2015-11-13T15:21:30 Revert "GLX backend: fallback to lesser swap_control extensions" This reverts commit a1393c59e9466dfe3a3ccaf710c272aa26045b85. Change-Id: I5da0f740a7073f14ad1ee7e2876a9cc71a706e7f Reviewed-on: https://chromium-review.googlesource.com/312231 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a1393c59 2015-11-06T14:30:15 GLX backend: fallback to lesser swap_control extensions Reland with a compilation fix. We would like to use the EXT_swap_control extension to specify the swap interval of each drawable independently. However open source drivers do not expose this extension and instead expose the MESA and SGI versions that have a global swap interval. This commit changes the code to use the best swap_control extension it can, potentially changing the swap interval on each swap buffers on lesser extensions. BUG=angleproject:1206 Change-Id: I6c24217c7cfd5e09f60469cc7d6336cd68bc5c32 Reviewed-on: https://chromium-review.googlesource.com/312270 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez b2b6265b 2015-11-09T15:00:39 Display[GLX|CGL]: correctly set the config conformant bits Reland with a fix for a compilation that happened because of a bad rebase. Previously there was a TODO to check if we supported ES3 before setting the conformant bitfield. Now it is done. BUG=angleproject:1188 Change-Id: I3ef2bd2bc71fb61c465085d32cf08a633904caa6 Reviewed-on: https://chromium-review.googlesource.com/312271 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho f0eb5bbb 2015-11-12T12:50:32 Revert "Display[GLX|CGL]: correctly set the config conformant bits" Fixes build on Linux. This reverts commit 46439bae5d441e13abf071ac209f310f2b044256. Change-Id: Ie6da92e3ee6cc535f2c153a12af0aa63f6bea665 Reviewed-on: https://chromium-review.googlesource.com/312442 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 0ed0d8ac 2015-11-11T21:24:31 Revert "GLX backend: fallback to lesser swap_control extensions" Compile error, whoops This reverts commit 10ad877c41c05aa0764748844244ead6ebca6c1c. Change-Id: Ic8c8b7945c7f702b91fc34ab6862e1aadb3e82e7 Reviewed-on: https://chromium-review.googlesource.com/312260 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 10ad877c 2015-11-06T14:30:15 GLX backend: fallback to lesser swap_control extensions We would like to use the EXT_swap_control extension to specify the swap interval of each drawable independently. However open source drivers do not expose this extension and instead expose the MESA and SGI versions that have a global swap interval. This commit changes the code to use the best swap_control extension it can, potentially changing the swap interval on each swap buffers on lesser extensions. BUG=angleproject:1206 Change-Id: I48e40e443ff9a258fc33b38efb0acf6b1f3db103 Reviewed-on: https://chromium-review.googlesource.com/311244 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 46439bae 2015-11-09T15:00:39 Display[GLX|CGL]: correctly set the config conformant bits Previously there was a TODO to check if we supported ES3 before setting the conformant bitfield. Now it is done. BUG=angleproject:1188 Change-Id: Iffe30ebb5538e205695acd619ca17918d8550f3c Reviewed-on: https://chromium-review.googlesource.com/311690 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 84f505db 2015-11-09T13:16:45 Revert "GLX backend: fallback to lesser swap_control extensions" This reverts commit 26e3736fe30b9f67ee4b488d8a9d31ded1b679d3.