zink: fix binding-usage
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 14 Feb 2020 15:50:42 +0000 (16:50 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 17 Feb 2020 10:00:18 +0000 (10:00 +0000)
commit4a20db70de25233f1c58d76bd17f9564d13fe7b2
treecda34d81500877548895a894d19209d9de50693d
parentc095b7d5bd44f807c479d117a51f7495712d61c1
zink: fix binding-usage

Rewriting the variable bindings is nasty and error-prone, and this code
triggered an assert when trying to resolve API bindings into Vulkan
bindings.

This code still needs some tweaks, but this makes things much better,
and fixes a few bugs where we incorrectly accounted for the
array-indexes.

Fixes: 1c3f4c07047 ("zink: fixup sampler-usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.h
src/gallium/drivers/zink/zink_compiler.c