[Mesa-dev] [PATCH 08/17] intle: Add an assert for glCopyTexSubImage() being called on MSAA buffers.

Marek Olšák maraeo at gmail.com
Tue May 28 16:32:19 PDT 2013


I recommend you to force an MSAA visual and run piglit. It may also be
useful to test all MSAA sample counts when you're at it (that's what I
did when I was working on MSAA).

Marek

On Wed, May 29, 2013 at 12:55 AM, Eric Anholt <eric at anholt.net> wrote:
> 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.


More information about the mesa-dev mailing list