static void
radv_emit_set_predication_state_from_image(struct radv_cmd_buffer *cmd_buffer,
- struct radv_image *image, bool value)
+ struct radv_image *image,
+ uint64_t pred_offset, bool value)
{
uint64_t va = 0;
if (value) {
va = radv_buffer_get_va(image->bo) + image->offset;
- va += image->fce_pred_offset;
+ va += pred_offset;
}
si_emit_set_predication_state(cmd_buffer, true, va);
pipeline = cmd_buffer->device->meta_state.fast_clear_flush.cmask_eliminate_pipeline;
}
- if (!decompress_dcc && radv_image_has_dcc(image)) {
+ if (radv_image_has_dcc(image)) {
+ uint64_t pred_offset = decompress_dcc ? image->dcc_pred_offset :
+ image->fce_pred_offset;
+
old_predicating = cmd_buffer->state.predicating;
- radv_emit_set_predication_state_from_image(cmd_buffer, image, true);
+ radv_emit_set_predication_state_from_image(cmd_buffer, image, pred_offset, true);
cmd_buffer->state.predicating = true;
}
&cmd_buffer->pool->alloc);
}
- if (!decompress_dcc && radv_image_has_dcc(image)) {
+ if (radv_image_has_dcc(image)) {
+ uint64_t pred_offset = decompress_dcc ? image->dcc_pred_offset :
+ image->fce_pred_offset;
+
cmd_buffer->state.predicating = old_predicating;
- radv_emit_set_predication_state_from_image(cmd_buffer, image, false);
+ radv_emit_set_predication_state_from_image(cmd_buffer, image, pred_offset, false);
if (cmd_buffer->state.predication_type != -1) {
/* Restore previous conditional rendering user state. */