summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-01-16 02:10:45 +0800
committerChia-I Wu <[email protected]>2014-02-22 22:45:12 +0800
commit409add30b367df1ac3d2675a20324229be8e7832 (patch)
tree9a3cbb0f00f080b8fb4ba63e5bcfef0fc5fde895 /src
parente7307fe7088aeda0c3449104239562bbe1c6be46 (diff)
ilo: fix a false assertion failure on GEN6
Layer offsetting is possible when it is level 0, layer 0.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen6.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.c b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
index c8ad38b7782..3ea8b8f5e77 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
@@ -1115,10 +1115,18 @@ zs_init_info(const struct ilo_dev_info *dev,
info->hiz.stride = tex->hiz.bo_stride;
info->hiz.tiling = INTEL_TILING_Y;
- assert(!offset_to_layer);
- info->hiz.offset = 0;
- x_offset[2] = 0;
- y_offset[2] = 0;
+ /*
+ * Layer offsetting is used on GEN6 only. And on GEN6, HiZ is enabled
+ * only when the depth buffer is non-mipmapped and non-array, making
+ * layer offsetting no-op.
+ */
+ if (offset_to_layer) {
+ assert(level == 0 && first_layer == 0 && num_layers == 1);
+
+ info->hiz.offset = 0;
+ x_offset[2] = 0;
+ y_offset[2] = 0;
+ }
}
info->width = tex->base.width0;