src/libANGLE/FrameCapture.cpp


Log

Author Commit Date CI Message
Tim Van Patten 5006a573 2021-01-26T17:15:10 Capture/Replay: Capture glUniformBlockBinding() eFootball PES 2021 uses glBindBufferRange(), which requires glUniformBlockBinding() to create the pairing of uniform block indexes to buffer bindings. The uniform buffer indexes that are assigned when each program is linked can differ between drivers, so the glUniformBlockBinding() calls need to be recorded to get the correct index values for the glBindBufferRange() calls. Bug: angleproject:5564 Change-Id: I909e05d5b1cc50e592b887bd130aa80cdb1bb40f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2650993 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 351e6e8c 2021-01-26T17:08:59 Add 'UniformBlockIndex' struct Add the new structure 'UniformBlockIndex'. This is in preparation for capturing glUniformBlockBinding() calls, which requires the (new) corresponding ParamType::TUniformBlockIndex. Bug: angleproject:5564 Change-Id: I88613dd96d058659dd253e8088fab49670c32316 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2651287 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 9bbcd86a 2021-01-25T10:52:35 Capture/Replay: Fix instanced array client data. Enables a bunch of self-tests. Bug: angleproject:5530 Change-Id: Idd14574ba0f3d44124e153ccb32fec7318baf217 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2647745 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e60ce3da 2021-01-21T16:42:17 Capture/Replay: Allow testing with multiple versions. This embeds the context version and device type info into the replay. The self-tests then can create the correct display and context types. This fixes testing against SwiftShader which is necessary for the bots. Bug: angleproject:4759 Change-Id: If9da6bfdc1c2b315ccd7e453872fc84063277054 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2643363 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 9ccd3536 2021-01-20T18:19:41 Capture/Replay: Capture all indexed buffer bindings during MEC "eFootball PES 2021" binds uniform buffers via glBindBufferRange() before any frames haves been rendered and then uses those bound buffers for all subsequent frames. A recent fix captured the UBOs that were also bound as GL_UNIFORM_BUFFER, but failed to capture all indexed buffers bound only with glBindBufferRange(). This CL captures all indexed uniform, atomic counter, and shader storage buffers during MEC setup. Bug: angleproject:5564 Change-Id: I0e638ec4407a091f943b9640e8fc6a7c9f4c4e08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2640424 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten 26e02593 2021-01-15T12:38:46 Capture/Replay: Erase texture from mCachedTextureLevelData When the caller issues a glCompressedTexImage call, we need to delete the cached texture data, since the texture size/data are being respecified and the old data is now stale. This fixes MEC for "Klondike Adventures". Bug: angleproject:5549 Change-Id: Ie788e2bf39f7a29ec6bc55f95d6f570f1d22d659 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633071 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 2e3786ed 2020-12-18T13:19:16 Capture/Replay: Use glUniform1iv on samplers, ignore images In OpenGL, GL_INT is expected for sampler uniforms. Before this our emitted code was using the underlying return type, which can be unsigned, leading to glUniformuiv. Also, don't try to set image uniforms with glUniform calls, it is not allowed. Test: Fortnite MEC Bug: b/170755560 Change-Id: I6786df487285fee77cfe792dfa85eb17feb155e9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611557 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop 20f8828c 2021-01-15T16:04:29 Capture/Replay: Fixes for compressed texture cache Some compressed block sizes don't align properly to surface dimensions. For instance, ASTC_6x6_UNORM populating a 64x64 surface. Our FrameCapture code was assuming block alignment and was losing data. To handle this, round the dimensions up to natural block alignment before doing any scaling math. This also fixes the problem we've had of losing small mip levels due to scaling. Test: Aztec Ruins MEC Bug: b/160808198 Bug: angleproject:5552 Change-Id: I194cdac87f7361f85539e78f85069b336ffb1f36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634205 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Tim Van Patten a1b4a1f3 2021-01-14T11:02:43 Capture/Replay: Only get source for linked programs CaptureMidExecutionSetup() currently assumes that all created programs have also been linked, since mCachedProgramSources is only updated when glLinkProgram() is called. However, a call to glCreateProgram() doesn't necessitate a call to glLinkProgram(). This leads to hitting an assert in FrameCaptureShared::getProgramSources() when iterating all glCreateProgram()'ed programs, but doesn't find that it in the list of linked programs. This fix is to move the program->isLinked() call earlier. Bug: angleproject:5545 Change-Id: I49fdec08de1c2767fe7f6a08fd0a9d53fa865167 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2629789 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Cody Northrop 8943d1e2 2021-01-12T22:21:38 Capture/Replay: Add DrawBuffer state to MEC This results in calls like this added to Setup*: const GLenum glDrawBuffers_bufs_38[] = { 36064, 36065, 36066, 36067, 0, 0, 0, 0 }; ... glDrawBuffers(8, glDrawBuffers_bufs_38); Test: Aztec Ruins MEC Bug: b/160808198 Bug: angleproject:3662 Bug: angleproject:5541 Change-Id: I1c6282e292f225684c99b5de65daf8ad15b0db56 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2627907 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Tim Van Patten 2d1406a8 2020-12-29T18:11:33 Capture/Replay: Capture glBindBufferBase during MEC setup "World War Doh" binds uniform buffers via glBindBufferBase() calls before any frames have rendered and then uses those bound buffers for all subsequent frames. ANGLE's frame capture was failing to perform these calls during the mid-execution capture setup phase, leading to the replay generating VVL errors: VUID-vkCmdDispatch-None-02699 Descriptor in binding #0 index 0 is being used in draw but has never been updated via vkUpdateDescriptorSets() or a similar call. This CL adds those calls to the MEC setup phase, allowing the replay to execute without any errors. Bug: angleproject:5495 Test: angle_perftests --gtest_filter="*world_war_doh*" Change-Id: I751c9c6f60bf78c13428a9d1d6a06dbfe600c24b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606806 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten e09e947d 2020-12-29T18:21:36 Capture/Replay: Don't force built-in attribs to have a location CaptureMidExecutionSetup() hits an assert while capturing "World War Doh": ANGLE : FATAL: FrameCapture.cpp:2876 (CaptureMidExecutionSetup): ! Assert failed [[[...]]] attrib.location != -1 This is due to CaptureMidExecutionSetup() enforcing that all attributes, including built-ins, have a location. However, in the case of "World War Doh", the built-in 'gl_GlobalInvocationID' does not have a location. Moving the assert to after the gl::IsBuiltInName() check allows the capture to complete without hitting any asserts. Bug: angleproject:4048 Test: Capture "World War Doh" Change-Id: Ice96dec629b1477b11a710283c4ec4bf1c95c6e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606807 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Cody Northrop 8b4990bb 2020-12-06T21:00:52 Capture/Replay: Fix capture of GL_EXT_debug_label Add it to the list of debug functions we skip. Test: Seven Deadly Sins MEC Bug: b/174965026 Bug: angleproject:5337 Change-Id: Ifa2bd9cf12abda20df0c693c149be50d57ee6e62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2576814 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi dfdf90a7 2020-12-01T16:09:41 Create helper for identifying builtin names Bug: angleproject:5405 Change-Id: I652f2d6d3af4468b9662cdea5d2706d36e118239 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568550 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Courtney Goeltzenleuchter a481bee2 2020-11-04T18:20:24 Add GetEnvironmentVarOrUnCachedAndroidProperty GetEnvironmentVarOrAndroidProperty will first return the given variableName from the processes enviroment if defined. If not defined and running on Android, will look up the corresponding property and store it in the environment. The framecapture code wants to see when the Android property changes so add an uncached version of GetEnvironmentVarOrAndroidProperty that always does the getprop command (which can be time consuming). Bug: b/170328907 Change-Id: I0624c0646889435cb6f6eb20a6d3cceb6ae3eb48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2520107 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 27ea50a5 2020-11-05T22:24:28 Capture/Replay: Restore buffer bindings during Reset Emit code to reset all buffer bindings to how they were at the beginning during MEC. Test: Capture Clash of Clans Bug: angleproject:4048 Bug: b/172626835 Change-Id: I5a5446304d119f51a018c8fe88ff386243d19749 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2521179 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Ian Elliott 3980b1f8 2020-10-27T10:01:05 Refactor FrameCapture.cpp to use common utility The frame-capture-specific AndroidGetEnvFromProp() function has been ported to the general utility, GetEnvironmentVarFromAndroidProperty(). Bug: b/170249632 Change-Id: I97de8205ceef140dfd8fab8e6f2d52b90cd996cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2502772 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 02deb199 2020-10-29T08:54:56 Write export labels into replay functions. This will allow them to be recaptured in such a way that they can be built into separate modules. This is building towards separate binaries for each trace. Bug: angleproject:5133 Change-Id: I306204e69a6d754282193f44055dbc85ccb01e9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506491 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 39b777c6 2020-10-29T16:55:06 Capture/Replay: Two cleanups. This changes from returning a vector to directly returning a pointer to the binary data for the serialized state. The second cleanup is to use a ContextID as a wrapped type which simplifies the output formatting code. Bug: angleproject:5247 Change-Id: Ieb8afdb9326a12968dd2d69c05e1ed811b93abff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506198 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 97a45a9f 2020-10-27T11:30:27 FrameCapture: Track surface width/height per context Test: Capture PUBG Mobile Bug: b/159238311 Bug: b/165824228 Change-Id: I7bbc7a80ade4df6b191cbe62e9badac1066ab246 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2503474 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 77defeb0 2020-10-27T18:31:53 Add the ability to re-trace existing traces. This new script runs the ANGLE trace tests with capture enabled to generate updated replay cpp files. This allows us to update our traces files to a new file format in one step. Trace metadata (currently only the default FBO format) is preserved between re-traces. Currently only desktop-based retracing is supported. This means a couple traces that require specific extensions don't run on all platforms. Bug: angleproject:5134 Change-Id: I7c923d89e33c18285ab36a7cee91f2fb735758eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488130 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill e94c35a1 2020-10-28T09:50:58 Capture/Replay: Always base replays on frame "1". No functional change. When we trigger a capture at frame X, the value of X is not important. Instead we'll record the frames as 1,2,3,etc. Helps keep the traces more consistent and re-trace the same way as they are captured. Bug: angleproject:5134 Change-Id: Icd8654d509423edcc74cd0ef694795a787f5cc05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2500602 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten ee4e0866 2020-09-24T11:39:49 Vulkan: Add descriptor set allocation counters Add descriptor set allocation counters for the following: - ContextVk - Driver uniform allocations for graphics and compute pipelines. - ProgramExecutableVk - ANGLE driver uniforms - Uniforms - Textures - Other shader resources - UtilsVk - All of the UtilsVk::Function types increment the same counter Each object's counters live within the object itself and the cumulative total is output as part of that object's destruction. On Present, all of the descriptor set counts are collected into a single total which is used to update the overlay each frame. In order to see the cumulative total output for each object, the following GN args must be enabled: is_debug = true angle_enable_perf_counter_output = true To see the descriptor set allocation overlay: ANGLE_OVERLAY=VulkanDescriptorSetAllocations Bug: angleproject:5067 Test: Manual verification with angle_perftests Change-Id: Ie45fda56ade3e68bfba7bf6da9554eb05a02c6b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2429487 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 78c5b83d 2020-10-27T08:16:58 Capture/Replay: Move exported data to start of header. This will make scripts have an easier time parsing metadata. Bug: angleproject:5134 Change-Id: I4ee32374c8d54d8f91e7f5b8c69b4085e43d1832 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2500601 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop f0dcaca2 2020-10-08T22:44:22 FrameCapture: Image Texture binding in MEC Test: LEGO MEC Bug: b/161716126 Bug: angleproject:4048 Change-Id: If5890638dfc6a8cc07aece584a5742b055007db0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462164 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 0d3b84ef 2020-10-17T17:56:52 FrameCapture: Fix GLSync creation for MEC on 64-bit GLSyncs created during MEC were getting garbage for the high order bits when when run on 64-bit applications. That's because the iterator is 32-bit and was being bitcast to 64-bit. This change zero extends the iterator before converting to a GLSync. Test: Lots of traces were hitting this Bug: angleproject:4048 Change-Id: Ia22da945e014de0caad2a3663a33f996bb781b19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2486403 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 5a9827d2 2020-10-08T13:17:16 FrameCapture: Move shader and program source to shared cache These are local copies of source seen earlier in the trace. Centralize them so they can be tracked across contexts. Test: PUBG MEC Bug: b/165824228 Bug: angleproject:4048 Change-Id: If414826b0280c61507812c2fd92706b7f095cc4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462162 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 580f40a6 2020-10-04T14:05:41 Capture/Replay: Embed ANGLE version in replay. This is embedded as a #define. It can be used for book-keeping and can also be used to control integration when there's incompatibility. Bug: angleproject:5135 Change-Id: Ie0bb8ff9509c5f973860cb9e6ae48714a27c7398 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449163 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 3e8305f5 2020-10-06T23:16:38 FrameCapture: Move compressed texture cache to shared location In support of tracking compressed texture data across multiple threads and contexts, move our cache to FrameCaptureShared. Make this accessible only via egl::ShareGroup, which will ensure unique texture IDs. Test: Asphalt 8 MEC Bug: b/150484427 Bug: angleproject:4048 Change-Id: I4e75b323d7aedc0333ceffba305439e54c4d6ac1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455266 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 385fb40f 2020-10-04T13:29:13 Capture/Replay: Don't capture deleted shaders. ANGLE can sometimes hold on to deleted shaders while they're still in use. This would happen when re-capturing captured application. A bunch of shaders would be still around after used in the program linking step because they are still attached to the program. Fix this by not skipping the capture for shader that have been deleted but are still in the resource map. Noticed while capturing the T-Rex replay. Bug: angleproject:5134 Change-Id: I04e3e96b43e445d7b467e6db0325ecd0d821549d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449162 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 82962a0d 2020-10-04T11:50:02 Capture/Replay: Complete RasterizerState capture. The dither check was incorrect. Fix the dither capture and add the missing rasterizer discard and polygon offset capture. Noticed when capturing the T-Rex replay. Bug: angleproject:5134 Change-Id: I5222625175ec7e078a9c0ad6c6fd3507db3a7769 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449158 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 57c6af7d 2020-10-04T12:18:29 Capture/Replay: Fix temp shader ID. We could mess up capturing Program #1 by using a temp shader ID of 1. Instead we can use a shader ID that isn't used in the application. Noticed when capturing from the T-Rex replay. Bug: angleproject:5134 Change-Id: Ic6fefe9d8cdf327a5ebbb47539b2e11161a4b13c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449159 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 8608b402 2020-10-04T11:42:08 Capture/Replay: Don't capture XFB 0 in MEC. This will only add an extra unused XFB object. Noticed when capturing from the T-Rex replay. Bug: angleproject:5134 Change-Id: Ia368f9e9f59f9ea7473ac88928a413001fa99496 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449157 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 505a8d05 2020-09-26T23:40:51 Capture/Replay: Split very large replay function. This allows a replay of the T-Rex offscreen benchmark. Bug: angleproject:5133 Change-Id: I9998c4785e61a6410863a1cd8a8a569b1e08098a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2446897 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill c15d1e2d 2020-09-26T15:11:43 Capture/Replay: Generalize function splitting. We can use this to split up the replay function as well as very large setup functions. This will let us replay the gfxbench offscreen benchmarks directly. Bug: angleproject:5133 Change-Id: Ic24f25f2ab6821e68356a28a698cb84301e99be2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2446896 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 34445b29 2020-10-02T15:23:35 FrameCapture: More fixes for app updates * Disable GL_EXT_map_buffer_range during capture, several native GLES drivers do not support it. * Unmap buffers before updating them during Reset. Some native drivers require it. Test: Temple Run on multiple systems Bug: angleproject:4845 Change-Id: I9aea9c220320095aee87da107320b8fcad6c0a2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2447029 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop b390d8b0 2020-09-30T16:28:46 Capture/Replay: Minor fixes for MEC Detected when recapturing Temple Run and Candy Crush. Each of these apps has updated recently. Test: angle_perftests --gtest_filter="*Trace*" Bug: angleproject:4845 Change-Id: Id0e8d362661d97d7b8e60b3afb0a3a989b6a6771 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 330c8673 2020-08-28T17:44:13 Enable MSVC warning 4312. This is caught in the Skia build. Bug: skia:7647 Change-Id: I9b164f6fcc55b7e13981659ee8a08766a99a2122 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381084 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cody Northrop 34120d07 2020-08-27T15:29:04 Capture/Replay: Track groups of strings When string counters were added, it accidentally broke transform feedback varyings. All the strings were combined, resulting in: const char *glTransformFeedbackVaryings_varyings_0[] = { R"(out_Posout_Aout_Bout_C)" }; Instead, generate the counter for the entire group. This CL results in: const char *glTransformFeedbackVaryings_varyings_0[] = { R"(out_Pos)", R"(out_A)", R"(out_B)", R"(out_C)", }; Test: Manhattan MEC works again Bug: angleproject:4941 Change-Id: Ie605395942c9105ba234009989f41a2a1cd8c53e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2381565 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Tobin Ehlis d7276586 2020-08-26T11:27:13 Vulkan:Use roundUpPow2 where possible Utility function roundUpPow2 is more optimal than roundUp so use it. Bug: b/166462979 Change-Id: I616fa9f487b818137b1b496d93e292c3bd1f428c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2377119 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
Cody Northrop a2c2a910 2020-08-20T11:41:50 Capture/Replay: Fixes for PUBG:Mobile This CL does the following: * Skip calls from KHR_debug and EXT_debug_marker * Update an assert in setDeletedBuffer * Warn when capturing an invalid call Test: Capture first 2000 frames of PUBG:Mobile Bug: b/165824228 Bug: angleproject:4048 Change-Id: Ib7fa616a1b5c8ed7c83daaaf0779b41acd31a7f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2366828 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop d488568a 2020-08-17T10:16:45 Capture/Replay: Don't capture unused default uniforms in MEC Test: MEC capture of COD:Mobile Bug: b/164426913 Bug: angleproject:4048 Change-Id: I7f47c8828d57dfcc14bee5994d98c7df5f6a9a71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2360046 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop a9b199b0 2020-08-13T17:37:27 Capture/Replay: Add ability to override entry points We don't support populating a texture from an EGLImage, but this feature is in use by games. Instead, populate the texture with null data. In the future, improve this by reading back the data. Test: Capture and play back first 1200 frames of COD. Bug: b/164426913 Bug: angleproject:4048 Change-Id: Ic8c6bdf3c359c89e647c28b8c57b7218bdf05b15 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2355705 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop a7cbb3f0 2020-08-10T09:53:54 Capture/Replay: Allow starting capture at an unknown frame This CL adds a new way to set the start frame of a capture. It adds a new environment variable called ANGLE_CAPTURE_TRIGGER that, when set, will be used instead of frame start and end. By setting ANGLE_CAPTURE_TRIGGER to a non-zero value, ANGLE will capture that many frames when the value changes. For example, on Android, we can set it with: adb shell setprop debug.angle.capture.trigger 20 When we reach the target content, set the value back to zero: adb shell setprop debug.angle.capture.trigger 0 and ANGLE will start capturing 20 frames. Currently only hooked up for Android, but should be possible to support on other platforms. Test: Capture application frames using trigger Bug: angleproject:4949 Change-Id: I469ef5c48feb78c85b8cda2fefd5df59e495bbe2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2347858 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Cody Northrop 9892e6a2 2020-08-05T11:38:27 Capture/Replay: Reduce SetupContext size further Still seeing long link times for NBA2K20 trace. Breaking up SetupContext into even smaller chunks helps. Test: Compile and link NBA2K20 trace for Android Bug: b/160014453 Bug: angleproject:4048 Change-Id: Ic8f6d7e8d1c35cbee986da670c0beeb4b77c4e7c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339853 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop a798819c 2020-08-05T11:38:10 Capture/Replay: Dedup shaders to reduce capture size This CL will track whether a string has already been declared and written in the output file. This cuts the shader string count in NBA2K20 trace by 85%, eliminating about 300K lines of code from setup. Test: Compile and link NBA2K20 trace for Android Bug: b/160014453 Bug: angleproject:4048 Change-Id: Id854b3314644c1e4aae41cd6bb4157f92e9b1945 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339852 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 4c7e3ee3 2020-08-03T12:26:05 Capture/Replay: Account for EGL_KHR_no_config_context EGL_KHR_no_config_context allows creating a context with EGL_NO_CONFIG. Add a null check when collecting config attributes. This fixes trace capture of Angry Birds 2 by allowing CaptureReplayTest to pass EGL_DONT_CARE for the config parameters. Bug: angleproject:4817 Change-Id: I982136ae2a7db4bd8d3f16f4accfe093e5610091 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333356 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 91f54d83 2020-08-02T11:28:49 Capture/Replay: Use vector for resource maps. unordered_map was showing up as a hotspot in replay profiling. Bug: angleproject:4916 Change-Id: I840371313ab51faa088664b9840c7ef3f998fcad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334094 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 248d754a 2020-07-29T16:50:03 Capture/Replay: Limit string lengths in capture MSVC can't handle string lengths longer than 16380 according to: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2026 Example build failure without this CL: https://logs.chromium.org/logs/angle/buildbucket/cr-buildbucket.appspot.com/8873410048312858000/+/steps/compile_with_ninja/0/stdout Test: Compile NBA2K20 MEC with MSVC Bug: b/160014453 Bug: angleproject:4048 Change-Id: Ie14d40e8c3eea35d08d4be32455b327a311f1bcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327702 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Jamie Madill d019af80 2020-07-29T11:30:34 Capture/Replay: Fix missing header. This was missing from a prior commit. Bug: angleproject:4845 Change-Id: Iff2b0f300270df4c2e26265c5af81af8ae7e5e54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2325032 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop e4ceee97 2020-07-17T15:57:37 Capture/Replay: Break up SetupContext While getting NBA2K20 MEC to work, discovered that SetupContext was so large, it was causing a stack overflow. To fix, simply break up the function into a series of helpers if the number of calls exceeds a set limit. Test: NBA2K20 MEC Bug: b/160014453 Bug: angleproject:4048 Change-Id: I332d5dea5fc4e14700b68150cbe31a4c88cdae89 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321739 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 07ae186b 2020-07-24T10:55:33 Capture/Replay: Update headers. Instead of including "angle_trace_gl.h" in shared capture header we can include it in each cpp file. This prevents a header conflict with the "old" way of using the util GL loader. Bug: angleproject:4845 Change-Id: Ia00a2beffc77446c779ceec8995fce9704e7b8af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315625 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya ffb31229 2020-07-22T12:02:54 Capture/Replay: Enable capturing slingshot scenes Implemented parameter capture functions for: glGetActiveUniformsiv glGetActiveUniformBlockName glGetActiveUniformBlockiv Added a check for bound unused locations when capturing glLinkProgram Changed CaptureGetParameter to always request a gReadBuffer allocation of the maximum reported possible array size needed to query GL_COMPRESSED_TEXTURE_FORMATS. Recording the value on the capturing device would previously have buffer overflow issues when the replaying the capture on a device with more formats available. Changed VertexAttribType::UnsignedInt2101010's string to reflect the correct type Bug: angleproject:4834 Change-Id: Icd1ff404369ae9f18cad7cd4f56fbcccc89e7e98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2306735 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jamie Madill 9faf0cdc 2020-07-20T10:30:55 Capture/Replay: Use custom GL header. This will let us override the util loader for all new traces. It will also be easier to maintain going forward if we have to change the header again. The end goal is to run the trace tests with a custom GL layer that can intercept certain API calls. Bug: angleproject:4845 Change-Id: I028a1afdadf638998805d7b9a2cc6717cf5f0148 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2308029 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 5671c2bd 2020-07-17T13:32:22 Capture/Replay: Fix vertex array objects for MEC While debugging NBA2K20 MEC, fixed the following issues: * Don't bind built-in attributes locations. * Don't emit glGenBuffers for the default VAO. * Include element array buffer in MEC. Test: NBA2K20 MEC Bug: b/160014453 Change-Id: I1b809946d67b6748b0670814be8dd090278dc38f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2307276 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop dd4723e3 2020-06-23T11:08:43 Capture/Replay: More ES 3.1 support This CL adds the following changes: * Support variable block sizes for ASTC * Support glMapBuffer * Additional param captures Test: Capture from beginning of Asphalt 8 and Aztec Ruins Bug: b/150484427 Bug: b/160808198 Change-Id: Ic1041011c3f51c32dbf7bf7105f41dffb9460b87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2264832 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen e5c18475 2020-07-06T09:50:49 Multi-frames serialization + comparision for capture replay test Changes how context states are serialized during capture run. Now, context states are serialized after each frame until the end frame is reached, or context is destroyed. Adds an api to the trace files to query serialization results of multiple frames. Makes change to CaptureReplayTest to serialize multiple frames then compares the serialization results with the ones retrieved from said api. Adds to capture replay the ability to produce working, compilable trace files even when end frame is not reached. Adds to the generated trace files config information and makes CaptureReplayTest utilize said config information to reproduce the exact environment of the captured application. Bug: angleproject:4817 Change-Id: Ie3d487af2bacf349dc3ff6f6b1b5f89e1169dc84 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2282885 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 13859945 2020-06-26T13:21:35 Capture/Replay: Fix default uniform array capture The pointer from vector::data() already reflects the size of the underlying type, so no need to include sizeof. This caused us to write beyond the vector bounds when reading multiple values. We were also missing component count. Test: MEC of NBA2K20 Bug: b/160014453 Change-Id: I51fc3f5f80c732221d6ea4b4bd1afde635e410a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2270909 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Manh Nguyen 900c7e87 2020-07-07T14:20:36 Serialize d/s buffers + use color buffers' impl format for readPixels Adds serialization of depth/stencil buffer contents Currently, readPixels on color buffers uses the gles front-end format, which can be different from the implementation format used in the backend. This can cause seg fault crashes when the number of bytes in a pixel differs between the two format. Changes so that readPixels for color buffers always use the backend format. Bug: angleproject:4817 Change-Id: I62d5deb1320ea38ee46143b2aa97f372ba01baeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2284451 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 3688cb36 2020-06-28T15:28:10 Fix bugs in angle_end2end_tests and frame capture 1. CaptureGetShaderInfoLog_infoLog method should not require shader object to be compiled 2. glCompressedTexImage3D's parameter locations are off by 1 3. EGLContextSharingTest.DisplayShareGroupObjectSharing test should not delete buffers it has no access to since it will crash when running capture replay Bug: angleproject:4801 Change-Id: I0d407cdb44eb41eea4209eebab0996d3dd8ae5f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2272862 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Manh Nguyen dce37b7d 2020-06-21T22:27:06 Serialize framebuffers + compare contexts for CaptureReplayTests Adds to frame capture the ability to serialize a frame's pre-swap GL state and store it in the binary data file Adds to CaptureReplayTests the ability to compare its serialized GL state with the serialized state pulled from the binary data file Adds a serialization module that serializes framebuffers' GL states and the contents of their color attachments Adds checks to automation script so that it would skips tests that do not produce the expected trace files Adds exception handling to automation script so that it will not crash when a replay build crashes Bug: angleproject:4779 Change-Id: I40a02e018073749e79f0ddbfd3d4065745548f46 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2258295 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop ea706304 2020-06-24T16:35:10 Capture/Replay: Fixups for draw surface Ran into these two problems while capturing gfxbench and trying to replay in the sample. Test: Capture and replay sample of gfxbench Bug: b/159238311 Change-Id: I1c873cbf2e297b5299581a7ffc2b1273e2d4c18a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2265287 Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 1c484343 2020-06-17T10:10:16 Capture/Replay: Track the draw surface width/height In order for captures to replay correctly, track the original width and height of the draw surface, as provided by eglMakeCurrent. Bug: b/159238311 Test: angle_perftests Change-Id: Ic8697abaca7dbdb94dabf34b872f69faf17b0b4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2250861 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 09be185d 2020-06-05T13:30:18 Fill in missing GL methods and fix crashes for MultiviewDrawTest Implements the capture of the following methods 1.glDrawArraysIndirect 2.glDrawElementsIndirect 3.glGetQueryObjectuivEXT Fix glVertexAttribPointer replay compilation error Bug: angleproject:4692 Bug: angleproject:4693 Change-Id: Id8b10354bad6b90beeb93837dcdb602ba8292659 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233398 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop a6c8e1c0 2020-06-04T17:01:22 Capture/Replay: Fix default uniform matrix capture We were only reading back a single location, rather than multiple locations required for arrayed types. Test: Angry Birds 2 MEC Bug: b/157672184 Change-Id: I8029dc5ece3b9dbff7c3c84c188996e622362767 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231804 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 22c95964 2020-06-04T17:00:52 Capture/Replay: Support buffer map/unmap state during MEC Angry Birds 2 is the first app we've targeted that maps buffers across frame boundaries. This exposed some gaps and assumptions we had in the code, and required additional support for MEC. To support this, we track each buffer's starting map/unmap state and how it changes throughout the trace. Then during Reset, we emit calls to return them to the correct state: void ResetContext3Replay() { ... glBindBuffer(GL_ARRAY_BUFFER, gBufferMap[546]); glUnmapBuffer(GL_ARRAY_BUFFER); glBindBuffer(GL_ARRAY_BUFFER, gBufferMap[550]); gMappedBufferData[gBufferMap[550]] = glMapBufferRange(GL_ARRAY_BUFFER, 0, 8192, GL_MAP_WRITE_BIT); ... } Test: MEC of Angry Birds 2 Bug: angleproject:4599 Bug: b/157672184 Change-Id: I5c73ca4d4eba7f1ecea01467ae887bae7f2d27fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231803 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen 66ec30a7 2020-06-03T10:45:34 Fix ExceedMaxVertexAtomicCounters test crash with FrameCapture The AtomicCounterBufferTest31.ExceedMaxVertexAtomicCounters crash is because when program linking fails, as it should for this test, the code tries to get the info log by calling glGetProgramInfoLog. The FrameCapture capturing this call currently tries to make sure that the program is linked. However, glGetProgramInfoLog does not require the program to be linked to execute. Bug: angleproject:4679 Change-Id: Ibbb87d6437152e9eb225e411100b1729e56e4c4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227857 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 550bc069 2020-06-03T18:24:17 Fill in missing GL methods for MemorySizeTest Implements captures of glGetRenderbufferParameteriv, glGetBufferParameteriv, and glgetAttachedShader. Fix FrameCapture and CaptureReplay sample so that it has single-frame capture and replay capabilities. Bug: angleproject:4681 Bug: angleproject:4682 Change-Id: I12c25a3857a88f2f40b3c3e8624da1379a950339 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229069 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Cody Northrop 860af7a2 2020-05-29T15:34:27 Capture/Replay: Use aligned offsets for binary data Traces that populate data by reading from unaligned memory addresses can crash. This CL ensures each offset is 16-byte aligned. TBR: jmadill@chromium.org,nguyenmh@google.com Test: angle_perftests --gtest_filter="*Trace*" Bug: b/150458446 Change-Id: I721999426772fa2f94fe39600d330a15eacc2794 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222847 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 6185d42e 2020-05-28T15:12:09 Capture/Replay: Update MEC for Subway Surfer Implement some missing entry points, including sync objects. Bug: b/150458446 Bug: angleproject:3662 Change-Id: I0e9e7926e1a13bd9b0e83900ea19d2fbef9a284f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2220312 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Charlie Lao 29bb612e 2020-05-28T10:32:26 Add egl::ShareGroup class to abstract the share context group Vulkan backend has a barrier tracker that tracks memory barrier needs of all shared resources. Because the buffer/texture objects are shared resources within a shared group, the tracker can not live in a context. Putting it in a device/renderer requires locks. It fits perfectly in a shareGroup object. The work is already done at API level to handle the mutex lock for shared context access so that no extra lock needs to be taken in the backend. This CL adds egl::ShareGroup class that represents the object that are shared among all share context group. At the front end this usually will include all the shared resource managers (not done in this CL). The ShareGroup object is accessible from gl::State object. This CL also adds ability for backend driver to allocate implementation specific ShareGroupImpl object. Vulkan backend will then use it to keeps the barrier tracker and other things that naturally fits the share group concept. Bug: angleproject:4664 Change-Id: Ifcd975cbdf5130022e21c41397894afc28f572e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2217252 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Manh Nguyen 218a6835 2020-05-26T13:51:34 Store non-string, non-enum data in binary file. Before, non-string, non-enum data smaller than a size threshold will be inlined in the cpp files. Now, they will be stored in binary file regardless of size. Bug: angleproject:4661 Change-Id: Id71cd22c97d26c9b9afaf5b26f7a327b998cb858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2216306 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 27ceed38 2020-05-25T13:06:53 Fix replay crash when captured sample doesn't create binary data Ensure samples without binary data like hello_triangle can be replayed Bug: angleproject:4658 Change-Id: I6da29a05335abe93666b6c19fa769e84c42a9fa8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2212499 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop fcfe7fad 2020-05-11T17:20:26 Capture/Replay: Fix MEC crash with Temple Run CaptureMidExecutionSetup was accidentally creating a copy of a vector, rather than using a const reference. Test: Temple Run MEC on Android Bug: b/152512564 Change-Id: Ia5eaa87235785eba7f10244d0ac7a831de0bcb0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197282 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 823b1bff 2020-05-07T16:06:26 Trace/Replay: Always use Linux-style line endings. This makes the traces consistent no matter which platform they are captured on. Will make it easier to use hashing with our code generator script. Bug: angleproject:4590 Change-Id: I7134b824c5cfefe4f2c21d8f9e21d80c2e8af57b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2188953 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 712fea9a 2020-05-06T15:45:25 Sync state when calling getTexImage ANGLE's mid-execution capture was failing after changes to defer clears. There were still textures with pending updates and dirty bits after SwapBuffers. This caused our calls to Texture::getTexImage to assert. This was due to a bug where getTexImage was not syncing state. This change makes the function non-const so that it can update state directly. TBR=cnorthrop@google.com,courtneygo@google.com,jmadill@chromium.org Test: Manhattan MEC Bug: angleproject:4517 Change-Id: I717ad44cfc60ae0d4483721f1c91e47c5dda3939 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2186170 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 06ce17e0 2020-04-27T09:05:54 Capture/Replay: Reset buffers on replay loop This CL adds infrastructure for tracking whether resources need to be reset when looping back to the beginning of the frame sequence. A new function is generated on the last frame: ResetContext*Replay(). It will contain calls to gen, delete, and restore contents of resources. This CL only supports Buffer resets. Bug: b/152512564 Bug: angleproject:3662 Bug: angleproject:4599 Change-Id: I46672dd70dcb997967e3cc0897308144f2582e21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168121 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 5b16123d 2020-05-01T08:26:28 Capture/Replay: Refactor default uniform handling for arrays Instead of walking through uniform locations, walk through the uniforms themselves and emit arrayed uniforms, which consume multiple locations. Test: MEC capture of Manhattan on Windows Bug: angleproject:3662 Change-Id: Ifd25528721982847d4f0938f469a914a1cb908c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175994 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 942796f6 2020-04-30T16:55:28 Capture/Replay: Use BindAttribLocation to force MEC compat. In some cases we'd end up with attributes that are optimized out by the GL driver. BindAttribLocation forces the programs to use the same attribute indexing numbers so that the command stream works mostly the same even if some attributes aren't active in the shader. Bug: angleproject:4598 Change-Id: I2d02dd38d29a1489706ae70bcc0b262b1c076942 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174266 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 57d95828 2020-04-30T17:35:50 Revert "Add type for attribute locations." This reverts commit 9349c14344b2d1fd6bc357063b602bc2626c140f and commit d43b057435e6c9e3194dd20627681ffca0c0808e. It's no longer needed after we bind attribute locations before link. Original CL message: This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ic510159d4d1982eff41560503cabf983a1be0381 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174076 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d43b0574 2020-04-30T14:17:21 Capture/Replay: Fix tool after parameter change. 'index' became 'indexPacked' for attribute locations. It also changed the type. Bug: angleproject:4598 Change-Id: I6393e09dd1d5c1a7c5d0e2ca8a67e4f7bbb05411 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174263 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9349c143 2020-04-29T16:36:17 Add type for attribute locations. This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 9cac3c58 2020-04-30T09:52:13 Capture/Replay: Disable default uniform updates for arrays We aren't properly handling them, were already firing UNIMPLEMENTED, but can't continue with the loop. Will follow up with real support. Test: MEC capture of Manhattan on Windows Bug: angleproject:3662 Change-Id: I7b77350b39971fda702eac8b19c6f29f36f78146 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171759 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Courtney Goeltzenleuchter b5992a55 2020-04-21T07:58:47 Add capture support for FenceSync This allows us to capture Angry Birds 2 traces. Bug: b/153652100 Change-Id: I99a47f9e41a84218b3bb3d9740df4bb7fc2a01fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2144763 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop cff64a83 2020-04-16T17:32:40 Capture/Replay: More mid-execution capture support Test: Temple Run MEC capture and replay Bug: b/152512564 Bug: angleproject:3662 Change-Id: I31be6e7ad9d290c2077f2f4d975c2d66779eb558 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2155490 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop edc7614c 2020-04-17T17:20:08 Capture/Replay: Handle default uniforms during MEC During mid-execution capture, when processing uniforms for a program, capture their values and repopulate during replay. Test: Temple Run MEC capture and replay Bug: b/152512564 Bug: angleproject:3662 Change-Id: If84711ead144b7c88710e6b12d0968e80e263c69 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2155489 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 8f48ba9f 2020-04-16T17:30:45 Capture/Replay: Use TexStorage for immutable images When we detect a texture is immutable, create it with TexStorage and populate with TexSubImage. Test: Temple Run MEC capture and replay Bug: b/152512564 Bug: angleproject:3662 Change-Id: I1948a0376d2634957329d1da35d60ded3608479a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2155488 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 461f9ab1 2020-03-30T12:41:34 Capture/Replay: Implement more GLES entry points Test: Temple Run capture and replay Bug: b:152512564 Bug: angleproject:3662 Change-Id: I4cb5d081e4f590d297dc4af6b49f5dc67584ecb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128329 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 84323449 2020-03-30T12:40:12 Capture/Replay: Track buffer contents by ID This CL updates how we restore buffer data after the client has unmapped it. We do this because we have no visibility into whether the buffer has been changed while mapped. Tracking a buffer map/unmap pairing by target as we have been is insufficient as apps can bind multiple buffers in succession before rebinding and unmapping selectively. To avoid this, we change our buffer data resource tracking to use the buffer ID instead of target. Also, since the app can map multiple buffers, we need to track the active buffer during MapBufferRange so we can use it during replay to restore from the appropriate handle. This is a deferred operation, so we store it as a new member of the ParamBuffer to preserve the information. Test: Temple Run capture and replay Bug: b:152512564 Bug: angleproject:3662 Change-Id: I1d3f594b496e5675e814b82acb4a238f845e26d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128328 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 1cc49bb2 2020-04-02T11:57:07 Squash State::mContext and State::mID. These were both id values for the context. This CL consolidates to the monotonically increasing ID since it is both safer and easier to debug. Makes life easier when indexing feedback loops by context ID. Bug: angleproject:4517 Change-Id: I28b40fed4e6e68ea72742f7defde5f8638f4cd47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2134408 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 06f4f3e1 2020-03-30T10:57:06 Capture/Replay: Disable binary formats when FrameCapture is enabled Rather than capture and replay a format that is not cross platform, limit the number of exposed binary formats to zero when FrameCapture is enabled. Test: Temple Run capture and replay Bug: b:152512564 Bug: angleproject:3662 Change-Id: I4a7bc5a353d2cdb1dceb1276a3c61bfbb74dc2f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128327 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten 7e0699a2 2020-02-05T17:04:06 Create the ProgramExecutable Class The ProgramExecutable class is being created to collect data structures that are common to both Programs and ProgramPipelines, as well as any shared functions. This allows callers to request the current ProgramExecutable from the State and make Program-/ProgramPipeline-specific queries without needing to know exactly which responded. This will also allow the necessary data structures to only be populated and stored within the ProgramExecutable when necessary and reused as often as necessary. Bug: angleproject:3570 Change-Id: I101f08ab03421894667b4a426a04d2147489f0e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2040512 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop f2bee304 2020-03-25T22:41:32 Capture/Replay: Implement more GLES entrypoints Tested with several apps that can't be captured otherwise. Bug: angleproject:3611 Change-Id: I2ad18c3bfcab48b0b385b2a868f57369c292b602 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998838 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop b69c4e14 2020-03-24T15:02:06 Capture/Replay: Update CaptureReplay sample for compression * Move DecompressBinaryData to a shared helper * Start using it in CaptureReplay sample * Error out if decompress callback isn't set correctly Test: AngryBirds and CandyCrush captures replay on desktop Test: angle_perftests --gtest_filter="*Trace*" Bug: angleproject:4484 Change-Id: I0432004fdb0cfb0fd61f9a66f792591c9aa40d9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118790 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 07467b4a 2020-03-20T10:40:56 Remove GL_CHROMIUM_path_rendering Bug: chromium:1063193 Bug: angleproject:4270 Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cody Northrop a4337121 2020-03-19T15:31:00 Perf: Limit TracePerfTest to single compressed TRex Update the TRex trace to: * Incorporate recent fixes for compressed textures * Incorporate support for compressing the trace * Simplify the tag on the trace (drop the end frame) Update TracePerfTest to: * Temporarily support only a single trace (TRex200). Test: angle_perftests --gtest_filter="*Trace*" Bug: angleproject:4484 Bug: angleproject:4488 Bug: angleproject:4496 Change-Id: Ice0c4ee9de3ad9ae4596305a93c51c6eac842123 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112629 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dadeffa3 2020-03-18T21:56:05 Capture/Replay: Fix stride in compressed texture caching. We were saving "width" bytes instead of "width * pixelSize". This was causing incorrect rendering in T-Rex and Manhattan. Bug: angleproject:4488 Change-Id: Ib5d38aaf813fb26905aedc155cc13b9d1597ec4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2109336 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 23d63fc3 2020-03-17T20:34:50 Capture/Replay: Fix MEC Query capture. In Manhattan the test generates a bunch of queries that it doesn't start until later frames. In ANGLE these queries will be stored as nullptr entries in the QueryMap. By default the QueryMap Iterator skips over nullptr entries. This manifested later as GL errors during replay. Fix this by adding a new Iterator type to ResourceMap that does not skip over nullptr values. Bug: angleproject:4489 Change-Id: If56b908fb233de0df0445f9ea19fc322f2c42976 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2107762 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>