Remove fStencilClearValue from Vulkan's CommandBufferInfo struct
Adding this extra field to the CommandBufferInfo may or may not have led to a memory regression.
Remove it until it is actually needed.
Change-Id: Ibdddbeb7625f91f5199584a575289f07f6e95304
Reviewed-on: https://skia-review.googlesource.com/33280
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index f152582..866e1ac 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1973,7 +1973,6 @@
void GrVkGpu::submitSecondaryCommandBuffer(const SkTArray<GrVkSecondaryCommandBuffer*>& buffers,
const GrVkRenderPass* renderPass,
const VkClearValue* colorClear,
- const VkClearValue* stencilClear,
GrVkRenderTarget* target,
const SkIRect& bounds) {
const SkIRect* pBounds = &bounds;
@@ -2007,7 +2006,8 @@
#endif
VkClearValue clears[2];
clears[0].color = colorClear->color;
- clears[1].depthStencil = stencilClear->depthStencil;
+ clears[1].depthStencil.depth = 0.0f;
+ clears[1].depthStencil.stencil = 0;
fCurrentCmdBuffer->beginRenderPass(this, renderPass, clears, *target, *pBounds, true);
for (int i = 0; i < buffers.count(); ++i) {
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h
index 976c95a..00bf060 100644
--- a/src/gpu/vk/GrVkGpu.h
+++ b/src/gpu/vk/GrVkGpu.h
@@ -124,7 +124,7 @@
void submitSecondaryCommandBuffer(const SkTArray<GrVkSecondaryCommandBuffer*>&,
const GrVkRenderPass*,
- const VkClearValue*, const VkClearValue*,
+ const VkClearValue* colorClear,
GrVkRenderTarget*,
const SkIRect& bounds);
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
index 6378251..66e4bff 100644
--- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
@@ -96,9 +96,6 @@
cbInfo.fColorClearValue.color.float32[2] = fClearColor.fRGBA[2];
cbInfo.fColorClearValue.color.float32[3] = fClearColor.fRGBA[3];
- cbInfo.fStencilClearValue.depthStencil.depth = 0;
- cbInfo.fStencilClearValue.depthStencil.stencil = 0;
-
cbInfo.fBounds.setEmpty();
cbInfo.fIsEmpty = true;
cbInfo.fStartsWithClear = false;
@@ -182,9 +179,7 @@
cbInfo.fBounds.roundOut(&iBounds);
fGpu->submitSecondaryCommandBuffer(cbInfo.fCommandBuffers, cbInfo.fRenderPass,
- &cbInfo.fColorClearValue,
- &cbInfo.fStencilClearValue,
- vkRT, iBounds);
+ &cbInfo.fColorClearValue, vkRT, iBounds);
}
}
}
@@ -404,7 +399,6 @@
// It shouldn't matter what we set the clear color to here since we will assume loading of the
// attachment.
memset(&cbInfo.fColorClearValue, 0, sizeof(VkClearValue));
- memset(&cbInfo.fStencilClearValue, 0, sizeof(VkClearValue));
cbInfo.fBounds.setEmpty();
cbInfo.fIsEmpty = true;
cbInfo.fStartsWithClear = false;
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.h b/src/gpu/vk/GrVkGpuCommandBuffer.h
index cccb82f..ab5900e 100644
--- a/src/gpu/vk/GrVkGpuCommandBuffer.h
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.h
@@ -108,7 +108,6 @@
const GrVkRenderPass* fRenderPass;
SkTArray<GrVkSecondaryCommandBuffer*> fCommandBuffers;
VkClearValue fColorClearValue;
- VkClearValue fStencilClearValue;
SkRect fBounds;
bool fIsEmpty;
bool fStartsWithClear;