llvmpipe: kill off llvmpipe_variant_count
authorRoland Scheidegger <sroland@vmware.com>
Tue, 13 May 2014 00:20:32 +0000 (02:20 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 15 May 2014 00:35:26 +0000 (02:35 +0200)
Unused except it was increased for both fs and setup shader variants created.
Probably some leftover from ages ago.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_context.h
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_setup.c

index ac074085589cb780c327a553d98c76e1aa449dff..d9696c2067d70be8a882de21e141530243b85f04 100644 (file)
 #include "lp_setup.h"
 
 
-/** shared by all contexts */
-unsigned llvmpipe_variant_count;
-
-
 static void llvmpipe_destroy( struct pipe_context *pipe )
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
index ee8033cd28e31013bd0264b1ad250b1f6c254958..ee0831fbb6d438ec2247d0d0e2d8a10158c9513f 100644 (file)
@@ -156,14 +156,6 @@ struct llvmpipe_context {
 };
 
 
-/**
- * Fragment and setup variant count, used to trigger garbage collection.
- * This is global since all variants in all contexts will be free when
- * we do garbage collection.
- */
-extern unsigned llvmpipe_variant_count;
-
-
 struct pipe_context *
 llvmpipe_create_context( struct pipe_screen *screen, void *priv );
 
@@ -171,7 +163,7 @@ struct pipe_resource *
 llvmpipe_user_buffer_create(struct pipe_screen *screen,
                             void *ptr,
                             unsigned bytes,
-                           unsigned bind_flags);
+                            unsigned bind_flags);
 
 
 static INLINE struct llvmpipe_context *
index a26b9812c9f25cca62b1e9ead3eefac559f43479..655891cffb16d51cb72842992d58c7380a958302 100644 (file)
@@ -3165,8 +3165,6 @@ llvmpipe_update_fs(struct llvmpipe_context *lp)
       LP_COUNT_ADD(llvm_compile_time, dt);
       LP_COUNT_ADD(nr_llvm_compiles, 2);  /* emit vs. omit in/out test */
 
-      llvmpipe_variant_count++;
-
       /* Put the new variant into the list */
       if (variant) {
          insert_at_head(&shader->variants, &variant->list_item_local);
index 10ede56b3433f58fb57b589f19d2359bc0d2b05b..870459f512656b3b891cb2993926f987fccf7c6e 100644 (file)
@@ -946,7 +946,7 @@ llvmpipe_update_setup(struct llvmpipe_context *lp)
 
    foreach(li, &lp->setup_variants_list) {
       if(li->base->key.size == key->size &&
-        memcmp(&li->base->key, key, key->size) == 0) {
+         memcmp(&li->base->key, key, key->size) == 0) {
          variant = li->base;
          break;
       }
@@ -957,19 +957,17 @@ llvmpipe_update_setup(struct llvmpipe_context *lp)
    }
    else {
       if (lp->nr_setup_variants >= LP_MAX_SETUP_VARIANTS) {
-        cull_setup_variants(lp);
+         cull_setup_variants(lp);
       }
 
       variant = generate_setup_variant(key, lp);
       if (variant) {
          insert_at_head(&lp->setup_variants_list, &variant->list_item_global);
          lp->nr_setup_variants++;
-         llvmpipe_variant_count++;
       }
    }
 
-   lp_setup_set_setup_variant(lp->setup,
-                             variant);
+   lp_setup_set_setup_variant(lp->setup, variant);
 }
 
 void