View Full Version : glBlitFramebufferEXT and ATI cards

09-26-2009, 05:55 AM
Hey guys,

do you also have problems with glBlitFramebufferEXT() and
Multisampling on ATI cards?

Using glBlitFramebufferEXT() to blit a multisampled color
renderbuffer from a FBO directly to the main window buffer
does not work. But it should work according to the spec.

And it works with NVidia graphic cards. A workaround on ATI
cards is to downsample the multisampled color buffer to a
singlesampled buffer and then blit the singlesampled buffer
to the main window.

If I try to blit the multisampled buffer directly...
http://s2.directupload.net/images/090926/temp/7ffv563q.jpg (http://s2.directupload.net/file/d/1929/7ffv563q_jpg.htm)

Alfonse Reinheart
09-26-2009, 11:08 AM
Is the default framebuffer multisampled? Don't forget: some drivers will force a multisampled framebuffer on you because the user selected a multisample option in the control panel.

The best way to deal with that is to check the default framebuffer before you create your FBO. If the default framebuffer is multisampled, then either just use it directly or create your textures/renderbuffers so that they have the same number of samples. Then your blit operation will work.

09-26-2009, 05:49 PM
Multisampling is set to "application controlled" in the
control panel. And the main window framebuffer (I guess
that is what you mean with default framebuffer?) is
initialized by myself to the same sample count as the
FBO renderbuffers.

It works fine with my NVidia card but not with the ATI card.

Alfonse Reinheart
09-26-2009, 07:00 PM
Oh, so you're not trying to downsample on the blit; you just want to copy it directly as-is.

First, verify that you're getting the same number of samples by doing a GL query on the number of samples (ie: check to see that the driver isn't giving you different numbers of samples). Unbind the FBO, do the query, then bind the FBO back and query again. If the FBO and the default framebuffer contain the same number of samples, the blit should work.

Then, if it still doesn't work, you clearly have a bug. File a bug report on it.

09-27-2009, 05:51 AM
Can you be so kind and post a short code snippet how to query
the FBO samples? I read the spec but... maybe I'm blind =/.

Alfonse Reinheart
09-27-2009, 11:14 AM
glGetIntegerv(GL_SAMPLES): retrieves a single integer representing the number of samples in the currently bound framebuffer.

09-28-2009, 12:58 PM
Thanks! I compared the samples, both are 4 so it should work.