mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
Revert "mesa: Add ARB_direct_state_access checks in texture functions"
This reverts commit 8940957238.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
92e362191e
commit
1ac6a8f1d1
6 changed files with 0 additions and 200 deletions
|
|
@ -158,13 +158,6 @@ _mesa_GenerateTextureMipmap(GLuint texture)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGenerateTextureMipmap(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, "glGenerateTextureMipmap");
|
||||
if (!texObj)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1108,13 +1108,6 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format,
|
|||
GLenum err;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureImage(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This has been moved here because a format/type mismatch can cause a NULL
|
||||
* texImage object, which in turn causes the mismatch error to be
|
||||
|
|
@ -1351,13 +1344,6 @@ _mesa_GetCompressedTextureImage(GLuint texture, GLint level,
|
|||
GLint image_stride;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetCompressedTextureImage(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetCompressedTextureImage");
|
||||
if (!texObj)
|
||||
|
|
|
|||
|
|
@ -3624,13 +3624,6 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
|
|||
_mesa_lookup_enum_by_nr(format),
|
||||
_mesa_lookup_enum_by_nr(type), pixels);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureSubImage%uD(GL_ARB_direct_state_access "
|
||||
"is not supported)", dims);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (!texObj) {
|
||||
|
|
@ -4190,12 +4183,6 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
|
|||
const char *self = "glCopyTextureSubImage1D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
|
@ -4220,12 +4207,6 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
|
|||
const char *self = "glCopyTextureSubImage2D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
|
@ -4253,12 +4234,6 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
|
|||
const char *self = "glCopyTextureSubImage3D";
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(GL_ARB_direct_state_access is not supported)", self);
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, self);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
|
@ -4854,13 +4829,6 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
|
|||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage1D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage1D");
|
||||
if (!texObj)
|
||||
|
|
@ -4939,13 +4907,6 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
|
|||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage2D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage2D");
|
||||
if (!texObj)
|
||||
|
|
@ -5024,13 +4985,6 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
|
|||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCompressedTextureSubImage3D(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glCompressedTextureSubImage3D");
|
||||
if (!texObj)
|
||||
|
|
@ -5515,13 +5469,6 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
|
|||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureBuffer(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBuffer");
|
||||
if (!bufObj)
|
||||
|
|
@ -5550,13 +5497,6 @@ _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
|
|||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureBufferRange(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
|
||||
"glTextureBufferRange");
|
||||
|
|
@ -5861,13 +5801,6 @@ _mesa_TextureStorage2DMultisample(GLuint texture, GLsizei samples,
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage2DMultisample(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glTextureStorage2DMultisample");
|
||||
if (!texObj)
|
||||
|
|
@ -5888,13 +5821,6 @@ _mesa_TextureStorage3DMultisample(GLuint texture, GLsizei samples,
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage3DMultisample(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glTextureStorage3DMultisample");
|
||||
|
|
|
|||
|
|
@ -1317,13 +1317,6 @@ _mesa_CreateTextures(GLenum target, GLsizei n, GLuint *textures)
|
|||
GLint targetIndex;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCreateTextures(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The 4.5 core profile spec (30.10.2014) doesn't specify what
|
||||
* glCreateTextures should do with invalid targets, which was probably an
|
||||
|
|
@ -1815,13 +1808,6 @@ _mesa_BindTextureUnit(GLuint unit, GLuint texture)
|
|||
_mesa_debug(ctx, "glBindTextureUnit %s %d\n",
|
||||
_mesa_lookup_enum_by_nr(GL_TEXTURE0+unit), (GLint) texture);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBindTextureUnit(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Section 8.1 (Texture Objects) of the OpenGL 4.5 core profile spec
|
||||
* (20141030) says:
|
||||
* "When texture is zero, each of the targets enumerated at the
|
||||
|
|
|
|||
|
|
@ -1108,13 +1108,6 @@ _mesa_TextureParameterfv(GLuint texture, GLenum pname, const GLfloat *params)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1131,13 +1124,6 @@ _mesa_TextureParameterf(GLuint texture, GLenum pname, GLfloat param)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterf(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1154,13 +1140,6 @@ _mesa_TextureParameteri(GLuint texture, GLenum pname, GLint param)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameteri(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1178,13 +1157,6 @@ _mesa_TextureParameteriv(GLuint texture, GLenum pname,
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1202,13 +1174,6 @@ _mesa_TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterIiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1226,13 +1191,6 @@ _mesa_TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureParameterIuiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -1692,13 +1650,6 @@ _mesa_GetTextureLevelParameterfv(GLuint texture, GLint level,
|
|||
GLint iparam;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureLevelParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetTextureLevelParameterfv");
|
||||
if (!texObj)
|
||||
|
|
@ -1717,13 +1668,6 @@ _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level,
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureLevelParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
"glGetTextureLevelParameteriv");
|
||||
if (!texObj)
|
||||
|
|
@ -2283,13 +2227,6 @@ _mesa_GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
|
|||
struct gl_texture_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterfv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!obj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -2307,13 +2244,6 @@ _mesa_GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
|
|||
struct gl_texture_object *obj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameteriv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
obj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!obj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -2331,13 +2261,6 @@ _mesa_GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterIiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
@ -2356,13 +2279,6 @@ _mesa_GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
|
|||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetTextureParameterIuiv(GL_ARB_direct_state_access "
|
||||
"is not supported)");
|
||||
return;
|
||||
}
|
||||
|
||||
texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
|
||||
if (!texObj) {
|
||||
/* User passed a non-generated name. */
|
||||
|
|
|
|||
|
|
@ -507,13 +507,6 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels,
|
|||
_mesa_lookup_enum_by_nr(internalformat),
|
||||
width, height, depth);
|
||||
|
||||
if (!ctx->Extensions.ARB_direct_state_access) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glTextureStorage%uD(GL_ARB_direct_state_access "
|
||||
"is not supported)", dims);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check the format to make sure it is sized. */
|
||||
if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue