summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-05-24 13:37:13 -0700
committerEric Anholt <[email protected]>2013-05-28 12:40:44 -0700
commit045612c90e53cd3c4e46c203b982f376d21ab13d (patch)
tree39adf165b631efc37705f312aad5c46691eb297b
parent7638f5578e3fdf37d3b55ca78508b002040b3468 (diff)
intel: Add an assert for glCopyTexSubImage() being called on MSAA buffers.
This is just in case someone else trips over this due to our weird reuse of this code in glBlitFramebuffer(). Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 94e90da5eaa..4a13b9ae2c2 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -62,6 +62,12 @@ intel_copy_texsubimage(struct intel_context *intel,
intel_prepare_render(intel);
+ /* glCopyTexSubImage() can't be called on multisampled renderbuffers or
+ * textures.
+ */
+ assert(!irb->Base.Base.NumSamples);
+ assert(!intelImage->base.Base.NumSamples);
+
if (!intelImage->mt || !irb || !irb->mt) {
if (unlikely(INTEL_DEBUG & DEBUG_PERF))
fprintf(stderr, "%s fail %p %p (0x%08x)\n",