[Mesa-stable] [PATCH] radv: Don't pass a TESS_EVAL shader when tesselation is not enabled.

Alex Smith asmith at feralinteractive.com
Mon Jun 4 07:44:31 UTC 2018


Oops. Thanks for tracking that down.

Reviewed-by: Alex Smith <asmith at feralinteractive.com>

On 2 June 2018 at 13:31, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:

> Otherwise on pre-GFX9, if the constant layout allows both TESS_EVAL and
> GEOMETRY shaders, but the PIPELINE has only GEOMETRY, it would return the
> GEOMETRY shader for the TESS_EVAL shader.
>
> This would cause the flush_constants code to emit the GEOMETRY constants
> to the TESS_EVAL registers and then conclude that it did not need to set
> the GEOMETRY shader registers.
>
> Fixes: dfff9fb6f8d "radv: Handle GFX9 merged shaders in
> radv_flush_constants()"
> CC: 18.1 <mesa-stable at lists.freedesktop.org>
> CC: Alex Smith <asmith at feralinteractive.com>
> CC: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_pipeline.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_
> pipeline.c
> index ff647ed9af3..375f7c357d3 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -1594,6 +1594,8 @@ radv_get_shader(struct radv_pipeline *pipeline,
>                 if (pipeline->shaders[MESA_SHADER_GEOMETRY])
>                         return pipeline->shaders[MESA_SHADER_GEOMETRY];
>         } else if (stage == MESA_SHADER_TESS_EVAL) {
> +               if (!radv_pipeline_has_tess(pipeline))
> +                       return NULL;
>                 if (pipeline->shaders[MESA_SHADER_TESS_EVAL])
>                         return pipeline->shaders[MESA_SHADER_TESS_EVAL];
>                 if (pipeline->shaders[MESA_SHADER_GEOMETRY])
> --
> 2.17.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20180604/8d3655d8/attachment.html>


More information about the mesa-stable mailing list