bool is_render_target)
{
switch (res->aux.usage) {
+ case ISL_AUX_USAGE_HIZ:
+ if (!is_render_target && iris_sample_with_depth_aux(devinfo, res)) {
+ *out_aux_usage = ISL_AUX_USAGE_HIZ;
+ *out_clear_supported = true;
+ } else {
+ *out_aux_usage = ISL_AUX_USAGE_NONE;
+ *out_clear_supported = false;
+ }
+ break;
case ISL_AUX_USAGE_MCS:
case ISL_AUX_USAGE_MCS_CCS:
case ISL_AUX_USAGE_CCS_E:
return isl_formats_are_ccs_e_compatible(devinfo, isl_format, access_format);
}
-static bool
-sample_with_depth_aux(const struct gen_device_info *devinfo,
- const struct iris_resource *res)
+bool
+iris_sample_with_depth_aux(const struct gen_device_info *devinfo,
+ const struct iris_resource *res)
{
switch (res->aux.usage) {
case ISL_AUX_USAGE_HIZ:
switch (res->aux.usage) {
case ISL_AUX_USAGE_HIZ:
- if (sample_with_depth_aux(devinfo, res))
+ if (iris_sample_with_depth_aux(devinfo, res))
return ISL_AUX_USAGE_HIZ;
break;
case ISL_AUX_USAGE_HIZ_CCS:
- if (sample_with_depth_aux(devinfo, res))
+ if (iris_sample_with_depth_aux(devinfo, res))
return ISL_AUX_USAGE_CCS_E;
break;
bool iris_resource_level_has_hiz(const struct iris_resource *res,
uint32_t level);
+
+bool iris_sample_with_depth_aux(const struct gen_device_info *devinfo,
+ const struct iris_resource *res);
+
bool iris_has_color_unresolved(const struct iris_resource *res,
unsigned start_level, unsigned num_levels,
unsigned start_layer, unsigned num_layers);