mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
d3d11: Set MaxAnisotropy value for the best quality
... and use anisotropic filter without comparison, which is actually intended one. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5580>
This commit is contained in:
parent
0e9fdabb1b
commit
033f98ad86
4 changed files with 10 additions and 4 deletions
|
@ -84,8 +84,7 @@ gst_d3d11_converter_sampler_filter_get_type (void)
|
|||
"D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT", "min-linear-mag-mip-point"},
|
||||
{D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT,
|
||||
"D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT", "min-mag-linear-mip-point"},
|
||||
{D3D11_FILTER_COMPARISON_ANISOTROPIC,
|
||||
"D3D11_FILTER_COMPARISON_ANISOTROPIC", "anisotropic"},
|
||||
{D3D11_FILTER_ANISOTROPIC, "D3D11_FILTER_ANISOTROPIC", "anisotropic"},
|
||||
{0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ GType gst_d3d11_converter_backend_get_type (void);
|
|||
* @D3D11_FILTER_MIN_MAG_MIP_POINT
|
||||
* @D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT
|
||||
* @D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT
|
||||
* @D3D11_FILTER_COMPARISON_ANISOTROPIC,
|
||||
* @D3D11_FILTER_ANISOTROPIC
|
||||
*
|
||||
* Default is #D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT.
|
||||
*
|
||||
|
|
|
@ -1897,6 +1897,13 @@ gst_d3d11_device_get_sampler (GstD3D11Device * device, D3D11_FILTER filter,
|
|||
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
|
||||
desc.MaxLOD = D3D11_FLOAT32_MAX;
|
||||
|
||||
if (filter == D3D11_FILTER_ANISOTROPIC) {
|
||||
if (priv->feature_level > D3D_FEATURE_LEVEL_9_1)
|
||||
desc.MaxAnisotropy = 16;
|
||||
else
|
||||
desc.MaxAnisotropy = 2;
|
||||
}
|
||||
|
||||
hr = priv->device->CreateSamplerState (&desc, &state);
|
||||
if (!gst_d3d11_result (hr, device))
|
||||
return hr;
|
||||
|
|
|
@ -1142,7 +1142,7 @@ static const SamplingMethodMap sampling_method_map[] = {
|
|||
{GST_D3D11_SAMPLING_METHOD_BILINEAR, D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT},
|
||||
{GST_D3D11_SAMPLING_METHOD_LINEAR_MINIFICATION,
|
||||
D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT},
|
||||
{GST_D3D11_SAMPLING_METHOD_ANISOTROPIC, D3D11_FILTER_COMPARISON_ANISOTROPIC},
|
||||
{GST_D3D11_SAMPLING_METHOD_ANISOTROPIC, D3D11_FILTER_ANISOTROPIC},
|
||||
};
|
||||
|
||||
D3D11_FILTER
|
||||
|
|
Loading…
Reference in a new issue