From b80dc4f5a6e7a43f86f6c7f8f56a26b348f92382 Mon Sep 17 00:00:00 2001 From: Brian Ho Date: Mon, 6 Apr 2020 13:38:04 -0700 Subject: [PATCH] turnip: Populate tu_pipeline.active_stages This can be used to determine if the pipeline has a specific shader stage (e.g. geometry shader). Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index ac02e66590b..816b3de5c32 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1980,6 +1980,12 @@ tu_pipeline_builder_parse_shader_stages(struct tu_pipeline_builder *builder, pipeline->program.binning_state_ib = tu_cs_end_sub_stream(&pipeline->cs, &prog_cs); + VkShaderStageFlags stages = 0; + for (unsigned i = 0; i < builder->create_info->stageCount; i++) { + stages |= builder->create_info->pStages[i].stage; + } + pipeline->active_stages = stages; + for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { if (!builder->shaders[i]) continue; -- 2.30.2