mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type
If querying the default/window-system FBO's attachment type, return GL_FRAMEBUFFER_DEFAULT (per the GL_ARB_framebuffer_object spec). See http://bugs.freedesktop.org/show_bug.cgi?id=31947 NOTE: This is a candidate for the 7.9 branch.
This commit is contained in:
@@ -2014,7 +2014,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
|
|||||||
|
|
||||||
switch (pname) {
|
switch (pname) {
|
||||||
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
|
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
|
||||||
*params = att->Type;
|
*params = buffer->Name == 0 ? GL_FRAMEBUFFER_DEFAULT : att->Type;
|
||||||
return;
|
return;
|
||||||
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
|
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
|
||||||
if (att->Type == GL_RENDERBUFFER_EXT) {
|
if (att->Type == GL_RENDERBUFFER_EXT) {
|
||||||
|
Reference in New Issue
Block a user