mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 14:10:37 +02:00
iris: Use known formats for tex_cache_flush_hack
Instead of using ISL_FORMAT_UNSUPPORTED, use the known format to avoid extra cache flushes. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23087>
This commit is contained in:
parent
803a569fdf
commit
03b9a6fde1
1 changed files with 7 additions and 4 deletions
|
|
@ -279,8 +279,7 @@ iris_blorp_surf_for_resource(struct isl_device *isl_dev,
|
|||
static bool
|
||||
is_astc(enum isl_format format)
|
||||
{
|
||||
return format != ISL_FORMAT_UNSUPPORTED &&
|
||||
isl_format_get_layout(format)->txc == ISL_TXC_ASTC;
|
||||
return isl_format_get_layout(format)->txc == ISL_TXC_ASTC;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -679,6 +678,10 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
batch->name == IRIS_BATCH_BLITTER ? IRIS_DOMAIN_OTHER_WRITE
|
||||
: IRIS_DOMAIN_RENDER_WRITE;
|
||||
|
||||
enum isl_format src_fmt, dst_fmt;
|
||||
blorp_copy_get_formats(&screen->isl_dev, &src_res->surf, &dst_res->surf,
|
||||
&src_fmt, &dst_fmt);
|
||||
|
||||
enum isl_aux_usage src_aux_usage, dst_aux_usage;
|
||||
bool src_clear_supported, dst_clear_supported;
|
||||
get_copy_region_aux_settings(ice, batch, src_res, src_level,
|
||||
|
|
@ -687,7 +690,7 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
&dst_aux_usage, &dst_clear_supported, true);
|
||||
|
||||
if (iris_batch_references(batch, src_res->bo))
|
||||
tex_cache_flush_hack(batch, ISL_FORMAT_UNSUPPORTED, src_res->surf.format);
|
||||
tex_cache_flush_hack(batch, src_fmt, src_res->surf.format);
|
||||
|
||||
if (dst->target == PIPE_BUFFER)
|
||||
util_range_add(&dst_res->base.b, &dst_res->valid_buffer_range, dstx, dstx + src_box->width);
|
||||
|
|
@ -757,7 +760,7 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
|
||||
blorp_batch_finish(&blorp_batch);
|
||||
|
||||
tex_cache_flush_hack(batch, ISL_FORMAT_UNSUPPORTED, src_res->surf.format);
|
||||
tex_cache_flush_hack(batch, src_fmt, src_res->surf.format);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue