From 53d99c4847bdabd5701d9cd783edc00fbadda99a Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Mon, 27 Feb 2023 12:14:04 -0800 Subject: iris/gfx20: Enable depth buffer write through for multi sampled images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BSpec: 56419 Backport-to: 24.2 Reviewed-by: Jianxun Zhang Signed-off-by: José Roberto de Souza Part-of: (cherry picked from commit 48e46c71c03b2d7bb32cb7672583f4d539eb1348) --- src/gallium/drivers/iris/iris_resource.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 3663c6fce58..39736046cec 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -677,15 +677,18 @@ static bool want_hiz_wt_for_res(const struct intel_device_info *devinfo, const struct iris_resource *res) { - if (res->surf.samples > 1) + /* Gen12 only supports single-sampled while Gen20+ supports + * multi-sampled images. + */ + if (devinfo->ver < 20 && res->surf.samples > 1) return false; if (!(res->surf.usage & ISL_SURF_USAGE_TEXTURE_BIT)) return false; - /* If this resource is single-sampled and will be used as a texture, - * put the HiZ surface in write-through mode so that we can sample - * from it. + /* If this resource has the maximum number of samples supported by + * running platform and will be used as a texture, put the HiZ surface + * in write-through mode so that we can sample from it. */ return true; } -- cgit v1.2.3