diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-09-16 10:45:52 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-09-16 17:34:19 +0100 |
commit | 5f00819cb382bdb70c29e2db3c6ff22a879bf10f (patch) | |
tree | 6c28495f4caef7c8610189ed011f50596b0e545c /src/gallium/drivers/llvmpipe/lp_tex_sample.c | |
parent | 045ee4601179c44f815ce3842ef900b36d54c914 (diff) |
llvmpipe: add LP_PERF flag to disable various aspects of rasterization
Allows disabling various operations (mainly texture-related, but
will grow) to try & identify bottlenecks.
Unlike LP_DEBUG, this is active even in release builds - which is
necessary for performance investigation.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_tex_sample.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_tex_sample.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c index 65208dd5d5..4e026cc8ff 100644 --- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c +++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c @@ -48,6 +48,7 @@ #include "gallivm/lp_bld_tgsi.h" #include "lp_jit.h" #include "lp_tex_sample.h" +#include "lp_debug.h" /** @@ -179,6 +180,11 @@ lp_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base, struct lp_llvm_sampler_soa *sampler = (struct lp_llvm_sampler_soa *)base; assert(unit < PIPE_MAX_SAMPLERS); + + if (LP_PERF & PERF_NO_TEX) { + lp_build_sample_nop(type, texel); + return; + } lp_build_sample_soa(builder, &sampler->dynamic_state.static_state[unit], |