return _mesa_has_ARB_depth_buffer_float(ctx) || _mesa_is_gles3(ctx);
}
+static inline bool
+_mesa_has_packed_float(const struct gl_context *ctx)
+{
+ return _mesa_has_EXT_packed_float(ctx) || _mesa_is_gles3(ctx);
+}
+
/**
* Checks if the context supports geometry shaders.
*/
return GL_NO_ERROR;
case GL_UNSIGNED_INT_10F_11F_11F_REV:
- if (!ctx->Extensions.EXT_packed_float) {
+ if (!_mesa_has_packed_float(ctx)) {
return GL_INVALID_ENUM;
}
if (format != GL_RGB) {
return ctx->Extensions.EXT_texture_shared_exponent
? GL_NO_ERROR : GL_INVALID_ENUM;
case GL_UNSIGNED_INT_10F_11F_11F_REV:
- return ctx->Extensions.EXT_packed_float
+ return _mesa_has_packed_float(ctx)
? GL_NO_ERROR : GL_INVALID_ENUM;
default:
return GL_INVALID_ENUM;
}
}
- if (ctx->Extensions.EXT_packed_float) {
+ if (_mesa_has_packed_float(ctx)) {
switch (internalFormat) {
case GL_R11F_G11F_B10F_EXT:
return GL_RGB;