summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2019-03-29 11:09:11 -0400
committerStan Iliev <stani@google.com>2019-03-29 11:18:21 -0400
commitbf99c4450b55a0bee268c382cba8c60796cd068b (patch)
treefc97273f387afc707c649bb9b60c46afb6c794d3 /libs/hwui/renderthread/RenderThread.cpp
parentdece92b28744012f6db87f5100b511cd459218a1 (diff)
Invalidate Skia shader cache if Vulkan driver has changed
Test: Ran apps several time and observed shader cache validation Change-Id: I7c2620b9a0eefcb7acedc86647ecf44805518b2f
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 6cce31943d03..369eee764a99 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -209,8 +209,8 @@ void RenderThread::requireVkContext() {
mVkManager->initialize();
GrContextOptions options;
initGrContextOptions(options);
- // TODO: get a string describing the SPIR-V compiler version and use it here
- cacheManager().configureContext(&options, nullptr, 0);
+ auto vkDriverVersion = mVkManager->getDriverVersion();
+ cacheManager().configureContext(&options, &vkDriverVersion, sizeof(vkDriverVersion));
sk_sp<GrContext> grContext = mVkManager->createContext(options);
LOG_ALWAYS_FATAL_IF(!grContext.get());
setGrContext(grContext);