Remove workaround for ANGLE + NVPR + Persistent Shader Cache
ANGLE no longer supports NVPR, so this isn't necessary. Change-Id: I68e720f17238c960e6f6ca07fe108f5fefed7705 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278467 Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
709e2408fe
commit
0b22f3bc53
@ -1539,9 +1539,6 @@ Result GPUPersistentCacheTestingSink::draw(const Src& src, SkBitmap* dst, SkWStr
|
||||
if (fCacheType == 2) {
|
||||
contextOptions.fShaderCacheStrategy = GrContextOptions::ShaderCacheStrategy::kBackendSource;
|
||||
}
|
||||
// anglebug.com/3619
|
||||
contextOptions.fGpuPathRenderers =
|
||||
contextOptions.fGpuPathRenderers & ~GpuPathRenderers::kStencilAndCover;
|
||||
|
||||
Result result = this->onDraw(src, dst, wStream, log, contextOptions);
|
||||
if (!result.isOk() || !dst) {
|
||||
@ -1578,10 +1575,6 @@ Result GPUPrecompileTestingSink::draw(const Src& src, SkBitmap* dst, SkWStream*
|
||||
GrContextOptions contextOptions = this->baseContextOptions();
|
||||
contextOptions.fPersistentCache = &memoryCache;
|
||||
contextOptions.fShaderCacheStrategy = GrContextOptions::ShaderCacheStrategy::kSkSL;
|
||||
// anglebug.com/3619 means that we don't cache shaders when we're using NVPR. That prevents
|
||||
// the precompile from working, so we'll trigger the assert at the end of this test.
|
||||
contextOptions.fGpuPathRenderers =
|
||||
contextOptions.fGpuPathRenderers & ~GpuPathRenderers::kStencilAndCover;
|
||||
|
||||
Result result = this->onDraw(src, dst, wStream, log, contextOptions);
|
||||
if (!result.isOk() || !dst) {
|
||||
@ -1599,9 +1592,6 @@ Result GPUPrecompileTestingSink::draw(const Src& src, SkBitmap* dst, SkWStream*
|
||||
// Ensure that the runtime cache is large enough to hold all of the shaders we pre-compile
|
||||
replayOptions.fRuntimeProgramCacheSize = memoryCache.numCacheMisses();
|
||||
replayOptions.fPersistentCache = &replayCache;
|
||||
// anglebug.com/3619
|
||||
replayOptions.fGpuPathRenderers =
|
||||
replayOptions.fGpuPathRenderers & ~GpuPathRenderers::kStencilAndCover;
|
||||
|
||||
SkBitmap reference;
|
||||
SkString refLog;
|
||||
|
@ -433,17 +433,11 @@ sk_sp<GrGLProgram> GrGLProgramBuilder::finalize(const GrGLPrecompiledProgram* pr
|
||||
|
||||
cleanup_shaders(fGpu, shadersToDelete);
|
||||
|
||||
// With ANGLE, we can't cache path-rendering programs. We use ProgramPathFragmentInputGen,
|
||||
// and ANGLE's deserialized program state doesn't restore enough state to handle that.
|
||||
// The native NVIDIA drivers do, but this is such an edge case that it's easier to just
|
||||
// black-list caching these programs in all cases. See: anglebug.com/3619
|
||||
//
|
||||
// We temporarily can't cache tessellation shaders while using back door GLSL.
|
||||
//
|
||||
// We also can't cache SkSL or GLSL if we were given a precompiled program, but there's not
|
||||
// much point in doing so.
|
||||
if (!cached && !primProc.isPathRendering() && !primProc.willUseTessellationShaders() &&
|
||||
!precompiledProgram) {
|
||||
if (!cached && !primProc.willUseTessellationShaders() && !precompiledProgram) {
|
||||
// FIXME: Remove the check for tessellation shaders in the above 'if' once the back door
|
||||
// GLSL mechanism is removed.
|
||||
(void)&GrPrimitiveProcessor::getTessControlShaderGLSL;
|
||||
|
Loading…
Reference in New Issue
Block a user