gallivm: use sampler index 0 for texel fetches
authorRoland Scheidegger <sroland@vmware.com>
Fri, 20 Nov 2015 03:49:23 +0000 (04:49 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 20 Nov 2015 16:00:15 +0000 (17:00 +0100)
commit24dc0316b4d7b29e055f220b23cab7daf4698c0c
treef4933921708f451229b062ee939d7cffbddce2ee
parent9a93da4e83ee332367a0d6aa601cbcd7f59321b2
gallivm: use sampler index 0 for texel fetches

texel fetches don't use any samplers. Previously we just set the same
number for both texture and sampler unit (as per "ordinary" gl style
sampling where the numbers are always the same) however this would trigger
some assertions checking that the sampler index isn't over PIPE_MAX_SAMPLERS
limit elsewhere with d3d10, so just set to 0.
(Fixing the assertion instead isn't really an option, the sampler isn't
really used but might still pass an out-of-bound pointer around and even
copy some things from it.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c