Revert of Add command buffer submits before copy calls in vulkan. (patchset #5 id:80001 of https://codereview.chromium.org/2363773006/ )
Reason for revert:
breaking things since apparently nvidia != windows always...
Original issue's description:
> Add command buffer submits before copy calls in vulkan.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2363773006
>
> Committed: https://skia.googlesource.com/skia/+/25661bac7722860b7589c5b01ec404531d941456
TBR=jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2373503004
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 22cffe7..7669ba5 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -74,10 +74,6 @@
fAllowInitializationErrorOnTearDown = true;
}
- if (kNvidia_VkVendor == properties.vendorID) {
- fSupportsCopiesAsDraws = true;
- }
-
this->applyOptionsOverrides(contextOptions);
GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
glslCaps->applyOptionsOverrides(contextOptions);
diff --git a/src/gpu/vk/GrVkCaps.h b/src/gpu/vk/GrVkCaps.h
index b0a6f46..8e8953e 100644
--- a/src/gpu/vk/GrVkCaps.h
+++ b/src/gpu/vk/GrVkCaps.h
@@ -86,7 +86,6 @@
private:
enum VkVendor {
kQualcomm_VkVendor = 20803,
- kNvidia_VkVendor = 4318,
};
void init(const GrContextOptions& contextOptions, const GrVkInterface* vkInterface,
diff --git a/src/gpu/vk/GrVkCommandBuffer.h b/src/gpu/vk/GrVkCommandBuffer.h
index 8020c7d..9864ec0 100644
--- a/src/gpu/vk/GrVkCommandBuffer.h
+++ b/src/gpu/vk/GrVkCommandBuffer.h
@@ -41,8 +41,6 @@
void bindVertexBuffer(GrVkGpu* gpu, GrVkVertexBuffer* vbuffer) {
VkBuffer vkBuffer = vbuffer->buffer();
- // TODO: once vbuffer->offset() no longer always returns 0, we will need to track the offset
- // to know if we can skip binding or not.
if (!fBoundVertexBufferIsValid || vkBuffer != fBoundVertexBuffer) {
VkDeviceSize offset = vbuffer->offset();
GR_VK_CALL(gpu->vkInterface(), CmdBindVertexBuffers(fCmdBuffer,
@@ -58,8 +56,6 @@
void bindIndexBuffer(GrVkGpu* gpu, GrVkIndexBuffer* ibuffer) {
VkBuffer vkBuffer = ibuffer->buffer();
- // TODO: once ibuffer->offset() no longer always returns 0, we will need to track the offset
- // to know if we can skip binding or not.
if (!fBoundIndexBufferIsValid || vkBuffer != fBoundIndexBuffer) {
GR_VK_CALL(gpu->vkInterface(), CmdBindIndexBuffer(fCmdBuffer,
vkBuffer,
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index ec68040..a72b517 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -380,10 +380,6 @@
SkASSERT(dst);
SkASSERT(src && src->numColorSamples() > 1 && src->msaaImage());
-#if defined(SK_BUILD_FOR_WIN)
- this->submitCommandBuffer(GrVkGpu::kSkip_SyncQueue);
-#endif
-
// Flip rect if necessary
SkIRect srcVkRect = srcRect;
int32_t dstY = dstPoint.fY;
@@ -847,10 +843,6 @@
return;
}
-#if defined(SK_BUILD_FOR_WIN)
- this->submitCommandBuffer(kSkip_SyncQueue);
-#endif
-
// We may need to resolve the texture first if it is also a render target
GrVkRenderTarget* texRT = static_cast<GrVkRenderTarget*>(tex->asRenderTarget());
if (texRT) {
@@ -1585,10 +1577,6 @@
return true;
}
-#if defined(SK_BUILD_FOR_WIN)
- this->submitCommandBuffer(GrVkGpu::kSkip_SyncQueue);
-#endif
-
if (fCopyManager.copySurfaceAsDraw(this, dst, src, srcRect, dstPoint)) {
return true;
}