On Sun, Jun 5, 2016 at 12:13 PM, Samuel Pitoiset <samuel.pitoi...@gmail.com> wrote: > Images invalidation is a bit weird on Fermi and there is already a hack > which forces invalidating all images when launching a computer shader > to help in fixing 3D<->CP interaction. > > However, we need to re-validate images for compute because > nvc0_compute_invalidate_surfaces() will destroy the previous binding. > This is not really good for performance purposes but this might be > improved later. > > This fixes the following piglits: > - spec/arb_compute_shader/execution/basic-uniform-access > - spec/arb_compute_shader/execution/mutiple-texture-reading > - spec/arb_compute_shader/execution/multiple-workgroups > - spec/glsl-4.30/execution/built-in-functions/cs-* (207 tests) > > Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> > Cc: "12.0" <mesa-sta...@lists.freedesktop.org> > --- > src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c > b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c > index 8c88225..baeeca5 100644 > --- a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c > +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c > @@ -458,4 +458,6 @@ nvc0_launch_grid(struct pipe_context *pipe, const struct > pipe_grid_info *info) > > /* TODO: Not sure if this is really necessary. */ > nvc0_compute_invalidate_surfaces(nvc0, 5); > + nvc0->dirty_cp |= NVC0_NEW_CP_SURFACES; > + nvc0->images_dirty[5] |= nvc0->images_valid[5];
Don't forget to clear out the bufctx. Also (in another patch), do a pass over all your invalidation hacks - any time you do nvc0->dirty |= foo, you should have an associated nouveau_bufctx_reset(). Otherwise things can start piling up in there. (Since validation only adds to the buckets.) -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev