mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
d3d11converter: Fallback to linear sampler if filter is not supported
Use linear sampler if requested filter is not supported Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
This commit is contained in:
parent
e7069984df
commit
f32bb06e32
1 changed files with 8 additions and 2 deletions
|
@ -799,8 +799,14 @@ gst_d3d11_color_convert_setup_shader (GstD3D11Converter * self,
|
|||
|
||||
hr = gst_d3d11_device_get_sampler (device, sampler_filter, &sampler);
|
||||
if (!gst_d3d11_result (hr, device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create sampler, hr: 0x%x", (guint) hr);
|
||||
return FALSE;
|
||||
GST_WARNING_OBJECT (self, "Trying again with linear sampler");
|
||||
|
||||
hr = gst_d3d11_device_get_sampler (device, D3D11_FILTER_MIN_MAG_MIP_LINEAR,
|
||||
&sampler);
|
||||
if (!gst_d3d11_result (hr, device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create sampler, hr: 0x%x", (guint) hr);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
hr = gst_d3d11_device_get_sampler (device, D3D11_FILTER_MIN_MAG_MIP_LINEAR,
|
||||
|
|
Loading…
Reference in a new issue