diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-10-06 18:44:51 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-10-06 18:51:25 +0100 |
commit | 87dd859b342b844add906358810445da21b6b092 (patch) | |
tree | f36dd3bf9f2213917bc9764b5b1aaf24b1108065 /src/gallium/auxiliary/gallivm/lp_bld_sample.h | |
parent | 1c32583581ef5aee59901d9dd8e56cc1a125f0d4 (diff) |
gallivm: Compute lod as integer whenever possible.
More accurate/faster results for PIPE_TEX_MIPFILTER_NEAREST. Less
FP <-> SI conversion overall.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_sample.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index bb83ede931..b019c3fa5e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -274,7 +274,7 @@ lp_sampler_static_state(struct lp_sampler_static_state *state, const struct pipe_sampler_state *sampler); -LLVMValueRef +void lp_build_lod_selector(struct lp_build_sample_context *bld, unsigned unit, const LLVMValueRef ddx[4], @@ -283,7 +283,10 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, LLVMValueRef explicit_lod, /* optional */ LLVMValueRef width, LLVMValueRef height, - LLVMValueRef depth); + LLVMValueRef depth, + unsigned mip_filter, + LLVMValueRef *out_lod_ipart, + LLVMValueRef *out_lod_fpart); void lp_build_nearest_mip_level(struct lp_build_sample_context *bld, @@ -294,10 +297,9 @@ lp_build_nearest_mip_level(struct lp_build_sample_context *bld, void lp_build_linear_mip_levels(struct lp_build_sample_context *bld, unsigned unit, - LLVMValueRef lod, + LLVMValueRef lod_ipart, LLVMValueRef *level0_out, - LLVMValueRef *level1_out, - LLVMValueRef *weight_out); + LLVMValueRef *level1_out); LLVMValueRef lp_build_get_mipmap_level(struct lp_build_sample_context *bld, |