zink: fix invalid Offset set for variables which do not need an offset
authorSoroushIMG <soroush.kashani@imgtec.com>
Tue, 19 Jul 2022 12:25:02 +0000 (13:25 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Oct 2022 20:51:48 +0000 (20:51 +0000)
commitb87c08b3bf707f25df2b788260381aea161d5dd8
treea42957a603e0a954dce99d9363b22e2dfc0e15b4
parent6eadd6d1698ae4b27e4b1a6f0321a80313a7e976
zink: fix invalid Offset set for variables which do not need an offset

Offset decoration in spirv is unsigned and it does not have a notion of an invalid offset.
Unlike NIR which set -1 for invlaid offset. This translates to invalid spirv being produced.
Instead, just don't emit an Offset decoration.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18910>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c