aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index bf8af133552..60ab31bc014 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -335,8 +335,7 @@ iris_resource_alloc_aux(struct iris_screen *screen, struct iris_resource *res)
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);
@@ -437,8 +436,10 @@ iris_resource_alloc_aux(struct iris_screen *screen, struct iris_resource *res)
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) {