softpipe/draw/tgsi: simplify driver/tgsi sampler interface
authorRoland Scheidegger <sroland@vmware.com>
Wed, 27 Feb 2013 18:07:18 +0000 (19:07 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 28 Feb 2013 02:39:53 +0000 (03:39 +0100)
commit6b35c2b110be0d9ae6a292250fdcbab11a9190a5
tree5141a7490ac67ee8df3542f8396b2ba4e6423ec7
parent0845d16976b41e0a151f96b900fb58a7f26d7774
softpipe/draw/tgsi: simplify driver/tgsi sampler interface

Use a single sampler adapter instead of per-sampler-unit samplers,
and just pass along texture unit and sampler unit in the calls.
The reason is that for dx10-style sample opcodes pre-wired
samplers including all the texture state aren't really feasible (and for
sample_i/sviewinfo we don't even have samplers).
Of course right now softpipe doesn't actually do anything more than
just look up all its pre-wired per-texunit/per-samplerunit sampler as
it did before so this doesn't really achieve much except one more
function call, however this is now all softpipe's fault (fixing that in
a way which doesn't suck is still an unsolved problem).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
15 files changed:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_gs.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_vs_exec.c
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/auxiliary/tgsi/tgsi_exec.h
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_fs_exec.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/softpipe/sp_state_derived.c
src/gallium/drivers/softpipe/sp_state_sampler.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_tex_sample.h