Mesa (master): intel: Add an assert for glCopyTexSubImage() being called on MSAA buffers.

Eric Anholt anholt at kemper.freedesktop.org
Tue May 28 20:09:47 UTC 2013


Module: Mesa
Branch: master
Commit: 045612c90e53cd3c4e46c203b982f376d21ab13d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=045612c90e53cd3c4e46c203b982f376d21ab13d

Author: Eric Anholt <eric at anholt.net>
Date:   Fri May 24 13:37:13 2013 -0700

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 <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Acked-by: Paul Berry <stereotype441 at gmail.com>

---

 src/mesa/drivers/dri/intel/intel_tex_copy.c |    6 ++++++
 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 94e90da..4a13b9a 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",




More information about the mesa-commit mailing list