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

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

Issue 1880613002: Implement initCopySurfaceDstDesc for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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') | no next file » | 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 428c2ff6bd363ad52b779cba73d3fe1480de1b8c..b3be3a9f479370682c65f76151791f0bf417ebe5 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1304,6 +1304,20 @@ bool GrVkGpu::onCopySurface(GrSurface* dst,
return false;
}
+bool GrVkGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const {
+ // Currently we don't support msaa
+ if (src->asRenderTarget() && src->asRenderTarget()->numColorSamples() > 1) {
+ return false;
+ }
+
+ // This will support copying the dst as CopyImage since all of our surfaces require transferSrc
+ // and transferDst usage flags in Vulkan.
+ desc->fOrigin = src->origin();
+ desc->fConfig = src->config();
+ desc->fFlags = kNone_GrSurfaceFlags;
+ return true;
+}
+
void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&,
int* effectiveSampleCnt, SkAutoTDeleteArray<SkPoint>*) {
// TODO: stub.
« no previous file with comments | « src/gpu/vk/GrVkGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698