iris: Add aux.sampler_usages.
authorRafael Antognolli <rafael.antognolli@intel.com>
Wed, 27 Mar 2019 21:42:12 +0000 (14:42 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Tue, 2 Apr 2019 22:26:45 +0000 (15:26 -0700)
commit7339660e80331ed773fc6dbb8295384d4ef6954e
tree8ecbacb2fd2da60c600fd90118d4c4882a5c8fdc
parentdfc5620a41ee7fa86850ed68ac32c4dde3466a95
iris: Add aux.sampler_usages.

We want to skip some types of aux usages (for instance,
ISL_AUX_USAGE_HIZ when the hardware doesn't support it, or when we have
multisampling) when sampling from the surface.

Instead of checking for those cases while filling the surface state and
leaving it blank, let's have a version of aux.possible_usages for
sampling. This way we can also avoid allocating surface state for the
cases we don't use.

Fixes: a8b5ea8ef015ed4a "iris: Add function to update clear color in surface state."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_resource.c
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_state.c