case GL_RGBA8I_EXT:
case GL_RGBA16I_EXT:
case GL_RGBA32I_EXT:
- return ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0;
case GL_RGB8UI_EXT:
case GL_RGB16UI_EXT:
case GL_RGB8I_EXT:
case GL_RGB16I_EXT:
case GL_RGB32I_EXT:
- return ctx->Extensions.EXT_texture_integer ? GL_RGB : 0;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer ? GL_RGB : 0;
case GL_R8UI:
case GL_R8I:
case GL_R16I:
case GL_R32UI:
case GL_R32I:
- return ctx->Extensions.ARB_texture_rg &&
- ctx->Extensions.EXT_texture_integer ? GL_RED : 0;
+ return ctx->VersionMajor >= 3 ||
+ (ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer) ? GL_RED : 0;
case GL_RG8UI:
case GL_RG8I:
case GL_RG16I:
case GL_RG32UI:
case GL_RG32I:
- return ctx->Extensions.ARB_texture_rg &&
- ctx->Extensions.EXT_texture_integer ? GL_RG : 0;
+ return ctx->VersionMajor >= 3 ||
+ (ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer) ? GL_RG : 0;
case GL_INTENSITY8I_EXT:
case GL_INTENSITY8UI_EXT:
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
default:
return GL_FALSE;
}
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_INT:
case GL_UNSIGNED_INT:
/* NOTE: no packed formats w/ BGR format */
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
default:
return GL_FALSE;
}
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
case GL_UNSIGNED_SHORT_5_5_5_1:
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
break;
+ }
+ }
+
+ if (ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
case GL_RGB8UI_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
}
}
- if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.EXT_texture_integer) {
+ if (ctx->VersionMajor >= 3 ||
+ (ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer)) {
switch (internalFormat) {
case GL_R8UI:
RETURN_IF_SUPPORTED(MESA_FORMAT_R_UINT8);
}
#endif /* FEATURE_EXT_texture_sRGB */
- if (ctx->Extensions.EXT_texture_integer) {
+ if (ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer) {
switch (internalFormat) {
case GL_RGBA8UI_EXT:
case GL_RGBA16UI_EXT:
case GL_RGB16I_EXT:
case GL_RGB32I_EXT:
return GL_RGB;
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
case GL_ALPHA8UI_EXT:
case GL_ALPHA16UI_EXT:
case GL_ALPHA32UI_EXT:
case GL_R16UI:
case GL_R32I:
case GL_R32UI:
- if (!ctx->Extensions.EXT_texture_integer)
+ if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer)
break;
/* FALLTHROUGH */
case GL_R8:
case GL_RG16UI:
case GL_RG32I:
case GL_RG32UI:
- if (!ctx->Extensions.EXT_texture_integer)
+ if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer)
break;
/* FALLTHROUGH */
case GL_RG:
}
/* additional checks for integer textures */
- if (ctx->Extensions.EXT_texture_integer &&
+ if ((ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) &&
(_mesa_is_integer_format(format) !=
_mesa_is_integer_format(internalFormat))) {
if (!isProxy) {
ctx->Extensions.EXT_framebuffer_sRGB &&
ctx->Extensions.EXT_packed_float &&
ctx->Extensions.EXT_texture_array &&
- ctx->Extensions.EXT_texture_integer &&
ctx->Extensions.EXT_texture_shared_exponent &&
ctx->Extensions.EXT_transform_feedback &&
ctx->Extensions.NV_conditional_render);