d3d12: ensure all compoents of clip-distances are written
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 5 Nov 2020 17:46:15 +0000 (18:46 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Nov 2020 15:37:07 +0000 (15:37 +0000)
commitbd5f92850614bc984a7e560849b19b31e94725a0
tree0831f23cea05b99922e3a301576d5d430d92b6ef
parent2ea15cd661c8355e8e35624eba0bf10cbcd57f61
d3d12: ensure all compoents of clip-distances are written

This fixes a regression that happened after rebasing on master, where we
end up not writing all components of the clip-distance array, which the
DXIL validation code in the D3D12 runtime treats as an error.

To ensure we don't end up overwriting a previous wrire, enable
nir_shader_compiler_options::lower_all_io_to_temps as well.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7477>
src/gallium/drivers/d3d12/d3d12_compiler.cpp
src/gallium/drivers/d3d12/d3d12_nir_passes.c
src/gallium/drivers/d3d12/d3d12_nir_passes.h
src/microsoft/compiler/nir_to_dxil.c