mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: Reenable check for GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT
The check was disabled when FEATURE_OES_framebuffer_object was enabled, since that used to mean we weren't implementing regular OpenGL semantics. Now that we can compile in support for multiple APIs, change the #ifdef to compile the check in when FEATURE_GL is enabled and enable the check for contexts that implement OpenGL at runtime.
This commit is contained in:
parent
c10154a298
commit
e88cef3c9d
1 changed files with 23 additions and 21 deletions
|
|
@ -629,30 +629,32 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
|
|||
}
|
||||
}
|
||||
|
||||
#if !FEATURE_OES_framebuffer_object
|
||||
/* Check that all DrawBuffers are present */
|
||||
for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
|
||||
if (fb->ColorDrawBuffer[j] != GL_NONE) {
|
||||
const struct gl_renderbuffer_attachment *att
|
||||
= _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
|
||||
assert(att);
|
||||
if (att->Type == GL_NONE) {
|
||||
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
|
||||
fbo_incomplete("missing drawbuffer", j);
|
||||
return;
|
||||
}
|
||||
#if FEATURE_GL
|
||||
if (ctx->API == API_OPENGL) {
|
||||
/* Check that all DrawBuffers are present */
|
||||
for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
|
||||
if (fb->ColorDrawBuffer[j] != GL_NONE) {
|
||||
const struct gl_renderbuffer_attachment *att
|
||||
= _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
|
||||
assert(att);
|
||||
if (att->Type == GL_NONE) {
|
||||
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
|
||||
fbo_incomplete("missing drawbuffer", j);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check that the ReadBuffer is present */
|
||||
if (fb->ColorReadBuffer != GL_NONE) {
|
||||
const struct gl_renderbuffer_attachment *att
|
||||
= _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
|
||||
assert(att);
|
||||
if (att->Type == GL_NONE) {
|
||||
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
|
||||
/* Check that the ReadBuffer is present */
|
||||
if (fb->ColorReadBuffer != GL_NONE) {
|
||||
const struct gl_renderbuffer_attachment *att
|
||||
= _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
|
||||
assert(att);
|
||||
if (att->Type == GL_NONE) {
|
||||
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
|
||||
fbo_incomplete("missing readbuffer", -1);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue