[Mesa-dev] [PATCH 7/7] radeonsi: emit rw_buffers for tes_shader only if tes_shader present

Marek Olšák maraeo at gmail.com
Sat Jan 23 03:26:53 PST 2016


For the series:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>



On Sat, Jan 23, 2016 at 1:00 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> ---
>  src/gallium/drivers/radeonsi/si_descriptors.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
> index d157a9f..aad836d 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -978,9 +978,11 @@ void si_emit_shader_userdata(struct si_context *sctx, struct r600_atom *atom)
>                 si_emit_shader_pointer(sctx, &sctx->const_buffers[i].desc, vs_base, true);
>                 si_emit_shader_pointer(sctx, &sctx->rw_buffers[i].desc, vs_base, true);
>
> -               /* The TESSEVAL shader needs this for the ESGS ring buffer. */
> -               si_emit_shader_pointer(sctx, &sctx->rw_buffers[i].desc,
> -                                      R_00B330_SPI_SHADER_USER_DATA_ES_0, true);
> +               if (sctx->tes_shader.cso) {
> +                       /* The TESSEVAL shader needs this for the ESGS ring buffer. */
> +                       si_emit_shader_pointer(sctx, &sctx->rw_buffers[i].desc,
> +                                              R_00B330_SPI_SHADER_USER_DATA_ES_0, true);
> +               }
>         } else if (sctx->tes_shader.cso) {
>                 /* The TESSEVAL shader needs this for streamout. */
>                 si_emit_shader_pointer(sctx, &sctx->rw_buffers[PIPE_SHADER_VERTEX].desc,
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list