summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-06-07 01:35:08 -0700
committerIan Romanick <[email protected]>2017-06-28 14:51:05 -0700
commit2e3f40272e7d8905969e7dd319a463097787fb57 (patch)
treec6da8a1b75e2b4c808229a9f2df9038e5bdf46c1 /src/mesa/main
parent36bd4a5f21f9e7060def6cf5501040b0509a2a00 (diff)
mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on GL_ARB_texture_border_clamp
On NV20 (and probably also on earlier NV GPUs that lack GL_ARB_texture_border_clamp) fixes the following piglit tests: gl-1.0-beginend-coverage gltexparameter[if]{v,} push-pop-texture-state texwrap 1d texwrap 1d proj texwrap 2d proj texwrap formats All told, 49 more tests pass on NV20 (10de:0201). No changes on Intel CI run or RV250 (1002:4c66). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texparam.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 3c110de839a..857faf6f3ad 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -736,8 +736,16 @@ set_tex_parameterf(struct gl_context *ctx,
break;
case GL_TEXTURE_BORDER_COLOR:
+ /* Border color exists in desktop OpenGL since 1.0 for GL_CLAMP. In
+ * OpenGL ES 2.0+, it only exists in when GL_OES_texture_border_clamp is
+ * enabled. It is never available in OpenGL ES 1.x.
+ *
+ * FIXME: Every driver that supports GLES2 has this extension. Elide
+ * the check?
+ */
if (ctx->API == API_OPENGLES ||
- !ctx->Extensions.ARB_texture_border_clamp)
+ (ctx->API == API_OPENGLES2 &&
+ !ctx->Extensions.ARB_texture_border_clamp))
goto invalid_pname;
if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))