[Mesa-dev] [PATCH 03/11] i965/miptree: Choose the stencil layout in miptree_create_layout
Jason Ekstrand
jason at jlekstrand.net
Wed Jun 7 04:59:58 UTC 2017
This ensures that we get the correct layout for all stencil buffers, not
just those which are created as separate stencil for a depth buffer.
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 07e9ecf..519e67b 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -335,6 +335,9 @@ intel_miptree_create_layout(struct brw_context *brw,
mt->msaa_layout = INTEL_MSAA_LAYOUT_NONE;
mt->refcount = 1;
+ if (brw->gen == 6 && format == MESA_FORMAT_S_UINT8)
+ layout_flags |= MIPTREE_LAYOUT_GEN6_HIZ_STENCIL;
+
int depth_multiply = 1;
if (num_samples > 1) {
/* Adjust width/height/depth for MSAA */
@@ -465,8 +468,7 @@ intel_miptree_create_layout(struct brw_context *brw,
intel_miptree_wants_hiz_buffer(brw, mt)))) {
uint32_t stencil_flags = MIPTREE_LAYOUT_ACCELERATED_UPLOAD;
if (brw->gen == 6) {
- stencil_flags |= MIPTREE_LAYOUT_GEN6_HIZ_STENCIL |
- MIPTREE_LAYOUT_TILING_ANY;
+ stencil_flags |= MIPTREE_LAYOUT_TILING_ANY;
}
mt->stencil_mt = intel_miptree_create(brw,
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list