diff options
author | 2018-07-25 12:37:14 -0400 | |
---|---|---|
committer | 2018-07-25 17:13:16 +0000 | |
commit | ba5c439809fb2be3b1db159b29aeffaa39f786df (patch) | |
tree | 1020b8b095c1ef7e366bbdc4b6195735b60ef97e /src/gpu/effects | |
parent | 73d7ffca4e12b4f227ebed447c84564285d36548 (diff) |
Fix GPU explicit resource allocation bug
The explicit resource allocator assumes that it has complete control
over the resources it hands out thus, they can have no pre-existing
pending IO.
Change-Id: I59d8d079d8b8514688c458a54424329b86922cb6
Reviewed-on: https://skia-review.googlesource.com/143300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrYUVtoRGBEffect.cpp | 13 | ||||
-rw-r--r-- | src/gpu/effects/GrYUVtoRGBEffect.fp | 14 | ||||
-rw-r--r-- | src/gpu/effects/GrYUVtoRGBEffect.h | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp index 55e7902739..905445e852 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.cpp +++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp @@ -60,6 +60,19 @@ std::unique_ptr<GrFragmentProcessor> GrYUVtoRGBEffect::Make(sk_sp<GrTextureProxy std::move(yProxy), yTransform, std::move(uProxy), uTransform, std::move(vProxy), vTransform, mat, nv12, GrSamplerState(GrSamplerState::WrapMode::kClamp, uvFilterMode))); } + +SkString GrYUVtoRGBEffect::dumpInfo() const { + SkString str; + str.appendf("Y: %d %d U: %d %d V: %d %d\n", + fYSampler.proxy()->uniqueID().asUInt(), + fYSampler.proxy()->underlyingUniqueID().asUInt(), + fUSampler.proxy()->uniqueID().asUInt(), + fUSampler.proxy()->underlyingUniqueID().asUInt(), + fVSampler.proxy()->uniqueID().asUInt(), + fVSampler.proxy()->underlyingUniqueID().asUInt()); + + return str; +} #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" diff --git a/src/gpu/effects/GrYUVtoRGBEffect.fp b/src/gpu/effects/GrYUVtoRGBEffect.fp index e49fedae71..453800dd1b 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.fp +++ b/src/gpu/effects/GrYUVtoRGBEffect.fp @@ -41,6 +41,7 @@ layout(key) in bool nv12; sk_sp<GrTextureProxy> uProxy, sk_sp<GrTextureProxy> vProxy, SkYUVColorSpace colorSpace, bool nv12); + SkString dumpInfo() const override; } @cpp { @@ -105,6 +106,19 @@ layout(key) in bool nv12; GrSamplerState(GrSamplerState::WrapMode::kClamp, uvFilterMode))); } + + SkString GrYUVtoRGBEffect::dumpInfo() const { + SkString str; + str.appendf("Y: %d %d U: %d %d V: %d %d\n", + fYSampler.proxy()->uniqueID().asUInt(), + fYSampler.proxy()->underlyingUniqueID().asUInt(), + fUSampler.proxy()->uniqueID().asUInt(), + fUSampler.proxy()->underlyingUniqueID().asUInt(), + fVSampler.proxy()->uniqueID().asUInt(), + fVSampler.proxy()->underlyingUniqueID().asUInt()); + + return str; + } } void main() { diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h index 3d44285bfe..6cc468edc0 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.h +++ b/src/gpu/effects/GrYUVtoRGBEffect.h @@ -19,6 +19,7 @@ public: sk_sp<GrTextureProxy> uProxy, sk_sp<GrTextureProxy> vProxy, SkYUVColorSpace colorSpace, bool nv12); + SkString dumpInfo() const override; SkMatrix44 ySamplerTransform() const { return fYSamplerTransform; } SkMatrix44 uSamplerTransform() const { return fUSamplerTransform; } SkMatrix44 vSamplerTransform() const { return fVSamplerTransform; } |