Another problem of multisample, about blit of GL_DEPTH24_STENCIL8_EXT.

Hi, All

Things go that I’m using multisample with GL_DEPTH24_STENCIL8_EXT and blitting between framebuffers. The source framebuffer’s code runs:


...
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,samples,GL_DEPTH24_STENCIL8_EXT,width,height);
glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
...

Another framebuffer that is the target framebuffer goes the same way. But when I try to blit between them as following


glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,srcframebuffer);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT,targetframebuffer);

glBlitFramebufferEXT(0,0,width,height,0,0,width,height,GL_DEPTH_BUFFER_BIT,GL_NEAREST);       // *

the line * cause a memory access fault.

So how to modify the code to fulfill the task of this blit? Anyone can help me?

Dark Photon, can you help me?

Best Regards,

newbiecow

[QUOTE=newbiecow;1245608]Hi, All

Things go that I’m using multisample with GL_DEPTH24_STENCIL8_EXT and blitting between framebuffers. The source framebuffer’s code runs:


...
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT,samples,GL_DEPTH24_STENCIL8_EXT,width,height);
glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT,GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,renderbuffer[DepthAndStencil]);
...

Another framebuffer that is the target framebuffer goes the same way. But when I try to blit between them as following


glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT,srcframebuffer);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT,targetframebuffer);

glBlitFramebufferEXT(0,0,width,height,0,0,width,height,GL_DEPTH_BUFFER_BIT,GL_NEAREST);       // *

the line * cause a memory access fault.

So how to modify the code to fulfill the task of this blit? Anyone can help me?

Dark Photon, can you help me?

Best Regards,

newbiecow[/QUOTE]

Anyone can give any advice?

Thanks in advance!

What GPU do you have, what is your GL target version? Is GL_EXT_framebuffer_blit or GL_ARB_framebuffer_object supported by your current GPU and driver?

Need some more code. A small stand-alone test program that illustrates your problem would be good.

Thanks for your help, Dark Photon.
It seems an implemention-dependent problem. I decided to try other ways to evade this one.
Thank you all the same.

Best Regards,

newbiecow