summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Smith <asmith@feralinteractive.com>2018-05-31 15:02:32 +0100
committerDylan Baker <dylan@pnwbakers.com>2018-06-01 08:43:25 -0700
commitf0ad21dfce0fa8395d324af59c649193194be2ba (patch)
treecb7113126ecce5fd462063034b84097c2cdc74a8
parent0dd373e841277a4a6b6d933dcba2a68f28860ce3 (diff)
radv: Set active_stages the same whether or not shaders were cached
With GFX9 merged shaders, active_stages would be set to the original stages specified if shaders were not cached, but to the stages still present after merging if they were. Be consistent and use the original stages. Signed-off-by: Alex Smith <asmith@feralinteractive.com> Cc: "18.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 0fa51bfdbe5773cb8534b9e006b81581f4e14982) [Dylan Baker: resolve trivial conflict] Conflicts: src/amd/vulkan/radv_pipeline.c
-rw-r--r--src/amd/vulkan/radv_pipeline.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 512ec85d11..423dce3dea 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1962,6 +1962,8 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
_mesa_sha1_compute(modules[i]->nir->info.name,
strlen(modules[i]->nir->info.name),
modules[i]->sha1);
+
+ pipeline->active_stages |= mesa_to_vk_shader_stage(i);
}
}
@@ -1977,10 +1979,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
if (radv_create_shader_variants_from_pipeline_cache(device, cache, hash, pipeline->shaders) &&
(!modules[MESA_SHADER_GEOMETRY] || pipeline->gs_copy_shader)) {
- for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
- if (pipeline->shaders[i])
- pipeline->active_stages |= mesa_to_vk_shader_stage(i);
- }
return;
}
@@ -2012,7 +2010,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
nir[i] = radv_shader_compile_to_nir(device, modules[i],
stage ? stage->pName : "main", i,
stage ? stage->pSpecializationInfo : NULL);
- pipeline->active_stages |= mesa_to_vk_shader_stage(i);
/* We don't want to alter meta shaders IR directly so clone it
* first.