return (buffer[0] == GL_TRUE);
}
+static bool
+_legal_target_for_framebuffer_texture_layer(struct gl_context *ctx,
+ GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_3D:
+ case GL_TEXTURE_1D_ARRAY:
+ case GL_TEXTURE_2D_ARRAY:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
+ case GL_TEXTURE_CUBE_MAP:
+ return true;
+ default:
+ return false;
+ }
+}
+
/* default implementation of QueryInternalFormat driverfunc, for
* drivers not implementing ARB_internalformat_query2.
*/
case GL_TEXTURE_SHADOW:
case GL_TEXTURE_GATHER:
case GL_TEXTURE_GATHER_SHADOW:
+ case GL_FRAMEBUFFER_RENDERABLE:
+ case GL_FRAMEBUFFER_RENDERABLE_LAYERED:
+ case GL_FRAMEBUFFER_BLEND:
params[0] = GL_FULL_SUPPORT;
break;
buffer[0] = GL_TRUE;
break;
+ case GL_FRAMEBUFFER_RENDERABLE_LAYERED:
+ if (!_mesa_has_EXT_texture_array(ctx) ||
+ _legal_target_for_framebuffer_texture_layer(ctx, target))
+ goto end;
+ /* fallthrough */
case GL_FRAMEBUFFER_RENDERABLE:
- /* @TODO */
- break;
+ case GL_FRAMEBUFFER_BLEND:
+ if (!_mesa_has_ARB_framebuffer_object(ctx))
+ goto end;
- case GL_FRAMEBUFFER_RENDERABLE_LAYERED:
- /* @TODO */
- break;
+ if (target == GL_TEXTURE_BUFFER ||
+ !_is_renderable(ctx, internalformat))
+ goto end;
- case GL_FRAMEBUFFER_BLEND:
- /* @TODO */
+ ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
+ buffer);
break;
case GL_READ_PIXELS: