aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_fast_clear.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-07-09 11:37:15 +0200
committerSamuel Pitoiset <[email protected]>2018-07-18 13:44:09 +0200
commite45ba51ea451c5ce580dc248e932e5b6324c0bbc (patch)
tree65aab55eb727a38ede4bcda95446419ed09b3f0f /src/amd/vulkan/radv_meta_fast_clear.c
parent946cf3f39fce79c692f7eab98196278c3f5ae478 (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_fast_clear.c')
-rw-r--r--src/amd/vulkan/radv_meta_fast_clear.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index d3cd445d97f..932a6c93aa2 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -586,6 +586,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
VkDevice device_h = radv_device_to_handle(cmd_buffer->device);
VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
uint32_t layer_count = radv_get_layerCount(image, subresourceRange);
+ bool old_predicating;
VkPipeline pipeline;
assert(cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL);
@@ -603,6 +604,8 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
}
if (radv_image_has_dcc(image)) {
+ old_predicating = cmd_buffer->state.predicating;
+
radv_emit_set_predication_state_from_image(cmd_buffer, image, true);
cmd_buffer->state.predicating = true;
}
@@ -669,13 +672,21 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
}
if (radv_image_has_dcc(image)) {
- cmd_buffer->state.predicating = false;
+ cmd_buffer->state.predicating = old_predicating;
+
radv_emit_set_predication_state_from_image(cmd_buffer, image, false);
/* Clear the image's fast-clear eliminate predicate because
* FMASK and DCC also imply a fast-clear eliminate.
*/
radv_set_dcc_need_cmask_elim_pred(cmd_buffer, image, false);
+
+ if (cmd_buffer->state.predication_type != -1) {
+ /* Restore previous conditional rendering user state. */
+ si_emit_set_predication_state(cmd_buffer,
+ cmd_buffer->state.predication_type,
+ cmd_buffer->state.predication_va);
+ }
}
radv_meta_restore(&saved_state, cmd_buffer);
}