summaryrefslogtreecommitdiff
path: root/src/amd/vulkan/radv_meta_buffer.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-07-09 11:37:15 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-07-18 13:44:09 +0200
commite45ba51ea451c5ce580dc248e932e5b6324c0bbc (patch)
tree65aab55eb727a38ede4bcda95446419ed09b3f0f /src/amd/vulkan/radv_meta_buffer.c
parent946cf3f39fce79c692f7eab98196278c3f5ae478 (diff)
radv: add support for VK_EXT_conditional_rendering
Inherited commands buffers are not supported. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Diffstat (limited to 'src/amd/vulkan/radv_meta_buffer.c')
-rw-r--r--src/amd/vulkan/radv_meta_buffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index 6c6d1cc41d7..f1887e33183 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -472,6 +472,13 @@ void radv_CmdCopyBuffer(
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
RADV_FROM_HANDLE(radv_buffer, src_buffer, srcBuffer);
RADV_FROM_HANDLE(radv_buffer, dest_buffer, destBuffer);
+ bool old_predicating;
+
+ /* VK_EXT_conditional_rendering says that copy commands should not be
+ * affected by conditional rendering.
+ */
+ old_predicating = cmd_buffer->state.predicating;
+ cmd_buffer->state.predicating = false;
for (unsigned r = 0; r < regionCount; r++) {
uint64_t src_offset = src_buffer->offset + pRegions[r].srcOffset;
@@ -481,6 +488,9 @@ void radv_CmdCopyBuffer(
radv_copy_buffer(cmd_buffer, src_buffer->bo, dest_buffer->bo,
src_offset, dest_offset, copy_size);
}
+
+ /* Restore conditional rendering. */
+ cmd_buffer->state.predicating = old_predicating;
}
void radv_CmdUpdateBuffer(