AnsweredAssumed Answered

glBlitFramebuffer crash with msaa depth -> msaa depth blit

Question asked by eodabash on Mar 3, 2013

The following code causes a crash on a Radeon HD 4800 (Win7 64-bit, latest drivers)

 


GLuint fbo1 = 0;

 

 


// setup FBO 1

{


glGenFramebuffers(1, &fbo1);

glBindFramebuffer(GL_FRAMEBUFFER, fbo1);



GLuint rb1 = 0;

glGenRenderbuffers(1, &rb1);

glBindRenderbuffer(GL_RENDERBUFFER, rb1);

glRenderbufferStorageMultisample(GL_RENDERBUFFER, 4, GL_DEPTH24_STENCIL8, 1024, 1024);

//glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 1024, 1024);

 



glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rb1);


glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rb1);

 

 



glReadBuffer(GL_NONE);


glDrawBuffer(GL_NONE);

 

 



GLenum fboStatus1 = glCheckFramebufferStatus(GL_FRAMEBUFFER);


assert(fboStatus1 == GL_FRAMEBUFFER_COMPLETE);

 

 



check_gl_error();

}

 


GLuint fbo2 = 0;

 


// setup FBO 2

{


glGenFramebuffers(1, &fbo2);

glBindFramebuffer(GL_FRAMEBUFFER, fbo2);

 

 



GLuint rb2 = 0;


glGenRenderbuffers(1, &rb2);


glBindRenderbuffer(GL_RENDERBUFFER, rb2);


glRenderbufferStorageMultisample(GL_RENDERBUFFER, 4, GL_DEPTH24_STENCIL8, 1024, 1024);


//glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 1024, 1024);

 

 



glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rb2);


glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rb2);

 

 



glReadBuffer(GL_NONE);


glDrawBuffer(GL_NONE);

 

 



GLenum fboStatus2 = glCheckFramebufferStatus(GL_FRAMEBUFFER);


assert(fboStatus2 == GL_FRAMEBUFFER_COMPLETE);

 



check_gl_error();

}

 

 


glBindFramebuffer(GL_FRAMEBUFFER,0);

 

 


glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo1);

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo2);

 

 


GLenum readStatus = glCheckFramebufferStatus(GL_READ_FRAMEBUFFER);

assert(readStatus == GL_FRAMEBUFFER_COMPLETE);

 

 


GLenum drawStatus = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);

assert(drawStatus == GL_FRAMEBUFFER_COMPLETE);

 

 


check_gl_error();

 

 


// crash here

glBlitFramebuffer(0, 0, 1024, 1024, 0, 0, 1024, 1024, GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);

 

 

Is there somewhere I can file this as a bug report? I've uploaded a self-contained VC10 project that reproduces the crash.

 

Thanks,

Evan

Attachments

Outcomes