return GL_INVALID_OPERATION;
break;
case GL_RGBA:
- if (_mesa_has_OES_texture_float(ctx) && internalFormat == format)
- break;
- /* fallthrough */
+ if (!_mesa_has_OES_texture_float(ctx) || internalFormat != format)
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
break;
case GL_HALF_FLOAT_OES:
- if (_mesa_has_OES_texture_half_float(ctx) && internalFormat == format)
- break;
- /* fallthrough */
+ if (!_mesa_has_OES_texture_half_float(ctx) || internalFormat != format)
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
return GL_INVALID_OPERATION;
break;
case GL_RGB:
- if (_mesa_has_OES_texture_float(ctx) && internalFormat == format)
- break;
- /* fallthrough */
+ if (!_mesa_has_OES_texture_float(ctx) || internalFormat != format)
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
return GL_INVALID_OPERATION;
break;
case GL_RG:
- if (_mesa_has_rg_textures(ctx) &&
- _mesa_has_OES_texture_half_float(ctx))
- break;
- /* fallthrough */
+ if (!_mesa_has_rg_textures(ctx) ||
+ !_mesa_has_OES_texture_half_float(ctx))
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
case GL_RG32F:
break;
case GL_RG:
- if (_mesa_has_rg_textures(ctx) &&
- _mesa_has_OES_texture_float(ctx))
- break;
- /* fallthrough */
+ if (!_mesa_has_rg_textures(ctx) ||
+ !_mesa_has_OES_texture_float(ctx))
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
break;
case GL_RG:
case GL_RED:
- if (_mesa_has_rg_textures(ctx) &&
- _mesa_has_OES_texture_half_float(ctx))
- break;
- /* fallthrough */
+ if (!_mesa_has_rg_textures(ctx) ||
+ !_mesa_has_OES_texture_half_float(ctx))
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}
case GL_R32F:
break;
case GL_RED:
- if (_mesa_has_rg_textures(ctx) &&
- _mesa_has_OES_texture_float(ctx))
- break;
- /* fallthrough */
+ if (!_mesa_has_rg_textures(ctx) ||
+ !_mesa_has_OES_texture_float(ctx))
+ return GL_INVALID_OPERATION;
+ break;
default:
return GL_INVALID_OPERATION;
}