[vlc-commits] dxgi_fmt: test the resource format in FindD3D11Format if formatTexture is unknown
Steve Lhomme
git at videolan.org
Tue Jun 13 15:01:57 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Jun 8 15:05:39 2017 +0200| [df7f4edc54d854a390cf9f6bb60e3b4815b5acc3] | committer: Jean-Baptiste Kempf
dxgi_fmt: test the resource format in FindD3D11Format if formatTexture is unknown
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df7f4edc54d854a390cf9f6bb60e3b4815b5acc3
---
modules/video_chroma/dxgi_fmt.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/video_chroma/dxgi_fmt.h b/modules/video_chroma/dxgi_fmt.h
index 2e4d98704d..b79dbce7c0 100644
--- a/modules/video_chroma/dxgi_fmt.h
+++ b/modules/video_chroma/dxgi_fmt.h
@@ -79,8 +79,13 @@ static inline const d3d_format_t *FindD3D11Format(ID3D11Device *d3ddevice,
output_format->fourcc == VLC_CODEC_D3D11_OPAQUE_10B))
continue;
- if( DeviceSupportsFormat( d3ddevice, output_format->formatTexture,
- supportFlags ) )
+ DXGI_FORMAT textureFormat;
+ if (output_format->formatTexture == DXGI_FORMAT_UNKNOWN)
+ textureFormat = output_format->resourceFormat[0];
+ else
+ textureFormat = output_format->formatTexture;
+
+ if( DeviceSupportsFormat( d3ddevice, textureFormat, supportFlags ) )
return output_format;
}
return NULL;
More information about the vlc-commits
mailing list