[Mesa-dev] [PATCH 01/14] mesa: remove redundant error check

Timothy Arceri tarceri at itsqueeze.com
Wed Jun 28 06:13:39 UTC 2017


We do the same check in the shared code in the set_tex_parameterf()
call.
---
 src/mesa/main/texparam.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 3c110de..6c908af 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -954,10 +954,6 @@ _mesa_texture_parameteriv(struct gl_context *ctx,
    switch (pname) {
    case GL_TEXTURE_BORDER_COLOR:
       {
-         if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) {
-            _mesa_error(ctx, GL_INVALID_ENUM, "glTextureParameteriv(texture)");
-            return;
-         }
          /* convert int params to float */
          GLfloat fparams[4];
          fparams[0] = INT_TO_FLOAT(params[0]);
-- 
2.9.4



More information about the mesa-dev mailing list