diff options
author | Nanley Chery <[email protected]> | 2019-09-19 13:10:24 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2019-10-28 10:47:06 -0700 |
commit | cc99d0adc0d40ba5879b0a1a1ec0b71df59fbe96 (patch) | |
tree | d2d8ede05c752d5066c7e21ba9b74be831a47246 | |
parent | 6020ebf799187f7d1ad58e30d7e6d65747b0c539 (diff) |
isl: Add isl_surf_supports_hiz_ccs_wt()
Add a helper to determine if an ISL surface supports the write-through
mode of HIZ_CCS.
Reviewed-by: Sagar Ghuge <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/intel/isl/isl.c | 10 | ||||
-rw-r--r-- | src/intel/isl/isl.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 954c7102b80..c756fb0c80f 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -2583,6 +2583,16 @@ isl_surf_get_depth_format(const struct isl_device *dev, } bool +isl_surf_supports_hiz_ccs_wt(const struct gen_device_info *dev, + const struct isl_surf *surf, + enum isl_aux_usage aux_usage) +{ + return aux_usage == ISL_AUX_USAGE_HIZ_CCS && + surf->samples == 1 && + surf->usage & ISL_SURF_USAGE_TEXTURE_BIT; +} + +bool isl_swizzle_supports_rendering(const struct gen_device_info *devinfo, struct isl_swizzle swizzle) { diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index d50f86f6892..bcb46b12266 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -2163,6 +2163,14 @@ isl_surf_get_depth_format(const struct isl_device *dev, const struct isl_surf *surf); /** + * @brief determines if a surface supports writing through HIZ to the CCS. + */ +bool +isl_surf_supports_hiz_ccs_wt(const struct gen_device_info *dev, + const struct isl_surf *surf, + enum isl_aux_usage aux_usage); + +/** * @brief performs a copy from linear to tiled surface * */ |