Require copy as draws for vulkan cross context image support
authorGreg Daniel <egdaniel@google.com>
Tue, 16 May 2017 18:38:54 +0000 (14:38 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 16 May 2017 21:15:18 +0000 (21:15 +0000)
Bug: skia:
Change-Id: I0eb5039146278f88b7a869c8c19d5f84d5857529
Reviewed-on: https://skia-review.googlesource.com/17108
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
src/gpu/vk/GrVkCaps.cpp

index 691722f..36a252e 100644 (file)
@@ -36,7 +36,7 @@ GrVkCaps::GrVkCaps(const GrContextOptions& contextOptions, const GrVkInterface*
 
     fUseDrawInsteadOfClear = false;
     fFenceSyncSupport = true;   // always available in Vulkan
-    fCrossContextTextureSupport = true;
+    fCrossContextTextureSupport = false;
 
     fMapBufferFlags = kNone_MapFlags; //TODO: figure this out
     fBufferMapThreshold = SK_MaxS32;  //TODO: figure this out
@@ -101,6 +101,10 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
         fMustSubmitCommandsBeforeCopyOp = true;
     }
 
+    if (fSupportsCopiesAsDraws) {
+        fCrossContextTextureSupport = true;
+    }
+
 #if defined(SK_BUILD_FOR_WIN)
     if (kNvidia_VkVendor == properties.vendorID) {
         fMustSleepOnTearDown = true;