diff options
author | Brian Paul <[email protected]> | 2011-03-07 18:59:39 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-03-07 18:59:42 -0700 |
commit | 2c1ef65a04de8d61fddee55c7a2f0673d69235d5 (patch) | |
tree | 3110a55c8e7c8342c7a01b8566eb5410a13f5a69 /src | |
parent | 0eef561a5bb10df343837d58d37d5c0d5b708243 (diff) |
llvmpipe: clamp texcoords in lp_build_sample_compare()
See previous commit for more info.
NOTE: This is a candidate for the 7.10 branch.
Diffstat (limited to 'src')
-rw-r--r-- | 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 1fec3adf5b1..9961ba08f3a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -1108,6 +1108,11 @@ lp_build_sample_compare(struct lp_build_sample_context *bld, coord, tex); } + /* Clamp p coords to [0,1] */ + p = lp_build_clamp(&bld->coord_bld, p, + bld->coord_bld.zero, + bld->coord_bld.one); + /* result = (p FUNC texel) ? 1 : 0 */ res = lp_build_cmp(texel_bld, bld->static_state->compare_func, p, texel[chan]); |