struct iris_resource *zres, *sres;
iris_get_depth_stencil_resources(cso_fb->zsbuf->texture,
&zres, &sres);
- // XXX: might not be writable...
- if (zres)
- iris_use_pinned_bo(batch, zres->bo, true);
- if (sres)
- iris_use_pinned_bo(batch, sres->bo, true);
+ if (zres) {
+ iris_use_pinned_bo(batch, zres->bo,
+ ice->state.depth_writes_enabled);
+ }
+ if (sres) {
+ iris_use_pinned_bo(batch, sres->bo,
+ ice->state.stencil_writes_enabled);
+ }
}
}
struct iris_resource *zres, *sres;
iris_get_depth_stencil_resources(cso_fb->zsbuf->texture,
&zres, &sres);
- // XXX: might not be writable...
- if (zres)
- iris_use_pinned_bo(batch, zres->bo, true);
- if (sres)
- iris_use_pinned_bo(batch, sres->bo, true);
+ if (zres) {
+ iris_use_pinned_bo(batch, zres->bo,
+ ice->state.depth_writes_enabled);
+ }
+
+ if (sres) {
+ iris_use_pinned_bo(batch, sres->bo,
+ ice->state.stencil_writes_enabled);
+ }
}
}