[Mesa-dev] [PATCH] nvc0: force cache flush when binding a new ubo

Ilia Mirkin imirkin at alum.mit.edu
Tue Jul 21 13:02:09 PDT 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

I'm unconvinced that this is strictly necessary, but it seems to fix
the test so... wtvr. UBO's don't get rebound too often without also
doing other things that would incur a similar barrier/flush.

On Tue, Jul 21, 2015 at 3:59 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> This fixes the following piglit test:
>   ext_transform_feedback-immediate-reuse-uniform-buffer
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
> index b07558a..2428314 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
> @@ -455,6 +455,8 @@ nvc0_constbufs_validate(struct nvc0_context *nvc0)
>                 PUSH_DATA (push, (i << 4) | 1);
>
>                 BCTX_REFN(nvc0->bufctx_3d, CB(s, i), res, RD);
> +
> +               nvc0->cb_dirty = 1; /* Force cache flush for UBO. */
>              } else {
>                 BEGIN_NVC0(push, NVC0_3D(CB_BIND(s)), 1);
>                 PUSH_DATA (push, (i << 4) | 0);
> --
> 2.4.6
>
> _______________________________________________
> 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