iris: Add aux offset into hiz_address
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 13 Aug 2019 08:37:11 +0000 (01:37 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 13 Aug 2019 22:20:39 +0000 (15:20 -0700)
This is not currently required because the hiz buffer is in a separate
buffer, and therefore the offset is 0. If we combine the aux buffer
with the main surface buffer, then the hiz offset may become non-zero.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_state.c

index 2eecf46d24ae6dfc2e036d0f562d7c5296a529c7..a3d93b769cebcca7e348a5a7211ec78f91d49e8f 100644 (file)
@@ -2461,7 +2461,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
          if (iris_resource_level_has_hiz(zres, view.base_level)) {
             info.hiz_usage = ISL_AUX_USAGE_HIZ;
             info.hiz_surf = &zres->aux.surf;
-            info.hiz_address = zres->aux.bo->gtt_offset;
+            info.hiz_address = zres->aux.bo->gtt_offset + zres->aux.offset;
          }
       }