radv: Set active_stages after getting cached shaders
authorAlex Smith <asmith@feralinteractive.com>
Wed, 18 Oct 2017 13:47:51 +0000 (14:47 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 18 Oct 2017 18:37:10 +0000 (20:37 +0200)
Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_pipeline.c

index c93871bfbcff112efd54b0b3150d6f135e461432..7102d07a03a19670bd44f04d6ea3ecdea31ee507 100644 (file)
@@ -1597,8 +1597,13 @@ 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))
+           (!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;
+       }
 
        if (!modules[MESA_SHADER_FRAGMENT] && !modules[MESA_SHADER_COMPUTE]) {
                nir_builder fs_b;