Check for geometry shaders before querying if framebuffer is layered

This commit is contained in:
baldurk
2018-07-06 11:55:15 +01:00
parent 5b0f51f9d9
commit 4bf028371d
+6 -2
View File
@@ -204,8 +204,12 @@ void GLResourceManager::ContextPrepare_InitialState(GLResource res)
{
GL.glGetNamedFramebufferAttachmentParameterivEXT(
res.name, attachment, eGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, &a.level);
GL.glGetNamedFramebufferAttachmentParameterivEXT(
res.name, attachment, eGL_FRAMEBUFFER_ATTACHMENT_LAYERED, &layered);
if(HasExt[ARB_geometry_shader4])
GL.glGetNamedFramebufferAttachmentParameterivEXT(
res.name, attachment, eGL_FRAMEBUFFER_ATTACHMENT_LAYERED, &layered);
else
layered = 0;
if(layered == 0)
GL.glGetNamedFramebufferAttachmentParameterivEXT(