summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2023-02-27 12:14:04 -0800
committerEric Engestrom <eric@engestrom.ch>2024-08-20 18:42:16 +0200
commit53d99c4847bdabd5701d9cd783edc00fbadda99a (patch)
treeedcdc35bf9e9fb3f2ce1e74be3977f7b6bde0d64 /src/gallium
parent61eb11e7799d8606b59da8054dcfdf50a6e8b9eb (diff)
iris/gfx20: Enable depth buffer write through for multi sampled images
BSpec: 56419 Backport-to: 24.2 Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615> (cherry picked from commit 48e46c71c03b2d7bb32cb7672583f4d539eb1348)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c11
1 files changed, 7 insertions, 4 deletions
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;
}