From a966cc20bc16f831433404dd7bb72cee2ab1d294 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 16 May 2020 21:45:02 +0900 Subject: [PATCH] d3d11convert: Fix fallback texture copy Fix texture copy when input texture has non-zero subresource index Part-of: --- sys/d3d11/gstd3d11colorconvert.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/d3d11/gstd3d11colorconvert.c b/sys/d3d11/gstd3d11colorconvert.c index f73695c1ae..5cd29abfe8 100644 --- a/sys/d3d11/gstd3d11colorconvert.c +++ b/sys/d3d11/gstd3d11colorconvert.c @@ -1467,7 +1467,8 @@ gst_d3d11_color_convert_transform (GstBaseTransform * trans, ID3D11DeviceContext_CopySubresourceRegion (context_handle, (ID3D11Resource *) self->in_texture[i], 0, 0, 0, 0, - (ID3D11Resource *) d3d11_mem->texture, 0, NULL); + (ID3D11Resource *) d3d11_mem->texture, d3d11_mem->subresource_index, + NULL); } gst_d3d11_device_unlock (device); } @@ -1520,8 +1521,8 @@ gst_d3d11_color_convert_transform (GstBaseTransform * trans, d3d11_mem = (GstD3D11Memory *) mem; ID3D11DeviceContext_CopySubresourceRegion (context_handle, - (ID3D11Resource *) d3d11_mem->texture, 0, 0, 0, 0, - (ID3D11Resource *) self->out_texture[i], 0, NULL); + (ID3D11Resource *) d3d11_mem->texture, d3d11_mem->subresource_index, + 0, 0, 0, (ID3D11Resource *) self->out_texture[i], 0, NULL); } gst_d3d11_device_unlock (device); } else {