gallivm,llvmpipe: handle TXF (texelFetch) instruction, including offsets
authorRoland Scheidegger <sroland@vmware.com>
Tue, 27 Nov 2012 02:26:49 +0000 (03:26 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 27 Nov 2012 02:26:49 +0000 (03:26 +0100)
commit0b6554ba6f2aa8a771852566340c24205e406d02
tree4860b057589b29b85a70fb8666537dfa51f10afa
parent93c689a2dfa29cf3a4647432f0690bf76514b5bd
gallivm,llvmpipe: handle TXF (texelFetch) instruction, including offsets

This also adds some code to handle per-quad lods for more than 4-wide fetches,
because otherwise I'd have to integrate the texelFetch function into
the splitting stuff... (but it is not used yet outside texelFetch).
passes piglit fs-texelFetch-2D, fails fs-texelFetchOffset-2D due to I believe
a test error (results are undefined for out-of-bounds fetches, we return
whatever is at offset 0, whereas the test expects [0,0,0,1]).
Texel offsets are only handled by texelFetch for now, though the interface
can handle it for everything.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 files changed:
src/gallium/auxiliary/draw/draw_llvm_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
src/gallium/auxiliary/gallivm/lp_bld_swizzle.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/auxiliary/tgsi/tgsi_info.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_tex_sample.c