summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael Antognolli <[email protected]>2019-03-26 11:08:22 -0700
committerRafael Antognolli <[email protected]>2019-04-02 15:24:15 -0700
commit6a02873687f76c08bf4788d2905b9b8abeee2ba7 (patch)
treeb2644e9b3d855cb4c9d964daa53cccb1130c33fc /src
parent5f467fe08e37a08fd12f4826b8a646760c491fec (diff)
iris: Only update clear color for gens 8 and 9.
Newer gens can read it directly. Also properly skip updating the ISL_AUX_USAGE_NONE surface. Fixes: a8b5ea8ef015ed4a "iris: Add function to update clear color in surface state." Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 25c2af9845e..50956ec7243 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3785,8 +3785,17 @@ update_clear_value(struct iris_batch *batch,
struct iris_resource *res,
struct iris_state_ref *state)
{
+ struct iris_screen *screen = batch->screen;
+ const struct gen_device_info *devinfo = &screen->devinfo;
+
+ /* We only need to update the clear color in the surface state for gen8 and
+ * gen9. Newer gens can read it directly from the clear color state buffer.
+ */
+ if (devinfo->gen > 9)
+ return;
+
unsigned aux_modes = res->aux.possible_usages;
- aux_modes &= ~ISL_AUX_USAGE_NONE;
+ aux_modes &= ~(1 << ISL_AUX_USAGE_NONE);
while (aux_modes) {
enum isl_aux_usage aux_usage = u_bit_scan(&aux_modes);