turnip: fix compute shaders crashing after geometry shader change

Fixes: 1af71bee73 ("turnip: Set has_gs in ir3_shader_key")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4483>
This commit is contained in:
Jonathan Marek
2020-04-07 21:13:31 -04:00
committed by Marge Bot
parent 52c8bc0130
commit d6a8591f72

View File

@@ -574,10 +574,12 @@ tu_shader_compile_options_init(
const VkGraphicsPipelineCreateInfo *pipeline_info)
{
bool has_gs = false;
for (uint32_t i = 0; i < pipeline_info->stageCount; i++) {
if (pipeline_info->pStages[i].stage == VK_SHADER_STAGE_GEOMETRY_BIT) {
has_gs = true;
break;
if (pipeline_info) {
for (uint32_t i = 0; i < pipeline_info->stageCount; i++) {
if (pipeline_info->pStages[i].stage == VK_SHADER_STAGE_GEOMETRY_BIT) {
has_gs = true;
break;
}
}
}