Ensures blob cache is always available, even if it is just a placeholder

Bug: dawn:549
Change-Id: I7efbaa58d93691648107fc6b94d76596a77f6516
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111140
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
Loko Kung
2022-11-23 08:55:57 +00:00
committed by Dawn LUCI CQ
parent 36e6b82df7
commit bf3fecfc4b
9 changed files with 18 additions and 37 deletions

View File

@@ -299,9 +299,7 @@ ResultOrError<GLuint> ShaderModule::CompileShader(const OpenGLFunctions& gl,
}
}
if (BlobCache* cache = GetDevice()->GetBlobCache()) {
cache->EnsureStored(compilationResult);
}
GetDevice()->GetBlobCache()->EnsureStored(compilationResult);
*needsPlaceholderSampler = compilationResult->needsPlaceholderSampler;
*combinedSamplers = std::move(compilationResult->combinedSamplerInfo);
return shader;