src/libANGLE/FrameCapture.cpp


Log

Author Commit Date CI Message
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>