radv: Set active_stages after getting cached shaders

Submitted by Alex Smith on Oct. 18, 2017, 1:47 p.m.

Details

Message ID 20171018134751.15581-1-asmith@feralinteractive.com
State New
Headers show
Series "radv: Set active_stages after getting cached shaders" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alex Smith Oct. 18, 2017, 1:47 p.m.
Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
---
 src/amd/vulkan/radv_pipeline.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 559862678e..a3d8660eda 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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]) {
 		nir_builder fs_b;

Comments

Thanks, pushed both patches.

On Wed, Oct 18, 2017 at 3:47 PM, Alex Smith <asmith@feralinteractive.com> wrote:
> Fixes: 7d45d22fdd2e ("radv: switch to using radv_create_shaders()")
> Signed-off-by: Alex Smith <asmith@feralinteractive.com>
> ---
>  src/amd/vulkan/radv_pipeline.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index 559862678e..a3d8660eda 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -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]) {
>                 nir_builder fs_b;
> --
> 2.13.6
>