Commit 4933d9d2 by Cody Northrop Committed by Commit Bot

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/+/2015818Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 3e691bb9
...@@ -180,6 +180,10 @@ using ProgramSources = gl::ShaderMap<std::string>; ...@@ -180,6 +180,10 @@ using ProgramSources = gl::ShaderMap<std::string>;
using ShaderSourceMap = std::map<gl::ShaderProgramID, std::string>; using ShaderSourceMap = std::map<gl::ShaderProgramID, std::string>;
using ProgramSourceMap = std::map<gl::ShaderProgramID, ProgramSources>; using ProgramSourceMap = std::map<gl::ShaderProgramID, ProgramSources>;
// Map from textureID to level and data
using TextureLevels = std::map<GLint, std::vector<uint8_t>>;
using TextureLevelDataMap = std::map<gl::TextureID, TextureLevels>;
class FrameCapture final : angle::NonCopyable class FrameCapture final : angle::NonCopyable
{ {
public: public:
...@@ -221,6 +225,10 @@ class FrameCapture final : angle::NonCopyable ...@@ -221,6 +225,10 @@ class FrameCapture final : angle::NonCopyable
// Cache most recently compiled and linked sources. // Cache most recently compiled and linked sources.
ShaderSourceMap mCachedShaderSources; ShaderSourceMap mCachedShaderSources;
ProgramSourceMap mCachedProgramSources; ProgramSourceMap mCachedProgramSources;
// Cache a shadow copy of texture level data
TextureLevels mCachedTextureLevels;
TextureLevelDataMap mCachedTextureLevelData;
}; };
template <typename CaptureFuncT, typename... ArgsT> template <typename CaptureFuncT, typename... ArgsT>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment