mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
iris: Enable CCS for copies from HiZ+CCS depth buffers
Ever sinceb274469daa, BLORP is able to sample from whatever the sampler supports. Inc0c899cf78, we added HiZ support for copies from HiZ compressed depth buffers but forgot HiZ+CCS. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3717>
This commit is contained in:
parent
83b641a038
commit
a0d5c7da18
1 changed files with 12 additions and 8 deletions
|
|
@ -566,20 +566,25 @@ iris_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
|
|||
}
|
||||
|
||||
static void
|
||||
get_copy_region_aux_settings(const struct gen_device_info *devinfo,
|
||||
get_copy_region_aux_settings(struct iris_context *ice,
|
||||
struct iris_resource *res,
|
||||
enum isl_aux_usage *out_aux_usage,
|
||||
bool *out_clear_supported,
|
||||
bool is_render_target)
|
||||
{
|
||||
struct iris_screen *screen = (void *) ice->ctx.screen;
|
||||
const struct gen_device_info *devinfo = &screen->devinfo;
|
||||
|
||||
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 {
|
||||
case ISL_AUX_USAGE_HIZ_CCS:
|
||||
if (is_render_target) {
|
||||
*out_aux_usage = ISL_AUX_USAGE_NONE;
|
||||
*out_clear_supported = false;
|
||||
} else {
|
||||
*out_aux_usage = iris_resource_texture_aux_usage(ice, res,
|
||||
res->surf.format);
|
||||
*out_clear_supported = (*out_aux_usage != ISL_AUX_USAGE_NONE);
|
||||
}
|
||||
break;
|
||||
case ISL_AUX_USAGE_MCS:
|
||||
|
|
@ -630,15 +635,14 @@ iris_copy_region(struct blorp_context *blorp,
|
|||
struct blorp_batch blorp_batch;
|
||||
struct iris_context *ice = blorp->driver_ctx;
|
||||
struct iris_screen *screen = (void *) ice->ctx.screen;
|
||||
const struct gen_device_info *devinfo = &screen->devinfo;
|
||||
struct iris_resource *src_res = (void *) src;
|
||||
struct iris_resource *dst_res = (void *) dst;
|
||||
|
||||
enum isl_aux_usage src_aux_usage, dst_aux_usage;
|
||||
bool src_clear_supported, dst_clear_supported;
|
||||
get_copy_region_aux_settings(devinfo, src_res, &src_aux_usage,
|
||||
get_copy_region_aux_settings(ice, src_res, &src_aux_usage,
|
||||
&src_clear_supported, false);
|
||||
get_copy_region_aux_settings(devinfo, dst_res, &dst_aux_usage,
|
||||
get_copy_region_aux_settings(ice, dst_res, &dst_aux_usage,
|
||||
&dst_clear_supported, true);
|
||||
|
||||
if (iris_batch_references(batch, src_res->bo))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue