summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_resource.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-05-22 14:21:22 +0800
committerChia-I Wu <[email protected]>2015-06-14 15:43:20 +0800
commit9cb0df4b50593e69f65b65704f5b64f3a12be9b5 (patch)
treeec711762dd00b86b4c45179524be9cee0a86930a /src/gallium/drivers/ilo/ilo_resource.c
parentf0de65cbc29b45fffbe4bf4e1ce299ddb8be9eda (diff)
ilo: add ilo_image_disable_aux()
When aux bo allocation fails, ilo_image_disable_aux() should be called to disable aux buffer.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index 91e4d63fc8d..b6f5d26da5b 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -288,15 +288,13 @@ tex_alloc_bos(struct ilo_texture *tex)
switch (tex->image.aux.type) {
case ILO_IMAGE_AUX_HIZ:
- if (!tex_create_hiz(tex)) {
- /* Separate Stencil Buffer requires HiZ to be enabled */
- if (ilo_dev_gen(&is->dev) == ILO_GEN(6) &&
- tex->image.separate_stencil)
- return false;
- }
+ if (!tex_create_hiz(tex) &&
+ !ilo_image_disable_aux(&tex->image, &is->dev))
+ return false;
break;
case ILO_IMAGE_AUX_MCS:
- if (!tex_create_mcs(tex))
+ if (!tex_create_mcs(tex) &&
+ !ilo_image_disable_aux(&tex->image, &is->dev))
return false;
break;
default: