[Mesa-dev] [PATCH 08/17] intle: Add an assert for glCopyTexSubImage() being called on MSAA buffers.
Eric Anholt
eric at anholt.net
Tue May 28 15:55:22 PDT 2013
Chad Versace <chad.versace at linux.intel.com> writes:
> 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`.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130528/a5e69876/attachment.pgp>
More information about the mesa-dev
mailing list