mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
d3d11memory: Inform subresource index via GstMapInfo::user_data
By using this way, caller does not need to call another method gst_d3d11_memory_get_subresource_index() Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
This commit is contained in:
parent
a37da515f4
commit
af9b9be76d
1 changed files with 3 additions and 0 deletions
|
@ -381,6 +381,9 @@ gst_d3d11_memory_map_full (GstMemory * mem, GstMapInfo * info, gsize maxsize)
|
|||
gst_d3d11_device_lock (dmem->device);
|
||||
GST_D3D11_MEMORY_LOCK (dmem);
|
||||
|
||||
memset (info->user_data, 0, sizeof (info->user_data));
|
||||
info->user_data[0] = GUINT_TO_POINTER (dmem->priv->subresource_index);
|
||||
|
||||
if ((flags & GST_MAP_D3D11) == GST_MAP_D3D11) {
|
||||
if (priv->native_type == GST_D3D11_MEMORY_NATIVE_TYPE_BUFFER) {
|
||||
/* FIXME: handle non-staging buffer */
|
||||
|
|
Loading…
Reference in a new issue