zink: fixup sampler-usage
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 31 Jan 2020 17:59:48 +0000 (18:59 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 7 Feb 2020 22:03:00 +0000 (22:03 +0000)
commit1c3f4c07047cef0dfcb9182690b22792b00d5935
treeed87f14f8442f155d7f2278baf186f44e8a8f824
parentfa915a724fbff0878478ca7dd968207bc9906016
zink: fixup sampler-usage

It seems I got this stuff all wrong, and looked at driver_location
rather than the binding. But since we mess with the binding, we need to
adjust things a bit to get things right.

This still isn't great as-is, but it seems to work. In the future, we
should move to having samplers always at bindings 0 and up, and just
update the bindings that are used by either of the stages. But this
band-aid should be OK for now.

This fixes 0AD for me.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
src/gallium/drivers/zink/zink_compiler.c