sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameteri(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glSamplerParameteri(sampler %u)", sampler);
return;
}
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterf(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glSamplerParameterf(sampler %u)", sampler);
return;
}
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameteriv(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glSamplerParameteriv(sampler %u)", sampler);
return;
}
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterfv(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glSamplerParameterfv(sampler %u)", sampler);
return;
}
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetSamplerParameteriv(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glGetSamplerParameteriv(sampler %u)", sampler);
return;
}
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetSamplerParameterfv(sampler %u)",
- sampler);
+ /* '3.8.2 Sampler Objects' section of the GL-ES 3.0 specification states:
+ *
+ * "An INVALID_OPERATION error is generated if sampler is not the name
+ * of a sampler object previously returned from a call to GenSamplers."
+ *
+ * In desktop GL, an GL_INVALID_VALUE is returned instead.
+ */
+ _mesa_error(ctx, (_mesa_is_gles(ctx) ?
+ GL_INVALID_OPERATION : GL_INVALID_VALUE),
+ "glGetSamplerParameterfv(sampler %u)", sampler);
return;
}