[Mesa-dev] [RFC PATCH 06/40] i965/gen7.5: Enable hardware-generated binding tables in blorp path

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Mon Jan 5 01:55:29 PST 2015



On 01/05/2015 05:41 AM, Kenneth Graunke wrote:
> On Sunday, January 04, 2015 04:04:20 PM Abdiel Janulgue wrote:
>> Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
>> ---
>>  src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
>> index 206a6ff..3d5c7df 100644
>> --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
>> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
>> @@ -824,6 +824,8 @@ gen7_blorp_exec(struct brw_context *brw,
>>     if (params->use_wm_prog) {
>>        uint32_t wm_surf_offset_renderbuffer;
>>        uint32_t wm_surf_offset_texture = 0;
>> +      
>> +      gen7_enable_hw_binding_tables(brw);
>>        wm_push_const_offset = gen6_blorp_emit_wm_constants(brw, params);
>>        intel_miptree_used_for_rendering(params->dst.mt);
>>        wm_surf_offset_renderbuffer =
> 
> I can't imagine there's any benefit to using the RS in BLORP.
> 
> BLORP's binding tables only contain 1-2 entries: the destination renderbuffer
> and (optional) source texture.  Each BLORP operation most likely operates on
> different buffers, so we may as well just re-emit the whole two entry binding
> table.
> 
> BLORP also doesn't use pull constants at all, so gather constants won't help
> at all either.
> 
> Unless the point is to not switch back and forth due to some cost?
> 

The reason for this is that the GPU does not allow us to mix
hardware-generated binding tables and software binding tables. So yes,
there is the cost of back and forth switching.

BLORP does not actually use gather constants, which can be easily
toggled on and off, compared to hw-binding tables which is more global.
See patch 18 of this series.

p.s. I'm still on vacation. I would probably be able to respond to all
your comments and have the v2 revision in a couple of weeks ;) But
thanks for the review so far!

-Abdiel


More information about the mesa-dev mailing list