[Mesa-dev] [PATCH] mesa: GLES2 fix for OES float/half-float textures.
Nick Kreeger
nick.kreeger at gmail.com
Mon Dec 10 21:19:12 UTC 2018
The OES_texture* extensions for float and half-float are valid when
GLES2 is present w/ the matching
OES_texture_float/OES_texture_half_float extensions. This fix ensures
that these formats are valid for this configuration.
---
src/mesa/main/glformats.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 3a91600..785d720 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -2914,10 +2914,15 @@ _mesa_gles_error_check_format_and_type(const struct gl_context *ctx,
case GL_FLOAT:
switch (internalFormat) {
case GL_RGBA16F:
+ if (!_mesa_has_OES_texture_half_float(ctx)) {
+ return GL_INVALID_OPERATION;
+ }
+ break;
case GL_RGBA32F:
- if (ctx->Version <= 20)
- return GL_INVALID_OPERATION;
- break;
+ if (!_mesa_has_OES_texture_float(ctx)) {
+ return GL_INVALID_OPERATION;
+ }
+ break;
case GL_RGBA:
if (_mesa_has_OES_texture_float(ctx) && internalFormat == format)
break;
--
2.17.1
More information about the mesa-dev
mailing list