src/libANGLE/FrameCapture.cpp


Log

Author Commit Date CI Message
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>
Jamie Madill e54f7ed7 2020-03-17T18:20:44 Capture/Replay: Fix compressed texture subImage caching. The prior code was caching the last subImage data. In fact we should be caching and updating a pixel rectangle. Multiple subImage calls will update the same rectangle until the final capture call sets up the replay with the complete initial data. This was causing an issue with Manhattan and the initial data for 3D compressed textures. Manhattan uploads these one layer at a time. So the prior code was trying to pass a single layer's data to the subImage call for the entire level. Bug: angleproject:4488 Change-Id: I76765dcea884f9d8ea07908c44e97578ddb0ff0d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2107761 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 7e453a25 2020-03-15T22:11:03 Capture/Replay: Use zlib to compress data files. Gives about a 2-3x reduced data file size. Should help reduce the time we spent transferring trace files on Android. This feature is implemented as a parameter to the capture/replay tool. This keeps backwards compatiblity if we ever need to integrate a cpp replay into an environment that doesn't have access to zlib for decompression. We'll need to update the traces to take advantage of the compression. Bug: angleproject:4484 Change-Id: Id7994efe3c0d529b85fa7e7f1b00444e630dd2cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2104555 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d24752e6 2020-03-15T21:34:10 Capture/Replay: Write to single binary data file. Previously the tool would save to a separate file for every frame and one additional file for the setup function. Frames without binary data would not get an "angledata" binary file. Using a single file has a few advantages: - makes it simpler to track the data dependencies in GN - should be easier to compress and decompress for speed up transfers - no need to wonder if we have frames with missing data files - less overhead reading from the HDD since the whole trace is buffered We might need to worry about extemely huge memory use cases. For now buffering the whole file into memory on startup is simple and fast. Also makes the binary data loader function more robust. Bug: angleproject:4484 Change-Id: Ia74fb0bc65200adf7a21c3143f98aa4da86457b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2104554 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 7c334c56 2020-03-15T17:37:15 Re-enable optimization for angle_perftests. This CL restricts the workaround to the trace perf tests. These trace tests are too big to optimize. Also includes a fix for a 32-bit Windows warnings. We'll need to update the build file to remove a suppression once the traces are updated. Bug: angleproject:3630 Change-Id: Id13a0050fc2a645aa572b8c9079908023b232f28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2103084 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cody Northrop c55fbc40 2020-03-01T16:23:05 Capture/Replay: Fill out more ES 3.0 state in mid-execution capture Test: Manhattan mid-execution capture working Bug: angleproject:3662 Bug: angleproject:4091 Change-Id: Id7f1a3f667229e4d5abedb3ada25d44db250605a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080592 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop e682bc57 2020-03-01T16:19:32 Capture/Replay: Add Sampler Object support to mid-execution capture Test: Manhattan mid-execution capture working Bug: angleproject:3662 Bug: angleproject:4091 Change-Id: Iafa528e2a25efe1c49eb49ecc429eac8f25c162c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080591 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 9459bae1 2020-03-01T16:17:41 Capture/Replay: Add Vertex Array Object support to mid-execution capture Test: Manhattan mid-execution capture working Bug: angleproject:3662 Bug: angleproject:4091 Change-Id: I5d16e8faed759507c85b6358b65750fe5c33ddfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2079190 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop f8ecac29 2020-03-01T16:16:18 Capture/Replay: Add TransformFeedback Object support to mid-execution capture Test: Manhattan mid-execution capture working Bug: angleproject:3662 Bug: angleproject:4091 Change-Id: Ibaa708085c5707a4ece637186daeafe6c681068f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2070901 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 54bd0005 2020-03-01T16:13:23 Capture/Replay: Add Query Object support to mid-execution capture Test: Manhattan mid-execution capture working Bug: angleproject:3662 Bug: angleproject:4091 Change-Id: I3e0d0fb1692b1fda08fd057d528f70aa5e50ef1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2070900 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 94d399ca 2020-02-28T08:18:37 Trace/Replay: Add framebuffer change callback. The perf tests can use this callback to instrument timer queries to delineate render pass times on the device. The new call pattern in the replay looks like this: glBindFramebuffer(GL_FRAMEBUFFER, gFramebufferMap[1]); OnFramebufferChange(GL_FRAMEBUFFER_OES, gFramebufferMap[1]); Bug: angleproject:4433 Change-Id: Ice5150741d1d5becb26d60020e8c00e3a2fb6218 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2074337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 14a2983f 2020-02-20T17:14:02 Trace/Replay: Add uniform locations map. This portability feature allows a single T-Rex capture done on Vulkan to work seamlessly on the ANGLE GL back-end and the WGL-loaded NVIDIA OpenGL driver. Previously the uniform locations would not be consistent between ANGLE and a native driver. And incompatiblities would trigger error messages between ANGLE back-ends. Will allow us to compare ANGLE performance vs the native driver using a capture. Example captured calls: glLinkProgram(gShaderProgramMap[3]); UpdateUniformLocation(gShaderProgramMap[3], "s_texture", 0); Bug: angleproject:4411 Change-Id: I5ddc76d75e15a9291b351e2aab94af4881f6ef47 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068121 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 263232ef 2020-02-23T15:02:16 Trace/Replay: Pass CallCapture to parameter replay writer. This will allow more advanced processing when writing the cpp replay for a specific parmeter. For the uniform locations map it'll allow us to look up the specified program from the call parameters. Bug: angleproject:4411 Change-Id: I4e91b3e4c6775c42140d00b2d155344b553a7404 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067629 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a18f4145 2020-02-19T22:42:12 Trace/Replay: Add uniform location type. This is a large refactor that replaces instances of "GLint location" for uniform locations with "UniformLocation location". This boxed type is similar to the ResourceID types that we use to capture resource IDs more easily. Eventually this will give us a more portable replay. Bug: angleproject:4411 Change-Id: I848e861c3956d95b6b953f57f8b6a2c4a676766f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066117 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop b8ca4309 2020-02-20T08:27:33 CaptureReplay: Emit unused resources In the final frame of Manhattan, resources are cleaned up, even if they are non-existent. This is allowed by the GLES spec. Compilation of the replay would fail, for instance: error: use of undeclared identifier 'gRenderbufferMap'; did you mean 'gFramebufferMap'? const GLuint glDeleteRenderbuffers_renderbuffersPacked_0[] = { gRenderbufferMap[0] }; ^~~~~~~~~~~~~~~~ This is because we are only declaring resources if they are used. Instead, go ahead and emit the resources, then circle back when filtering is implemented, allow that to optimize the replay. Bug: angleproject:4091 Bug: angleproject:4223 Change-Id: Ib48da0d9c3f4f2eca268646e7717a12126b1d85c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066455 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 94c19142 2020-02-12T19:50:38 Capture/Replay: Track and restore mapped buffer data When a buffer is mapped writable by the host, we need to track its final contents, and then restore them during replay. This implementation just blindly captures the whole mapped range if writable, and can be optimized in the future. This change renders the moving billboards in Manhattan correctly. Test: First 500 frames of Manhattan and TRex Bug: angleproject:4091 Change-Id: I5f7775235f569efb264bde679fd3045d7012c622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2053512 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Cody Northrop 9d86f331 2020-02-04T18:27:20 Capture/Replay: Avoid null pointer dereference in MEC Small fix to progress Manhattan MEC. Bug: angleproject:4091 Test: Working through Manhattan frames 5-10, TRex still works Change-Id: I7981e19a64f121b2ecca4451574ca2886641c6ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039532 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop fc1e8503 2020-02-05T10:59:27 Capture/Replay: Initial support for framebuffer textures Bug: angleproject:3662 Test: Working through Manhattan frames 5-10, TRex still works Change-Id: I3d9b4dced4c1667382154fb68839d01ba2db9b98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039531 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 0d224cce 2020-02-05T11:00:59 Capture/Replay: Add 2DArray and 3D texture support for MEC This also includes support for compressed formats, which required a small refactor to streamline the code, since all of the entrypoints have slightly different parameter lists for imageSize and data. Bug: angleproject:3662 Test: Working through Manhattan frames 5-10, TRex still works Change-Id: I007ad9366934fff773f367ecb6387bc8b0d13aa0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039530 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 4933d9d2 2020-01-16T13:16:45 Capture/Replay: Track compressed texture data Rather than try to read back compressed data using ANGLE_get_image (which does not yet support compressed formats), track a shadow copy of the compressed image and store it like client data. Test: Mid-execution capture and replay of TRex frames using ETC1 Bug: angleproject:4036 Change-Id: Id15be60f7444cc2e1356e76ff18069c42e552663 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2015818 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop e580ca8b 2020-01-29T16:21:05 Capture/Replay: Implement Manhattan ES 3.0 support Populate the entrypoints required to get gfxBench Manhattan scene to capture and replay correctly from the beginning of the trace. Test: Captured and replayed Manhattan frames 0-500 on both Windows and Linux (Nvidia GPUs) Bug: angleproject:4091 Change-Id: I5447a6835e55e944772d37219f2bd414606f0a70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029216 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jeff Vigil 564eb6f2 2019-11-22T16:46:02 Implement EGL_IMG_context_priority Change RendererVk to have 3 VkQueues instead of one. Each queue has a priority. To match extension: Low, Med, High. gl::Context contains priority. ContextVk contains a reference to one of the queues. Every call to vulkan that uses queue, uses the associated context queue. Bug: angleproject:3962 Change-Id: Ibd913a07a81c77bd975921d6dbae6a222842e88b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1978154 Commit-Queue: Jeff Vigil <j.vigil@samsung.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 1d77542f 2019-12-03T15:54:41 Add flag to label captures Add an optional parameter (ANGLE_CAPTURE_LABEL) to ANGLE frame capture that tags files and functions uniquely, allowing multiple frame captures to be replayed by a test harness. Example: ANGLE_CAPTURE_LABEL=foo Results in filenames like this: foo_capture_context1.cpp foo_capture_context1.h foo_capture_context1_files.txt foo_capture_context1_frame000.angledata foo_capture_context1_frame000.cpp foo_capture_context1_frame001.angledata foo_capture_context1_frame001.cpp ... Functions wrapped in namespaces like this: namespace foo { void ReplayContext1Frame0(); void ReplayContext1Frame1(); } For use like this: foo::SetupContext1Replay(); for (...) { foo::ReplayContext1Frame(i); } Bug: angleproject:3630 Change-Id: Ibe27dc4d40a36606ee40678a9e4d43b5a4baf976 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1949603 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 6430e5e0 2019-11-20T19:56:10 Enable frame capture on Android This CL gets capture/replay working on Android again. * Updates where Android frame captures are written * Uses debug system properties to prime Android environment variables * Adds a configurable target Context to the capture_replay sample * Updates capture/replay documentation for Android Bug: angleproject:4036 Test: Captured TRex on Android, replayed on Linux Change-Id: I94b4f6dc77468cd179b9d884b4dcd4afa56bd28c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1928056 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill 5c0e6e52 2019-11-08T17:05:38 Capture/Replay: Implement more state for mid-execution replay. Includes much more state serialization. Notably Vertex Arrays were missing as well as multiple GL render states. Also fixes many serialization bugs. For example, we would not be using the correct client array and pack/unpack state in the mid-execution capture. Also depth/stencil attachments were missing from the capture. Also fixes the replay sample to work with non-zero starting frames. With these fixes we can run mid-execution replay of the T-Rex demo. Bug: angleproject:3611 Change-Id: I6945eb9b30a5137be996956b43f074a0a750b333 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1895112 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 653ee5f1 2019-11-07T09:14:22 Capture/Replay: Introduce capture index file. This index file lets us very easily write a generic capture sample. Previously the dev had to maintain a list of multiple sources files. Potentially hundreds. By writing the source file list to an index file we can load this easily in GN as a variable and plug that into the sources. Also updates docs. Bug: angleproject:3611 Change-Id: I69ba961e271d6d13d06ae01c89a0605a6fd725ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1902189 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill e167f76b 2019-11-06T16:51:55 Capture/Replay: Pass gl::State to capture functions. This replaces passing gl::Context. Using a gl::State directly will more easily let the mid-execution replay code pass a mocked gl::State instead of having to modify the real underlying Context state. For example when capturing pixel pack and unpack parameters the states could not be overridden without changing the gl::Context itself. Similarly when capturing client side data. Also moves a query parameter info function into queryutils so it can be accessible to the State-based capture. Refactoring change only. Bug: angleproject:3611 Change-Id: I3c064001cfa83ebbb67a2b8fc8b6180491edd215 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1899728 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6c7208f9 2019-10-31T14:33:27 Capture/Replay: Implement mid-execution replay. Mid-execution replay starts the replay from a specific start frame instead of frame 0. Integration tests will then run between the start and end frames. This lets us make much smaller reproduction cases from large benchmarks or applications. We implement mid-execution replay via a cpp "Setup" function. The replay test will run the setup function before the starting frame. Test execution proceeds normally after setup. Currently we do not implement mid-execution capture. We run capture on all frames. Including frames before the start frame. We do this to intercept compiled shaders and programs for easier caching. This could be changed in the future to also start capture mid-execution. Mid- execution capture might require using ProgramBinary calls to capture shader and program data. Many captures are unimplemented. Several comments indicate missing functionality. There's a lot we can add as we explore replaying more complex applications and higher GL versions. We will also need some kind of state reset functionality so we can run the replay in a loop. Bug: angleproject:3611 Change-Id: I51841fc1a64e3622c34e49c85ed8919a9a7c0b20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1689329 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill b68a279c 2019-10-31T17:47:59 Capture/Replay: Capture GetFloatv params. Was used in the mip map ANGLE sample. Add a new helper function that we can use for multiple captures. Bug: angleproject:3611 Change-Id: I430ce0089df4ce81ba2ca2ad64c0c206b59397b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894144 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill e9603921 2019-10-31T14:33:26 Capture/Replay: Correct a few GLenum replay issues. This change refactors the GLenum utils into a non-autogenerated and an autogenerated portion. That makes it easier to modify the non-auto- generated bits to properly output GLenums even when the gl.xml data isn't totally correct. For instance, the "GetPName" group was missing a bunch of queries. Instead of trying to fix the GL we can simply fall back to querying the "Default" group when we return invalid enum. Also corrects a missing "0x" on hex output. Also allows the capture/replay sample to specify the correct binary data directory when testing a replay. Bug: angleproject:3611 Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 02c89327 2019-10-25T12:04:36 Capture/Replay: Fix capture build on Android. A compile error slipped in due to lack of test coverage. Bug: angleproject:3611 Change-Id: Id34ce239f3913efb0ed1abab77321981419cab44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1880160 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f251995d 2019-10-24T12:42:36 Capture/Replay: Write capture index file. This file will be used with multi-frame captures to share common code. Common code is global state, resource maps, and a list of frame replay functions. This should make converting a CPP replay into a functional test quite a bit simpler. The replay files will now be something like: angle_capture_context1.cpp angle_capture_context1.h angle_capture_context1_frame000.cpp angle_capture_context1_frame001.cpp ... etc Also adds a template for adding a capture/replay sample. Instructions are located in samples/BUILD.gn and docs in doc/CaptureAndReplay.md. Bug: angleproject:3611 Change-Id: I437b338fd84689d670a7d9e3e219d9334de25fd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869543 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill a2e66a5e 2019-10-24T12:42:36 Capture/Replay: Introduce environment options and docs. Introduces a few ways of controlling capture via: * `ANGLE_CAPTURE_ENABLED`: Can be set to "0" to disable capture entirely. * `ANGLE_CAPTURE_OUT_DIR`: Can specify an alternate directory than the CWD. * `ANGLE_CAPTURE_FRAME_END`: This variable can override the default of 10 frame to capture. Also adds a simple usage guide document. Bug: angleproject:3611 Change-Id: I49d32d5bae2c490dcbeb0f1ce3c6038e433adfaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869542 Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 34148207 2019-09-16T11:30:39 Capture/Replay: Encapsulate cpp replay. This moves the cpp replay logic out of the FrameCapture class into pure c helper functions. This is a bit cleaner and could help us eventually move to writing out the cpp replay on a worker thread. Bug: angleproject:3611 Change-Id: I6a96c1ef1595a6203d44c1d4d9d793205701dd24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804879 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jamie Madill 2249fef2 2019-09-16T11:19:23 Capture/Replay: Move stub implementation to new file. This lets the MSVC parser work better with FrameCapture.cpp. Bug: angleproject:3611 Change-Id: I249106dce81a7965684caf1a835f0472b34e8963 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804878 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 01dfe404 2019-09-04T12:08:25 Capture/Replay: Use resource ID maps in cpp replay. Introduces a new enum for resource ID types. This is used in auto- generated code to convert ParamType to resource ID map types. Also implements a lot of new parameter captures for gen/delete calls. Bug: angleproject:3611 Change-Id: I26cca1df88d1783d9830c89438c99f7593a70ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784059 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 2e16f639 2019-09-16T18:37:00 Capture/Replay: Refactor cpp replay param writes. This makes a few more methods use static helpers. Introduces a DataCounters helper class that can manage tracking the names for particular local data members in the cpp replay. Prepares for a larger refactor to support resource ID maps. Bug: angleproject:3611 Change-Id: I25b4cc80cc3aa140c1cd15d9012c9542ba0cfc87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1802743 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu d0e56cc6 2019-08-27T09:35:30 Add fallback to write GLenum as hex in capture 1. Add extension 'GL_ANGLE_program_binary' to registry_xml.py, this extension brings enum 'GL_PROGRAM_BINARY_ANGLE' which ANGLE already supports. 2. Add a fallback for converting GLenum and GLbitfield to string, for any GLenum value not found in the conversion table, write out its hex value instead of 'EnumUnknown'. It prevents GLenum from some unregistered extensions breaking the frame capture. Bug: angleproject:3804 Change-Id: I36a676305fbbcff2173bbc9f818ff589abe51434 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775028 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu c3f7873b 2019-08-30T15:00:52 Use TransformFeedbackID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ib8fbec89f28645790df98a184f47303f4a8d64c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779343 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu feb8507f 2019-09-03T13:22:04 Use VertexArrayID in place of GLuint handle Bug: angleproject:3804 Change-Id: I0454533eff13218a6aa1e1672ffcd0e76aedb399 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769716 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 9deb3bfa 2019-08-23T15:57:50 Use MemoryObjectID in place of GLuint handle Bug: angleproject:3804 Change-Id: I7ca86089fe1e72c136c0fc1947ad43cecee122eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769544 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu f0640bc3 2019-08-23T10:26:25 Use SemaphoreID in place of GLuint handle Bug: angleproject:3804 Change-Id: Iabaae60ed7cbbe423bf768c506099d26cf0dedcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1768978 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 2c5d48a6 2019-08-23T09:28:35 Use FramebufferID in place of GLuint handle Bug: angleproject:3804 Change-Id: I5e1b5f1903b05a91468379e00ec130802315cdc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769039 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 120b61d3 2019-08-21T12:51:58 Use ShaderProgramID in place of GLuint handles Bug: angleproject:3804 Change-Id: I5dc640004c2cc054c53261e8e939b6a9f5fc23bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762363 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu c43852aa 2019-08-27T13:38:29 Various fixes for frame capture 1. Use contextId as identifier to separate captures for different GL context. 2. Fix write string params. In order to keep consistent between replay and capture, changes have been made to store C style string (with '\0' suffix) for string param capture, which breaks cpp frame capture. This change fixes it. 3. On Android device, it use a custom path to save captures and it breaks the loadBinaryData(). Here differentiate file name and file path to fix it. Bug: angleproject:3804 Change-Id: I378cf26697d15f0c1a8cf7afea2b758f5c58498b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1774469 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiacheng Lu 378c1881 2019-08-22T16:55:39 Use ProgramPipelineID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ice37a4b3d43008e5bcd5d0a7528514d5bb504066 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767322 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 7b5744f4 2019-08-22T16:26:35 Use PathID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ibadfc2c33e4af1cca22caa1dbe96ac48a4a85ffa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1766822 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 814a0a1b 2019-08-22T11:50:43 Use QueryID in place of GLuint handle Bug: angleproject:3804 Change-Id: I921bbe7f67c025ab2b624fe14530c04ac17346f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765889 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 05114fe7 2019-08-09T15:45:56 Support in memory frame capture replay Enable FrameCapture to dispatch its calls back to Context and replay them. Bug: angleproject:3785 Change-Id: I580eff1fca3e39414a9b45bb296e0f3866ea33bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1747055 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 962503e7 2019-08-21T13:18:30 Use FenceNVID in place of GLuint handles Bug: angleproject:3804 Change-Id: I29c16e17c3a426efbbf0b60670581962ee505f3e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1764298 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu ee79e2ff 2019-08-20T11:28:36 Use SamplerID in place of GLuint handles Update all Sampler handles to type SamplerID, preparing for midframe capture of sampler. Bug: angleproject:3804 Change-Id: I9337919f97d61e28718987612d642c569b90246a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761780 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 617f23d1 2019-08-12T10:11:53 Fix frame capture build for Android Bug: angleproject:3611 Change-Id: I65018823a8d7223de0f63ea5bd6a573f62f1c24b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1748884 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 609d45f6 2019-08-14T15:16:49 Capture/Replay: Use Renderbuffer ID map. This should give a more robust replay. Devices are not guaranteed to return IDs in the same order in each instance of a program. Also for mid-execution capture we often won't have the same resources available. Once the Renderbuffer implementation lands we can switch to using more resource maps for different types of resources. Bug: angleproject:3611 Change-Id: I84a5b84856be3e8eb13e424e1990a39553adb82e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1719066 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill be74c47d 2019-08-13T13:54:15 Capture/Replay: Also capture on postSubBuffer. Necessary to capture from Chrome. Bug: angleproject:3611 Change-Id: Ia9330e0c273e65adaa4171020d0aebb05e100260 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752013 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 3ea90d60 2019-07-26T15:20:53 Fix compile error on capture with client array 1. The current implementation misused the offset in gBinaryData as the memcpy size. This CL fixed it by adding the byte size into the UpdateClientArrayPointer call. 2. Trying passing a pointer to a C-style array parameter which causes compiling error. This CL fixed by simply use const void * to do memcpy. 3. Able to run frame capture successfully for the first 100 frames of glmark2. Bug: angleproject:3611 Change-Id: Ibaef224c2a2d124b681757d9ecd187a5f9b7079b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721207 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Darpinian 7e48c9eb 2019-08-06T17:17:19 Add explicit integer casts WebKit uses the -Wshorten-64-to-32 flag which warns on these cases. Bug: 3439 Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill 2ab08edc 2019-08-12T16:20:21 Use TextureID in place of GLuint handles. Bug: angleproject:3611 Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3b3fe837 2019-08-06T17:44:12 Use BufferID in place of GLuint handles. Introduces enable_if handling for "FromGL". Avoids the use of any macro code to handle resource id casting. Bug: angleproject:3611 Change-Id: I1a6d10c3c9cc6ba0dc072bad1d62c33551f05d87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736127 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 7c7dec01 2019-08-06T17:44:11 Use RenderbufferID in place of GLuint handles. This will allow frame capture/replay to more easily emulate object handle manipulation. It also provides a bit of type safety. Also generalizes ResourceMap to handle non-GLuint IDs. Bug: angleproject:3611 Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiacheng Lu f3dbf0a7 2019-07-29T11:31:20 FrameCapture dump GLenum to enum instead of value Add functionality to capture GLenum and GLbitfield parameters as enum names instead of values. Bug: angleproject:3611 Change-Id: I7ddc21093d44d1480b205563f30d89f82779b1f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724460 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b8c0dc04 2019-07-30T17:22:23 Capture/Replay: Capture entry point enum when possible. This should save on a few string comparisons. This CL also adds a helper function that converts from an entry point enum ID to a string entry point name. Bug: angleproject:3611 Change-Id: I47434235ca25203ef1d6814897d81afab444a7fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1719065 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill af69179c 2019-07-30T17:22:22 Capture/Replay: Capture return values. This will allow us to record resource IDs as they are created and bound to OpenGL. This in turn will enable implementing mid-execution capture. Bug: angleproject:3611 Change-Id: I9f12eb0025d90ad86327cf5181efd831662c2e3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706562 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill eb1b1646 2019-07-30T17:22:17 Capture/Replay: Fix capture-enabled libs build. Adds a build option to use the capture libraries in the default output location for libGLESv2. With |angle_with_capture_by_default| enabled, libGLESv2 will have capture enabled and the non-capture libGLESv2 is built as libGLESv2_no_capture. Also moves the FrameCapture to be owned by gl::Context. Rearranges the code a bit so that we don't require a separate version of libANGLE for capture. Also implements a read pixels entry point parameter. Bug: angleproject:3611 Change-Id: Ic528e43e4779f794c8b6d0bf35410166dacc81b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1719064 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 3e9bc2a7 2019-07-26T10:23:32 Fix param name of glDrawArrays capture Bug: angleproject:3611 Change-Id: Idba4d49d36274db8545f2526f19f045f97031379 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721173 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Clemen Deng 523dbf40 2019-07-15T10:56:26 Add GL versions to desktop implementation The current implementation generates entry points for GL up to version 3.1. Will need to support later versions for some apps. Bug: angleproject:3698 Change-Id: Ic44d07b12a9eeeceb8cd98dd9c44652dca728dc0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700572 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3bd10b19 2019-07-08T13:23:37 Capture/Replay: Return CallCapture from capture funcs. This moves more shared code into a simple templated helper function. It will also allow us to call the parameter capture methods more easily for mid-execution capture. Refactoring change only. Bug: angleproject:3611 Change-Id: I8d95a6230922dfa0403ba5c328df78735c765519 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688508 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 612b7417 2019-07-05T11:13:30 Capture/Replay: Add frame capture to cpp files. Capture is implemented mostly via code auto-generation. The capture requires a bit of custom logic for each captured pointer parameter. We handle this by using auto-generation to lay out the base template for each GL call and then custom logic that uses ANGLE's internals to know how much data to capture at which point. Client array pointers are captured before each draw call. Currently only GLES capture is supported. We write out cpp files and an optional data file accompanying each cpp. For small data chunks we inline them in the cpp files. For bigger chunks like texture data we pack them into the data file. Mid-execution capture is not yet supported. Configuring the capture is currently only available by modifying the cpp sources. Both of these features will be implemented in the future. Bug: angleproject:3611 Change-Id: If6d5dac2f7bf363129d42ea9198162aef0d3a4ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1671904 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>