src/libANGLE/capture/FrameCapture.cpp


Log

Author Commit Date CI Message
Gert Wollny 4aedb71f 2021-08-11T17:00:41 Capture/Replay: Force count and length in CaptureShaderSource The problem ist that there is a mix on how the captured shader source is written out, in some cases one string is written, e.g. with the test ZeroShaderLength, and in others case an array if strings is written, a with MixedShaderLengths. Be constistent about it and capture the shader source always as one string and handle it like this, and override the count to be 1 to reflect this and set the length to {-1} to use the new accumulated shader strings automatically. Bug: angleproject:6268 Change-Id: Ide927db1a6e4facdbab4d35c023b9bce4b6c30d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3087448 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.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>
Lubosz Sarnecki 97c21277 2021-08-03T15:06:37 FrameCapture: Don't capture default drawbuffers state. When capturing framebuffers during mid-execution-capture the drawbuffers state is now compared with the default one and skipped when equal. This prevents capturing the unavailable glDrawBuffers call when using OES_framebuffer_object on GLES 1 contexts. Bug: angleproject:6181 Change-Id: Id2076223067dc5f89df88fe6a3a48b09fa9a3f5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3068957 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 595ce2b8 2021-08-03T15:06:14 FrameCapture: Use OES suffixes for framebuffer functions on ES1. Functions using the GL_OES_framebuffer_object extension on GLES 1.1 require the OES suffix or will otherwise crash on certain native OpenGL drivers. The framebuffer capture functions are stored in a struct. This patch makes replay of Sonic The Hedgehog possible on Pixel 4 XL native GL. Bug: angleproject:6181 Change-Id: I689267b024824818bfcf28e652b835e075208415 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3068956 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Tim Van Patten 06b19ed8 2021-08-06T17:02:36 Framecapture: Update file naming Update the file naming to add "shared" and remove the unnecessary frame numbering: angle.angledata.gz angle_capture_context1.cpp angle_capture_context1.h angle_capture_context1_files.txt angle_capture_context1_frame001.cpp angle_capture_shared.cpp angle_capture_shared.h Bug: angleproject:6256 Change-Id: I6454a3dc412896557f29faee1269dfa55146d43b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078908 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 3fd572c4 2021-08-04T12:45:09 FrameCapture: Fix setCaptureActive() and MEC timing Frame capture is currently off by one when calling setCaptureActive() and collecting the mid-execution capture state. The MEC state is collected at frame N, but setCaptureActive() isn't called until frame N+1, meaning all of the maybeCapturePreCallUpdates() and maybeCapturePostCallUpdates() calls are not tracking resources correctly for frame N. This CL fixes when setCaptureActive() is called relative to when setupSharedAndAuxReplay() is called, so the trace is active for the first frame and all of the resources are correctly tracked. Additionally, setCaptureActive() during the FrameCaptureShared() ctor if frame capture starts with the first frame. Bug: angleproject:6225 Change-Id: Id07e78b2da9c9d33779e20ab6a42f63cd103a6a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3071940 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Cody Northrop f9c287f0 2021-08-04T17:24:02 Capture/Replay: Fix reset for immutable textures Before this CL, we were including TexStorage in the calls to reset an immutable texture. This throws an error in GL, as you can only call TexStorage once on a texture. Example from ResetReplay(): glBindTexture(GL_TEXTURE_2D, gTextureMap[52]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9729); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, 6403); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); glTexStorage2D(GL_TEXTURE_2D, 1, GL_R8, 256, 512); // <== ERROR glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 256, 512, GL_RED, GL_UNSIGNED_BYTE, ...); To fix this, move TexStorage into the calls used to regen the texture rather than restore its contents. This means ResetReplay will only call TexStorage again if the texture was actually deleted. Example new regen sequence, if the texture had been deleted: const GLuint deleteTexturesPacked[] = { gTextureMap[52] }; glDeleteTextures(1, deleteTexturesPacked); glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer)); UpdateTextureID(52, 0); glBindTexture(GL_TEXTURE_2D, gTextureMap[52]); glTexStorage2D(GL_TEXTURE_2D, 1, GL_R8, 256, 512); Also rename texCalls to texSetupCalls to more easily distinguish from texGenCalls, now that they intermingle. Test: Final Fantasy MEC Bug: b/195607411 Bug: angleproject:6246 Change-Id: I37daaeb6ea4337969cb241a20256fec07dce514e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3073379 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 35bdaf8d 2021-08-03T08:12:26 Capture/Replay: Minor cleanups. Removes a duplicate assignment to the enabled variable. In the cpp it's set to true, and in the header it was false. Also updates a few variable names to be consistent with the group. Bug: angleproject:5133 Change-Id: I3fb00ecc474191bea7c3a650ce23805b6f02d667 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066007 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 5bbaa2c5 2021-08-02T15:50:11 Capture/Replay: Track arrayed uniform locations Arrayed uniform values consume multiple locations. Until now we've only tracked the starting location in our lookup table. This breaks down when applications update uniforms in the middle of an array. We don't have a location to provide. We need to start tracking a location per entry. To support this, pass in the uniform count to UpdateUniformLocation and track a location for each array entry. Do it with an overload to preserve functionality with existing traces. Test: PUBG Mobile MEC Bug: b/180418573 Bug: angleproject:6087 Bug: angleproject:6234 Change-Id: I74fbe201cb37273d1a5f361ef0c951e00ca89a88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3068199 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 262dc97c 2021-07-27T11:13:59 FrameCapture: Capture the EGL color space. Add a SurfaceParams struct containing extents and color space so a single map can be used for all draw surface parameters. Persist the color space in the trace's header. Bug: angleproject:5857 Change-Id: I327da8c8870f2d76d057954af57d977a10ebb59f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056371 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lubosz Sarnecki ef406f1b 2021-07-16T12:19:23 FrameCapture: Capture GLES1 matrix stack. Capture the modelview and projection matrix stack. This is required for GLES1 applications that do not reset the stack every frame. Bug: angleproject:6181 Change-Id: I71befc15ca287cf91fcebf9d972c7badaeb23605 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jamie Madill 3bd2273b 2021-07-16T12:33:11 Capture/Replay: Only perform call updates on valid calls. Bug: angleproject:5133 Change-Id: Ib1a6ae1ca9ff9717c4e51f8908f5a4ee132d72ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035443 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny d67cab22 2021-07-12T13:48:22 Capture/Replay: Handle missing context serialization Some ContextLost* tests do weird things with the context serialization which results in a mis-match of available context serializations. In this case check whether both serializations are missing, if so consider this to be an equal contexts states, otherwise, if only one serialization is available, report failure. While touching this code, also remove an unused parameter from the context serialization compare function. Disable tests that still fail with this change. Bug: angleproject:6157 Change-Id: Iee6cc7d65437112e38919cff59804e2b7f9467da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021061 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop b5630d5c 2021-07-19T20:39:02 Capture/Replay: Add textures to resource tracking This CL: - Shifts resource reset tracking to be stored in an array of structs indexed by type. This helps curb the complexity of adding more resource types. - Moves buffer and program tracking to the new layout. - Adds textures to the resource tracker, using new layout. Note that only aspects common to all ResourceIDTypes have been moved to the new layout. Unique pieces of data, like buffer mapping state and GLSync handling, remain in resource tracker alone. Since texture setup is quite involved, this CL takes the approach of having each call applied to two call chains at the same time; SetupReplay calls and ResetReplay calls. ResetReplay ends up with a sequence similar to buffers: ... const GLuint deleteTextures[] = { gTextureMap[1], gTextureMap[2], ... gTextureMap[n]}; glDeleteTextures(<count>, deleteTextures); ... glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer)); UpdateTextureID(1, 0); glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer)); UpdateTextureID(2, 0); glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer)); UpdateTextureID(3, 0); ... glBindTexture(GL_TEXTURE_2D, gTextureMap[1]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9729); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, 33071); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 33071); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 33071); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); glTexImage2D(GL_TEXTURE_2D, 0, 6406, 512, 512, 0, GL_ALPHA, GL_UNSIGNED_BYTE, reinterpret_cast<const GLubyte *>(&gBinaryData[183263280])); glBindTexture(GL_TEXTURE_2D, gTextureMap[2]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9987); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 6); glTexStorage2D(GL_TEXTURE_2D, 7, GL_COMPRESSED_SRGB8_ETC2, 64, 64); ... Test: PUBG Mobile MEC Bug: b/180418573 Bug: angleproject:6087 Change-Id: I9f8e151c12aec5b2b7af376b8e0ff644ff9c61c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016114 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 8a737c5d 2021-07-21T16:38:05 Capture/Replay: Update unpack state in Shared MEC The shared context state MEC performed by CaptureSharedContextMidExecutionSetup() needs to include updating the pixel unpack state before capturing texture contents. Otherwise, computeRowPitch() will compute the wrong value, leading to a crash in memcpy() when capturing Pokemon GO. Bug: angleproject:6203 Change-Id: Id1b2d0b4f3bc79e615778ba513f50aabaeb4a56e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3044356 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Vigil d2b659f9 2021-03-25T15:40:58 EGL: implement EGL_EXT_protected_content Context Add Validation check to Contexts and Surfaces Add Vulkan protected memory features and properties Add protected member to Surfaces and Contexts Implement hasProtectedContent in Vulkan Add QueueFamily helper, extent DeviceQueueMap Protected Swapchains always on for Android Add EGLProtectedContentTest Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: I9352b1e594f71bb4e89cee7137a468940d186b1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800413 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 1e75181f 2021-07-15T13:39:08 Capture/Replay: redesign capturing of arrays passed by pointer Instead of doing a lookup of the number of passes array when the call is written, store the number of array values in the ParamCapture when the call is captured. Bug: angleproject:6164 Change-Id: I87b0e2f776a6884b999cc50844e0777cda26b380 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3031543 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny 106ed74c 2021-07-12T20:55:33 Capture/Replay: Capture FenceNV parameters Enable according tests. Bug: angleproject:6163 Change-Id: I4435a650530006997ed3f14315461060729b836a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3024206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
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>
Gert Wollny 5fb5f63b 2021-06-29T09:56:43 Capture: Write captured context for empty frames When a frame is empty, still write the captured context for that frame because the index file will contain the frame file, and the replay will execute the according swapbuffer so that the replay will query the context serialization when testing trace correctness. With that enable RobustResourceInitTest.SurfaceInitializedAfterSwap/* for capture/replay. Bug: angleproject:5939 Change-Id: Ib280d55f739cc2bb8d2da0919e98c37a2cd576ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987991 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 4964513a 2021-06-28T20:07:46 ANGLETest: When on WebGL compatibility then use index buffers WebGL actually requires the use of index buffers, otherwise the call is invalid, therefore explicitely request index buffers in the according VertexAttributeOORTest tests. In addition, assert on the indices when the glDrawElements call is captured. With that we can enable VertexAttributeOORTest.* Bug: angleproject:6125 Change-Id: Id3855c78d4c5fcab5599f19dd74ce745d059fb1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999523 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny b3e920e2 2021-06-28T14:32:13 Capture/Replay: don't capture DrawElements with count zero Usually Context::noopDraw would reject calls that doen't draw, but FrameCapture::maybeCaptureDrawElementsClientData seems to be called before Context::noopDraw, and since in ComputeTypedIndexRange we would obtain the illegal range [0,0) (which is actually prohibited by an ssertion "count > 0"), we have to exit early. With that the test can be enabled. Bug: angleproject:6111 Change-Id: I4c242712bd90602f84ad6072b02c3a13a26840f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993089 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny dba2e136 2021-05-13T20:33:46 Capture/Replay: Emit InitializeReplay() late Only emit InitializeReplay() after all captured frames have been run, so that the readBufferSize and the maxClientArraySize are really sufficiently large for all frames. To achieve this a layer of indirection is added, that is because InitializeReplay() has to be called from SetupFrame() which is still emitted with the first frame, a new function InitReplay() is added. The call to this function is emitted with the first frame, buts its body is emitted after the last frame has been captured. Bug: angleproject:5965 Change-Id: Ic38791b4c02989594ec87d1ba3f031fd81471314 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940841 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop aec47ff6 2021-06-22T15:47:43 Capture/Replay: Update CopyImageSubData params The parameters to glCopyImageSubData are flexible and can take a TextureID or a RenderbufferID as a GLuint. Our replay needs to remap those values, so we'll convert the GLuint based on the target. This leads to a change like the following. Before: glCopyImageSubData(138, 0x0DE1, 0, 0, 0, 0, 642, 0x0DE1, 1, 0, 0, 0, 256, 256, 1); After: glCopyImageSubData(gTextureMap[138], 0x0DE1, 0, 0, 0, 0, gTextureMap[642], 0x0DE1, 1, 0, 0, 0, 256, 256, 1); Test: PUBG Mobile MEC Bug: angleproject:6087 Bug: angleproject:6104 Change-Id: I5cd422e41ffbb4f08c8909e520bdce63e3008c5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2981464 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Gert Wollny 8cf6d8cc 2021-06-28T10:00:54 Capture/Replay: Handle Gen/Delete Semaphores and fix map emit Add capturing of the handles used in GenSemaphores and DeleteSemaphore, fix the emission of the gSemaphoreMap. and enable capture/replay tests. Change-Id: Iabb88bd1d6c22c08271d0883607efb72de9d3d0c Bug: angleproject:6107 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2988679 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny c2449441 2021-06-24T13:06:08 Capture/Replay: Make sure EGLImageKHR is a parsable number For some reason on win-trace-rel the pointer value us written as a hex number but without the leading "0x", so the number gets interpreted as octal, and compilation fails. Fixes: cb4f8a79a4def3dd8fd9f941d6674939e1731860 Capture: Add a specialization for TGLeglImageOES Bug: angleproject:6036 Change-Id: I949ace542a0ad257b47fbe539893a56c1c32b0b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982551 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Gert Wollny c8677c73 2021-06-12T17:23:42 Capture: Add a specialization for const GLuint * Bug: angleproject:6058 Change-Id: I31cad1dd23d313aae625874e140c406747e0f4c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957953 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 22716d31 2021-06-11T13:51:41 Capture: Add specialization for ParamType::TGLubyte Also enable "CurrentColorTest.Set/*" tests. Bug: angleproject:6049 Change-Id: I65e62b6c0805687ad6744a12217e0c08bc97ca1a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954262 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 90f9ddd9 2021-06-10T14:35:13 Capture: Add support for capturing (Get)ClipPlanef equation In addition, correctly handle "const GLfloat *" when replaying, and enable the according capture/replay tests Bug: angleproject:6047 Change-Id: I5dd7510d1b621d4c941490c9d0261559a96dd681 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2951133 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 1b104dd9 2021-05-26T14:29:01 Finish switch to angle_version.h. Bug: b/168736059 Change-Id: I1232c8284f37aadb374840aca8f40e4569382c7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2920490 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny cb4f8a79 2021-06-08T10:39:47 Capture: Add a specialization for TGLeglImageOES When writing out the parameter TGLeglImageOES an additional cast is needed. Bug: angleproject:6036 Change-Id: I7470a58a6ae17b0185d0c2e3fe1184b698f3efaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2944952 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Jamie Madill 16b10a54 2021-05-21T15:35:00 Revert "Capture/Replay: Emit SetupReplay() late" This reverts commit 54ba6f0135715737a55f2dc4fc1cb86874fb98f9. Reason for revert: breaks MEC. Bug: angleproject:5999 Original change's description: > Capture/Replay: Emit SetupReplay() late > > Only emit SetupReplay() after all captured frames have been run, > so that InitializeReplay() is called with values of > readBufferSize and the maxClientArraySize that are sufficiently > large for all frames. > > Bug: angleproject:5965 > Bug: angleproject:5895 > Change-Id: Ic59597dc27f733fb210d7cc5a144a86e54cd2040 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2894486 > Commit-Queue: Gert Wollny <gert.wollny@collabora.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:5965 Bug: angleproject:5895 Change-Id: Ia901183b2052fa2b4552ad2e09818a2894fbdf6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911878 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 9ba86e06 2021-06-03T13:41:39 Revert "FrameCapture: Write the frame cpp file even if frame is empty" This reverts commit 6619c464e5f6237d7465ec945d24164372aa4196. Reason for revert: breaks MEC. Bug: angleproject:5999 Original change's description: > FrameCapture: Write the frame cpp file even if frame is empty > > The index file will add a reference to this file, and the replay will > also expect that the frame execution function and the context function > exist, so write the file even if the frame is empty > > Bug: angleproject:5939 > Change-Id: I265d061fdae51b86131d145116ad1c0f9ca8c93f > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2882581 > Commit-Queue: Gert Wollny <gert.wollny@collabora.com> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5939 Change-Id: I759d44ba847c69faf1caf97a9818836d1be3b058 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2937737 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop a29a64a6 2021-05-26T09:34:52 Capture/Replay: Skip GLGetActiveUniformsiv Test: Genshin Impact MEC Bug: b/181794064 Change-Id: Ib0edfa8d1c063d43c34a65be0144bc5efc4cf19b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2921067 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Gert Wollny 6619c464 2021-05-10T13:00:48 FrameCapture: Write the frame cpp file even if frame is empty The index file will add a reference to this file, and the replay will also expect that the frame execution function and the context function exist, so write the file even if the frame is empty Bug: angleproject:5939 Change-Id: I265d061fdae51b86131d145116ad1c0f9ca8c93f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2882581 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 54ba6f01 2021-05-13T20:33:46 Capture/Replay: Emit SetupReplay() late Only emit SetupReplay() after all captured frames have been run, so that InitializeReplay() is called with values of readBufferSize and the maxClientArraySize that are sufficiently large for all frames. Bug: angleproject:5965 Bug: angleproject:5895 Change-Id: Ic59597dc27f733fb210d7cc5a144a86e54cd2040 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2894486 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 421c665c 2021-05-13T21:17:16 Capture: Make writeCppReplayIndexFiles a method of FrameCapture This is useful to not pass a large amount of parameters around. Bug: angleproject:5965 Change-Id: I3890a0ca852729bbf74725fb9e5f4062e20e9158 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2894485 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop 40f11af8 2021-05-17T23:05:16 Capture/Replay: Ignore delete of non-genned buffers Instead of asserting that the app is calling glDeleteBuffers on buffers we've seen created, ignore buffer names that we haven't seen. This is allowed by the spec: Buffer objects are deleted by calling void DeleteBuffers(sizei n, const uint *buffers); Unused names in buffers are silently ignored, as is the value zero. Test: SAKURA School Simulator MEC Bug: b/188488065 Bug: angleproject:5987 Change-Id: Id4704e544f644dbe3edf6efdf70b5c3ef9ccaba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2902442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 4b071880 2021-05-13T16:20:05 Capture/Replay: Add const to string pointer Traces that have shader compiles in the middle of the run are reusing the string pointers on each go through. On some (multiple) platforms, the string pointer is no good on the second run through. This may only happen for large strings. Adding a const qualifier on the pointer itself, not just the string, avoids the issue. This has the effect of changing strings from this: const char *glShaderSource_string_0[] = { const char *glShaderSource_string_1[] = { to this: const char* const glShaderSource_string_0[] = { const char* const glShaderSource_string_1[] = { Test: Pokemon Go MEC Bug: b/188091629 Bug: angleproject:5968 Change-Id: Id6a05c955adb3e1c43d2723450be6b5278d99fba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2895328 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 83d22b66 2021-05-13T16:10:54 Capture/Replay: Skip glGetActiveUniform Apps are querying GL_ACTIVE_UNIFORMS and then walking through them all numerically, calling glGetActiveUniform on each one. Before this CL, our trace would also walk through them all, exactly as the app. But, the active uniform count can vary on different platforms depending on how aggressive the underlying compiler is. We have at least one that does cross stage optimizations eliminating more active uniforms than others. Rather than check each call against the actual number of active uniforms, we can just drop the calls to glGetActiveUniform. We don't actually use any of the results from the call. For example, this is what we generate before this CL: glGetActiveUniform(gShaderProgramMap[144], 31, 1024, reinterpret_cast<GLsizei *>(gReadBuffer), reinterpret_cast<GLint *>(gReadBuffer), reinterpret_cast<GLenum *>(gReadBuffer), glGetActiveUniform_name_30); This has the downside of moving away from reflecting what the app actually sent down. The alternatives are too intrusive though, and we want to stay as close to speed of light as we can. Test: Pokemon Go MEC Bug: b/188091629 Bug: angleproject:5968 Change-Id: I1263f2256c6a964dac54d9997a1c1c2dceac711b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2895327 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop 8ea11eb7 2021-05-13T15:54:41 Capture/Replay: Reset programs on loop Apps that create new programs during the run need to have them deleted on loop. This CL handles that. It does not handle programs that have been deleted and need to be recreated, or that have been modified otherwise. An assert has been included to catch that for future needs. With this CL, entries like this will show up in ResetReplay: ... glDeleteProgram(gShaderProgramMap[120]); glDeleteProgram(gShaderProgramMap[121]); ... Test: Pokemon Go MEC Bug: b/188091629 Bug: angleproject:5968 Change-Id: I78c425e8fe95792fc626484641d067613dfae971 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2895326 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 31cd0e98 2021-05-10T10:37:54 Capture/Replay: track robustResourceInit Bug: angleproject:5938 Change-Id: I7c9ab9bebd1ec2dc572a071844a860f99d0befe6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2882580 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 51d02ca0 2021-05-06T15:16:16 FrameCapture: Use gl*Separate functions only when required. Use non-separate stencil and blend functions that do not distinguish between front and back buffers or color and alpha, if they apply. This prevents capturing GLES2 functions on GLES1 contexts. Bug: angleproject:5893 Change-Id: I8303ee5b279268ea9c21e2c6465e1b155d1cc54d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877238 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki 4901ac64 2021-05-06T15:15:57 FrameCapture: Capture GLES1 specific states. Implement capturing GLES1 specific state by checking the difference to the default state using getEnableFeature. When getEnableFeature is called from a context version higher than 1 and a GLES1 state is requested, an assertion is hit. Therefore the context version needs to be determined before calling getEnableFeature. Use the available isTextureTargetEnabled function to determine GL_TEXTURE_2D and GL_TEXTURE_CUBE_MAP states in getEnableFeature. Return false in isTextureTargetEnabled when mTextUnitEnables is empty, so the vector is not accessed when not initialized, which was the case for a default state. Bug: angleproject:5893 Change-Id: I66ee41c3bf7a8e1f04a8a4ce0461fddc16f9a013 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877237 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki 83e5bb97 2021-05-06T15:15:42 FrameCapture: Don't capture shader functions on GLES1. Since an internal default shader is created and captured here in the GLES1 case, we need to check for the context version to skip capturing glUseProgram and emit an update call in GLES1 traces. Bug: angleproject:5893 Change-Id: Iac9bc05234fbc87c1f64264b5c12b9b117522bad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877236 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki 078ebbcf 2021-05-06T17:07:14 FrameCatpure: Move capturing default vertex attribs to function. Don't capture these on GLES1, due to the unavailability of glVertexAtrrib4fv. Bug: angleproject:5893 Change-Id: Iafbc9219cfc0a0c1d0a55e112ee88d7180ed94f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877235 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki e40edf92 2021-05-06T17:06:58 FrameCapture: Add GLES1 support to CaptureVertexArrayData. Implement CaptureVertexPointerES1 that captures specific GLES1 vertex pointer functions depending on the attribute index. Use GLES1 capture functions in CaptureVertexArrayData by detecting the current context version. Implement VertexArrayType function in GLES1Renderer to get a ClientVertexArrayType enum from a vertex attrib index. Bug: angleproject:5893 Change-Id: I442b2e29475ca817860388cafc120db90a0fb9c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2846838 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki 78fb9314 2021-04-29T18:05:12 FrameCapture: Capture GLES1 vertex buffer pointers. CaptureVertexPointerGLES1 was expecting only client-side vertex arrays and not checking whether a vertex buffer was bound. This patch fixes offsets in vertex buffers for GLES1, which can be seen in apps like Dr. Driving. The mClientVertexArrayMap index is now retrieved by entrypoint name, as the arrayClientPointerIndex is unset in the vertex buffer case. Bug: angleproject:5751 Change-Id: If40cae56bcdbed57885e83c49291cb000a884b0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2859826 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Gert Wollny 39cef942 2021-04-27T08:28:13 Capture/Replay: capture WebGL compatibility With that we can also enable the tests DifferentStencilMasksTest.* Bug: angleproject:5851 Change-Id: If2c992e456716f606320e3992f389823d0af050f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2853584 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 7444466c 2021-04-19T18:44:13 Reland "Capture/Replay: Reset GL Fence Sync objects" This is a reland of 9b4fd5456e3cc8c5412af96212d2840b422208b5 This fixes the original CL by moving where setCaptureActive() is called to allow the first replay source file to be written. Original change's description: > Capture/Replay: Reset GL Fence Sync objects > > Asphalt 9 uses GL Fence Sync objects during rendering, which results in > Fence Sync objects being created during setup and deleted while > replaying frames. When the replay is restarted, the Fence Sync objects > that were created during setup and deleted during the replay need to be > recreated during the reset phase. > > Bug: angleproject:5883 > Bug: angleproject:4599 > Change-Id: I118f2b7208c4d512ab646b10f52b3a0936895089 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2838237 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5883 Bug: angleproject:4599 Bug: angleproject:5900 Change-Id: I5e1d901d8875007691699b7b973f3fb7db027337 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2850758 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Jamie Madill 3839fa5b 2021-04-26T13:08:15 Revert "Capture/Replay: Reset GL Fence Sync objects" This reverts commit 9b4fd5456e3cc8c5412af96212d2840b422208b5. Reason for revert: Breaks capture: INFO:root:Passed: 0, Comparison Failed: 0, Crashed: 0, CompileFailed 0, Skipped: 745, Timeout: 0 Bug: angleproject:5900 Original change's description: > Capture/Replay: Reset GL Fence Sync objects > > Asphalt 9 uses GL Fence Sync objects during rendering, which results in > Fence Sync objects being created during setup and deleted while > replaying frames. When the replay is restarted, the Fence Sync objects > that were created during setup and deleted during the replay need to be > recreated during the reset phase. > > Bug: angleproject:5883 > Bug: angleproject:4599 > Change-Id: I118f2b7208c4d512ab646b10f52b3a0936895089 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2838237 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5883 Bug: angleproject:4599 Change-Id: I56c682e1d90dcdde7b18c941aad976825de3af42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2851057 Reviewed-by: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 9b4fd545 2021-04-19T18:44:13 Capture/Replay: Reset GL Fence Sync objects Asphalt 9 uses GL Fence Sync objects during rendering, which results in Fence Sync objects being created during setup and deleted while replaying frames. When the replay is restarted, the Fence Sync objects that were created during setup and deleted during the replay need to be recreated during the reset phase. Bug: angleproject:5883 Bug: angleproject:4599 Change-Id: I118f2b7208c4d512ab646b10f52b3a0936895089 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2838237 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 3e1af85a 2021-04-19T18:12:30 Capture/Replay: Handle bindGeneratesResource in trace meta data Bug: angleproject:5844 Change-Id: I0243cab70b5833efd83b0d75a1801f68025ee291 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2835889 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny c1da2794 2021-04-19T11:49:41 Capture/Replay: Handle ClientArraysEnabled in trace meta data Bug: angleproject:5848 Change-Id: Ieba325e2b5efa3242b24cafa8363e562c258546c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2835888 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten fbfecbe2 2021-04-07T11:26:13 Capture/Replay: Add PPO/glProgramUniform support Command and Conquer: Rivals requires additional frame capture API support: - Program Pipeline Objects - glProgramUniform* Bug: angleproject:5830 Change-Id: I159086f92d2dfead0a513cd17fadeda7df92f408 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809891 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Cody Northrop fdfb2b82 2021-04-09T15:42:12 Capture/Replay: Support non-binary GLboolean This CL contains two changes. One to how we print out GLboolean values, and another to how we capture GLbooleans. According to the spec, anything non-zero can be considered GL_TRUE when setting state: When the type of internal state is boolean, zero integer or floating-point values are converted to FALSE and non-zero values are converted to TRUE. Dota Underlords is using 0xFF for GL_TRUE. Before the change, this manifested as: // logcat glColorMask(context = 4, red = kUnknownGLenumString, green = kUnknownGLenumString, blue = kUnknownGLenumString, alpha = GL_FALSE) // trace glColorMask(GL_INVALID_ENUM, GL_INVALID_ENUM, GL_INVALID_ENUM, GL_FALSE); After: // logcat glColorMask(context = 4, red = 0x00FF, green = 0x00FF, blue = 0x00FF, alpha = GL_FALSE) // trace glColorMask(0xFF, 0xFF, 0xFF, GL_FALSE); Test: MEC for Dota Underlords Bug: b/185192780 Bug: angleproject:5857 Change-Id: Ie53aeba8d8a40f91ee375467b325d8e6be053a98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821947 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 4f723d2c 2021-04-09T15:42:36 Capture/Replay: Support glBufferStorageEXT Add the entrypoint, and when a buffer is immutable, recreate it with glBufferStorageEXT. Test: MEC for Dota Underlords Bug: b/185192780 Bug: angleproject:5857 Change-Id: I29b934bdff4185d19594e49e9387dd79c6031aa5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821945 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Gert Wollny fb3173b9 2021-04-13T15:05:44 FrameCapture: write the float values with high precision Because values might be the result of calculations that require some accuracy, writing the float values with the default formatting may not be sufficient to replay correctly, therefore format the values so that they carry more digits. In addition, enable the test that are now passing. Bug: angleproject:5846 Bug: angleproject:5847 Change-Id: I305552a1ffa3cded6326df59883912e14c95f5f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822257 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop d49f7351 2021-04-07T08:46:16 Capture/Replay: Ignore deletes of buffer 0 Per the spec for DeleteBuffers: > Unused names in buffers are silently ignored, as is the value zero. Haven't seen an app delete unknown buffers yet, but just hit one that deletes 0 a lot. Test: MEC for Disney Tsum Tsum Bug: b/184770989 Bug: angleproject:5835 Change-Id: I2070b753d89fdcf390203072cd7ec2c9f915089c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2811643 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lubosz Sarnecki fddbc9c7 2021-03-04T20:45:01 capture: Implement capturing GLES1 vertex pointers. Implement capturing glVertexPointer, glTexCoordPointer, glNormalPointer, glColorPointer and glPointSizePointerOES using a new CaptureVertexPointerGLES1 helper function. This is done by using fixed indices for gClientArrays that are retrieved from the GLES1Renderer. Bug: angleproject:5751 Change-Id: I6c774ff21942ea3422c4c77a615f88299901c0ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773288 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jamie Madill 78dde332 2021-03-29T17:31:52 Move restricted traces to CIPD. All traces are now stored as DEPS entries in CIPD. The auto-generation script generates the DEPS entries. Note that we don't include DEPS in the list of generated outputs to simplify other rollers. Also we update auto-generation to include full sources list to allow 'gn analyze' to work successfully. Usees a trace fixture for common code. This will enable a more compact trace without as much repeated code. We must land a set of re-trace traces to avoid breakage. Also includes a python script for uploading new traces to CIPD. The script first checks if traces are already present in the cloud, and if so it skips the upload. It will take a while to complete as the number of traces grows larger as it takes a few seconds per trace. The traces in this patch are also re-traced to use the common fixture code instead of including duplicated code in each trace. They now form a simple common interface and the autogenerated cpp is now simply a list of properties. I've also updated the capture/replay tests to use the simpler common entry point integration. There is less auto-generated glue code now. We now use a new serialized string query extension instead of calling directly into ANGLE's internals. Also includes a docs update. The capture/replay sample is broken and we'll need to update it in a follow-up CL. Also includes a few necessary fixes to the retracing script. Bug: angleproject:5811 Change-Id: I977bc6dc56843c8966377fc445ae97e91e17319a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797833 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 67e4aff5 2021-04-02T13:17:00 Fix rapidjson build error in Skia. Instead of using defines in the header, use the same approach as we do with frame capture by defining a stub "mock" cpp file. Bug: angleproject:5805 Change-Id: Ief1cb6497ddafc9656bb0e7d6a921eff3610a7fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2801695 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny cee0bfd6 2021-03-15T14:39:30 Capture/Replay: serialize context to JSON Bug: angleproject:5715 Change-Id: Ibc6897d7567fedab4a2ba7bf8d2bd5a7e496bd4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2760325 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny e0b9d4f7 2021-03-15T11:25:39 libAngle: Add Json context serializer library Bug: angleproject:5715 Change-Id: I42319fe30e42d49d7e817b14c211b5ba82a94a42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2760324 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop a70a6a9d 2021-03-09T10:38:13 Capture/Replay: Fix compressed cube textures We were only tracking one image per level of cube map textures. Instead, we need to track one per face (6). Test: MEC for Extreme Car Driving Simulator Bug: b/180419767 Bug: angleproject:5735 Change-Id: I59e6a5e83a60666a29f44d0a1e1993a1b461e8e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2744293 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki c11186c2 2021-03-02T14:42:08 capture_replay_tests: Fix MemoryObjectTest. Add gles_ext_params Capture functions for MemoryObjectsEXT. Add case for GLCreateMemoryObjectsEXT to MaybeCaptureUpdateResourceIDs. Don't skip MemoryObjectTest, as it passes now on SwiftShader ES2. Bug: angleproject:5703 Change-Id: I930fab675cf0848f46a846388955a6bd3274a587 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2729004 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop bdd1ac23 2021-02-25T16:31:25 Capture/Replay: Add CubeMapArray support Test: Recapture Lego Legacy: Heroes Unboxed Bug: angleproject:5685 Change-Id: I41a5ceb72724ab28ce3d57a85108d3dd806d976f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721103 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 7ff605a5 2021-02-23T21:45:40 Capture/Replay: Fix compressed texture level caching Before this commit, the following sequence would cause an assert: glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_ASTC_8x8, ...); glCompressedTexImage2D(GL_TEXTURE_2D, 1, GL_COMPRESSED_RGBA_ASTC_8x8, ...); This is due to code we added that clears the compressed texture cache when it detects we already have an entry for the texture level. This is allowed in GL, to respecify a texture level by simply calling glCompressedTexImage on it again. The problem is we would clear the entire texture from the cache, not just the level being respecified. Test: Recapture Asphalt 8 Bug: angleproject:5678 Change-Id: I473d6ea1cb8823bfec680ddd78c3457b93ecc431 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2716639 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 51c5137a 2021-01-05T16:58:50 Capture/Replay: Add texture buffer support Test: Fortnite MEC Bug: b/180418810 Bug: angleproject:5658 Change-Id: I2025f0b88f7488a827159029e6d04a4cf4e9a1b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611558 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 19e4cf86 2021-02-09T21:49:42 Capture/Replay: Some fixes for capturing WebGL Bug: angleproject:5635 Change-Id: I756471fbad34660c494fb7f9ba1144accd5c08b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686119 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
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>