r300g: only check for an empty shader if there are no compile errors
[mesa.git] / src / gallium / drivers / softpipe / sp_state_derived.c
index d2eda7324ca22a887d50fed9e71b1b7244a31697..3ba4d934fd243538eed4b4e3c329128c327ad60e 100644 (file)
@@ -202,7 +202,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
    for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
       struct softpipe_tex_tile_cache *tc = softpipe->tex_cache[i];
       if (tc->texture) {
-         struct softpipe_texture *spt = softpipe_texture(tc->texture);
+         struct softpipe_resource *spt = softpipe_resource(tc->texture);
          if (spt->timestamp != tc->timestamp) {
            sp_tex_tile_cache_validate_texture( tc );
             /*
@@ -217,7 +217,20 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
       struct softpipe_tex_tile_cache *tc = softpipe->vertex_tex_cache[i];
 
       if (tc->texture) {
-         struct softpipe_texture *spt = softpipe_texture(tc->texture);
+         struct softpipe_resource *spt = softpipe_resource(tc->texture);
+
+         if (spt->timestamp != tc->timestamp) {
+           sp_tex_tile_cache_validate_texture(tc);
+            tc->timestamp = spt->timestamp;
+         }
+      }
+   }
+
+   for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) {
+      struct softpipe_tex_tile_cache *tc = softpipe->geometry_tex_cache[i];
+
+      if (tc->texture) {
+         struct softpipe_resource *spt = softpipe_resource(tc->texture);
 
          if (spt->timestamp != tc->timestamp) {
            sp_tex_tile_cache_validate_texture(tc);