summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-05-19 20:50:06 -0700
committerKenneth Graunke <[email protected]>2016-05-25 14:17:29 -0700
commitc51702bdc81b65396a7945d2cb30e0576e4aa59a (patch)
treebbe89794eaaddec9f7724adcd4279d11661d9ba6 /src/mesa/drivers/dri
parent45d6818021409f61ccbbd92faa3d2af35499509f (diff)
i965: Also copy stencil miptree data.
The Meta path handles this, but the CPU/BLT fallbacks did not. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/intel_copy_image.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/drivers/dri/i965/intel_copy_image.c
index d1145348d65..ead5b0d830c 100644
--- a/src/mesa/drivers/dri/i965/intel_copy_image.c
+++ b/src/mesa/drivers/dri/i965/intel_copy_image.c
@@ -314,6 +314,21 @@ intel_copy_image_sub_data(struct gl_context *ctx,
copy_miptrees(brw, src_mt, src_x, src_y, src_z, src_level,
dst_mt, dst_x, dst_y, dst_z, dst_level,
src_width, src_height);
+
+ /* CopyImage only works for equal formats, texture view equivalence
+ * classes, and a couple special cases for compressed textures.
+ *
+ * Notably, GL_DEPTH_STENCIL does not appear in any equivalence
+ * classes, so we know the formats must be the same, and thus both
+ * will either have stencil, or not. They can't be mismatched.
+ */
+ assert((src_mt->stencil_mt != NULL) == (dst_mt->stencil_mt != NULL));
+
+ if (dst_mt->stencil_mt) {
+ copy_miptrees(brw, src_mt->stencil_mt, src_x, src_y, src_z, src_level,
+ dst_mt->stencil_mt, dst_x, dst_y, dst_z, dst_level,
+ src_width, src_height);
+ }
}
void