mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
iris: Use iris_sample_with_depth_aux more often
We're going to remove res->aux.sampler_usages. This will simplify the commit in which we do so. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
This commit is contained in:
parent
85a7fb1e19
commit
d905018a2c
3 changed files with 6 additions and 2 deletions
|
|
@ -864,7 +864,8 @@ iris_resource_texture_aux_usage(struct iris_context *ice,
|
|||
case ISL_AUX_USAGE_HIZ_CCS:
|
||||
case ISL_AUX_USAGE_HIZ_CCS_WT:
|
||||
assert(res->surf.format == view_format);
|
||||
return util_last_bit(res->aux.sampler_usages) - 1;
|
||||
return iris_sample_with_depth_aux(devinfo, res) ?
|
||||
res->aux.usage : ISL_AUX_USAGE_NONE;
|
||||
|
||||
case ISL_AUX_USAGE_MCS:
|
||||
case ISL_AUX_USAGE_MCS_CCS:
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ iris_get_aux_clear_color_state_size(struct iris_screen *screen,
|
|||
* sampler via render surface state objects.
|
||||
*/
|
||||
if (isl_surf_usage_is_depth(res->surf.usage) &&
|
||||
res->aux.sampler_usages == 1 << ISL_AUX_USAGE_NONE)
|
||||
!iris_sample_with_depth_aux(&screen->devinfo, res))
|
||||
return 0;
|
||||
|
||||
return screen->isl_dev.ss.clear_color_state_size;
|
||||
|
|
|
|||
|
|
@ -2529,6 +2529,9 @@ iris_create_sampler_view(struct pipe_context *ctx,
|
|||
isv->res->aux.usage == ISL_AUX_USAGE_GFX12_CCS_E) &&
|
||||
!isl_format_supports_ccs_e(devinfo, isv->view.format)) {
|
||||
aux_usages = 1 << ISL_AUX_USAGE_NONE;
|
||||
} else if (isl_aux_usage_has_hiz(isv->res->aux.usage) &&
|
||||
!iris_sample_with_depth_aux(devinfo, isv->res)) {
|
||||
aux_usages = 1 << ISL_AUX_USAGE_NONE;
|
||||
} else {
|
||||
aux_usages = isv->res->aux.sampler_usages;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue