llvmpipe: kill off llvmpipe_variant_count
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>
This commit is contained in:
@@ -47,10 +47,6 @@
|
||||
#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 );
|
||||
|
||||
@@ -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 *
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user