diff options
author | Samuel Pitoiset <[email protected]> | 2018-07-09 11:37:15 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-07-18 13:44:09 +0200 |
commit | e45ba51ea451c5ce580dc248e932e5b6324c0bbc (patch) | |
tree | 65aab55eb727a38ede4bcda95446419ed09b3f0f /src/amd/vulkan/radv_meta_blit.c | |
parent | 946cf3f39fce79c692f7eab98196278c3f5ae478 (diff) |
radv: add support for VK_EXT_conditional_rendering
Inherited commands buffers are not supported.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_blit.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_blit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_blit.c b/src/amd/vulkan/radv_meta_blit.c index a6ee0cb7e93..67c26aabdb3 100644 --- a/src/amd/vulkan/radv_meta_blit.c +++ b/src/amd/vulkan/radv_meta_blit.c @@ -520,6 +520,7 @@ void radv_CmdBlitImage( RADV_FROM_HANDLE(radv_image, src_image, srcImage); RADV_FROM_HANDLE(radv_image, dest_image, destImage); struct radv_meta_saved_state saved_state; + bool old_predicating; /* From the Vulkan 1.0 spec: * @@ -534,6 +535,12 @@ void radv_CmdBlitImage( RADV_META_SAVE_CONSTANTS | RADV_META_SAVE_DESCRIPTORS); + /* VK_EXT_conditional_rendering says that blit 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++) { const VkImageSubresourceLayers *src_res = &pRegions[r].srcSubresource; const VkImageSubresourceLayers *dst_res = &pRegions[r].dstSubresource; @@ -648,6 +655,9 @@ void radv_CmdBlitImage( } } + /* Restore conditional rendering. */ + cmd_buffer->state.predicating = old_predicating; + radv_meta_restore(&saved_state, cmd_buffer); } |