scripts/generate_entry_points.py


Log

Author Commit Date CI Message
Gert Wollny a52c0a6c 2023-02-06T16:01:27 Capture/Replay: Add and handle new resource type for EGLSync So far calls involving EGLSync were not tracking the actual sync objects, and this may lead to race conditions in multi-threaded and multi-context scenarios. This CL adds the type EGLSyncID and some specialized code handling of egl::Sync to distinguish EGLSync from the already existing GLSync objects in order to track them separately. Bug: angleproject:7911 Change-Id: I91b188a41069bc0620f51c55ee516d23b55bdd38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4200095 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill f7b5d5d1 2022-12-15T10:52:07 Capture/Replay: Remove inline variable declarations. This makes parsing easier for the "simplified C" interpreter. We introduce a resource ID buffer as a way to manage a list of resource IDs to replace the inline resource lists. Turns on the Among Us trace in the interpreter tests. Bug: angleproject:7775 Change-Id: I1bb9c0e9b087965a18691bc99b2e9947610b9eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128719 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fdada9ee 2022-12-13T14:52:53 Re-land: "Make SyncIDs a packed type." This re-land fixes the sync map size tracking. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: If2114c51d5b68503890eacbf549182823667fedc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178012 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8971a592 2023-01-18T14:35:09 Revert "Make SyncIDs a packed type." This reverts commit 9de913077a5fcc3d2f2e327b56bbe30efe2fde96. Reason for revert: Fails win-trace, somewhat flakily. Original change's description: > Make SyncIDs a packed type. > > This prepares syncs to use a simple resource map like other > types, which will make life easier in the trace interpreter. > > Bug: angleproject:7775 > Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:7775 Change-Id: I29534b14c973fa34a4cb7457d534cd6156f33cd2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178010 Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 9de91307 2022-12-13T14:52:53 Make SyncIDs a packed type. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill aaee3c23 2022-11-30T14:24:13 Build and test ANGLE with Vulkan secondary CBs. This will allow us to run tests with both permutations of ANGLE (custom secondaries & Vulkan secondaries) in the same build directory. It will also allow us to run these configs as tests on our infra. This CL adds a few simple test to CI. Bug: angleproject:6811 Change-Id: I053f8cc5bafc2a7ab7d0665da9301f0ba7f8417f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4067806 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peng Huang 2805e164 2022-11-29T15:16:42 Fix EGLImage related race condition crash Bug: chromium:1383195 Change-Id: Ibd74126f19674dad9425d2c8f5b3a217cfd590e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4062912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Chris Dalton 9f693aa3 2022-10-22T14:45:59 Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Jamie Madill dc62b3ee 2022-10-10T21:00:16 Capture/Replay: Add trace interpreter. Also adds a self-test using the retrace script. Bug: angleproject:7752 Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 6193274a 2022-10-10T21:00:12 Capture/Replay: Redesign in-memory call capture replay. This will allow the replay to use the call captures returned by the interpreter's parser. Bug: angleproject:7752 Change-Id: If1b281d9ce7ccfbdc23bea615e1e2258c8a029f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963367 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill fd45cec3 2022-10-10T20:59:58 Entry Points: Move enum helper to registry_xml. This will make it accessible to other generators. Bug: angleproject:7752 Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 Capture/Replay: Move shared trace code into src/common. This will let them be accessible to the test harnesses. The trace tests interpreter will need direct access to the classes that we move in this CL. This CL also moves the GLenum utils into the common folder, where they were already used by some other tests. Bug: angleproject:7752 Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 2265e37b 2022-10-12T09:27:16 Capture/Replay: Auto-generate EGL capture code. Replaces the custom code in the EGL stubs. Skips a few "Get" entry points because this CL doesn't implement pointer capture like we do for all the GL entry points. Includes a new state in the AttributeMap that indicates which type of attribute values we used when initializing the map. Bug: angleproject:4035 Change-Id: I272eac5e4068602ce710ef66c9a1dce5387943a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949911 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 7c4dc253 2022-10-12T08:38:46 Capture/Replay: Clean up EGL capture. This switches the EGL capture types to ANGLE-casted pointers since that's what we receive in the capture layer. Note that even if the capture layer were used as a pure layer, not an EGL implementation, we'd still have these types for state tracking. This also prefixes each EGL class in the entry points with the egl namespace for consistency and for simplifying the ParamType code. Required changing to non-const gl::Context * in a few places. Also changes the gSurfaceMap to be indexed by the raw pointer value, which cleans up the code somewhat. Bug: angleproject:4035 Change-Id: Id800c1ba25e5819ac7ea1df8aab806bc393fe192 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949910 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b3781ec 2022-10-03T16:09:35 Remove namespacing from all ANGLE loaders. This will make it easier to work with pure C files. Bug: angleproject:7731 Change-Id: I2fe9af486af5f339d973c9149f082eb1f2efa8c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3925426 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi de73f7cd 2022-09-14T22:27:28 Introduce GL_ANGLE_logic_op This extension exposes the desktop GL glLogicOp function as a GLES extension. This is supported by Vulkan through the logicOp feature as well. The goal is to directly use this extension in GLES1 emulation where the backend supports it, avoiding a more costly fallback. Bug: angleproject:3862 Change-Id: I7ed436cdf401437157ca9724168849b4c819b91b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898310 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Eddie Hatfield 3960e63b 2022-08-09T14:02:59 Infra: Enable angle_deqp_gl46_tests on SwiftShader This change disables the WGL frontend by default on Windows when building ANGLE for desktop GL. This is because the WGL frontend is not yet fully implemented and it causes some of the trace tests to fail. The WGL frontend should be enabled by default on windows when more of its functionality gets implemented. Test: angle_deqp_gl46_tests --use-angle=swiftshader Bug: angleproject:7566 Bug: angleproject:7628 Change-Id: I69c695eb56d3858f715eeb86d28cc805e25c60eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 64f41972 2022-08-25T11:16:23 Use canonical gl.xml and update enum to string function. This replaces our copy of gl.xml with the upstream canonical copy. Note that one patch is required before we can remove ANGLE's copy: https://github.com/KhronosGroup/OpenGL-Registry/pull/538 Because the upstream version uses a new method of enum groups, we also update our enum-to-string generator to use the new groups. This new code includes many more enums and groups in the mapping. Bug: angleproject:6461 Change-Id: I1c0ab44c36afce8db04c9661b377bbe5762c913e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856649 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Eddie Hatfield 98d5db70 2022-08-25T16:50:38 Add capture functions for desktop GL entry points The parameter capture functions are left unimplemented for now. Bug: angleproject:7533 Change-Id: Ief356e7401805cf9b417e1f5cc3790011237e03f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858618 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Eddie Hatfield d89c027e 2022-08-22T11:40:40 Add unimplemented GLX entry points to desktop GL Test: Run glxgears and hit unimplemented in ANGLE Bug: angleproject:7533 Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield c54ed790 2022-07-21T10:38:47 Get desktop GL conformance tests to build The target for these tests is angle_deqp_gl_tests. Bug: angleproject:7533 Change-Id: I290822671d99da020f9a6a1f02bee43987644bf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3766435 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Peng Huang b78d471a 2022-07-21T09:53:37 Add angle_enable_share_context_lock build flag This flags can be used to enable the share context lock. Without this lock, the client need to use gl calls in a threadsafe way. It is true by default. Bug: chromium:1336126 Change-Id: I984f8cfb0379195f6ebe11b0997e401f2421affa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780582 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Faye Zhang 06ff0e3c 2022-06-06T15:29:16 Implement GL_EXT_base_instance Added new extension GL_EXT_base_instance to registry_xml.py and auto-generated the entry point function calls for the following functions introduced by the extension: * GL_DrawElementsInstancedBaseVertexBaseInstanceEXT * GL_DrawElementsInstancedBaseInstanceEXT * GL_DrawArraysInstancedBaseInstanceEXT Bug: angleproject:6983 Change-Id: I36167faf3ca98e42acf787dbf09ee7052e15e358 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691952 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Faye Zhang <ffz@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Gert Wollny 66b9214f 2022-05-03T14:48:07 Capture/Replay: rename ANGLE_CAPTURE to ANGLE_CAPTURE_GL In addition gunning "git cl format" on the current tree resulted in additional changes. Bug: angleproject:4964 Change-Id: I3df4888aef763d06f91227409dbd943d0d25689e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634699 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 24c641dc 2022-03-01T11:12:38 Add stubs for AMD_performance_monitor. We can piggy-back on this extension to report internal ANGLE performance counters to the ANGLE tests. Includes a minor variable de-duplication in the EP generator. Bug: angleproject:4918 Change-Id: I4a76aea957b423a36a90349643bd50a4e1905849 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3497537 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d3ce72d 2022-01-20T10:13:06 Refactor shared library load to avoid allocations. Fixes a leak of an angle::Library detected in the EGL loader. Bug: angleproject:6937 Change-Id: I623aa6172b98a35465e1d2641b92f67bdc5d24e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3403060 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 926b43e7 2022-01-06T13:31:54 Reland: Frontend: separate lock in swap prep Swapchain-based backends like Vulkan might block a lot in vkAcquireNextImageKHR, which is bad for overall fast progress if we also hold the global EGL lock there. This CL starts to split the global EGL lock. We release the EGL lock when performing vkAcquireNextImageKHR, and only maintain a lock for surfaces. This is done via a new custom entry point, EGL_PrepareSwapBuffers, so that we can control how the global lock is used throughout the entire call. Bug: angleproject:6851 Change-Id: I095cd8b3bdbb13c842cab0a46148e2122582cdfd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373426 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Jamie Madill 9d668d6c 2022-01-07T18:18:23 Revert "Frontend: separate lock in swap prep" This reverts commit 40c5cb255c0a07bdab574aa076ee603e7d791ab3. Reason for revert: Regression in TSAN caused by this CL: https://ci.chromium.org/ui/p/angle/builders/ci/linux-tsan-test/352/overview Original change's description: > Frontend: separate lock in swap prep > > Swapchain-based backends like Vulkan might block a lot in > vkAcquireNextImageKHR, which is bad for overall fast progress if we also > hold the global EGL lock there. > > This CL starts to split the global EGL lock. We release the EGL lock > when performing vkAcquireNextImageKHR, and only maintain a lock for > surfaces. > > Bug: angleproject:6851 > Change-Id: I329d5c4c579718a4980c4261590f77099ce1400e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3361249 > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> Bug: angleproject:6851 Change-Id: Ie03b784021f7b8b5c1ef95a911ef7da4029abd46 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373165 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 40c5cb25 2022-01-06T13:31:54 Frontend: separate lock in swap prep Swapchain-based backends like Vulkan might block a lot in vkAcquireNextImageKHR, which is bad for overall fast progress if we also hold the global EGL lock there. This CL starts to split the global EGL lock. We release the EGL lock when performing vkAcquireNextImageKHR, and only maintain a lock for surfaces. Bug: angleproject:6851 Change-Id: I329d5c4c579718a4980c4261590f77099ce1400e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3361249 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Alexis Hetu cac81f07 2021-12-14T22:56:15 Return full error info when opening a library with dlopen This CL adds a parameter to OpenSharedLibrary and OpenSharedLibraryWithExtension which is used to return the full path of the library which was opened. If dlopen failed, the string also contains the result of dlerror which explains what the error was. Bug: chromium:1246171 Change-Id: I374c7e2dfa18853c8137b4cbea06af8db3fdb501 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3340020 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Alexis Hetu f7d92a32 2021-12-10T10:23:32 Add debug info when loading EGL entry points fails Mac11 bots are often failing with the: "Error loading EGL entry points" error for an unknown reason. This CL adds the library path to the error message to see if it's trying to open the correct file. Bug: chromium:1277690 Change-Id: Ieb73a3097702933a89794d92c19ee44a6301c169 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3330576 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Gert Wollny 8d51bd4b 2021-11-19T00:34:22 Capture/Replay: Add default return path for AccessParamValue Some versions of MSVC have a bug that it will not detect when all values of an enum are exhausted in a switch statement, which leads to a warning that not all code path return a value, and since the warning is treated as an error, compilation fails. Bug: angleproject:6721 Change-Id: I4d62191ce83a04ba554dd804f13e7d428afd86a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3291649 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Gert Wollny 8712495d 2021-10-05T11:56:32 Capture/Replay: Don't handle void pointers as const TL;DR: glReadPixels needs a non-const pointer if a pack buffer is bound, so change the code generation to keep TvoidPointer non-const and regenerate the entry points. Long version: When no pack buffer is bound, then in WriteCppReplayForCall param.readBufferSizeBytes is non-zero and the cast of the read buffer pointer is using the type passed by the parameter (TvoidPionter) to write the typecast by calling ParamTypeToString directly, which returns "void *". If. OTOH, a pack buffer is bound, then param.readBufferSizeBytes is zero, and the default WriteParamCaptureReplay is called. This autogenerated function forwards the call to WriteParamValueReplay by using an explicit type specification, and the autogeneration code was translating TvoidPointer to call WriteParamValueReplay<ParamType::TvoidConstPointer> which would then translate to "const void *" in the parameter type cast, and this would lead to a compilation failure, because the parameter must be a non-const pointer. Change the autogeneration code so that TvoidPointer is not forced to be a const pointer and regenerate the entry points. Bug: angleproject:6521 Change-Id: I673c77f803a284fb7dfc08a2e0918aebdf698194 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3204959 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Jamie Madill ad286e71 2021-08-17T10:43:47 Capture/Replay: Clean up ResourceTracker access. This reduces the boilerplate needed to tracked genned/deleted resources. Refactoring change only. Bug: angleproject:5133 Change-Id: I81f8877b2c308fe9d4136999f3ca63371a070720 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3100591 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Tim Van Patten 62cac8b5 2021-08-06T18:24:52 Capture/Replay: Add EGL support to generate_entry_points.py Add EGL support to generate_entry_points.py. This is a pre-requisite to frame capture being able to generate EGL calls, which is required for multi-context support. Bug: angleproject:5878 Bug: angleproject:4035 Change-Id: I3b8e9c91f9e2820b5207fc02d858e8109921f581 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078993 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 232e5236 2021-07-08T15:08:35 Remove the explicit context extension. This extension currently has no known users and doubles the number of entry points that ANGLE exports which is a significant binary size cost. This saves about 130kb of binary size on Android. Bug: chromium:1084580 Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 223cd0ac 2021-06-15T18:46:07 Capture/Replay: Refactor shared context handling This is the initial CL to enable capture/replay of multi-context applications. This CL refactors FrameCapture and FrameCaptureShared to move much of the functionality into FrameCaptureShared, since most everything is shared by Contexts in the share group. For example, the setup of the majority of the GL objects is done in the new SetupReplayContextShared() function in the new $LABEL_capture_context_shared_frame001.cpp file. The setup is performed by (for example): void SetupReplay() { $LABEL::InitReplay(); $LABEL::SetupReplayContextShared(); SetupReplayContext2(); } This performs the shared setup first, followed by the context-specific setup, which may reference shared objects careated by LABEL::SetupReplayContextShared(). No re-capturing is required with this change, since the external APIs (i.e., SetupReplay()) are still the same. Bug: angleproject:5878 Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2 Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate baca10b7 2021-05-29T16:26:57 CL: Remove object cache and fix multi-threading All CL front end objects used to be cached to be able to determine if an object has been created by the front end to check its validity. The validity is now checked with the existence of an intrinsic value (the dispatch table pointer), which is consistent with the patterns found in Mesa and clvk (though clvk uses a magic value). This allows the removal of all cached objects. The cached objects were stored with std::unique_ptr. These are now gone and all remaining pointers are now custom intrinsic reference count pointers. Also remove global lock which causes deadlocks, e.g. when CL API is called from a separate thread to unlock a blocking call with a user event. Most of the front end is constant and already thread-safe. The ref count is also thread-safe now (atomic). A few remaining locks will follow. Without the global lock it was now possible to make the API reentrant, and to remove the workaround with the Khronos ICD loader to skip ANGLE's OpenCL library. Bug: angleproject:6001 Change-Id: I7d3b52db9011a02cb7ea9ebdeb6e22c4c702ef5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2927395 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 51ab3dc3 2021-05-25T16:54:11 CL: Improve validation readablity Improve validation readablity by introducing a bit field class and by changing how the CL error code is returned. Bug: angleproject:6001 Change-Id: I51deb745454e5281de725481edef85eb30be28c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2919690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate a7ae63e4 2021-05-14T21:55:52 CL: Move object cast from entry points to stubs and front end Move the OpenCl object cast from the generated entry points to the stubs and front end, to make it possible to properly use static_cast. This removes the limitation that the front end objects have to be standard layout (and makes it possible to use virtual functions), which is consistent with other front end objects. Move the back end initialization from the stubs to the entry point functions, which fixes a bug where the back ends were not initialized during validation. Move more code from the stubs to the front end, to keep the stubs light. Remove unused function `default_return_value` from `generate_entry_points.py`. Bug: angleproject:5904 Change-Id: Id999ad6c537888017bf3252c6f6e088b7d4c7984 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897245 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate b300dc52 2021-05-09T00:35:24 CL: device partitioning for front end and passthrough Partitioning is the creation of sub-devices. Also add reference counting for CL objects, which is needed now for sub-devices. Also fix CL print format strings, since cl_ulong is actually always 64 bit and not unsigned long. Bug: angleproject:5904 Change-Id: I006699fad2f953ce312bca87c9b6362b5d77a18a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2880665 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate dfe208f1 2021-04-28T18:26:00 Add loader for CL pass-through back end Bug: angleproject:5904 Change-Id: If4960f3150f6bbc85a30f0f6ac5c9e668e6ff756 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2864022 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
John Plate 05fb2272 2021-04-27T19:31:31 Add support for OpenCL ICD Loader Bug: angleproject:5908 Change-Id: Idafc0d15b69f9a21f2ab5e48c4c34f0dc0e0ee96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2854598 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate cddb2003 2021-04-23T18:26:51 Stubs for CL validation entry points Bug: angleproject:5775 Change-Id: Ic3b15efdf602bad8f5f170f03ba24b421a398ca8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2848504 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Plate <jplate@google.com>
John Plate e25f3b10 2021-04-21T21:43:46 Generate empty CL object classes Bug: angleproject:5886 Change-Id: I01566f40e85bd7f5531536fdc1df42965622a939 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2844969 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 8226dc23 2021-04-15T19:25:31 Generate CL enums in libGLESv2 Bug: angleproject:5869 Change-Id: Ie547d415bed37accef6cb62d28bc6b088a1eb810 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2829370 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 8994fc7b 2021-04-12T19:46:11 Migrate CL entry points to libGLESv2 Bug: angleproject:5759 Change-Id: I79644e7bda3ad0a15eb041b2805b8765c0d22029 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822258 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
John Plate 1d7046ca 2021-04-12T16:17:22 Generate CL stubs in libGLESv2 Bug: angleproject:5758 Change-Id: I6440dacf0db57a56923d2cab5a7c791981ba3b9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822248 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Chris Forbes 84a62266 2021-04-01T15:18:44 Expand CL plumbing support to cover all versions The OpenCL CTS assumes that libOpenCL has symbols for all versions as it usually expects to link against the Khronos loader. Since we're not using that, we have to expose all the symbols it wants, whether we intend to implement all versions or not. All the 2.x stuff will likely remain stubs forever as it is made optional again in 3.0. In the generator scripts, work around a small issue where one function takes an array-typed parameter, which confused just_the_name and produced invalid code. Bug: angleproject:5819 Change-Id: I6c3591dc9229c5276f14ff66ee3ee6362e8bf622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807531 Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Plate <jplate@google.com>
John Plate 2489a0c1 2021-04-06T14:55:11 Fixed OpenCL headers for Windows Bug: angleproject:5761 Change-Id: I29d1fd3bf862728a3e78418a4f98219828394452 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807717 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Plate 65586746 2021-03-10T19:02:12 add cl entry points loader Bug: angleproject:5743 Change-Id: I61791f412e8dbc54878cd3791519ad1c4ee33399 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2749595 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Plate <jplate@google.com>
John Plate 8507b105 2021-03-11T11:30:39 Fix CL_EVENT macro Bug: angleproject:5745 Change-Id: Icbfab0d0bd4b1510b98d5ed746f4d3ddfa5ec36e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2752746 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6623a70f 2021-02-19T17:28:10 Stubs for OpenCL entry points. Bug: angleproject:5653 Change-Id: I7ec9692a47be2556fef5bdd7630b422cc2d369b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2708343 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 7b7e5cad 2021-02-19T13:46:06 Clean up entry point generation script. The main refactor from this change is to replace statements like this: decls, defs, export_defs, _, _, _, _ = get_entry_points( apis.EGL, eglxml.all_commands, egl_version_commands, False, egl_param_types, cmd_packed_egl_enums, EGL_PACKED_TYPES, egl_ep_to_object, TEMPLATE_EGL_ENTRY_POINT_EXPORT) With statements like this: eps = EGLEntryPoints(eglxml, egl_version_commands) This will make the script easier to maintain and extend. Bug: angleproject:5653 Change-Id: Ibd0930d45b8629702b7782f43a2d7ebfa4dac9b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2705156 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7e990ef4 2021-02-16T18:15:43 Clean ups to generate_entry_points. Switches to Python 3 support. Made a change to run_code_generation to support this. Affects several generators. Also updates the generator to make a few other small cleanups. Bug: angleproject:5653 Change-Id: I045173c9ca85947c4eac22285701032c09f4c8d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2699187 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6fc10389 2021-02-10T11:20:16 Move Frame Capture to capture/ folder. This will make it easier to trigger the trace tests when these files are modified. Bug: angleproject:5530 Change-Id: I5f0c450595b380cd91b20c1477dc1845bee35dd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686120 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Trevor David Black 192a0147 2020-10-08T16:47:35 Multithreading in D3D11 minimum viable product Bug: b/168046573 Change-Id: I676a148333cbf5e9ca508768503e62cb14d8eeb0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2629618 Commit-Queue: Doug Horn <doughorn@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor David Black <vantablack@google.com>
Geoff Lang b5424bb4 2021-01-14T15:09:41 Generate internal gl entry point functions as C functions. Some internal GL functions are exported to our libGLESv1_CM library and to properly export them, they must be C functions. Bug: angleproject:5534 Change-Id: I37280312f73fd5e55166e4fa36659267d657a50b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628139 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 234fccfb 2020-12-01T10:59:16 Entry Points: Add egl:: namespace to Display. This will prevent symbol collision with X11. This fixes the build integration with Skia. Bug: angleproject:2621 Bug: angleproject:5416 Change-Id: I6949a375cf9fcdd790b4c40ffb82c7c25bc15315 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2567644 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 0be3f296 2020-11-30T17:27:39 Entry Points: Combine desktop GL minor versions. This reduces the proliferation of small entry point files. Bug: angleproject:2621 Change-Id: Ib882fd9e32e165279439d5d6cab7205eae0732ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2566592 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 6edaf098 2020-11-30T16:03:45 Entry Points: Clean up versions lists. This reduces code duplication in a few generator scripts. The version lists are now located in registry_xml. Bug: angleproject:2621 Change-Id: Ia1470f2863753d78d8def1132a20e81d3f8ec4a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2566591 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f564fc7 2020-11-23T13:59:17 EGL: Generate entry points. This adds two final auto-generated files for the EGL and EXT extension entry points. It adds a new data file that stores a mapping between object types and entry points for associating labeled objects with certain methods. When we generate errors we record the associated object in the debug message output. This places the remainder of the hand-written code in "stub" files. Going forward the work for implementing new extension entry points for EGL will be to update the registry XML files and then implement the corresponding stub methods. Event logging, parameter packing, and validation are all handled by the auto-generated code. Bug: angleproject:2621 Change-Id: I28153432802c37b929ff2ea1e1a3e3ce9de91605 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562680 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 1a8eec63 2020-11-26T16:33:59 Rename FromGL to PackParam. This will allow us to use the same method with EGL without complications. Bug: angleproject:2621 Change-Id: I03dea2291adc13025723fe02eb47b76a74cef911 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 9528641b 2020-11-23T15:47:09 EGL: Generalize the entry point enum. This both generalizes the GL entry point enum to include other APIs like EGL and inserts the EGL and WGL entry points into the enum. This will faciliate EGL entry point auto-generation and also frame capture for EGL entry points. Bug: angleproject:2621 Change-Id: Iaf4310e03b3d55839dd1328362fb29dcef918fab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2555861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 2114fcf2 2020-11-23T13:38:09 More cleanups to run_code_generation. Moves some include definition blocks into constants. Also fixes a small case error in the capture headers. Bug: angleproject:2621 Change-Id: I0e5eadcfd8e16969f3502339f58dbf13eb53f43c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2555860 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 23d4b64a 2020-11-22T13:01:36 EGL: Auto-generate Windows .def file. Several entry points were missing from the .def file. The auto- generation ensures we remain consistent. Bug: angleproject:2621 Change-Id: Icb4089c4235f43e76ebd588216d4b988e3a2f0f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552775 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 0a5bc0ce 2020-11-22T12:31:45 EGL: Auto-generate "libEGL" export cpp file. This steps towards full auto-generation of EGL entry point files. Bug: angleproject:2621 Change-Id: I629447bb6754ee1e87bef020de21b28e37e20eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552774 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 732dc295 2020-11-22T12:46:51 Fix auto-generated export file comment. The comment incorrectly was missing the _autogen suffix. Bug: angleproject:2621 Change-Id: Iaeb1bc5b8a1b7174e6c3699162720e0e77eff667 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552773 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 11c81534 2020-11-22T09:39:51 EGL: Auto-generate entry point headers. This steps towards the goal of auto-generating EGL entry points. Also cleans up some EP definition inconsistencies. Bug: angleproject:2621 Change-Id: I94dcf3d080b6864bca3f9db6c4c01429f4f8b91f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2553968 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 3efa290d 2020-11-19T14:36:16 EGL: Auto-generate validation header. This is a first step towards auto-generating more EGL code. It includes format handling for all the EGL parameter types, type reinterpretation for EGL types using the "packed enum" handling, and code refactoring to support the new consistent validation entry point pattern. Bug: angleproject:2621 Change-Id: I2740e82928db311aa934825cbe74bd75bf49c33c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552976 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 1b413197 2020-11-22T09:51:33 generate_entry_points.py clean-ups. Use all upper-case for Python constants. Also use line breaks to make the templates more readable. No functional changes, refactoring only. Bug: angleproject:2621 Change-Id: I3ec1c07089b33fd1655ffbacc8c3a8cdcb919a3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2553967 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 309bd3b6 2020-11-22T09:09:49 Use hard-coded year in generate_entry_points. Using a dynamic year isn't fully supported as it makes the auto- generation depend on the date. Also we do not need to update the year in the copyright notices for any files in ANGLE. Bug: angleproject:2621 Change-Id: I123864e77bffe8e04e5b299f0c58853c89287372 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552980 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Mohan Maiya 4f96bf19 2020-11-16T08:25:18 Remove duplicate entry of glProgramUniformMatrix4fvEXT in gl.xml The GL_EXT_separate_shader_objects section of gl.xml has duplicate entries for glProgramUniformMatrix4fvEXT. Remove that locally, while this khronos bug - https://github.com/KhronosGroup/OpenGL-Registry/issues/443 tracks the upstream fix. Also add an assert in the script to error out when duplicates exist. Bug: angleproject:3570 Change-Id: Id0799b0e4f5ec6bc6beb3e18b5f888afec8ac169 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2539119 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian 3f741f0d 2020-11-16T12:00:00 Remove trailing whitespace. This whitespace inside a string is ignored by our presubmit but WebKit's doesn't like it. Bug: angleproject:5351 Change-Id: I8385c9a49332a92ce16b170bc1a22408bd387f30 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2541823 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 9217d49d 2020-11-08T09:18:33 Vulkan: Add EXT_external_buffer entry points Addition of the entry points for EXT_external_buffer extension. Bug: angleproject:5073 Change-Id: I5dc9f74dfd68c1e83e17ca15166df4cd4c20fca2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525104 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 42ad0279 2020-10-24T10:44:12 Omit types in EVENT macros. The type information is redundant with the parameters. Cleans up both the debugger and text-based traces. Bug: b/170249632 Change-Id: I00f96dc1d69ec7a8c5ca24b1a275f3bc7c29d376 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2507636 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5dafe107 2020-10-25T20:05:03 Output nullptr pointer parameters correctly. Fix by piping all pointer value parameter output to const void *, which has a custom handler. This fixes a case where non-void pointers were being output as (nil) or other values. Fixes the Capture/Replay tests for many cases. Bug: angleproject:5249 Change-Id: I20c9e605d9c5a36e36e7a3d6c753a4e0de94ac4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497563 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Geoff Lang d8529380 2020-10-20T13:55:23 Generate CONTEXT_LOST errors on every GL call. The robustness spec states that all GL calls should generate context lost errors when the context is lost. This behaviour was lost due to some context lookup optimizations but can be re-added at no cost by updating the autogenerated entry points. Updated the ContextLostTest to cover the repeated error generation behaviour. Bug: chromium:1137241 Change-Id: I0b8d1cf4d2a37f13c466c8dd0e66edfe852f7e59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488180 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 98117b9d 2020-10-07T12:44:10 Move entry point enum utils to common. These are now used in debug.cpp. Bug: angleproject:5131 Change-Id: Ibe1f0e3e2919a9e2f2b85c3ed80a77617266913e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451973 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Ian Elliott f074d61a 2020-09-28T21:40:57 Plumb EntryPoint & Context to DebugAnnotator/EVENT() This makes it easier to plumb debug labels to a future DebugAnnotatorVk class. Bug: b/162068318 Bug: b/169243237 Change-Id: I01e3779569c27c91252dc2874f6deaec526afd6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451516 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott 981a401e 2020-09-25T08:00:28 Add Context* to EVENT() & DebugAnnotator::beginEvent() This will make it easier for us to record GLES calls and log them with Vulkan vkCmd*DebugUtilsLabelEXT() Bug: b/162068318 Change-Id: I6bddf086ef39cbaca313409802bbb4f2da0d85cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2432193 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 821aabb3 2020-09-11T14:53:21 Add Context::renderbufferStorageMultisampleEXT glRenderbufferStorageMultisampleEXT is special in that it doesn't have the same semantics as glRenderbufferStorageMultisample, but is aliased in gl.xml for the sake of desktop GL (where it does have the same semantics). This change special-cases this function so multisampled-render-to-texture renderbuffers can be supported. Bug: angleproject:4881 Change-Id: Iaa321dd0671dd82ea802df22a1ae935942789c21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405395 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Manh Nguyen bbfbea9d 2020-08-10T10:55:58 Invalid calls' pointer params are no longer captured Changes call capture methods generation so that invalid calls no longer capture pointer params. Bug: angleproject:4817 Change-Id: I2d83d4d3334da8ba34925f80aed2de859a10fae5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2346749 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 263232ef 2020-02-23T15:02:16 Trace/Replay: Pass CallCapture to parameter replay writer. This will allow more advanced processing when writing the cpp replay for a specific parmeter. For the uniform locations map it'll allow us to look up the specified program from the call parameters. Bug: angleproject:4411 Change-Id: I4e91b3e4c6775c42140d00b2d155344b553a7404 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067629 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd4e756a 2020-02-17T09:49:45 Const-ify the validation layer. Enforces that the validation layers should be working pretty much read- only with the exeption of updating caches. Requires a few tricks: - updates EP code generation to add 'const' to pointer parameters - enables a kludge const_cast to enable the robust query extension - makes some members of Framebuffer mutable to work around syncState - makes 'is' queries and other methods in Context/State const Will allow us to more safely expose the no_error extension. Bug: angleproject:1280 Change-Id: Id9756757854c9e68fc096ecec8d93759fbe6b3a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060689 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Schade 0a6e118d 2020-01-27T13:37:29 Change g_Mutex from std::mutex to std::recursive_mutex When running flatland on android-10.0.0_r21 (Pixel 3), libgui's ~EglImage calls eglTerminate which grabs angle's EGL entry point mutex. The path continues to libvulkan where eventually another egl call happens (eglDestroyImageKHR) and it will attempt to take the mutex at the entry point again. So we try to get the mutex multiple times from the same thread. Change this mutex to a recursive_mutex to allow for this re-entry of EGL calls Tests: android-10.0.0_r21/frameworks/native/cmds/flatland Bug: angleproject:4354 Change-Id: If8a817df45e9f58d5f06884510350e17d7127fa9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029218 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill e167f76b 2019-11-06T16:51:55 Capture/Replay: Pass gl::State to capture functions. This replaces passing gl::Context. Using a gl::State directly will more easily let the mid-execution replay code pass a mocked gl::State instead of having to modify the real underlying Context state. For example when capturing pixel pack and unpack parameters the states could not be overridden without changing the gl::Context itself. Similarly when capturing client side data. Also moves a query parameter info function into queryutils so it can be accessible to the State-based capture. Refactoring change only. Bug: angleproject:3611 Change-Id: I3c064001cfa83ebbb67a2b8fc8b6180491edd215 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1899728 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e9603921 2019-10-31T14:33:26 Capture/Replay: Correct a few GLenum replay issues. This change refactors the GLenum utils into a non-autogenerated and an autogenerated portion. That makes it easier to modify the non-auto- generated bits to properly output GLenums even when the gl.xml data isn't totally correct. For instance, the "GetPName" group was missing a bunch of queries. Instead of trying to fix the GL we can simply fall back to querying the "Default" group when we return invalid enum. Also corrects a missing "0x" on hex output. Also allows the capture/replay sample to specify the correct binary data directory when testing a replay. Bug: angleproject:3611 Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott aa292a59 2019-10-10T08:22:04 Generate GLES 3.2 entry points This is a combination of: - Changing the "scripts/generate_entry_points.py" script to tell it to also auto-generate GLES 3.2. Also changing "scripts/gen_proc_table.py". - Generating new and modified files needed to add GLES 3.2 to the ANGLE front-end. This is done by running the following command: "python scripts/run_code_generation.py". - Creating the following files: - src/libANGLE/validationES32.h - src/libANGLE/validationES32.cpp - src/libANGLE/capture_gles_3_2_params.cpp - Hand-editing the following files: - src/libGLESv1_CM/libGLESv1_CM.cpp - include/GLES2/gl2ext_angle.h - src/libGLESv2.gni - src/libANGLE/Context.h - src/libANGLE/Context.cpp - src/libANGLE/Context_gl.cpp - src/libANGLE/ErrorStrings.h - src/libANGLE/State.h - src/libANGLE/validationES1.cpp - src/libANGLE/validationGL3.cpp - src/libANGLE/validationGL31.cpp - src/libANGLE/validationGL32.cpp - src/libANGLE/validationGL33.cpp - src/libANGLE/validationGL4.cpp - src/libANGLE/validationGL43.cpp - src/libANGLE/validationGL45.cpp Bug: angleproject:3649 Change-Id: I5b67f72e3e3b55e74039ec3e28aa8d399ec08cf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1850231 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 01dfe404 2019-09-04T12:08:25 Capture/Replay: Use resource ID maps in cpp replay. Introduces a new enum for resource ID types. This is used in auto- generated code to convert ParamType to resource ID map types. Also implements a lot of new parameter captures for gen/delete calls. Bug: angleproject:3611 Change-Id: I26cca1df88d1783d9830c89438c99f7593a70ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784059 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jiacheng Lu 05114fe7 2019-08-09T15:45:56 Support in memory frame capture replay Enable FrameCapture to dispatch its calls back to Context and replay them. Bug: angleproject:3785 Change-Id: I580eff1fca3e39414a9b45bb296e0f3866ea33bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1747055 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3c6b2e16 2019-08-23T15:12:32 More improvements to trace logging. - output 'glDrawArrays' instead of 'DrawArrays' - output context IDs for multithreaded scenarios - output to trace even when platform logging is on - fix newlines in trace file output Bug: angleproject:3815 Change-Id: Ie07c5c91d9eae6204aaf6f6319ef318b88d292aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761163 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 7c1af2d5 2019-08-14T15:16:49 Capture/Replay: Use GL types for packed types. Previously we were trying to use the packed enum types for our replay. This wouldn't work as the packed enum types don't exist outside of ANGLE. Bug: angleproject:3611 Change-Id: Id0d5c9f37304b30c204bac9bc7873661b035f918 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754324 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Tobin Ehlis a2ec1344 2019-08-13T14:13:35 Add shared mutex to frontend Add shared mutex to frontend API entrypoints that is only enabled when ANGLE is being used with a shared context. Bug: angleproject:2464 Change-Id: I0d918e37d9579dccd013dc88f563bed7de7ee55f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1685712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Jiacheng Lu 9e14a19b 2019-08-09T10:03:24 EVENT trace to print GLenum as string reland Reland of CL https://chromium-review.googlesource.com/c/angle/angle/+/1737141 Bug: angleproject:3778 Change-Id: I2a43c618de032d6e6286d707fbc88241ad4c19ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745837 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 08b1e660 2019-08-09T15:31:19 Revert "Enable EVENT trace to print GLenum as string" This reverts commit 048547e743b655d12ad44bb3e63766b7b96cd9a0. Reason for revert: crashes on Debug bots (at least Mac) Original change's description: > Enable EVENT trace to print GLenum as string > > Bug: angleproject:3778 > Change-Id: Ib3a4bd6ba631e0165d571789bbfab9b4b1905d8d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737141 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Tobin Ehlis <tobine@google.com> TBR=tobine@google.com,jmadill@chromium.org,lujc@google.com Change-Id: Ib72f932f9b99bf981399759b17cec456b3ffafc1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3778 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745835 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jiacheng Lu 048547e7 2019-08-05T11:55:54 Enable EVENT trace to print GLenum as string Bug: angleproject:3778 Change-Id: Ib3a4bd6ba631e0165d571789bbfab9b4b1905d8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737141 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>