aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkCommandBuffer.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-04-21 08:03:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-21 08:03:10 -0700
commit58a8d9214a70e0f6c81c88a8b0b563c06bf0f70e (patch)
treedbbf36d4bd35f3c57669aacdeffb84b13aee003a /src/gpu/vk/GrVkCommandBuffer.cpp
parent12d62a7d51a1826e221ffd34224d01c9bec49bab (diff)
Update min Vulkan version to 1.0.8.0, and fix various bugs
With updating the SDK, the debug layers also showed multiple bugs. I have fixed those as well in this CL. These include: 1. Incorrectly tracking the allocated descriptor sets from the descriptor pools 2. Using MemoryBarriers inside render passes. 3. Correctly setting the Stencil Image layout anytime we are using a render pass with a stencil attachment 4. Setting the correct aspect mask for Depth/Stencil in a barrier. TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1906623002 Review URL: https://codereview.chromium.org/1906623002
Diffstat (limited to 'src/gpu/vk/GrVkCommandBuffer.cpp')
-rw-r--r--src/gpu/vk/GrVkCommandBuffer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index 2868d8e1fd..94d4c9d2bb 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -141,6 +141,7 @@ void GrVkCommandBuffer::submitToQueue(const GrVkGpu* gpu, VkQueue queue, GrVkGpu
submitInfo.pNext = nullptr;
submitInfo.waitSemaphoreCount = 0;
submitInfo.pWaitSemaphores = nullptr;
+ submitInfo.pWaitDstStageMask = 0;
submitInfo.commandBufferCount = 1;
submitInfo.pCommandBuffers = &fCmdBuffer;
submitInfo.signalSemaphoreCount = 0;
@@ -195,6 +196,11 @@ void GrVkCommandBuffer::pipelineBarrier(const GrVkGpu* gpu,
BarrierType barrierType,
void* barrier) const {
SkASSERT(fIsActive);
+ // For images we can have barriers inside of render passes but they require us to add more
+ // support in subpasses which need self dependencies to have barriers inside them. Also, we can
+ // never have buffer barriers inside of a render pass. For now we will just assert that we are
+ // not in a render pass.
+ SkASSERT(!fActiveRenderPass);
VkDependencyFlags dependencyFlags = byRegion ? VK_DEPENDENCY_BY_REGION_BIT : 0;
switch (barrierType) {
@@ -390,7 +396,6 @@ void GrVkCommandBuffer::bindDescriptorSets(const GrVkGpu* gpu,
void GrVkCommandBuffer::bindPipeline(const GrVkGpu* gpu, const GrVkPipeline* pipeline) {
SkASSERT(fIsActive);
- SkASSERT(fActiveRenderPass);
GR_VK_CALL(gpu->vkInterface(), CmdBindPipeline(fCmdBuffer,
VK_PIPELINE_BIND_POINT_GRAPHICS,
pipeline->pipeline()));