Module: Mesa Branch: master Commit: b80dc4f5a6e7a43f86f6c7f8f56a26b348f92382 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b80dc4f5a6e7a43f86f6c7f8f56a26b348f92382
Author: Brian Ho <[email protected]> Date: Mon Apr 6 13:38:04 2020 -0700 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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4436> --- 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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
