Commit 43b2b125 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

d3d11: move the processor input/output support logging in libd3d11_common

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent be9ea17a
......@@ -466,3 +466,21 @@ void D3D11_Destroy(d3d11_handle_t *hd3d)
#endif
#endif
}
#ifndef NDEBUG
#undef D3D11_LogProcessorSupport
void D3D11_LogProcessorSupport(vlc_object_t *o,
ID3D11VideoProcessorEnumerator *processorEnumerator)
{
UINT flags;
HRESULT hr;
for (int format = 0; format < 188; format++) {
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, format, &flags);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT))
msg_Dbg(o, "processor format %s (%d) is supported for input", DxgiFormatToStr(format),format);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
msg_Dbg(o, "processor format %s (%d) is supported for output", DxgiFormatToStr(format),format);
}
}
#endif
......@@ -120,4 +120,9 @@ int AllocateTextures(vlc_object_t *obj, d3d11_device_t *d3d_dev,
const d3d_format_t *cfg, const video_format_t *fmt,
unsigned pool_size, ID3D11Texture2D *textures[]);
#ifndef NDEBUG
void D3D11_LogProcessorSupport(vlc_object_t*, ID3D11VideoProcessorEnumerator*);
#define D3D11_LogProcessorSupport(a,b) D3D11_LogProcessorSupport( VLC_OBJECT(a), b )
#endif
#endif /* include-guard */
......@@ -116,13 +116,7 @@ static int SetupProcessor(filter_t *p_filter, ID3D11Device *d3ddevice,
UINT flags;
#ifndef NDEBUG
for (int format = 0; format < 188; format++) {
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, format, &flags);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT))
msg_Dbg(p_filter, "processor format %s (%d) is supported for input", DxgiFormatToStr(format),format);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
msg_Dbg(p_filter, "processor format %s (%d) is supported for output", DxgiFormatToStr(format),format);
}
D3D11_LogProcessorSupport(p_filter, processorEnumerator);
#endif
/* shortcut for the rendering output */
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, srcFormat, &flags);
......
......@@ -378,13 +378,7 @@ static int Open(vlc_object_t *obj)
UINT flags;
#ifndef NDEBUG
for (int format = 0; format < 188; format++) {
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, format, &flags);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT))
msg_Dbg(filter, "processor format %s (%d) is supported for input", DxgiFormatToStr(format),format);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
msg_Dbg(filter, "processor format %s (%d) is supported for output", DxgiFormatToStr(format),format);
}
D3D11_LogProcessorSupport(filter, processorEnumerator);
#endif
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, dst->p_sys->formatTexture, &flags);
if (!SUCCEEDED(hr))
......
......@@ -360,13 +360,7 @@ static int Open(vlc_object_t *obj)
UINT flags;
#ifndef NDEBUG
for (int format = 0; format < 188; format++) {
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, format, &flags);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT))
msg_Dbg(filter, "processor format %s (%d) is supported for input", DxgiFormatToStr(format),format);
if (SUCCEEDED(hr) && (flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
msg_Dbg(filter, "processor format %s (%d) is supported for output", DxgiFormatToStr(format),format);
}
D3D11_LogProcessorSupport(filter, processorEnumerator);
#endif
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, dst->p_sys->formatTexture, &flags);
if (!SUCCEEDED(hr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment