From b3b3b389fa7756869e7a8bc2755bce081c94945f Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 1 Mar 2013 02:25:13 +0100 Subject: gallivm: add support for texel offsets for ordinary texturing. This was previously only handled for texelFetch (much easier). Depending on the wrap mode this works slightly differently (for somewhat efficient implementation), hence have to do that separately in all roughly 137 places - it is easy if we use fixed point coords for wrapping, however some wrapping modes are near impossible with fixed point (the repeat stuff) hence we have to normalize the offsets if we can't do the wrapping in unnormalized space (which is a division which is slow but should still be much better than the alternative, which would be integer modulo for wrapping which is just unusable). This should still give accurate results in all cases that really matter, though it might be not quite conformant behavior for some apis (but we have much worse problems there anyway even without using offsets). (Untested, no piglit test.) Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h index 6590e8c..6fce971 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.h @@ -46,6 +46,7 @@ lp_build_sample_aos(struct lp_build_sample_context *bld, LLVMValueRef s, LLVMValueRef t, LLVMValueRef r, + const LLVMValueRef *offsets, LLVMValueRef lod_ipart, LLVMValueRef lod_fpart, LLVMValueRef ilevel0, -- cgit v1.1