Not actually seen in the wild but could theoretically be a problem for
applications that explicitly import/export resources.
v2: Set it on exporting as well as importing (Daniel Stone)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6717>
rsc->internal_format = templat->format;
rsc->modifier = (whandle->modifier == DRM_FORMAT_MOD_INVALID) ?
DRM_FORMAT_MOD_LINEAR : whandle->modifier;
+ rsc->modifier_constant = true;
rsc->slices[0].stride = whandle->stride;
rsc->slices[0].offset = whandle->offset;
rsc->slices[0].initialized = true;
struct renderonly_scanout *scanout = rsrc->scanout;
handle->modifier = rsrc->modifier;
+ rsrc->modifier_constant = true;
if (handle->type == WINSYS_HANDLE_TYPE_SHARED) {
return false;