diff options
author | Rafael Antognolli <[email protected]> | 2019-04-02 17:10:26 -0700 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2019-04-30 08:31:44 -0700 |
commit | cf3cadacdfe7275c44141685ca92697ca97784b1 (patch) | |
tree | 85552f5f02de30b01a4ea779ddef9a9e75f229e8 /src/gallium/drivers | |
parent | 91bcbfc35100b64eb230e9bdafc7abe7cb134c06 (diff) |
iris: Update the surface state clear color address when available.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 91659f4f67b..60d409b5301 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1728,7 +1728,15 @@ fill_surface_state(struct isl_device *isl_dev, f.aux_surf = &res->aux.surf; f.aux_usage = aux_usage; f.aux_address = res->aux.bo->gtt_offset + res->aux.offset; - f.clear_color = res->aux.clear_color; + + struct iris_bo *clear_bo = NULL; + uint64_t clear_offset = 0; + f.clear_color = + iris_resource_get_clear_color(res, &clear_bo, &clear_offset); + if (clear_bo) { + f.clear_address = clear_bo->gtt_offset + clear_offset; + f.use_clear_address = isl_dev->info->gen > 9; + } } isl_surf_fill_state_s(isl_dev, map, &f); |