radv: add has_clear_state and enable it on CIK+ only

This will allow us to emit the CLEAR_STATE packet instead
of a bunch of useless packets when doing CS initialization.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Samuel Pitoiset 2017-10-05 14:55:24 +02:00
parent c74ed3966e
commit 65dcff7a26
2 changed files with 6 additions and 1 deletions

View file

@ -401,6 +401,11 @@ radv_physical_device_init(struct radv_physical_device *device,
device->rbplus_allowed = device->rad_info.family == CHIP_STONEY;
}
/* The mere presense of CLEAR_STATE in the IB causes random GPU hangs
* on SI.
*/
device->has_clear_state = device->rad_info.chip_class >= CIK;
return VK_SUCCESS;
fail:

View file

@ -277,7 +277,7 @@ struct radv_physical_device {
bool has_rbplus; /* if RB+ register exist */
bool rbplus_allowed; /* if RB+ is allowed */
bool has_clear_state;
/* This is the drivers on-disk cache used as a fallback as opposed to
* the pipeline cache defined by apps.