nir: Fix unaligned pointer access
authorTony Wasserka <tony.wasserka@gmx.de>
Tue, 15 Sep 2020 10:26:34 +0000 (12:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 7 Oct 2020 19:50:01 +0000 (19:50 +0000)
commit0ef2f1d4a0096316f2aa4a887882d262c5294084
treeb07d89be30d67578bbd83540972f0031de25510a
parent6a9dc75cc23ccb8f918d3ba92873ff160cff4941
nir: Fix unaligned pointer access

This was observed with the intel vulkan driver when running
dEQP-VK.spirv_assembly.instruction.compute.float32.comparison_1.modfstruct
with ubsan enabled.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728>
src/compiler/nir/nir_serialize.c