示例#1
0
static void
update_tgsi_samplers( struct softpipe_context *softpipe )
{
   unsigned i;

   softpipe_reset_sampler_variants( softpipe );

   for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
      struct softpipe_tex_tile_cache *tc = softpipe->fragment_tex_cache[i];
      if (tc && tc->texture) {
         struct softpipe_resource *spt = softpipe_resource(tc->texture);
         if (spt->timestamp != tc->timestamp) {
	    sp_tex_tile_cache_validate_texture( tc );
            /*
            _debug_printf("INV %d %d\n", tc->timestamp, spt->timestamp);
            */
            tc->timestamp = spt->timestamp;
         }
      }
   }

   for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
      struct softpipe_tex_tile_cache *tc = softpipe->vertex_tex_cache[i];

      if (tc && 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 && 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;
         }
      }
   }
}
示例#2
0
static void
update_tgsi_samplers( struct softpipe_context *softpipe )
{
    unsigned i, sh;

    softpipe_reset_sampler_variants( softpipe );

    for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) {
        for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
            struct softpipe_tex_tile_cache *tc = softpipe->tex_cache[sh][i];
            if (tc && tc->texture) {
                struct softpipe_resource *spt = softpipe_resource(tc->texture);
                if (spt->timestamp != tc->timestamp) {
                    sp_tex_tile_cache_validate_texture( tc );
                    /*
                      _debug_printf("INV %d %d\n", tc->timestamp, spt->timestamp);
                    */
                    tc->timestamp = spt->timestamp;
                }
            }
        }
    }
}