X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Firis%2Firis_resource.c;h=fc093110fb27902e3323536d0592d0c9ea36bc32;hb=361f3d19f1f;hp=d0a473fd72af71b6500e458a785c64e18be6c3a4;hpb=276d22c52dd9c50a2b2becd13c702fbb801a7e17;p=mesa.git diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index d0a473fd72a..fc093110fb2 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -839,6 +839,14 @@ iris_resource_get_handle(struct pipe_screen *pscreen, { struct iris_resource *res = (struct iris_resource *)resource; + /* Disable aux usage if explicit flush not set and this is the + * first time we are dealing with this resource. + */ + if ((!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && res->aux.usage != 0)) { + if (p_atomic_read(&resource->reference.count) == 1) + iris_resource_disable_aux(res); + } + /* If this is a buffer, stride should be 0 - no need to special case */ whandle->stride = res->surf.row_pitch_B; whandle->modifier =