diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-11-30 17:12:00 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-12-08 17:59:33 +0000 |
commit | 6cf7245f6938e27c9b8a1742f27659aec017bbdc (patch) | |
tree | 79397228a7f7408efd756f6e58298ff9977204f7 /src/gallium/drivers/llvmpipe/lp_context.h | |
parent | f32c7232a8a16887af710a11f025381bc73640f0 (diff) | |
download | external_mesa3d-6cf7245f6938e27c9b8a1742f27659aec017bbdc.zip external_mesa3d-6cf7245f6938e27c9b8a1742f27659aec017bbdc.tar.gz external_mesa3d-6cf7245f6938e27c9b8a1742f27659aec017bbdc.tar.bz2 |
llvmpipe: Trim the fragment shader cached based on LLVM IR instruction count.
Number of fragment shader variants is not very representative of the
memory used by LLVM, neither is number of shader instructions, as often
texture sampling constitutes most of the generated code.
This change adds an additional trim criteria: least recently used
fragment shader variants will be freed until the total number of LLVM IR
instruction falls below a specified threshold.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_context.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index 70fba21..438fc88 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -129,6 +129,7 @@ struct llvmpipe_context { /** List of all fragment shader variants */ struct lp_fs_variant_list_item fs_variants_list; unsigned nr_fs_variants; + unsigned nr_fs_instrs; /** JIT code generation */ struct gallivm_state *gallivm; |