[Mesa-dev] [PATCH 08/17] intle: Add an assert for glCopyTexSubImage() being called on MSAA buffers.
Chad Versace
chad.versace at linux.intel.com
Tue May 28 14:04:53 PDT 2013
On 05/28/2013 01:54 PM, Eric Anholt wrote:
> Marek Olšák <maraeo at 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`.
More information about the mesa-dev
mailing list