st/mesa: Remove unnecessary headers.
[mesa.git] / src / mesa / state_tracker / st_atom_texture.c
index 241c001f94fa5b865876e83d8f45c0aee28cdb13..d403b7db1e5bf9047761bbb59fc37ab47a04884a 100644 (file)
@@ -46,6 +46,7 @@
 static void 
 update_textures(struct st_context *st)
 {
+   struct pipe_context *pipe = st->pipe;
    struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current;
    struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
    const GLbitfield samplersUsed = (vprog->Base.SamplersUsed |
@@ -61,7 +62,7 @@ update_textures(struct st_context *st)
       if (samplersUsed & (1 << su)) {
          struct gl_texture_object *texObj;
          struct st_texture_object *stObj;
-         GLboolean flush, retval;
+         GLboolean retval;
          GLuint texUnit;
 
          if (fprog->Base.SamplersUsed & (1 << su))
@@ -76,7 +77,7 @@ update_textures(struct st_context *st)
          }
          stObj = st_texture_object(texObj);
 
-         retval = st_finalize_texture(st->ctx, st->pipe, texObj, &flush);
+         retval = st_finalize_texture(st->ctx, st->pipe, texObj);
          if (!retval) {
             /* out of mem */
             continue;
@@ -84,18 +85,9 @@ update_textures(struct st_context *st)
 
          st->state.num_textures = su + 1;
 
-         sampler_view = st_get_stobj_sampler_view(stObj);
+         sampler_view = st_get_texture_sampler_view(stObj, pipe);
       }
 
-      /*
-      if (pt) {
-         printf("%s su=%u non-null\n", __FUNCTION__, su);
-      }
-      else {
-         printf("%s su=%u null\n", __FUNCTION__, su);
-      }
-      */
-
       pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view);
    }
 
@@ -137,19 +129,16 @@ finalize_textures(struct st_context *st)
          const GLuint texUnit = fprog->Base.SamplerUnits[su];
          struct gl_texture_object *texObj
             = st->ctx->Texture.Unit[texUnit]._Current;
-         struct st_texture_object *stObj = st_texture_object(texObj);
 
          if (texObj) {
-            GLboolean flush, retval;
+            GLboolean retval;
 
-            retval = st_finalize_texture(st->ctx, st->pipe, texObj, &flush);
+            retval = st_finalize_texture(st->ctx, st->pipe, texObj);
             if (!retval) {
                /* out of mem */
                st->missing_textures = GL_TRUE;
                continue;
             }
-
-            stObj->teximage_realloc = TRUE;
          }
       }
    }