HiZ buffers can be multisampled and, on BDW+, simply using interleaved multisampling with a compression block size of 8x4 samples yields the correct HiZ surface size calculations. Unfortunately, choose_msaa_layout was rejecting multisampled HiZ buffers because of format checks. Now that we have a simple helper for determining if a format supports multisampling, that's an easy enough issue to fix. --- src/intel/isl/isl_format.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c index 5d43fe7..02df1ce 100644 --- a/src/intel/isl/isl_format.c +++ b/src/intel/isl/isl_format.c @@ -450,6 +450,11 @@ isl_format_supports_multisampling(const struct brw_device_info *devinfo, */ if (devinfo->gen < 8 && isl_format_get_layout(format)->bpb > 64) { return false; + } else if (format == ISL_FORMAT_HIZ) { + /* On SKL+, HiZ is always single-sampled even when the primary surface + * is multisampled. See also isl_surf_get_hiz_surf(). + */ + return devinfo->gen <= 8; } else if (isl_format_is_compressed(format)) { return false; } else if (isl_format_is_yuv(format)) { -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev