[Mesa-dev] [PATCH v3 5/6] i965: Upload binding tables in hw-generated binding table format.

Kenneth Graunke kenneth at whitecape.org
Fri Jul 17 12:49:25 PDT 2015


On Friday, July 17, 2015 09:22:26 AM Abdiel Janulgue wrote:
> 
> On 07/17/2015 05:41 AM, Kenneth Graunke wrote:
> 
> >>  
> >> +static uint32_t
> >> +reserve_hw_bt_space(struct brw_context *brw, unsigned bytes)
> >> +{
> >> +   if (brw->hw_bt_pool.next_offset + bytes >= brw->hw_bt_pool.bo->size - 128) {
> > 
> > Why -128?  I don't see why we should have to subtract anything...
> > 
> 
> This is the WaStateBindingTableOverfetch workaround you mentioned that
> we should include?
> 
> -Abdiel

Ahh, right.  Certainly seems deserving of a comment, such as:

/* From the Broadwell PRM, Volume 16, "Workarounds",
 * WaStateBindingTableOverfetch:
 * "HW over-fetches two cache lines of binding table indices.  When
 *  using the resource streamer, SW needs to pad binding table pointer
 *  updates with an additional two cache lines."
 *
 * Cache lines are 64 bytes, so we subtract 128 bytes from the size of
 * the binding table pool buffer.
 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150717/941b7a0e/attachment.sig>


More information about the mesa-dev mailing list