diff options
author | Jason Ekstrand <[email protected]> | 2016-09-01 18:57:18 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-10-03 14:53:01 -0700 |
commit | b1311a48e093ebe7ee6162e2afe1886728866918 (patch) | |
tree | 95fbcf9ede2e94e03e8626c63522c49fd696f4f8 /src/intel/isl/isl_format.c | |
parent | baade41a5c0c0342ad9db4b5123714dcedc66937 (diff) |
intel/isl: Allow multisampling with ISL_FORMAT_HiZ
HiZ buffers can be multisampled and, on Broadwell and earlier, 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.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_format.c')
-rw-r--r-- | src/intel/isl/isl_format.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c index 81c01e0b8ca..daf2d813436 100644 --- a/src/intel/isl/isl_format.c +++ b/src/intel/isl/isl_format.c @@ -444,9 +444,16 @@ isl_format_supports_multisampling(const struct gen_device_info *devinfo, * - any compressed texture format (BC*) * - any YCRCB* format * - * The restriction on the format's size is removed on Broadwell. + * The restriction on the format's size is removed on Broadwell. Also, + * there is an exception for HiZ which we treat as a compressed format and + * is allowed to be multisampled on Broadwell and earlier. */ - if (devinfo->gen < 8 && isl_format_get_layout(format)->bpb > 64) { + 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 (devinfo->gen < 8 && isl_format_get_layout(format)->bpb > 64) { return false; } else if (isl_format_is_compressed(format)) { return false; |