d3d11: Ensure sampler max_lod is >= min_lod.
A maximum level of detail smaller than the minimum is poorly defined in OpenGL and D3D, and disallowed by Vulkan. Found by the Vulkan validation layers. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
98137faeb2
commit
cce051b7d6
|
@ -1551,7 +1551,7 @@ static HRESULT d3d_sampler_state_init(struct d3d_sampler_state *state, struct d3
|
|||
wined3d_desc.mip_filter = wined3d_texture_filter_mip_from_d3d11(desc->Filter);
|
||||
wined3d_desc.lod_bias = desc->MipLODBias;
|
||||
wined3d_desc.min_lod = desc->MinLOD;
|
||||
wined3d_desc.max_lod = desc->MaxLOD;
|
||||
wined3d_desc.max_lod = max(desc->MinLOD, desc->MaxLOD);
|
||||
wined3d_desc.mip_base_level = 0;
|
||||
wined3d_desc.max_anisotropy = D3D11_DECODE_IS_ANISOTROPIC_FILTER(desc->Filter) ? desc->MaxAnisotropy : 1;
|
||||
wined3d_desc.compare = wined3d_texture_compare_from_d3d11(desc->Filter);
|
||||
|
|
Loading…
Reference in New Issue