i965/gen9: Add workarounds for object preemption.
authorRafael Antognolli <rafael.antognolli@intel.com>
Mon, 29 Oct 2018 17:19:54 +0000 (10:19 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Fri, 14 Dec 2018 17:40:27 +0000 (09:40 -0800)
commit5c454661c66fa2624cf4bba1071175070724869a
treed0e0580dab7399defa3f7355b9774dc120e23d6c
parentd8b50e152a0d5df0971c05b8db132fa688794001
i965/gen9: Add workarounds for object preemption.

Gen9 hardware requires some workarounds to disable preemption depending
on the type of primitive being emitted.

We implement this by adding a function that checks the primitive type
and number of instances right before the 3DPRIMITIVE.

For now, we just ignore blorp.  The only primitive it emits is
3DPRIM_RECTLIST, and since it's not listed in the workarounds, we can
safely leave preemption enabled when it happens. Or it will be disabled
by a previous 3DPRIMITIVE, which should be fine too.

v3:
 - Apply missing workarounds for instanced rendering and line loop (Ken)
 - Move workaround code to brw_draw_single_prim()

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw.c