Skip to content

Commit 71a4a7b

Browse files
Remove d3d10/d3d10_1 runtime logic and keep only real DXVK DLLs
- Remove `d3d10` and `d3d10_1` from `DllProviderResolver` target list. - Clean up `ResolveDllProvidersStage` to remove DXVK capability fixup for aliases. - Audit `utils.rs` and remove aliases from `build_dll_overrides` and `cleanup_dll_symlinks`. - Update `LaunchInvariantValidator` and `OverrideConflictValidator` to remove alias-specific rules. - Refine error classification patterns in `pipeline.rs` and `wine_capture.rs`. - Focus diagnostics and launch configuration entirely on concrete DXVK DLLs (`d3d8`, `d3d9`, `d3d10core`, `d3d11`, `dxgi`). Co-authored-by: weter11 <14630689+weter11@users.noreply.github.com>
1 parent 9cae845 commit 71a4a7b

7 files changed

Lines changed: 12 additions & 63 deletions

File tree

src/infra/logging/wine_capture.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn classify_graphics_evidence(log_line: &str) -> Option<String> {
5353

5454
// Override/Policy regressions
5555
if line_lower.contains("invalid dll") ||
56-
(line_lower.contains("failed to load") && (line_lower.contains("d3d10") || line_lower.contains("d3d11"))) {
56+
(line_lower.contains("failed to load") && (line_lower.contains("d3d11"))) {
5757
return Some(format!("Override Policy Conflict: {}", log_line.trim()));
5858
}
5959

src/launch/dll_provider_resolver.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ impl DllProviderResolver {
5656
"d3d8".into(),
5757
"d3d9".into(),
5858
"dxgi".into(),
59-
"d3d10".into(),
60-
"d3d10_1".into(),
6159
"d3d10core".into(),
6260
"d3d11".into(),
6361
"d3d12".into(),
@@ -273,7 +271,7 @@ impl DllProviderResolver {
273271
// 3. System Priority
274272
// For now, we use a simplified check for system paths
275273
let system_paths = match dll_name {
276-
"d3d8" | "d3d9" | "d3d10" | "d3d10_1" | "d3d10core" | "d3d11" | "dxgi" => vec![
274+
"d3d8" | "d3d9" | "d3d10core" | "d3d11" | "dxgi" => vec![
277275
"/usr/lib/dxvk/x64",
278276
"/usr/lib/x86_64-linux-gnu/dxvk",
279277
],
@@ -324,7 +322,7 @@ impl DllProviderResolver {
324322
custom_vkd3d_proton_path: Option<&Path>,
325323
) -> Option<PathBuf> {
326324
let dll_filename = format!("{}.dll", dll_name);
327-
let is_dxvk = matches!(dll_name, "d3d8" | "d3d9" | "d3d10" | "d3d10_1" | "d3d10core" | "d3d11" | "dxgi");
325+
let is_dxvk = matches!(dll_name, "d3d8" | "d3d9" | "d3d10core" | "d3d11" | "dxgi");
328326
let is_vkd3d_proton = matches!(dll_name, "d3d12" | "d3d12core");
329327
let is_vkd3d = matches!(dll_name, "libvkd3d-1" | "libvkd3d-shader-1");
330328

@@ -382,7 +380,7 @@ impl DllProviderResolver {
382380
let dll_filename = format!("{}.dll", dll_name);
383381

384382
// Match DLL to component and look for it in runner root
385-
let is_dxvk = matches!(dll_name, "d3d8" | "d3d9" | "d3d10" | "d3d10_1" | "d3d10core" | "d3d11" | "dxgi");
383+
let is_dxvk = matches!(dll_name, "d3d8" | "d3d9" | "d3d10core" | "d3d11" | "dxgi");
386384
if is_dxvk && components.dxvk.is_some() {
387385
let mut relative_paths = vec![
388386
"lib/wine/dxvk/x86_64-windows",

src/launch/pipeline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ impl LaunchPipeline {
404404
break;
405405
}
406406
if evidence.contains("DLL Load Failure") {
407-
if evidence.contains("d3d10") || evidence.contains("d3d11") {
407+
if evidence.contains("d3d11") {
408408
fatal_error = Some("startup_environment_regression");
409409
} else {
410410
fatal_error = Some("missing_required_module");

src/launch/stages/resolve_dll_providers.rs

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,6 @@ impl PipelineStage for ResolveDllProvidersStage {
106106

107107
ctx.dll_resolutions = resolutions;
108108

109-
// DXVK Capability Fixup for D3D10/10.1
110-
if let Some(config) = &ctx.user_config {
111-
if config.graphics_layers.graphics_backend_policy == crate::models::GraphicsBackendPolicy::DXVK {
112-
let has_dxvk_core = |name: &str| -> bool {
113-
ctx.dll_resolutions.iter()
114-
.find(|r| r.name == name)
115-
.map(|r| r.chosen_provider != crate::launch::dll_provider_resolver::DllProvider::None)
116-
.unwrap_or(false)
117-
};
118-
119-
let d3d10_supported = has_dxvk_core("d3d10core") && has_dxvk_core("d3d11") && has_dxvk_core("dxgi");
120-
121-
if d3d10_supported {
122-
for res in &mut ctx.dll_resolutions {
123-
if (res.name == "d3d10" || res.name == "d3d10_1") && res.chosen_provider == crate::launch::dll_provider_resolver::DllProvider::None {
124-
res.chosen_provider = crate::launch::dll_provider_resolver::DllProvider::Internal;
125-
res.fallback_reason = Some("Satisfied via DXVK D3D10 capability (d3d10core + d3d11 + dxgi)".to_string());
126-
}
127-
}
128-
}
129-
}
130-
}
131-
132109
// Strict Backend Policy Enforcement
133110
if let Some(config) = &ctx.user_config {
134111
let backend_policy = &config.graphics_layers.graphics_backend_policy;
@@ -155,12 +132,10 @@ impl PipelineStage for ResolveDllProvidersStage {
155132
if !has_dx11_dxgi {
156133
missing_capabilities.push("DX11/DXGI (requires d3d11.dll and dxgi.dll)");
157134
}
158-
if !has_dx10_core || !has_dx11_dxgi {
159-
if !has_dx10_core {
160-
missing_capabilities.push("DX10/10.1 capability incomplete: missing d3d10core.dll");
161-
} else {
162-
missing_capabilities.push("DX10/10.1 support unavailable because d3d11.dll or dxgi.dll could not be resolved");
163-
}
135+
if !has_dx10_core {
136+
missing_capabilities.push("DX10/10.1 capability incomplete: missing d3d10core.dll");
137+
} else if !has_dx11_dxgi {
138+
missing_capabilities.push("DX10/10.1 support unavailable because d3d11.dll or dxgi.dll could not be resolved");
164139
}
165140
if !has_dx9 {
166141
missing_capabilities.push("DX9 (requires d3d9.dll)");

src/launch/validators/invariants.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,11 @@ impl LaunchValidator for LaunchInvariantValidator {
3333
if ctx.graphics_stack.effective_backend != "DXVK" {
3434
if let Some(spec) = &ctx.command_spec {
3535
if let Some(overrides) = spec.env.get("WINEDLLOVERRIDES") {
36-
let dxvk_dlls = ["d3d8", "d3d9", "d3d10", "d3d10core", "d3d11", "dxgi"];
36+
let dxvk_dlls = ["d3d8", "d3d9", "d3d10core", "d3d11", "dxgi"];
3737
for part in overrides.split(';') {
3838
if let Some((dll, mode)) = part.split_once('=') {
3939
let dll_trimmed = dll.trim().to_lowercase();
4040
if dxvk_dlls.contains(&dll_trimmed.as_str()) && mode.contains('n') {
41-
// Exclude d3d10/10_1 from being flagged as DXVK-forcing if they are not in the concrete list
42-
if dll_trimmed == "d3d10" || dll_trimmed == "d3d10_1" {
43-
continue;
44-
}
45-
4641
warnings.push((
4742
"INVARIANT_B_VIOLATION",
4843
format!("Effective backend is not DXVK but found native override for DXVK DLL: {}", dll),
@@ -255,23 +250,6 @@ impl LaunchValidator for LaunchInvariantValidator {
255250
));
256251
}
257252

258-
// Invariant E: DXVK alias DLLs (d3d10, d3d10_1) should not be explicitly overridden as native.
259-
if let Some(spec) = &ctx.command_spec {
260-
if let Some(overrides) = spec.env.get("WINEDLLOVERRIDES") {
261-
let alias_dlls = ["d3d10", "d3d10_1"];
262-
for part in overrides.split(';') {
263-
if let Some((dll, mode)) = part.split_once('=') {
264-
let dll_trimmed = dll.trim().to_lowercase();
265-
if alias_dlls.contains(&dll_trimmed.as_str()) && mode.contains('n') {
266-
warnings.push((
267-
"DANGEROUS_ALIAS_OVERRIDE",
268-
format!("Found native override for DXVK alias DLL: {}. This often causes startup failures. These should be handled via Wine's built-in wrappers delegating to d3d10core.", dll),
269-
));
270-
}
271-
}
272-
}
273-
}
274-
}
275253

276254
for (code, msg) in warnings {
277255
ctx.add_warning(code, msg);

src/launch/validators/overrides.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl LaunchValidator for OverrideConflictValidator {
1616

1717
// 1. Check for D3D/DXGI override conflicts with DXVK
1818
if dxvk_enabled {
19-
let conflicts = ["d3d9", "d3d10", "d3d10core", "d3d11", "dxgi"];
19+
let conflicts = ["d3d9", "d3d10core", "d3d11", "dxgi"];
2020
if let Some(val) = user_config.env_variables.get("WINEDLLOVERRIDES") {
2121
for part in val.split(';') {
2222
if let Some((dll, mode)) = part.split_once('=') {

src/utils.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,6 @@ pub fn build_dll_overrides(
737737
for dll in &[
738738
"d3d8",
739739
"d3d9",
740-
"d3d10",
741-
"d3d10_1",
742740
"d3d10core",
743741
"d3d11",
744742
"dxgi",
@@ -1094,7 +1092,7 @@ fn find_sibling_dll(
10941092

10951093
pub fn cleanup_dll_symlinks(prefix: &Path) -> Result<()> {
10961094
let target_dlls = [
1097-
"d3d8.dll", "d3d9.dll", "dxgi.dll", "d3d10.dll", "d3d10_1.dll", "d3d10core.dll",
1095+
"d3d8.dll", "d3d9.dll", "dxgi.dll", "d3d10core.dll",
10981096
"d3d11.dll", "d3d12.dll", "d3d12core.dll", "libvkd3d-1.dll", "libvkd3d-shader-1.dll"
10991097
];
11001098

0 commit comments

Comments
 (0)