summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-02 10:05:21 -0700
committerJason Ekstrand <[email protected]>2017-06-14 18:15:05 -0700
commitee0e29dd0274038957af4ac62b5ffab8d2a25704 (patch)
tree11bef0d04aaf691b0bd920572fc142e2b50070bf
parent6f6aa0f462680a9796afdecdb37a68be7bacdad6 (diff)
i965/miptree: Choose the stencil layout in miptree_create_layout
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. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c6
1 files 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 bd816816a53..28215497fe0 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -333,6 +333,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 */
@@ -463,8 +466,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,