summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-05 09:27:52 -0700
committerBrian Paul <[email protected]>2017-12-05 15:32:25 -0700
commit323e6029a34aac50d2cae90503f21f96ae968305 (patch)
tree9c5fb6f0628a2a5408b6fa4ceea663a83ca51eed /src/mesa/main
parent726e495bbdf08b7914ea9e3afb1ba2c3d8c1d549 (diff)
mesa: simplify/improve some _mesa_error() calls in teximage.c
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/teximage.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 41de966d793..572e380872b 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -5778,14 +5778,10 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
}
if (!check_multisample_target(dims, target, dsa)) {
- if (dsa) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(target)", func);
- return;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
- return;
- }
+ GLenum err = dsa ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
+ _mesa_error(ctx, err, "%s(target=%s)", func,
+ _mesa_enum_to_string(target));
+ return;
}
/* check that the specified internalformat is color/depth/stencil-renderable;
@@ -5826,7 +5822,7 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
* However, if samples is not supported, then no error is generated.
*/
if (!samplesOK && !_mesa_is_proxy_texture(target)) {
- _mesa_error(ctx, sample_count_error, "%s(samples)", func);
+ _mesa_error(ctx, sample_count_error, "%s(samples=%d)", func, samples);
return;
}