From: Brian Ho Date: Mon, 6 Apr 2020 20:38:04 +0000 (-0700) Subject: turnip: Populate tu_pipeline.active_stages X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b80dc4f5a6e7a43f86f6c7f8f56a26b348f92382;p=mesa.git 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: --- 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;