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

Unified Diff: src/gpu/vk/GrVkCommandBuffer.h

Issue 2363773006: Add command buffer submits before copy calls in vulkan. (Closed)
Patch Set: change submit check to a cap Created 4 years, 3 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/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkCommandBuffer.h
diff --git a/src/gpu/vk/GrVkCommandBuffer.h b/src/gpu/vk/GrVkCommandBuffer.h
index 9864ec02fec4eefcd201b556a8aa52c40288c827..8020c7db142c9dfd8d357f52c50b3df98e045ddc 100644
--- a/src/gpu/vk/GrVkCommandBuffer.h
+++ b/src/gpu/vk/GrVkCommandBuffer.h
@@ -41,6 +41,8 @@ public:
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,
@@ -56,6 +58,8 @@ public:
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,
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698