Henri Verbeet : d3d11: Ensure sampler max_lod is >= min_lod.
Alexandre Julliard
julliard at winehq.org
Thu Mar 11 15:59:36 CST 2021
Module: wine
Branch: master
Commit: cce051b7d6820d8e14109823e3382ed7261d8981
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cce051b7d6820d8e14109823e3382ed7261d8981
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 11 13:54:31 2021 +0100
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c
index 737dae93848..6b287176536 100644
--- a/dlls/d3d11/state.c
+++ b/dlls/d3d11/state.c
@@ -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);
More information about the wine-cvs
mailing list