d3d11convert: Allow MSAA only for native DXGI formats

Enable MSAA only if converter can render directly on texture
without post-processing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
This commit is contained in:
Seungha Yang 2023-11-27 01:11:04 +09:00 committed by GStreamer Marge Bot
parent 845f5d4856
commit f23d4475b3

View file

@ -1618,10 +1618,15 @@ gst_d3d11_base_convert_setup_msaa_texture (GstD3D11BaseConvert * self,
return;
}
if (device_format.dxgi_format != DXGI_FORMAT_UNKNOWN)
if (device_format.dxgi_format == DXGI_FORMAT_UNKNOWN ||
(device_format.format_support[0] &
D3D11_FORMAT_SUPPORT_RENDER_TARGET) == 0) {
GST_DEBUG_OBJECT (self,
"MSAA supported only for native and RTV available formats");;
return;
} else {
dxgi_format = device_format.dxgi_format;
else
dxgi_format = device_format.resource_format[0];
}
device_handle = gst_d3d11_device_get_device_handle (device);
while (sample_count > 1) {