[Mesa-dev] [PATCH] nv50, nvc0: Set only NEW_CP_GLOBALS upon binding

Samuel Pitoiset samuel.pitoiset at gmail.com
Sun Mar 13 21:18:35 UTC 2016


This is there since ... 2013 ... but this was never really used because 
it's compute-related, that might explain why you are the first one to 
hit the issue. :-)

Luckily, this doesn't affect compute shaders on Fermi because globals 
buffers are validated *after* all other things.

Good catch!

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 03/13/2016 10:11 PM, Pierre Moreau wrote:
> Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> ---
>   src/gallium/drivers/nouveau/nv50/nv50_state.c | 2 +-
>   src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c
> index c73e3ba..b9efb3f 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c
> @@ -1246,7 +1246,7 @@ nv50_set_global_bindings(struct pipe_context *pipe,
>
>      nouveau_bufctx_reset(nv50->bufctx_cp, NV50_BIND_CP_GLOBAL);
>
> -   nv50->dirty_cp = NV50_NEW_CP_GLOBALS;
> +   nv50->dirty_cp |= NV50_NEW_CP_GLOBALS;
>   }
>
>   void
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> index c279093..36e3546 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> @@ -1343,7 +1343,7 @@ nvc0_set_global_bindings(struct pipe_context *pipe,
>
>      nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_GLOBAL);
>
> -   nvc0->dirty_cp = NVC0_NEW_CP_GLOBALS;
> +   nvc0->dirty_cp |= NVC0_NEW_CP_GLOBALS;
>   }
>
>   void
>


More information about the mesa-dev mailing list