diff options
author | Brian Paul <brianp@vmware.com> | 2010-03-11 11:17:15 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-03-11 11:17:37 -0700 |
commit | d6451190982fdae60dd0055550a54398729c64f4 (patch) | |
tree | 7258a0fe9f63afe8a1fcf926e589b92f28f22f6b | |
parent | ed1c69710c5046a80a86a9e8b51a1cb15b1b92eb (diff) |
gallivm: fix some bugs on the 1D texture paths
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index dadae61115..9358ad3860 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -1007,7 +1007,7 @@ lp_build_sample_image_nearest(struct lp_build_sample_context *bld, } } else { - y = NULL; + y = z = NULL; } /* @@ -1075,6 +1075,7 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld, } else { y0 = y1 = t_fpart = NULL; + z0 = z1 = r_fpart = NULL; } /* @@ -1092,9 +1093,11 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld, if (dims == 1) { /* Interpolate two samples from 1D image to produce one color */ - colors_out[chan] = lp_build_lerp(&bld->texel_bld, s_fpart, - neighbors[0][0][chan], - neighbors[0][1][chan]); + for (chan = 0; chan < 4; chan++) { + colors_out[chan] = lp_build_lerp(&bld->texel_bld, s_fpart, + neighbors[0][0][chan], + neighbors[0][1][chan]); + } } else { /* 2D/3D texture */ @@ -1198,10 +1201,10 @@ lp_build_sample_general(struct lp_build_sample_context *bld, const int dims = texture_dims(bld->static_state->target); LLVMValueRef lod, lod_fpart; LLVMValueRef ilevel0, ilevel1, ilevel0_vec, ilevel1_vec; - LLVMValueRef width0_vec, height0_vec, depth0_vec; - LLVMValueRef width1_vec, height1_vec, depth1_vec; - LLVMValueRef row_stride0_vec, row_stride1_vec; - LLVMValueRef img_stride0_vec, img_stride1_vec; + LLVMValueRef width0_vec = NULL, height0_vec = NULL, depth0_vec = NULL; + LLVMValueRef width1_vec = NULL, height1_vec = NULL, depth1_vec = NULL; + LLVMValueRef row_stride0_vec = NULL, row_stride1_vec = NULL; + LLVMValueRef img_stride0_vec = NULL, img_stride1_vec = NULL; LLVMValueRef data_ptr0, data_ptr1; int chan; |