BlitFramebuffer BUG on ATI/AMD

I have recently added multisampling to my deferred engine by creating a new set of FrameBuffers with multisampling renderbuffers. Instead of my engine rendering the GBuffer to FBO set A, I now render into set B (the multisample FBO set). At the end, I resolve the multisample buffers back to FBO set A via glBlitFrameBuffer.

This is where I’m seeing a differnce between GeForce 8 and Radeon 4850. On the GeForce, I blit the depth and stencil in one operation using:

glBindFrameBuffer (GL_READ_FRAMEBUFFER, FBid1)
glReadBuffer (GL_NONE)
glBindFrameBuffer (GL_DRAW_FRAMEBUFFER, FBid2)
glDrawBuffer (GL_NONE)

glBlitFrameBuffer (0,0,w,h, 0,0,w,h, GL_DEPTH_BUFFER_BIT OR GL_STENCIL_BUFFER_BIT, GL_NEAREST)

but on the Radeon this does not copy the stencil values (took me ages to discover that was the reason).

So, I now have to do the following:


glBlitFrameBuffer (0,0,w,h, 0,0,w,h, GL_DEPTH_BUFFER_BIT, GL_NEAREST)
glBlitFrameBuffer (0,0,w,h, 0,0,w,h, GL_STENCIL_BUFFER_BIT, GL_NEAREST)

My undertstanding of the GL spec is that the bit mask can be combined, so I should only be performing one blit operation.

My question is: Is this the correct behaviour - ie having to perform two separate Blit operations, or is this a bug in the AMD drivers? (Cat 10.7, Open GL 3.3 compatibility profile)
How do I submit this a a bug to AMD?

hi,

I quickly looked and indeed color|depth, color|stencil works, but depth|stencil does not work (typo). we will fix asap.

thanks for the accurate report.

Ok, Thanks for your quick response. Yes it took a while to get everything pinned down and accurate (in the process fixed quite a nast bug - instead of deleting a renderbuffer I was deleting a framebuffer. oops). I work in a support env so I know you need to be as accurate as possible to fix issues like this.

If it’s not too much of a liberty whilst we’re on the multisample render buffer suject:

  1. I also noticed that the Multisample colour render buffers seem to be optimised for GL_RGBA16F formats. When I switch to RGBA8 , GL_R10_G11_B11 or GL_RGBA16 I notice a huge frame rate drop (have not tested RGBA32F).
    Is this to be expected?

  2. I have enabled MSAA *4 Multisample render buffers and gemoetry appears not to respect the depth test. I have nearby grass objects which are being overdrawn by far distant grass. This does not happen on the Geforce.

on our HW, speed is higher for smaller formats than for bigger formats, so your feedback is unexpected.

can you send a test case to devrel@amd.com (with pierre.boudier@amd.com in CC)

thanks,

Is there an FTP or upload area I could use. I’ll repackage my engine plus data to be as small as possible but it is bound to be too large for my email system to accept.

Test case sent as requested.
I actually took the liberty of sending a couple more EXEs which illustrate several other bugs.