gallivm: make lp_build_sample_nop public
authorKeith Whitwell <keithw@vmware.com>
Thu, 16 Sep 2010 11:31:42 +0000 (12:31 +0100)
committerKeith Whitwell <keithw@vmware.com>
Thu, 16 Sep 2010 16:04:01 +0000 (17:04 +0100)
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c

index ff72b8e9f16a484055c281930e90b62a14381600..1a9cc944a33cb51a9e3e1d46d3f9deb0abaaa5d8 100644 (file)
@@ -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 */
index db6865bdf36427273e00a8602ab7233165a32eb2..69753d0601ffda7143cb44deb454c1127729ef90 100644 (file)
@@ -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) &&