virgl: Store format modifier in blob's bo meta
Prior this change the format modifier was not set for blob's meta, which lead to incorrect reporting of format modifier to clients. This changes fixes this issue. BUG=b:267299128 TEST=ExoPlayer demo app Change-Id: I15c2f9095d3cb20e2a5a34d749af6657e98f7ba6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4628256 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Tested-by: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
This commit is contained in:
parent
3957b416fa
commit
3af863ad23
1 changed files with 2 additions and 0 deletions
|
|
@ -834,6 +834,7 @@ static int virgl_blob_get_host_format(struct driver *drv, struct bo_metadata *me
|
|||
}
|
||||
entry->meta.total_size =
|
||||
entry->meta.offsets[num_planes - 1] + entry->meta.sizes[num_planes - 1];
|
||||
entry->meta.format_modifier = info.format_modifier;
|
||||
|
||||
lru_insert(&priv->virgl_blob_metadata_cache, &entry->entry);
|
||||
}
|
||||
|
|
@ -842,6 +843,7 @@ static int virgl_blob_get_host_format(struct driver *drv, struct bo_metadata *me
|
|||
memcpy(meta->sizes, entry->meta.sizes, sizeof(meta->sizes));
|
||||
memcpy(meta->strides, entry->meta.strides, sizeof(meta->strides));
|
||||
meta->total_size = entry->meta.total_size;
|
||||
meta->format_modifier = entry->meta.format_modifier;
|
||||
}
|
||||
pthread_mutex_unlock(&priv->host_blob_format_lock);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue