Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: src/gpu/vk/GrVkGpu.cpp

Issue 2038583002: Add GpuCommandBuffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@secondaryCB
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkGpu.h ('k') | src/gpu/vk/GrVkGpuCommandBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.cpp
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index d18481c08a74ca9d9fc45ae1fbc83d2180888462..efa933f8997d94a2e0969643ef66df7af0350ec5 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -17,6 +17,7 @@
#include "GrTexturePriv.h"
#include "GrVkCommandBuffer.h"
+#include "GrVkGpuCommandBuffer.h"
#include "GrVkImage.h"
#include "GrVkIndexBuffer.h"
#include "GrVkMemory.h"
@@ -160,6 +161,15 @@ GrVkGpu::~GrVkGpu() {
///////////////////////////////////////////////////////////////////////////////
+GrGpuCommandBuffer* GrVkGpu::createCommandBuffer(const GrRenderTarget& target,
+ GrGpuCommandBuffer::LoadAndStoreOp colorOp,
+ GrColor colorClear,
+ GrGpuCommandBuffer::LoadAndStoreOp stencilOp,
+ GrColor stencilClear) {
+ const GrVkRenderTarget& vkRT = static_cast<const GrVkRenderTarget&>(target);
+ return new GrVkGpuCommandBuffer(this, vkRT, colorOp, colorClear, stencilOp, stencilClear);
+}
+
void GrVkGpu::submitCommandBuffer(SyncQueue sync) {
SkASSERT(fCurrentCmdBuffer);
fCurrentCmdBuffer->end(this);
@@ -1569,6 +1579,11 @@ bool GrVkGpu::onReadPixels(GrSurface* surface,
return true;
}
+
+void GrVkGpu::submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer* buffer) {
+ fCurrentCmdBuffer->executeCommands(this, buffer);
+}
+
sk_sp<GrVkPipelineState> GrVkGpu::prepareDrawState(const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
GrPrimitiveType primitiveType,
« no previous file with comments | « src/gpu/vk/GrVkGpu.h ('k') | src/gpu/vk/GrVkGpuCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698