src/libANGLE/capture_gles_2_0_params.cpp


Log

Author Commit Date CI Message
Cody Northrop 1844860f 2020-10-27T09:25:47 FrameCapture: Handle glReadPixels with pack buffer Test: Capture PUBG Mobile Bug: b/159238311 Bug: b/165824228 Change-Id: I3d76e0ccd641616ba971f15ed6ea280c4905fe18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2503473 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop b390d8b0 2020-09-30T16:28:46 Capture/Replay: Minor fixes for MEC Detected when recapturing Temple Run and Candy Crush. Each of these apps has updated recently. Test: angle_perftests --gtest_filter="*Trace*" Bug: angleproject:4845 Change-Id: Id0e8d362661d97d7b8e60b3afb0a3a989b6a6771 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Manh Nguyen 2e2fcfb5 2020-08-05T14:43:24 Implement param capture for glGetUniform calls and extensions Implement glGetUniform calls to fix crashes in UniformTest test group. Tests: UniformTest test group Bug: angleproject:4817 Change-Id: I132c61e053665b0642667aad51f1f3220d101d14 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339542 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop dd4723e3 2020-06-23T11:08:43 Capture/Replay: More ES 3.1 support This CL adds the following changes: * Support variable block sizes for ASTC * Support glMapBuffer * Additional param captures Test: Capture from beginning of Asphalt 8 and Aztec Ruins Bug: b/150484427 Bug: b/160808198 Change-Id: Ic1041011c3f51c32dbf7bf7105f41dffb9460b87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2264832 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Manh Nguyen 3688cb36 2020-06-28T15:28:10 Fix bugs in angle_end2end_tests and frame capture 1. CaptureGetShaderInfoLog_infoLog method should not require shader object to be compiled 2. glCompressedTexImage3D's parameter locations are off by 1 3. EGLContextSharingTest.DisplayShareGroupObjectSharing test should not delete buffers it has no access to since it will crash when running capture replay Bug: angleproject:4801 Change-Id: I0d407cdb44eb41eea4209eebab0996d3dd8ae5f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2272862 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Manh Nguyen 46594c96 2020-06-11T15:20:10 Fill in missing GL methods for TextureTest Bug: angleproject:4732 Change-Id: Ic475e29b6ca641029243712115d6a578a48c85f0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241624 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Manh Nguyen 66ec30a7 2020-06-03T10:45:34 Fix ExceedMaxVertexAtomicCounters test crash with FrameCapture The AtomicCounterBufferTest31.ExceedMaxVertexAtomicCounters crash is because when program linking fails, as it should for this test, the code tries to get the info log by calling glGetProgramInfoLog. The FrameCapture capturing this call currently tries to make sure that the program is linked. However, glGetProgramInfoLog does not require the program to be linked to execute. Bug: angleproject:4679 Change-Id: Ibbb87d6437152e9eb225e411100b1729e56e4c4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227857 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Manh Nguyen 550bc069 2020-06-03T18:24:17 Fill in missing GL methods for MemorySizeTest Implements captures of glGetRenderbufferParameteriv, glGetBufferParameteriv, and glgetAttachedShader. Fix FrameCapture and CaptureReplay sample so that it has single-frame capture and replay capabilities. Bug: angleproject:4681 Bug: angleproject:4682 Change-Id: I12c25a3857a88f2f40b3c3e8624da1379a950339 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229069 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
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 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 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>
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>
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 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>
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 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 ba65c156 2019-10-31T10:52:24 Capture/Replay: Implement GetFramebufferParameter capture. This is necessary for the T-Rex benchmark. Bug: angleproject:3611 Change-Id: I4573f8e86356272364baaccc678494707d2eebc0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1893571 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@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 0b8eca79 2019-09-10T10:39:40 Capture/Replay: Fix CaptureShaderSource_string. Was accessing a buffer out-of-bounds. Also wasn't handling negative length. Test: ASAN build Bug: angleproject:3611 Change-Id: I0f1cfa09d0488de20928d90e910803d98c225968 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1796082 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: 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 05114fe7 2019-08-09T15:45:56 Support in memory frame capture replay Enable FrameCapture to dispatch its calls back to Context and replay them. Bug: angleproject:3785 Change-Id: I580eff1fca3e39414a9b45bb296e0f3866ea33bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1747055 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 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 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>
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>
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>