Browse Source

iris: Prepare depth resource if clear_depth enable

Avoid preparing depth resource, if we did fast depth clear before.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
tags/19.3-branchpoint
Sagar Ghuge 6 years ago
parent
commit
4e0ed40ed7
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/gallium/drivers/iris/iris_clear.c

+ 2
- 2
src/gallium/drivers/iris/iris_clear.c View File

return; return;
} }


if (z_res) {
if (clear_depth && z_res) {
iris_resource_prepare_depth(ice, batch, z_res, level, box->z, box->depth); iris_resource_prepare_depth(ice, batch, z_res, level, box->z, box->depth);
iris_blorp_surf_for_resource(&ice->vtbl, &z_surf, &z_res->base, iris_blorp_surf_for_resource(&ice->vtbl, &z_surf, &z_res->base,
z_res->aux.usage, level, true); z_res->aux.usage, level, true);
iris_flush_and_dirty_for_history(ice, batch, res, 0, iris_flush_and_dirty_for_history(ice, batch, res, 0,
"cache history: post slow ZS clear"); "cache history: post slow ZS clear");


if (z_res) {
if (clear_depth && z_res) {
iris_resource_finish_depth(ice, z_res, level, iris_resource_finish_depth(ice, z_res, level,
box->z, box->depth, true); box->z, box->depth, true);
} }

Loading…
Cancel
Save