update feature level

This commit is contained in:
Junkui Zhang 2025-07-30 22:56:28 +08:00
parent 0a0803e2a7
commit 7c8074ce5c
2 changed files with 9 additions and 6 deletions

View file

@ -360,7 +360,7 @@ mod windows {
&output_file, &output_file,
&const_name, &const_name,
shader_path, shader_path,
"vs_5_0", "vs_4_1",
); );
generate_rust_binding(&const_name, &output_file, &rust_binding_path); generate_rust_binding(&const_name, &output_file, &rust_binding_path);
@ -373,7 +373,7 @@ mod windows {
&output_file, &output_file,
&const_name, &const_name,
shader_path, shader_path,
"ps_5_0", "ps_4_1",
); );
generate_rust_binding(&const_name, &output_file, &rust_binding_path); generate_rust_binding(&const_name, &output_file, &rust_binding_path);
} }

View file

@ -1000,8 +1000,11 @@ fn get_device(
HMODULE::default(), HMODULE::default(),
device_flags, device_flags,
// 4x MSAA is required for Direct3D Feature Level 10.1 or better // 4x MSAA is required for Direct3D Feature Level 10.1 or better
// 8x MSAA is required for Direct3D Feature Level 11.0 or better Some(&[
Some(&[D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_11_1]), D3D_FEATURE_LEVEL_11_1,
D3D_FEATURE_LEVEL_11_0,
D3D_FEATURE_LEVEL_10_1,
]),
D3D11_SDK_VERSION, D3D11_SDK_VERSION,
device, device,
None, None,
@ -1493,8 +1496,8 @@ mod shader_resources {
} }
); );
let target = match target { let target = match target {
ShaderTarget::Vertex => "vs_5_0\0", ShaderTarget::Vertex => "vs_4_1\0",
ShaderTarget::Fragment => "ps_5_0\0", ShaderTarget::Fragment => "ps_4_1\0",
}; };
let mut compile_blob = None; let mut compile_blob = None;