gallivm: implement TG4 for ARB_texture_gather

Graphics / Mesa 3D Graphics Library / Mesa - Roland Scheidegger [vmware.com] - 31 March 2015 10:23 UTC

This is quite trivial, essentially just follow all the same code you'd use with linear min/mag (and no mip) filter, then just skip the filtering after looking up the texels in favor of direct assignment of the right channel to the result. (This is though not true for the multi-offset version if we'd want to support it - for this would probably need to do something along the lines of 4x nearest sampling due to the necessity of doing coord wrapping individually per texel.) Supports multi-channel formats. From the SM5 gather cap bit, should support non-constant offsets, plus shadow comparisons (the former untested), but not component selection (should be easy to implement but all this stuff is not really exposable anyway for now).

0753b13 gallivm: implement TG4 for ARB_texture_gather
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 137 ++++++++++++++++-----
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 36 ++++--
2 files changed, 133 insertions(+), 40 deletions(-)

Upstream: cgit.freedesktop.org


  • Share