From: Chia-I Wu Date: Tue, 14 Jan 2014 05:34:29 +0000 (+0800) Subject: ilo: OOM for HiZ is fatal on GEN6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e90e3e39c24e0120558b33006bc5e2b69f4638b0;p=mesa.git ilo: OOM for HiZ is fatal on GEN6 On GEN6, HiZ and Separate Stencil Buffer must be enabled at the same time. --- 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; }