diff options
author | Brian Ho <[email protected]> | 2020-04-06 13:38:04 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-07 14:13:20 +0000 |
commit | b80dc4f5a6e7a43f86f6c7f8f56a26b348f92382 (patch) | |
tree | 8856aefc2eb1bce0b876e1c6865f1d0cec66e4ef /src/freedreno/vulkan/tu_pipeline.c | |
parent | 8eb009631217e415869709faadaf18dbeca8f8b0 (diff) |
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>
Diffstat (limited to 'src/freedreno/vulkan/tu_pipeline.c')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |