summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glformats.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-01-13 15:23:48 -0800
committerEric Anholt <eric@anholt.net>2014-02-11 14:36:43 -0800
commit1edca151a00134778b959366d5e7c0a3b63cc8f7 (patch)
tree284ae78e0cb98d6a7aa436bc145ac4b8cbbb6895 /src/mesa/main/glformats.c
parent6d6a29018119fd414973ad051fc2271c784ef0f1 (diff)
downloadexternal_mesa3d-1edca151a00134778b959366d5e7c0a3b63cc8f7.zip
external_mesa3d-1edca151a00134778b959366d5e7c0a3b63cc8f7.tar.gz
external_mesa3d-1edca151a00134778b959366d5e7c0a3b63cc8f7.tar.bz2
mesa: GL_ARB_half_float_pixel is not optional
Almost every driver already supported it. All current and future Gallium drivers always support it, and most existing classic drivers support it. This only changes radeon and nouveau. This extension only adds data types that can be passed to, for example, glTexImage2D. It does not add internal formats. Since you can already pass GL_FLOAT to glTexImage2D this shouldn't pose any additional issues with those drivers. Note that r200 and i915 already supported this extension, and they don't support floating-point textures either. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/main/glformats.c')
-rw-r--r--src/mesa/main/glformats.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 7d4a310..77cf263 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1323,10 +1323,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_INT:
case GL_UNSIGNED_INT:
case GL_FLOAT:
- return GL_NO_ERROR;
case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
+ return GL_NO_ERROR;
default:
return GL_INVALID_ENUM;
}
@@ -1349,10 +1347,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_INT:
case GL_UNSIGNED_INT:
case GL_FLOAT:
- return GL_NO_ERROR;
case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
+ return GL_NO_ERROR;
default:
return GL_INVALID_ENUM;
}
@@ -1368,10 +1364,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_INT:
case GL_UNSIGNED_INT:
case GL_FLOAT:
- return GL_NO_ERROR;
case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
+ return GL_NO_ERROR;
default:
return GL_INVALID_ENUM;
}
@@ -1389,14 +1383,12 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_HALF_FLOAT:
return GL_NO_ERROR;
case GL_UNSIGNED_INT_2_10_10_10_REV:
/* OK by GL_EXT_texture_type_2_10_10_10_REV */
return (ctx->API == API_OPENGLES2)
? GL_NO_ERROR : GL_INVALID_ENUM;
- case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
case GL_UNSIGNED_INT_5_9_9_9_REV:
return ctx->Extensions.EXT_texture_shared_exponent
? GL_NO_ERROR : GL_INVALID_ENUM;
@@ -1419,10 +1411,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_INT:
case GL_UNSIGNED_INT:
case GL_FLOAT:
- return GL_NO_ERROR;
case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
+ return GL_NO_ERROR;
default:
return GL_INVALID_ENUM;
}
@@ -1446,10 +1436,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_INT_8_8_8_8_REV:
case GL_UNSIGNED_INT_10_10_10_2:
case GL_UNSIGNED_INT_2_10_10_10_REV:
- return GL_NO_ERROR;
case GL_HALF_FLOAT:
- return ctx->Extensions.ARB_half_float_pixel
- ? GL_NO_ERROR : GL_INVALID_ENUM;
+ return GL_NO_ERROR;
default:
return GL_INVALID_ENUM;
}