mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
iris: Drop get_copy_region_aux_settings
With the previous commit, it is no longer used. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24446>
This commit is contained in:
parent
60aebe8fa8
commit
1d1dbbd03f
1 changed files with 0 additions and 92 deletions
|
|
@ -632,98 +632,6 @@ prepare_copy_region(struct iris_context *ice,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
get_copy_region_aux_settings(struct iris_context *ice,
|
||||
const struct iris_batch *batch,
|
||||
struct iris_resource *res,
|
||||
unsigned level,
|
||||
enum isl_aux_usage *out_aux_usage,
|
||||
bool *out_clear_supported,
|
||||
bool is_dest)
|
||||
{
|
||||
struct iris_screen *screen = (void *) ice->ctx.screen;
|
||||
const struct intel_device_info *devinfo = screen->devinfo;
|
||||
|
||||
switch (res->aux.usage) {
|
||||
case ISL_AUX_USAGE_HIZ:
|
||||
case ISL_AUX_USAGE_HIZ_CCS:
|
||||
case ISL_AUX_USAGE_HIZ_CCS_WT:
|
||||
case ISL_AUX_USAGE_STC_CCS:
|
||||
if (is_dest) {
|
||||
*out_aux_usage = iris_resource_render_aux_usage(ice, res,
|
||||
res->surf.format,
|
||||
level, false);
|
||||
} else {
|
||||
*out_aux_usage = iris_resource_texture_aux_usage(ice, res,
|
||||
res->surf.format,
|
||||
level, 1);
|
||||
}
|
||||
*out_clear_supported = isl_aux_usage_has_fast_clears(*out_aux_usage);
|
||||
break;
|
||||
case ISL_AUX_USAGE_MCS:
|
||||
case ISL_AUX_USAGE_MCS_CCS:
|
||||
if (!is_dest && !iris_can_sample_mcs_with_clear(devinfo, res)) {
|
||||
*out_aux_usage = res->aux.usage;
|
||||
*out_clear_supported = false;
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
case ISL_AUX_USAGE_CCS_E:
|
||||
case ISL_AUX_USAGE_FCV_CCS_E: {
|
||||
/* If our source doesn't have any unresolved color, report an aux
|
||||
* usage of ISL_AUX_USAGE_NONE. This way, texturing won't even look
|
||||
* at the aux surface and we can save some bandwidth.
|
||||
*/
|
||||
if (!is_dest &&
|
||||
!iris_has_invalid_primary(res, level, 1,
|
||||
0, INTEL_REMAINING_LAYERS)) {
|
||||
*out_aux_usage = ISL_AUX_USAGE_NONE;
|
||||
*out_clear_supported = false;
|
||||
break;
|
||||
}
|
||||
|
||||
/* blorp_copy may reinterpret the surface format and has limited support
|
||||
* for adjusting the clear color, so clear support may only be enabled
|
||||
* in some cases:
|
||||
*
|
||||
* - On gfx11+, the clear color is indirect and comes in two forms: a
|
||||
* 32bpc representation used for rendering and a pixel representation
|
||||
* used for sampling. blorp_copy doesn't change indirect clear colors,
|
||||
* so clears are only supported in the sampling case.
|
||||
*
|
||||
* - A clear color of zeroes holds the same meaning regardless of the
|
||||
* format. Although it could avoid more resolves, we don't use
|
||||
* isl_color_value_is_zero because the surface format used by
|
||||
* blorp_copy isn't guaranteed to access the same components as the
|
||||
* original format (e.g. A8_UNORM/R8_UINT).
|
||||
*/
|
||||
bool is_zero = clear_color_is_fully_zero(res);
|
||||
|
||||
if (batch->name == IRIS_BATCH_BLITTER) {
|
||||
|
||||
/* Compression isn't used for blitter destinations. */
|
||||
assert(!is_dest);
|
||||
|
||||
if (devinfo->verx10 >= 125) {
|
||||
*out_aux_usage = res->aux.usage;
|
||||
*out_clear_supported = is_zero;
|
||||
} else {
|
||||
*out_aux_usage = ISL_AUX_USAGE_NONE;
|
||||
*out_clear_supported = false;
|
||||
}
|
||||
} else {
|
||||
*out_aux_usage = res->aux.usage;
|
||||
*out_clear_supported = is_zero || (devinfo->ver >= 11 && !is_dest);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
*out_aux_usage = ISL_AUX_USAGE_NONE;
|
||||
*out_clear_supported = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a GPU-based raw memory copy between compatible view classes.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue