summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2015-10-22 11:29:17 +0800
committerChia-I Wu <olvaffe@gmail.com>2015-10-22 14:06:21 +0800
commit13a5805b646b19fd9c155d5c586ad1967d7d9e00 (patch)
treefd21158e03cfeb72a04aae4c4f03375a37eed9c0 /src/gallium
parent0b6f6ee50f3b25c21dd8c9ca339d006141340666 (diff)
ilo: make sure there is HiZ before resolving
We do not want to perform a depth resolve on an MCS enabled surface.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/ilo/ilo_blit.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_blit.h b/src/gallium/drivers/ilo/ilo_blit.h
index da0bfe9c4c9..bad4dab8404 100644
--- a/src/gallium/drivers/ilo/ilo_blit.h
+++ b/src/gallium/drivers/ilo/ilo_blit.h
@@ -58,10 +58,12 @@ ilo_blit_resolve_slices(struct ilo_context *ilo,
* As it is only used to resolve HiZ right now, return early when there is
* no HiZ.
*/
- if (!ilo_image_can_enable_aux(&tex->image, level))
+ if (tex->image.aux.type != ILO_IMAGE_AUX_HIZ ||
+ !ilo_image_can_enable_aux(&tex->image, level))
return;
- if (ilo_image_can_enable_aux(&tex->image, level)) {
+ if (tex->image.aux.type == ILO_IMAGE_AUX_HIZ &&
+ ilo_image_can_enable_aux(&tex->image, level)) {
ilo_blit_resolve_slices_for_hiz(ilo, res, level,
first_slice, num_slices, resolve_flags);
}