D3D11: Update cached dynamically recompiled programs.
This change makes it so that when we need to recompile a program on a
draw call, we also update the cache. It also streamlines the internal
queries of the dynamic vertex and fragment shaders such that we only
update the input and output signatures a single time per draw. This
should also facilitate dirty bit implementations for the D3D11 back-
end.
BUG=angleproject:2116
Change-Id: Iccb0501b700bc894f40a8c68d7f297ff0c8f46bd
Reviewed-on: https://chromium-review.googlesource.com/531798
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/MemoryProgramCache.cpp b/src/libANGLE/MemoryProgramCache.cpp
index 1a93cd8..e34a18a 100644
--- a/src/libANGLE/MemoryProgramCache.cpp
+++ b/src/libANGLE/MemoryProgramCache.cpp
@@ -585,6 +585,13 @@
put(programHash, std::move(binaryProgram));
}
+void MemoryProgramCache::updateProgram(const Context *context, const Program *program)
+{
+ gl::ProgramHash programHash;
+ ComputeHash(context, program, &programHash);
+ putProgram(programHash, context, program);
+}
+
void MemoryProgramCache::putBinary(const ProgramHash &programHash,
const uint8_t *binary,
size_t length)