[Mesa-dev] [PATCH 2/2] intel: Reserve enough space to finish occlusion queries on Gen6.

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 10 15:37:52 PDT 2012


On Fri, 10 Aug 2012 10:26:04 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> After realizing that brw_finish_batch emitted some final PIPE_CONTROLs
> to record occlusion queries, Chris noted that we probably hadn't
> reserved enough space to actually emit them.
> 
> Reserving a full 60 bytes seems a bit harsh, since we only need that
> much if occlusion queries are actually active.  Plus, 28 bytes would be
> sufficient for Gen7, and 24 for Gen4-5.
> 
> We could optimize this in the future, but it doesn't seem too critical.
> 
> NOTE: This is a candidate for stable release branches.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Eric Anholt <eric at anholt.net>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

Both patches look good and there don't seem to be any more holes. I did
spot a couple of other useful additions, firstly to extend the comment
before brw_finish_batch() to mention that it uses the reserved space;
it's assumed knowledge for that path. The second thing is to check that
the the command portion of the batch does not overlap the surface state
just prior to uploading the buffer.

Completely minor in comparison to fixing the bug, so
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list