diff options
author | Jason Ekstrand <[email protected]> | 2016-07-08 19:36:33 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-07-13 11:47:37 -0700 |
commit | 33dc8549fb9b227a57a84aac53f17bd099da38f4 (patch) | |
tree | dc1e72f24ed24cf3974435ae52360243bb5a53dc /src/intel/isl/isl_gen7.c | |
parent | fc3650a0a9eca29a9498f663d489ab729f55f65f (diff) |
isl: Add support for HiZ surfaces
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_gen7.c')
-rw-r--r-- | src/intel/isl/isl_gen7.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c index d9b0c080a4c..1cdb52d3c4e 100644 --- a/src/intel/isl/isl_gen7.c +++ b/src/intel/isl/isl_gen7.c @@ -111,7 +111,8 @@ gen7_choose_msaa_layout(const struct isl_device *dev, * In the table above, MSFMT_MSS refers to ISL_MSAA_LAYOUT_ARRAY, and * MSFMT_DEPTH_STENCIL refers to ISL_MSAA_LAYOUT_INTERLEAVED. */ - if (isl_surf_usage_is_depth_or_stencil(info->usage)) + if (isl_surf_usage_is_depth_or_stencil(info->usage) || + (info->usage & ISL_SURF_USAGE_HIZ_BIT)) require_interleaved = true; /* From the Ivybridge PRM, Volume 4 Part 1 p72, SURFACE_STATE, Multisampled @@ -230,6 +231,13 @@ gen7_filter_tiling(const struct isl_device *dev, *flags &= ~ISL_TILING_W_BIT; } + /* The HiZ format and tiling always go together */ + if (info->format == ISL_FORMAT_HIZ) { + *flags &= ISL_TILING_HIZ_BIT; + } else { + *flags &= ~ISL_TILING_HIZ_BIT; + } + if (info->usage & (ISL_SURF_USAGE_DISPLAY_ROTATE_90_BIT | ISL_SURF_USAGE_DISPLAY_ROTATE_180_BIT | ISL_SURF_USAGE_DISPLAY_ROTATE_270_BIT)) { @@ -384,6 +392,9 @@ gen7_choose_image_alignment_el(const struct isl_device *dev, enum isl_msaa_layout msaa_layout, struct isl_extent3d *image_align_el) { + /* Handled by isl_choose_image_alignment_el */ + assert(info->format != ISL_FORMAT_HIZ); + /* IVB+ does not support combined depthstencil. */ assert(!isl_surf_usage_is_depth_and_stencil(info->usage)); |