Chad Versace <chad.vers...@linux.intel.com> writes: > On 05/28/2013 01:54 PM, Eric Anholt wrote: >> Marek Olšák <mar...@gmail.com> writes: >> >>> CopyTexSubImage can be called on a multisample renderbuffer if the >>> renderbuffer is part of the window-system framebuffer (i.e. comes from >>> the visual). >>> >>> IIRC, the game Cogs uses it if both MSAA and Post Filters are enabled. >> >> Good to note; I hadn't thought about this. This should be covered by >> the blorp CTSI path, but at least we'll find out more obviously now if >> that turns out to be false for some reason. > > --- -8<- ---- > static void > intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, > struct gl_texture_image *texImage, > GLint xoffset, GLint yoffset, GLint zoffset, > struct gl_renderbuffer *rb, > GLint x, GLint y, > GLsizei width, GLsizei height) > { > struct intel_context *intel = intel_context(ctx); > if (dims != 3) { > #ifndef I915 > /* Try BLORP first. It can handle almost everything. */ > if (brw_blorp_copytexsubimage(intel, rb, texImage, x, y, > xoffset, yoffset, width, height)) > return; > #endif > > /* Next, try the BLT engine. */ > if (intel_copy_texsubimage(intel, > intel_texture_image(texImage), > xoffset, yoffset, > intel_renderbuffer(rb), x, y, width, > height)) > return; > } > --- ->8- ---- > > If the read buffer is multi-sampled and brw_blorp_copytexsubimage fails for an > unexpected reason, then the assertions fail. To avoid that disaster, I think > the assertions should be replaced with `if (is_multisampled) return false`.
The code that gets called after that will also be a trainwreck in the presence of multisampling. You really want to assert at this point.
pgpCB5tOCnDAI.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev