On Fri, Nov 18, 2016 at 9:20 AM, Chris Wilson <ch...@chris-wilson.co.uk> wrote: > On Fri, Nov 18, 2016 at 08:39:37AM -0500, Rob Clark wrote: >> +void fd_fence_server_sync(struct pipe_context *pctx, >> + struct pipe_fence_handle *fence) >> +{ >> + struct fd_context *ctx = fd_context(pctx); >> + struct fd_batch *batch = ctx->batch; >> + >> + if (sync_accumulate("freedreno", &batch->in_fence_fd, >> fence->fence_fd)) { >> + /* error */ > > On error, the choice is either to cause corruption or convert it into a > CPU (client) wait. I would suggest: > perf_debug("Failed to add fence to command stream," > " stalling in the client instead!\n"); > sync_wait(fence->fence_fd, -1);
hmm, that is a good idea.. I was wondering what to do in case of error since there isn't currently (without changing dri fence extension, iirc) a way to propagate that back to the user. I was assuming corruption would be the best we could do (and anyways, if you hit this case, it is likely that a lot of other things are going to be going badly..) BR, -R >> + } >> +} > > -- > Chris Wilson, Intel Open Source Technology Centre _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev