D3D: Asynchronously load program binaries.
Unpack as much of the binary steam as possible before passing the final loading
of the shader programs off to a worker thread. Reporting as many possible link
errors before becoming asynchronous means that linking should only fail due to
unexpected system issues at that point.
This also allows other backends to asynchronously load program binaries.
BUG=angleproject:2857
Change-Id: I587917a3e54522114dabd41d1b14fc491c8fd18a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1473451
Commit-Queue: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
index 3d45a4f..206bc20 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -221,12 +221,12 @@
}
}
-angle::Result ProgramVk::load(const gl::Context *context,
- gl::InfoLog &infoLog,
- gl::BinaryInputStream *stream)
+std::unique_ptr<rx::LinkEvent> ProgramVk::load(const gl::Context *context,
+ gl::BinaryInputStream *stream,
+ gl::InfoLog &infoLog)
{
UNIMPLEMENTED();
- return angle::Result::Stop;
+ return std::make_unique<LinkEventDone>(angle::Result::Stop);
}
void ProgramVk::save(const gl::Context *context, gl::BinaryOutputStream *stream)