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

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Tue Jun 2 05:14:08 PDT 2015



On 06/02/2015 11:25 AM, Kenneth Graunke wrote:
> On Tuesday, June 02, 2015 12:58:29 AM Kenneth Graunke wrote:
>> As I mentioned in my reply to patch 3, I think you need some sort of
>> "did the buffer fill up?" check.  Perhaps make a function to reserve
>> space, advancing next_offset and returning the offset to use:
>>
>> static uint32_t
>> reserve_hw_bt_space(struct brw_context *brw, unsigned bytes)
>> {
>>    if (brw->hw_bt_pool.next_offset + bytes >= hw_bt_pool.bo->size) {
>>       gen7_reset_hw_bt_pool_offsets();
>>    }
>>
>>    uint32_t offset = brw->hw_bt_pool.next_offset;
>>
>>    brw->hw_bt_pool.next_offset += ALIGN(bytes, 64);
>>
>>    return offset;
>> }
>>
>> That would reduce the number of if (brw->has_resource_streamer) checks a
>> bit too...
> 
> By the way, you'll probably also want to implement this workaround:
> 
> "WaStateBindingTableOverfetch: HW over fetches two cachelines of binding
>  table indices.  When using the resource streamer, SW needs to pad
>  binding table pointer updates with an additional two cache lines."
> 
> So you actually need to check:
> if (next_offset + bytes >= hw_bt_pool.bo->size - 128)
> 
> Which reminds me.  Your earlier patches had all kinds of workarounds
> for Haswell resource streamer hardware errata.  Dummy 3DPRIMITIVE
> commands come to mind.  What happened to those?  Surely they're still
> necessary?

Dummy 3d primitives are only needed when gather constants are enabled.
However, I haven't experienced any lock-ups either since I skipped them
out. Things are running quite smoothly now. Although spec mentions that
we may need them when programming null push constants, I found out by
trial and error that even those can be skipped when using this approach
instead:

http://lists.freedesktop.org/archives/mesa-dev/2015-April/083012.html

-Abdiel


> 
> --Ken
> 
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list