mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +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
|
@ -798,10 +798,16 @@ gst_d3d11_color_convert_setup_shader (GstD3D11Converter * self,
|
|||
device_handle = gst_d3d11_device_get_device_handle (device);
|
||||
|
||||
hr = gst_d3d11_device_get_sampler (device, sampler_filter, &sampler);
|
||||
if (!gst_d3d11_result (hr, device)) {
|
||||
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,
|
||||
&linear_sampler);
|
||||
|
|
Loading…
Reference in a new issue