aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/panfrost/pan_mfbd.c14
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index a35acc311bc..e3595af4cf1 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -313,6 +313,20 @@ panfrost_mfbd_set_zsbuf(
fbx->flags |= 0x1;
} else if (surf->format == PIPE_FORMAT_Z32_UNORM) {
/* default flags (0 in bottom place) */
+ } else if (surf->format == PIPE_FORMAT_Z32_FLOAT) {
+ fbx->flags |= 0xA;
+ fb->mfbd_flags ^= 0x100;
+ fb->mfbd_flags |= 0x200;
+ } else if (surf->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
+ fbx->flags |= 0x1000A;
+ fb->mfbd_flags ^= 0x100;
+ fb->mfbd_flags |= 0x201;
+
+ struct panfrost_resource *stencil = rsrc->separate_stencil;
+ struct panfrost_slice stencil_slice = stencil->slices[level];
+
+ fbx->ds_linear.stencil = stencil->bo->gpu + stencil_slice.offset;
+ fbx->ds_linear.stencil_stride = stencil_slice.stride;
}
} else {
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index 6fe9e60f69a..39d00009091 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -428,6 +428,8 @@ panfrost_is_format_supported( struct pipe_screen *screen,
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z32_UNORM:
+ case PIPE_FORMAT_Z32_FLOAT:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return true;
default: