Mesa (master): gallivm: add some assertions in special-case sampler code

Brian Paul brianp at kemper.freedesktop.org
Thu Apr 29 15:39:38 UTC 2010


Module: Mesa
Branch: master
Commit: 60a6bfefd115b93aaae2a3e11191ecb22ec65f56
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60a6bfefd115b93aaae2a3e11191ecb22ec65f56

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Apr 29 09:13:47 2010 -0600

gallivm: add some assertions in special-case sampler code

---

 src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 54ef921..74dc9e1 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -1830,6 +1830,11 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
    LLVMValueRef unswizzled[4];
    LLVMValueRef stride;
 
+   assert(bld->static_state->target == PIPE_TEXTURE_2D);
+   assert(bld->static_state->min_img_filter == PIPE_TEX_FILTER_LINEAR);
+   assert(bld->static_state->mag_img_filter == PIPE_TEX_FILTER_LINEAR);
+   assert(bld->static_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE);
+
    lp_build_context_init(&i32, builder, lp_type_int_vec(32));
    lp_build_context_init(&h16, builder, lp_type_ufixed(16));
    lp_build_context_init(&u8n, builder, lp_type_unorm(8));




More information about the mesa-commit mailing list