On Thu, Jul 9, 2015 at 4:21 AM, Christian König <deathsim...@vodafone.de> wrote: > On 08.07.2015 22:34, Rob Clark wrote: >> >> From: Rob Clark <robcl...@freedesktop.org> >> >> This isn't at all clear for pipe driver writers currently, since it >> is not documented anywhere. But radeon/nouveau/llvmpipe seem to drop >> the ref on the **fence passed in to pipe->flush() (if *fence!=NULL). >> Freedreno/ilo/vc4 where not doing this. Some state trackers do call >> screen->fence_reference(screen, &fence, NULL) before pipe->flush(), >> but others do not. >> >> Add a comment for pipe->flush() to clairify what is expected of the >> driver, and fixup freedreno/ilo/vc4 to comply. >> >> Note: that ilo/vc4 patches are untested > > > Oh, yes please. That also annoyed me once or twice while hacking on the > state trackers. > > Since I'm not into the drivers those changes are Acked-by: Christian König > <christian.koe...@amd.com> > > Do you want to take care of the state trackers as well or should I look into > the video state trackers to fix this myself?
I guess w/ the doc change + fixing drivers, we don't strictly need to change the other state trackers to explicitly unref their last_fence, if that is what you had in mind? It probably wouldn't hurt, but shouldn't be required.. BR, -R > Regards, > Christian. > > >> >> Rob Clark (4): >> gallium: clarify reference counting for fence >> freedreno: unref old fence >> ilo: unref old fence >> vc4: unref old fence >> >> src/gallium/drivers/freedreno/freedreno_context.c | 2 +- >> src/gallium/drivers/freedreno/freedreno_fence.c | 2 +- >> src/gallium/drivers/ilo/ilo_context.c | 5 ++++- >> src/gallium/drivers/ilo/ilo_screen.c | 2 +- >> src/gallium/drivers/vc4/vc4_context.c | 3 ++- >> src/gallium/drivers/vc4/vc4_fence.c | 2 +- >> src/gallium/include/pipe/p_context.h | 8 +++++++- >> 7 files changed, 17 insertions(+), 7 deletions(-) >> > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev