diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index c38bb259178..7fe2355da66 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1581,6 +1581,8 @@ iris_resource_get_param(struct pipe_screen *pscreen, bool mod_with_aux = res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE; bool wants_aux = mod_with_aux && plane > 0; + bool wants_cc = mod_with_aux && + mod_plane_is_clear_color(res->mod_info->modifier, plane); bool result; unsigned handle; @@ -1605,9 +1607,8 @@ iris_resource_get_param(struct pipe_screen *pscreen, *value = wants_aux ? res->aux.surf.row_pitch_B : res->surf.row_pitch_B; return true; case PIPE_RESOURCE_PARAM_OFFSET: - *value = wants_aux ? - mod_plane_is_clear_color(res->mod_info->modifier, plane) ? - res->aux.clear_color_offset : res->aux.offset : 0; + *value = wants_cc ? res->aux.clear_color_offset : + wants_aux ? res->aux.offset : 0; return true; case PIPE_RESOURCE_PARAM_MODIFIER: *value = res->mod_info ? res->mod_info->modifier :