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>
This commit is contained in:
Robert Phillips 2017-08-10 13:50:17 -04:00 committed by Skia Commit-Bot
parent b74ef035a4
commit 8c326e9b81
4 changed files with 4 additions and 11 deletions

View File

@ -1973,7 +1973,6 @@ void adjust_bounds_to_granularity(SkIRect* dstBounds, const SkIRect& srcBounds,
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 @@ void GrVkGpu::submitSecondaryCommandBuffer(const SkTArray<GrVkSecondaryCommandBu
#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) {

View File

@ -124,7 +124,7 @@ public:
void submitSecondaryCommandBuffer(const SkTArray<GrVkSecondaryCommandBuffer*>&,
const GrVkRenderPass*,
const VkClearValue*, const VkClearValue*,
const VkClearValue* colorClear,
GrVkRenderTarget*,
const SkIRect& bounds);

View File

@ -96,9 +96,6 @@ void GrVkGpuCommandBuffer::init() {
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 @@ void GrVkGpuCommandBuffer::onSubmit() {
cbInfo.fBounds.roundOut(&iBounds);
fGpu->submitSecondaryCommandBuffer(cbInfo.fCommandBuffers, cbInfo.fRenderPass,
&cbInfo.fColorClearValue,
&cbInfo.fStencilClearValue,
vkRT, iBounds);
&cbInfo.fColorClearValue, vkRT, iBounds);
}
}
}
@ -404,7 +399,6 @@ void GrVkGpuCommandBuffer::addAdditionalRenderPass() {
// 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;

View File

@ -108,7 +108,6 @@ private:
const GrVkRenderPass* fRenderPass;
SkTArray<GrVkSecondaryCommandBuffer*> fCommandBuffers;
VkClearValue fColorClearValue;
VkClearValue fStencilClearValue;
SkRect fBounds;
bool fIsEmpty;
bool fStartsWithClear;