i965/gen10: Implement WaSampleOffsetIZ workaround
authorAnuj Phogat <anuj.phogat@gmail.com>
Sat, 9 Sep 2017 00:23:28 +0000 (17:23 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 3 Nov 2017 21:30:33 +0000 (14:30 -0700)
commit3cf4fe22199a39bde3d290e343612349866a93f9
treeba7ccf801b21d841e6fdaf9955dfc40409ff536f
parent7a09be2dc9dcac0afbd91e1a35fb54df459e51f3
i965/gen10: Implement WaSampleOffsetIZ workaround

There are few other (duplicate) workarounds which have similar recommendations:
WaFlushHangWhenNonPipelineStateAndMarkerStalled
WaCSStallBefore3DSamplePattern
WaPipeControlBefore3DStateSamplePattern

WaPipeControlBefore3DStateSamplePattern has some extra recommendations if
driver is using mid batch context restore. Ignoring it for now because We're
not doing mid-batch context restore in Mesa.

This workaround doesn't fix any of the piglit hangs we've seen
on CNL. But it might be fixing something we haven't tested yet.

V2: Use brw_load_register_imm32() to program CACHE_MODE_0.
    Get rid of brw_flush_gpu_caches().

V3: Make the workaround helper functions static.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by :Nanley Chery <nanley.g.chery@intel.com>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/gen8_multisample_state.c