return GL_NO_ERROR;
case GL_RG:
case GL_RED:
- if (_mesa_is_gles3(ctx) || ctx->Extensions.ARB_texture_rg)
+ if (_mesa_has_rg_textures(ctx))
return GL_NO_ERROR;
default:
return GL_INVALID_OPERATION;
}
case GL_RG:
- if (!ctx->Extensions.ARB_texture_rg)
- return GL_INVALID_ENUM;
+ if (!_mesa_has_rg_textures(ctx))
+ return GL_INVALID_ENUM;
switch (type) {
case GL_BYTE:
case GL_UNSIGNED_BYTE:
switch (format) {
case GL_RED:
case GL_RG:
- if (ctx->API == API_OPENGLES || !ctx->Extensions.ARB_texture_rg)
+ if (!_mesa_has_rg_textures(ctx))
return GL_INVALID_VALUE;
/* fallthrough */
case GL_ALPHA:
}
}
- if (ctx->Extensions.ARB_texture_rg) {
+ if (_mesa_has_rg_textures(ctx)) {
switch (internalFormat) {
case GL_R16F:
case GL_R32F:
break;
case GL_RG:
- if (!ctx->Extensions.ARB_texture_rg)
+ if (!_mesa_has_rg_textures(ctx))
return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
return GL_INVALID_OPERATION;
break;
case GL_RG:
- if (ctx->Extensions.ARB_texture_rg &&
+ if (_mesa_has_rg_textures(ctx) &&
ctx->Extensions.OES_texture_half_float)
break;
/* fallthrough */
case GL_RG32F:
break;
case GL_RG:
- if (ctx->Extensions.ARB_texture_rg &&
+ if (_mesa_has_rg_textures(ctx) &&
ctx->Extensions.OES_texture_float)
break;
/* fallthrough */
break;
case GL_RED:
- if (!ctx->Extensions.ARB_texture_rg)
+ if (!_mesa_has_rg_textures(ctx))
return GL_INVALID_OPERATION;
switch (type) {
case GL_UNSIGNED_BYTE:
break;
case GL_RG:
case GL_RED:
- if (ctx->Extensions.ARB_texture_rg &&
+ if (_mesa_has_rg_textures(ctx) &&
ctx->Extensions.OES_texture_half_float)
break;
/* fallthrough */
case GL_R32F:
break;
case GL_RED:
- if (ctx->Extensions.ARB_texture_rg &&
+ if (_mesa_has_rg_textures(ctx) &&
ctx->Extensions.OES_texture_float)
break;
/* fallthrough */