Mesa (master): ilo: OOM for HiZ is fatal on GEN6

Chia-I Wu olv at kemper.freedesktop.org
Tue Jan 14 07:43:42 UTC 2014


Module: Mesa
Branch: master
Commit: e90e3e39c24e0120558b33006bc5e2b69f4638b0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e90e3e39c24e0120558b33006bc5e2b69f4638b0

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Tue Jan 14 13:34:29 2014 +0800

ilo: OOM for HiZ is fatal on GEN6

On GEN6, HiZ and Separate Stencil Buffer must be enabled at the same time.

---

 src/gallium/drivers/ilo/ilo_resource.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index 01d2d08..3ec8839 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;
 }




More information about the mesa-commit mailing list