<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 1 June 2018 at 15:48, Dylan Baker <span dir="ltr"><<a href="mailto:dylan@pnwbakers.com" target="_blank">dylan@pnwbakers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Quoting Alex Smith (2018-05-31 08:44:18)<br>
<div><div class="gmail-h5">> With GFX9 merged shaders, active_stages would be set to the original<br>
> stages specified if shaders were not cached, but to the stages still<br>
> present after merging if they were.<br>
> <br>
> Be consistent and use the original stages.<br>
> <br>
> Signed-off-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
> Cc: "18.1" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
> ---<br>
> src/amd/vulkan/radv_pipeline.c | 7 ++-----<br>
> 1 file changed, 2 insertions(+), 5 deletions(-)<br>
> <br>
> diff --git a/src/amd/vulkan/radv_<wbr>pipeline.c b/src/amd/vulkan/radv_<wbr>pipeline.c<br>
> index 52734a308a..18dcc43ebe 100644<br>
> --- a/src/amd/vulkan/radv_<wbr>pipeline.c<br>
> +++ b/src/amd/vulkan/radv_<wbr>pipeline.c<br>
> @@ -1964,6 +1964,8 @@ void radv_create_shaders(struct radv_pipeline *pipeline,<br>
> _mesa_sha1_compute(modules[i]-<wbr>>nir-><a href="http://info.name" rel="noreferrer" target="_blank">info.name</a>,<br>
> strlen(modules[i]->nir-><a href="http://info.name" rel="noreferrer" target="_blank">info.<wbr>name</a>),<br>
> modules[i]->sha1);<br>
> +<br>
> + pipeline->active_stages |= mesa_to_vk_shader_stage(i);<br>
> }<br>
> }<br>
> <br>
> @@ -1979,10 +1981,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,<br>
> <br>
> if (radv_create_shader_variants_<wbr>from_pipeline_cache(device, cache, hash, pipeline->shaders) &&<br>
> (!modules[MESA_SHADER_<wbr>GEOMETRY] || pipeline->gs_copy_shader)) {<br>
> - for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {<br>
> - if (pipeline->shaders[i])<br>
> - pipeline->active_stages |= mesa_to_vk_shader_stage(i);<br>
> - }<br>
> return;<br>
> }<br>
> <br>
> @@ -2015,7 +2013,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,<br>
> stage ? stage->pName : "main", i,<br>
> stage ? stage->pSpecializationInfo : NULL,<br>
> flags);<br>
> - pipeline->active_stages |= mesa_to_vk_shader_stage(i);<br>
> <br>
> /* We don't want to alter meta shaders IR directly so clone it<br>
> * first.<br>
> -- <br>
> 2.14.3<br>
> <br>
</div></div>> ______________________________<wbr>_________________<br>
> mesa-stable mailing list<br>
> <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-stable" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-stable</a><br>
<br>
Hi Alex,<br>
<br>
This doesn't apply cleanly to the 18.1 tree with the following collision:<br>
<br>
++<<<<<<< HEAD <br>
+ stage ? stage->pSpecializationInfo : NULL); <br>
<span class="gmail-"> + pipeline->active_stages |= mesa_to_vk_shader_stage(i); <br>
</span>++======= <br>
+ stage ? stage->pSpecializationInfo : NULL, <br>
+ flags); <br>
++>>>>>>> 0fa51bfdbe5... radv: Set active_stages the same whether or not shaders were cached <br>
<br>
I can remove the flags field (which doesn't exist in 18.1) before merging if you<br>
think that's the right thing to do. Does that seem reasonable?<br></blockquote><div><br></div><div>Yes, that's correct. Should just be removing the pipeline->active_stages line at that point.</div><div><br></div><div>Thanks,</div><div>Alex</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888"><br>
Dylan<br>
</font></span></blockquote></div><br></div></div>