Mesa (master): gallivm: make lp_build_sample_nop public

Keith Whitwell keithw at kemper.freedesktop.org
Thu Sep 16 16:35:14 UTC 2010


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Thu Sep 16 12:31:42 2010 +0100

gallivm: make lp_build_sample_nop public

---

 src/gallium/auxiliary/gallivm/lp_bld_sample.h     |    3 +++
 src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |   11 +++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
index ff72b8e..1a9cc94 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
@@ -346,6 +346,9 @@ lp_build_sample_soa(LLVMBuilderRef builder,
                     LLVMValueRef explicit_lod,
                     LLVMValueRef texel_out[4]);
 
+void
+lp_build_sample_nop(struct lp_type type,
+                    LLVMValueRef texel_out[4]);
 
 
 #endif /* LP_BLD_SAMPLE_H */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index db6865b..69753d0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -1095,16 +1095,15 @@ lp_build_sample_compare(struct lp_build_sample_context *bld,
  * Just set texels to white instead of actually sampling the texture.
  * For debugging.
  */
-static void
-lp_build_sample_nop(struct lp_build_sample_context *bld,
+void
+lp_build_sample_nop(struct lp_type type,
                     LLVMValueRef texel_out[4])
 {
-   struct lp_build_context *texel_bld = &bld->texel_bld;
+   LLVMValueRef one = lp_build_one(type);
    unsigned chan;
 
    for (chan = 0; chan < 4; chan++) {
-      /*lp_bld_mov(texel_bld, texel, texel_bld->one);*/
-      texel_out[chan] = texel_bld->one;
+      texel_out[chan] = one;
    }  
 }
 
@@ -1189,7 +1188,7 @@ lp_build_sample_soa(LLVMBuilderRef builder,
 
    if (0) {
       /* For debug: no-op texture sampling */
-      lp_build_sample_nop(&bld, texel_out);
+      lp_build_sample_nop(bld.texel_type, texel_out);
    }
    else if (util_format_fits_8unorm(bld.format_desc) &&
             lp_is_simple_wrap_mode(static_state->wrap_s) &&




More information about the mesa-commit mailing list