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

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

Issue 1755753002: Implement various vulkan stencil clears and fix various stenciling bugs. (Closed) Base URL: https://skia.googlesource.com/skia.git@stencilImage
Patch Set: Review Nits Created 4 years, 10 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/GrVkCommandBuffer.h ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkCommandBuffer.cpp
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index e43c50fc4ac44bdeaeb546002cc86fd6a614f920..d26d06d1c34a2d642b8b7d464e2b0df75eedae09 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -104,7 +104,6 @@ void GrVkCommandBuffer::beginRenderPass(const GrVkGpu* gpu,
fActiveRenderPass = renderPass;
this->addResource(renderPass);
target.addResources(*this);
-
}
void GrVkCommandBuffer::endRenderPass(const GrVkGpu* gpu) {
@@ -295,6 +294,22 @@ void GrVkCommandBuffer::clearColorImage(const GrVkGpu* gpu,
subRanges));
}
+void GrVkCommandBuffer::clearDepthStencilImage(const GrVkGpu* gpu,
+ GrVkImage* image,
+ const VkClearDepthStencilValue* color,
+ uint32_t subRangeCount,
+ const VkImageSubresourceRange* subRanges) {
+ SkASSERT(fIsActive);
+ SkASSERT(!fActiveRenderPass);
+ this->addResource(image->resource());
+ GR_VK_CALL(gpu->vkInterface(), CmdClearDepthStencilImage(fCmdBuffer,
+ image->textureImage(),
+ image->currentLayout(),
+ color,
+ subRangeCount,
+ subRanges));
+}
+
void GrVkCommandBuffer::clearAttachments(const GrVkGpu* gpu,
int numAttachments,
const VkClearAttachment* attachments,
« no previous file with comments | « src/gpu/vk/GrVkCommandBuffer.h ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698