Mesa (master): turnip: fix compute shaders crashing after geometry shader change
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 8 02:08:38 UTC 2020
Module: Mesa
Branch: master
Commit: d6a8591f72a9f1ce48dc0eefdb89cc0825e8acf7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6a8591f72a9f1ce48dc0eefdb89cc0825e8acf7
Author: Jonathan Marek <jonathan at marek.ca>
Date: Tue Apr 7 21:13:31 2020 -0400
turnip: fix compute shaders crashing after geometry shader change
Fixes: 1af71bee734da7d8 ("turnip: Set has_gs in ir3_shader_key")
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4483>
---
src/freedreno/vulkan/tu_shader.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c
index 51e1c65177c..bd52335093d 100644
--- a/src/freedreno/vulkan/tu_shader.c
+++ b/src/freedreno/vulkan/tu_shader.c
@@ -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;
+ }
}
}
More information about the mesa-commit
mailing list