aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstorage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstorage.c')
-rw-r--r--src/mesa/main/texstorage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 9fd969fbc53..f4a076028fb 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -358,11 +358,11 @@ tex_storage_error_check(struct gl_context *ctx,
}
/* additional checks for depth textures */
- if (!_mesa_legal_texture_base_format_for_target(ctx, target, internalformat,
- dims, dsa ?
- "glTextureStorage" :
- "glTexStorage"))
+ if (!_mesa_legal_texture_base_format_for_target(ctx, target, internalformat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTex%sStorage%uD(bad target for texture)",
+ suffix, dims);
return GL_TRUE;
+ }
return GL_FALSE;
}