summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-08-23 21:46:58 -0700
committerJordan Justen <[email protected]>2016-08-26 10:09:22 -0700
commit91627d1956a7e82a5821500a0bca537ffd6e5157 (patch)
tree02cde17bc04724f48727c1a50cdd25769eb36729
parentb82bb98441609579c753351295a9f5317b572604 (diff)
i965: Fix assert with multisampling and cubemaps
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[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 e7aa6318109..5fe6e477436 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -384,6 +384,7 @@ intel_miptree_create_layout(struct brw_context *brw,
mt->msaa_layout = INTEL_MSAA_LAYOUT_NONE;
mt->refcount = 1;
+ int depth_multiply = 1;
if (num_samples > 1) {
/* Adjust width/height/depth for MSAA */
mt->msaa_layout = compute_msaa_layout(brw, format,
@@ -470,7 +471,8 @@ intel_miptree_create_layout(struct brw_context *brw,
}
} else {
/* Non-interleaved */
- depth0 *= num_samples;
+ depth_multiply = num_samples;
+ depth0 *= depth_multiply;
}
}
@@ -500,7 +502,7 @@ intel_miptree_create_layout(struct brw_context *brw,
}
if (target == GL_TEXTURE_CUBE_MAP)
- assert(depth0 == 6);
+ assert(depth0 == 6 * depth_multiply);
mt->physical_width0 = width0;
mt->physical_height0 = height0;