src/libANGLE/renderer/vulkan/DebugAnnotatorVk.cpp


Log

Author Commit Date CI Message
Ian Elliott ebf75698 2021-06-10T18:55:04 Vulkan: Fix AGI clear hierarchy bug for clear commands This approach properly handles outside-render-pass clears. Bug: b/190622922 Change-Id: Ia4a9d6ec13d7da8c4a445af1127e82c03f37e8b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2951960 Reviewed-by: Mark Lobodzinski <mark@lunarg.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott 1fcbf77c 2021-06-10T16:02:31 Vulkan: Fix AGI hierarchy for query commands Treat glBeginQuery* and glEndQuery* commands the same as glDraw* commands, generating a hierarchy. This results in vkCmdBeginQuery and vkCmdEndQuery commands being nested under gl*Query*, instead of being a peer of glDraw* commands. This change necessitated plumbing some of the existing "end" path to return angle::Result. Bug: b/190512191 Change-Id: I898d3fdd9b4b7d86e76dfae2ffc5d6f7316a55ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950926 Reviewed-by: Mark Lobodzinski <mark@lunarg.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Mark Lobodzinski 4bafc503 2021-06-01T10:59:17 Vulkan: Fix AGI hierarchy for clear commands Treat mid-render-pass glClear* commands the same as glDraw* commands, generating a hierarchy. This results in vkCmdClearAttachment commands being nested under glClear, instead of being a peer of glDraw* commands. Bug: b/183547523 Change-Id: Ibc6900b0485fd174d79c8fe6c94ea17dbefa520b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2941364 Reviewed-by: Mark Lobodzinski <mark@lunarg.com> Reviewed-by: Mike Schuchardt <mikes@lunarg.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Mark Lobodzinski 0a6c6c00 2021-06-01T10:59:17 Vulkan: Submit Dispatch commands outside renderpass Compute dispatch commands must be submitted outside a renderpass, but their associated debug event markers were being submitted on the renderpass commandbuffer. The dispatch debug event markers are now handled separately from those for draw calls and are now submitted on the correct commandbuffer. Failure manifested in malformed AGI traces for Ragnarok M: Eternal Love Bug: b/181611786 Change-Id: I768eeccd76be38818fc99d6d56f5899290c8fc5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2930818 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott ce7bc0c8 2021-05-14T17:00:46 Vulkan: Fix AGI hierarchy The GLES hierarchy of debug-util markers given to AGI was wrong for several games. The problem is that glDrawBuffer* was treated as a draw call, instead of as the state-setting call that it is. Bug: b/184888395 Change-Id: I6911bd3aae42b5f29b3f40466a615c614651ca8a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2898472 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@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>
Ian Elliott e2ecb2dd 2020-11-03T19:26:00 Enable logging API commands to Android logcat This enables logging API commands to Android logcat. It is enabled via the following GN arg: angle_enable_android_api_logcat = true On desktop, API commands can continue to be logged to the "angle_debug.txt" file via a different mechanism, with the GN arg: angle_enable_trace = true Bug: b/170249632 Change-Id: Id52e75f966a97692ec6d69eb3d254ba295a151c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519094 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
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 bc4ec4c1 2020-10-05T17:10:18 Vulkan: Plumb OpenGL ES commands to AGI/debuggers Use vkCmd*DebugUtilsLabelEXT() calls to delimit all GLES commands, and group them under GLES draw/dispatch calls. Plumb calls from the EVENT macro (for every GL entrypoint) to vkCmd*DebugUtilsLabelEXT() via a newly-implemented DebugAnnotatorVk class. Use a new dirty bit so that cached entrypoints are associated with a triggering draw/dispatch command. The DebugAnnotatorVk::beginEvent() method saves a string in a vector of all GL commands in ContextVk. The dirty bit converts the strings into begin-end vkCmd*DebugUtilsLabelEXT() pairs. The DebugAnnotatorVk::endEvent() method makes the final vkCmdEndDebugUtilsLabelEXT() call for a draw/dispatch command. Enable the OGL->VK mapping feature by setting "angle_enable_trace = true" in GN args. Bug: b/162068318 Bug: b/169243237 Change-Id: I61b6a8d113168c0ce578d6efd002d8a393659aba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451517 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 6534a6f8 2020-10-02T01:10:54 Revert "Vulkan:Add debug labels for OpenGL calls" This reverts commit 3705fc41315b50a64299ecb1d75015a33fefd6aa. Reason for revert: Causes errors on Debug bots. See bug. Bug: angleproject:5121 Original change's description: > Vulkan:Add debug labels for OpenGL calls > > Implement the DebugAnnotatorVk class, and plumb the EVENT macro in the > GL entrypoints to save a string of call info in the vector of all > GL calls in ContextVk. > > Then add a vkCmdBeginDebugUtilsLabelEXT() call that includes the > OpenGL draw/dispatch call prior to any Vulkan Draw or Dispatch calls. > Also embedded under that label add a second > vkCmdBeginDebugUtilsLabelEXT() call labeled "OpenGL Commands" that > includes all of the OpenGL calls leading up to the draw/dispatch. > Each individual OpenGL call is then given its own > vkCmdBegin/EndDebugUtilsLabelEXT() pair so that the complete sequence > of GL calls leading up to a draw call is visible for each Draw. > > Enable the OGL->VK mapping feature by setting > "angle_enable_trace = true" in GN args. > > Note: This will create an ANGLE APK on Android that generally won't > work with games, unless launched by AGI (which provides the debug > utils extension). A future version will disable these labels unless > the debug utils extension is found. > > Bug: b/162068318 > Bug: b/169243237 > Change-Id: I09886f17fa9287528c12552698738ea1fe2a4b8c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427557 > Commit-Queue: Ian Elliott <ianelliott@google.com> > Reviewed-by: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=courtneygo@google.com,ianelliott@google.com,timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: b/162068318 Bug: b/169243237 Change-Id: I772d549213e1ad64ae58a1937e5de0f7ea740084 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott 3705fc41 2020-09-28T21:40:57 Vulkan:Add debug labels for OpenGL calls Implement the DebugAnnotatorVk class, and plumb the EVENT macro in the GL entrypoints to save a string of call info in the vector of all GL calls in ContextVk. Then add a vkCmdBeginDebugUtilsLabelEXT() call that includes the OpenGL draw/dispatch call prior to any Vulkan Draw or Dispatch calls. Also embedded under that label add a second vkCmdBeginDebugUtilsLabelEXT() call labeled "OpenGL Commands" that includes all of the OpenGL calls leading up to the draw/dispatch. Each individual OpenGL call is then given its own vkCmdBegin/EndDebugUtilsLabelEXT() pair so that the complete sequence of GL calls leading up to a draw call is visible for each Draw. Enable the OGL->VK mapping feature by setting "angle_enable_trace = true" in GN args. Note: This will create an ANGLE APK on Android that generally won't work with games, unless launched by AGI (which provides the debug utils extension). A future version will disable these labels unless the debug utils extension is found. Bug: b/162068318 Bug: b/169243237 Change-Id: I09886f17fa9287528c12552698738ea1fe2a4b8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427557 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>