diff options
author | Robert Phillips <robertphillips@google.com> | 2017-08-10 13:50:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-10 18:12:56 +0000 |
commit | 8c326e9b81a5f314832b6a48df5602d79cb222b5 (patch) | |
tree | 49f28cc16969e74c5fa8ebb47d66a071cde410d2 | |
parent | b74ef035a42af8acf028abd129cb59862cb15c46 (diff) |
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>
-rw-r--r-- | src/gpu/vk/GrVkGpu.cpp | 4 | ||||
-rw-r--r-- | src/gpu/vk/GrVkGpu.h | 2 | ||||
-rw-r--r-- | src/gpu/vk/GrVkGpuCommandBuffer.cpp | 8 | ||||
-rw-r--r-- | src/gpu/vk/GrVkGpuCommandBuffer.h | 1 |
4 files changed, 4 insertions, 11 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index f15258281a..866e1ac4c2 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -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) { diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h index 976c95a661..00bf060f74 100644 --- a/src/gpu/vk/GrVkGpu.h +++ b/src/gpu/vk/GrVkGpu.h @@ -124,7 +124,7 @@ public: 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 6378251d3d..66e4bffe87 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp +++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp @@ -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; diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.h b/src/gpu/vk/GrVkGpuCommandBuffer.h index cccb82f8fe..ab5900eb61 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.h +++ b/src/gpu/vk/GrVkGpuCommandBuffer.h @@ -108,7 +108,6 @@ private: const GrVkRenderPass* fRenderPass; SkTArray<GrVkSecondaryCommandBuffer*> fCommandBuffers; VkClearValue fColorClearValue; - VkClearValue fStencilClearValue; SkRect fBounds; bool fIsEmpty; bool fStartsWithClear; |