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.
 */

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to