summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2015-02-12 14:33:53 +0200
committerEmil Velikov <[email protected]>2015-02-24 12:16:01 +0000
commitfe98850c5f4fed83dbe5e7b5633bef0459293c91 (patch)
tree6001793dfb485357af14c8ff3cb9f4a136d68b43 /src/mesa/main
parent6f14955b71ba3571049cd4004b1e8381fa6f3b90 (diff)
mesa: fix OES_texture_float texture render target behavior
Current implementation allowed usage of unsized type texture GL_FLOAT and GL_HALF_FLOAT as a render target as this was 'expected behavior' by WEBGL_oes_texture_float and is also allowed by the oes-texture-float WebGL test. However this broke some ES3 conformance tests that do not accept such behavior. Patch sets such an fbo incomplete as expected by the ES3 conformance tests. Textures with sized types like RGBA32F will still continue to work as render targets. v2: code style cleanups (Ian Romanick, Matt Turner) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88905 Reviewed-by: Ian Romanick <[email protected]> Cc: "10.5" <[email protected]> (cherry picked from commit e333035c47a6a4cc88f0f9ca2bced500538bebae)
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 3305151ff2c..79390abf8f9 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -780,6 +780,18 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
att->Complete = GL_FALSE;
return;
}
+
+ /* OES_texture_float allows creation and use of floating point
+ * textures with GL_FLOAT, GL_HALF_FLOAT but it does not allow
+ * these textures to be used as a render target, this is done via
+ * GL_EXT_color_buffer(_half)_float with set of new sized types.
+ */
+ if (_mesa_is_gles(ctx) && (texImage->TexObject->_IsFloat ||
+ texImage->TexObject->_IsHalfFloat)) {
+ att_incomplete("bad internal format");
+ att->Complete = GL_FALSE;
+ return;
+ }
}
else if (format == GL_DEPTH) {
if (baseFormat == GL_DEPTH_COMPONENT) {