case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer)
+ return _mesa_has_integer_textures(ctx)
? GL_NO_ERROR : GL_INVALID_ENUM;
default:
return GL_INVALID_ENUM;
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer)
+ return _mesa_has_integer_textures(ctx)
? GL_NO_ERROR : GL_INVALID_ENUM;
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_INT:
case GL_UNSIGNED_INT:
/* NOTE: no packed formats w/ BGR format */
- return (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer)
+ return _mesa_has_integer_textures(ctx)
? GL_NO_ERROR : GL_INVALID_ENUM;
default:
return GL_INVALID_ENUM;
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer)
+ return _mesa_has_integer_textures(ctx)
? GL_NO_ERROR : GL_INVALID_ENUM;
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
}
}
- if (ctx->Version >= 30 ||
- ctx->Extensions.EXT_texture_integer) {
+ if (_mesa_has_integer_textures(ctx)) {
switch (internalFormat) {
case GL_RGBA8UI_EXT:
case GL_RGBA16UI_EXT:
case GL_R16UI:
case GL_R32I:
case GL_R32UI:
- if (ctx->Version < 30 && !ctx->Extensions.EXT_texture_integer)
- break;
- /* FALLTHROUGH */
+ if (!_mesa_has_integer_textures(ctx))
+ break;
+ /* FALLTHROUGH */
case GL_R8:
case GL_R16:
case GL_RED:
case GL_RG16UI:
case GL_RG32I:
case GL_RG32UI:
- if (ctx->Version < 30 && !ctx->Extensions.EXT_texture_integer)
- break;
- /* FALLTHROUGH */
+ if (!_mesa_has_integer_textures(ctx))
+ break;
+ /* FALLTHROUGH */
case GL_RG:
case GL_RG8:
case GL_RG16: