summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index 01d2d0853ec..3ec8839eac5 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -1192,8 +1192,13 @@ tex_create(struct pipe_screen *screen,
return NULL;
}
- if (layout.hiz)
- tex_create_hiz(tex, &layout);
+ if (layout.hiz && !tex_create_hiz(tex, &layout)) {
+ /* Separate Stencil Buffer requires HiZ to be enabled */
+ if (layout.dev->gen == ILO_GEN(6) && layout.separate_stencil) {
+ tex_destroy(tex);
+ return NULL;
+ }
+ }
return &tex->base;
}