summaryrefslogtreecommitdiff
path: root/src/mesa/main/samplerobj.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-11-14 11:10:05 -0500
committerMarge Bot <eric+marge@anholt.net>2020-09-09 17:45:07 +0000
commit06c6920a5b1046305408089561c4e5f7b90511d5 (patch)
treed29e72f8acfdb6e185226f7df4b7b098e2a3497c /src/mesa/main/samplerobj.c
parent0f61f0142ac84a3b73eed5b7f414af457f3b3473 (diff)
mesa: Fix GL_CLAMP handling in glSamplerParameter
GL_CLAMP is only a thing in compat contexts. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6653>
Diffstat (limited to 'src/mesa/main/samplerobj.c')
-rw-r--r--src/mesa/main/samplerobj.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index fe1c0125341..0bf58859a54 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -480,6 +480,14 @@ validate_texture_wrap_mode(struct gl_context *ctx, GLenum wrap)
switch (wrap) {
case GL_CLAMP:
+ /* From GL 3.0 specification section E.1 "Profiles and Deprecated
+ * Features of OpenGL 3.0":
+ *
+ * - Texture wrap mode CLAMP - CLAMP is no longer accepted as a value of
+ * texture parameters TEXTURE_WRAP_S, TEXTURE_WRAP_T, or
+ * TEXTURE_WRAP_R.
+ */
+ return ctx->API == API_OPENGL_COMPAT;
case GL_CLAMP_TO_EDGE:
case GL_REPEAT:
case GL_MIRRORED_REPEAT: