softpipe: don't use samplers with prebaked sampler and sampler_view state
authorRoland Scheidegger <sroland@vmware.com>
Fri, 8 Mar 2013 21:29:34 +0000 (22:29 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 11 Mar 2013 16:07:51 +0000 (17:07 +0100)
commitef17cc9cb697a7146cf2a3dba2eb0f6a968918cc
treef409b9ec2c9fd536fc42f063590f4a6704033378
parentf33c744fb9b4bb711335412018ecc108a4b38355
softpipe: don't use samplers with prebaked sampler and sampler_view state

This is needed for handling the dx10-style sample opcodes.
This also simplifies the logic by getting rid of sampler variants
completely (sampler_views though OTOH have sort of variants because
some of their state is different depending on the shader stage they
are bound to).
No significant performance difference (openarena run:
840 frames in 459.8 seconds vs. 840 frames in 460.5 seconds).

v2: fix reference counting bug spotted by Jose.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/softpipe/sp_context.h
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