turnip: fix a crash when rasterizerDiscardEnable is set
authorJonathan Marek <jonathan@marek.ca>
Wed, 17 Jun 2020 18:23:37 +0000 (14:23 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 03:15:26 +0000 (03:15 +0000)
commitff2efd095e5a7543268e40112978b293a82518a7
tree0f7e5fbcc937cee56a84831fb6b2aaca56924ace
parent31a66cbe5d91a04310e73ce238d48d8f6ea6e6f5
turnip: fix a crash when rasterizerDiscardEnable is set

pMultisampleState needs to be ignored when rasterizerDiscardEnable, so the
current code can crash when trying to load msaa_info->pNext.

At the same time this simplifies tu_pipeline_shader_key_init a bit, by not
calling it for the compute shader case (which doesn't need to set anything
in the key struct).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
src/freedreno/vulkan/tu_pipeline.c