From d48117d08d5606201829d429f782fe50ecb37fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Sat, 7 Feb 2015 23:12:40 +0200 Subject: [PATCH] mesa:check that texture is not type float _mesa_FramebufferTexture2D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tapani Pälli --- src/mesa/main/fbobject.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 3305151..ba13ac8 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2376,6 +2376,16 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, texObj = _mesa_lookup_texture(ctx, texture); if (texObj != NULL) { + + /* Workaround #88905 .. (check table 3.13 in ES 3.0.3 spec), + * this should not have happened. + */ + if (_mesa_is_gles3(ctx) && + (texObj->_IsFloat || texObj->_IsHalfFloat)) { + fbo_incomplete(ctx, "color attachment incomplete", 0); + return; + } + if (textarget == 0) { if (layered) { /* We're being called by glFramebufferTexture() and textarget -- 2.1.0