Add GrGpu support for Vulkan command buffer flush
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1705133002 Review URL: https://codereview.chromium.org/1705133002
This commit is contained in:
parent
48e78468f5
commit
d2d2eb9a01
@ -214,7 +214,7 @@ void GrDrawTarget::drawBatches(GrBatchFlushState* flushState) {
|
||||
fBatches[i]->draw(flushState);
|
||||
}
|
||||
|
||||
fGpu->performFlushWorkaround();
|
||||
fGpu->finishDrawTarget();
|
||||
}
|
||||
|
||||
void GrDrawTarget::reset() {
|
||||
|
@ -369,9 +369,6 @@ void GrGpu::resolveRenderTarget(GrRenderTarget* target) {
|
||||
this->onResolveRenderTarget(target);
|
||||
}
|
||||
|
||||
void GrGpu::performFlushWorkaround() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
|
||||
|
@ -349,8 +349,9 @@ public:
|
||||
|
||||
void draw(const DrawArgs&, const GrVertices&);
|
||||
|
||||
// Called by drawtarget when flushing. Provides a hook for working around an ARM PLS driver bug.
|
||||
virtual void performFlushWorkaround();
|
||||
// Called by drawtarget when flushing.
|
||||
// Provides a hook for post-flush actions (e.g. PLS reset and Vulkan command buffer submits).
|
||||
virtual void finishDrawTarget() {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Debugging and Stats
|
||||
|
@ -2427,7 +2427,7 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
|
||||
return true;
|
||||
}
|
||||
|
||||
void GrGLGpu::performFlushWorkaround() {
|
||||
void GrGLGpu::finishDrawTarget() {
|
||||
if (fPLSHasBeenUsed) {
|
||||
/* There is an ARM driver bug where if we use PLS, and then draw a frame which does not
|
||||
* use PLS, it leaves garbage all over the place. As a workaround, we use PLS in a
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
|
||||
void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override;
|
||||
|
||||
void performFlushWorkaround() override;
|
||||
void finishDrawTarget() override;
|
||||
|
||||
private:
|
||||
GrGLGpu(GrGLContext* ctx, GrContext* context);
|
||||
|
Loading…
Reference in New Issue
Block a user