i965: Allow HiZ for glCopyImageSubData sources
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 5 Dec 2019 16:39:18 +0000 (10:39 -0600)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 4 Jan 2020 20:25:55 +0000 (12:25 -0800)
v2 (Ken): Handle platforms without sampler support for HiZ

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v2 changes]
src/mesa/drivers/dri/i965/brw_blorp.c

index 0ac636bb88c44f85be4b39ff11ed99d5684eeb49..337294306387607d1ff28fa03595ee4c018ffcc7 100644 (file)
@@ -463,6 +463,15 @@ brw_blorp_copy_miptrees(struct brw_context *brw,
    bool src_clear_supported, dst_clear_supported;
 
    switch (src_mt->aux_usage) {
+   case ISL_AUX_USAGE_HIZ:
+      if (intel_miptree_sample_with_hiz(brw, src_mt)) {
+         src_aux_usage = src_mt->aux_usage;
+         src_clear_supported = true;
+      } else {
+         src_aux_usage = ISL_AUX_USAGE_NONE;
+         src_clear_supported = false;
+      }
+      break;
    case ISL_AUX_USAGE_MCS:
    case ISL_AUX_USAGE_CCS_E:
       src_aux_usage = src_mt->aux_usage;