mesa: rework texture completeness testing
[mesa.git] / src / mesa / main / texparam.c
index 205f51f4231a29553d6f946786268bbc7becfeb6..9abc503e3149915230dfdc3e91e78c3edc96290a 100644 (file)
@@ -212,8 +212,7 @@ flush(struct gl_context *ctx)
 
 /**
  * This is called just prior to changing any texture object state which
- * can effect texture completeness (texture base level, max level,
- * minification filter).
+ * can effect texture completeness (texture base level, max level).
  * Any pending rendering will be flushed out, we'll set the _NEW_TEXTURE
  * state flag and then mark the texture object as 'incomplete' so that any
  * per-texture derived state gets recomputed.
@@ -242,7 +241,7 @@ set_tex_parameteri(struct gl_context *ctx,
       switch (params[0]) {
       case GL_NEAREST:
       case GL_LINEAR:
-         incomplete(ctx, texObj);
+         flush(ctx);
          texObj->Sampler.MinFilter = params[0];
          return GL_TRUE;
       case GL_NEAREST_MIPMAP_NEAREST:
@@ -251,7 +250,7 @@ set_tex_parameteri(struct gl_context *ctx,
       case GL_LINEAR_MIPMAP_LINEAR:
          if (texObj->Target != GL_TEXTURE_RECTANGLE_NV &&
              texObj->Target != GL_TEXTURE_EXTERNAL_OES) {
-            incomplete(ctx, texObj);
+            flush(ctx);
             texObj->Sampler.MinFilter = params[0];
             return GL_TRUE;
          }