mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
d3d11device: Print supported DXGI format for debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1355>
This commit is contained in:
parent
8fe1aae96c
commit
3dd2b6f20b
1 changed files with 18 additions and 3 deletions
|
@ -371,14 +371,29 @@ can_support_format (GstD3D11Device * self, DXGI_FORMAT format)
|
||||||
(D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_RENDER_TARGET |
|
(D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_RENDER_TARGET |
|
||||||
D3D11_FORMAT_SUPPORT_SHADER_SAMPLE);
|
D3D11_FORMAT_SUPPORT_SHADER_SAMPLE);
|
||||||
|
|
||||||
if (!gst_d3d11_is_windows_8_or_greater ())
|
if (!gst_d3d11_is_windows_8_or_greater ()) {
|
||||||
|
GST_WARNING_OBJECT (self, "DXGI format %d needs Windows 8 or greater",
|
||||||
|
(guint) format);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
hr = ID3D11Device_CheckFormatSupport (handle, format, &supported);
|
hr = ID3D11Device_CheckFormatSupport (handle, format, &supported);
|
||||||
if (!gst_d3d11_result (hr, NULL))
|
if (!gst_d3d11_result (hr, NULL)) {
|
||||||
|
GST_WARNING_OBJECT (self, "DXGI format %d is not supported by device",
|
||||||
|
(guint) format);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return (supported & flags) == flags;
|
if ((supported & flags) != flags) {
|
||||||
|
GST_WARNING_OBJECT (self,
|
||||||
|
"DXGI format %d doesn't support flag 0x%x (supported flag 0x%x)",
|
||||||
|
(guint) format, (guint) supported, (guint) flags);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_INFO_OBJECT (self, "Device supports DXGI format %d", (guint) format);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue