aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-11-04 12:47:02 -0800
committerEric Anholt <[email protected]>2012-11-19 15:07:22 -0800
commit52ee1a7269b84b60558760655a4c722d827703d4 (patch)
tree0af5371769efa438394dd1210d35a639dec49d9f /src/mesa/drivers/dri/i965/brw_context.h
parent9ec6a54ba94264d4d6c6ddbced2144a882a23cfa (diff)
i965: Move all the depth/stencil/hiz offset logic into the workaround.
Given that we have the mask information here (assuming the rebase is to the same tiling, which is safe), we can just save a set of miptrees and offsets and the global intra-tile offset in the context and cut out a bunch of logic. This will also save emitting the next fix I need to do twice. Acked-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 4863c40c8c1..1abaee3db1d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1072,6 +1072,21 @@ struct brw_context
bool enable_cut_index;
} prim_restart;
+ /** Computed depth/stencil/hiz state from the current attached
+ * renderbuffers, valid only during the drawing state upload loop after
+ * brw_workaround_depthstencil_alignment().
+ */
+ struct {
+ struct intel_mipmap_tree *depth_mt;
+ struct intel_mipmap_tree *stencil_mt;
+ struct intel_mipmap_tree *hiz_mt;
+
+ /* Inter-tile (page-aligned) byte offsets. */
+ uint32_t depth_offset, hiz_offset, stencil_offset;
+ /* Intra-tile x,y offsets for drawing to depth/stencil/hiz */
+ uint32_t tile_x, tile_y;
+ } depthstencil;
+
uint32_t num_instances;
int basevertex;
};