Commit 169ef353 by Jamie Madill Committed by Commit Bot

Vulkan: Fix build with custom secondaries disabled.

We should also add a compile-only target that verifies the build works as expected. Bug: angleproject:3117 Change-Id: Ib55969cdd0e670c123cdbe98bd0decf2204e7267 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1650789 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 9728643b
...@@ -327,7 +327,8 @@ class CommandGraphResource : angle::NonCopyable ...@@ -327,7 +327,8 @@ class CommandGraphResource : angle::NonCopyable
bool renderPassStartedButEmpty() const bool renderPassStartedButEmpty() const
{ {
return hasStartedRenderPass() && return hasStartedRenderPass() &&
mCurrentWritingNode->getInsideRenderPassCommands()->empty(); (!vk::CommandBuffer::CanKnowIfEmpty() ||
mCurrentWritingNode->getInsideRenderPassCommands()->empty());
} }
void clearRenderPassColorAttachment(size_t attachmentIndex, const VkClearColorValue &clearValue) void clearRenderPassColorAttachment(size_t attachmentIndex, const VkClearColorValue &clearValue)
......
...@@ -510,6 +510,7 @@ class SecondaryCommandBuffer final : angle::NonCopyable ...@@ -510,6 +510,7 @@ class SecondaryCommandBuffer final : angle::NonCopyable
// The SecondaryCommandBuffer is valid if it's been initialized // The SecondaryCommandBuffer is valid if it's been initialized
bool valid() const { return mAllocator != nullptr; } bool valid() const { return mAllocator != nullptr; }
static bool CanKnowIfEmpty() { return true; }
bool empty() const { return mCommands.size() == 0 || mCommands[0]->id == CommandID::Invalid; } bool empty() const { return mCommands.size() == 0 || mCommands[0]->id == CommandID::Invalid; }
private: private:
......
...@@ -182,6 +182,7 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer> ...@@ -182,6 +182,7 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer>
VkResult init(VkDevice device, const VkCommandBufferAllocateInfo &createInfo); VkResult init(VkDevice device, const VkCommandBufferAllocateInfo &createInfo);
// There is no way to know if the command buffer contains any commands. // There is no way to know if the command buffer contains any commands.
static bool CanKnowIfEmpty() { return false; }
bool empty() const { return false; } bool empty() const { return false; }
using WrappedObject::operator=; using WrappedObject::operator=;
...@@ -841,6 +842,18 @@ ANGLE_INLINE void CommandBuffer::resetQueryPool(VkQueryPool queryPool, ...@@ -841,6 +842,18 @@ ANGLE_INLINE void CommandBuffer::resetQueryPool(VkQueryPool queryPool,
vkCmdResetQueryPool(mHandle, queryPool, firstQuery, queryCount); vkCmdResetQueryPool(mHandle, queryPool, firstQuery, queryCount);
} }
ANGLE_INLINE void CommandBuffer::resolveImage(const Image &srcImage,
VkImageLayout srcImageLayout,
const Image &dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageResolve *regions)
{
ASSERT(valid() && srcImage.valid() && dstImage.valid());
vkCmdResolveImage(mHandle, srcImage.getHandle(), srcImageLayout, dstImage.getHandle(),
dstImageLayout, regionCount, regions);
}
ANGLE_INLINE void CommandBuffer::beginQuery(VkQueryPool queryPool, ANGLE_INLINE void CommandBuffer::beginQuery(VkQueryPool queryPool,
uint32_t query, uint32_t query,
VkQueryControlFlags flags) VkQueryControlFlags flags)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment