const struct gen_device_info *devinfo = &screen->devinfo;
const unsigned clear_color_state_size = devinfo->gen >= 10 ?
screen->isl_dev.ss.clear_color_state_size :
- screen->isl_dev.ss.clear_value_size;
-
+ (devinfo->gen >= 9 ? screen->isl_dev.ss.clear_value_size : 0);
assert(!res->aux.bo);
iris_bo_unmap(res->aux.bo);
}
- res->aux.clear_color_bo = res->aux.bo;
- iris_bo_reference(res->aux.clear_color_bo);
+ if (clear_color_state_size > 0) {
+ res->aux.clear_color_bo = res->aux.bo;
+ iris_bo_reference(res->aux.clear_color_bo);
+ }
if (res->aux.usage == ISL_AUX_USAGE_HIZ) {
for (unsigned level = 0; level < res->surf.levels; ++level) {
if (res->aux.bo) {
iris_use_pinned_bo(batch, res->aux.bo, writeable);
- iris_use_pinned_bo(batch, res->aux.clear_color_bo, false);
+ if (res->aux.clear_color_bo)
+ iris_use_pinned_bo(batch, res->aux.clear_color_bo, false);
if (memcmp(&res->aux.clear_color, &surf->clear_color,
sizeof(surf->clear_color)) != 0) {
if (isv->res->aux.bo) {
iris_use_pinned_bo(batch, isv->res->aux.bo, false);
- iris_use_pinned_bo(batch, isv->res->aux.clear_color_bo, false);
+ if (isv->res->aux.clear_color_bo)
+ iris_use_pinned_bo(batch, isv->res->aux.clear_color_bo, false);
if (memcmp(&isv->res->aux.clear_color, &isv->clear_color,
sizeof(isv->clear_color)) != 0) {
update_clear_value(ice, batch, isv->res,