diff --git a/viogpu/viogpu3d/tools/prepare_package_inx.ps1 b/viogpu/viogpu3d/tools/prepare_package_inx.ps1
index 3aa0b4d3..92cf27b6 100644
--- a/viogpu/viogpu3d/tools/prepare_package_inx.ps1
+++ b/viogpu/viogpu3d/tools/prepare_package_inx.ps1
@@ -17,9 +17,10 @@ if (-not (Test-Path -LiteralPath $SourcePath)) {
}
$sourceName = [System.IO.Path]::GetFileName($SourcePath)
-if ($sourceName -like 'viogpu3d_x64*') {
- if ([string]::IsNullOrWhiteSpace($Yttrium12Path) -or
- -not (Test-Path -LiteralPath $Yttrium12Path -PathType Leaf)) {
+$yttrium12Present = $sourceName -like 'viogpu3d_x64*' -and
+ -not [string]::IsNullOrWhiteSpace($Yttrium12Path)
+if ($yttrium12Present) {
+ if (-not (Test-Path -LiteralPath $Yttrium12Path -PathType Leaf)) {
throw "Missing x64 Yttrium12 payload: $Yttrium12Path. Build yttrium12 first and set YTTRIUM12_DLL_x64."
}
@@ -62,6 +63,13 @@ if ($hasWow64Payload -and -not $wow64LvpPresent) {
}
$lines = [System.IO.File]::ReadAllLines($SourcePath)
+if (-not $yttrium12Present) {
+ # Drop the optional DX12 slot without removing the DX9/DX10/DX11 entries
+ # on the same registry lines. The remaining matches are file entries.
+ $lines = $lines -replace ',%11%\\yttrium12\.dll\s*$', ''
+ $lines = $lines -replace ',yttrium12\s*$', ''
+ $removeTokens += @('yttrium12_x64.dll')
+}
if ($removeTokens.Count -ne 0) {
$pattern = ($removeTokens | ForEach-Object { [regex]::Escape($_) }) -join '|'
$lines = @($lines | Where-Object { $_ -notmatch $pattern })
@@ -75,4 +83,4 @@ if (-not (Test-Path -LiteralPath $destinationDir)) {
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllLines($DestinationPath, $lines, $utf8NoBom)
-Write-Host "Prepared $DestinationPath (native Lavapipe=$nativeLvpPresent, wow64 Lavapipe=$wow64LvpPresent, Yttrium12=$Yttrium12Path)"
+Write-Host "Prepared $DestinationPath (native Lavapipe=$nativeLvpPresent, wow64 Lavapipe=$wow64LvpPresent, Yttrium12=$yttrium12Present)"
diff --git a/viogpu/viogpu3d/viogpu3d.vcxproj b/viogpu/viogpu3d/viogpu3d.vcxproj
index 596c8d82..764fe64d 100644
--- a/viogpu/viogpu3d/viogpu3d.vcxproj
+++ b/viogpu/viogpu3d/viogpu3d.vcxproj
@@ -462,12 +462,14 @@
$(IntDir)messa_stage\
- $(MSBuildProjectDirectory)\..\..\..\yttrium12\yttrium12.dll
-
-
-
+
+
+
+
+
+
@@ -513,7 +515,7 @@
x64
-
+
x64
@@ -619,7 +621,7 @@
x64
- x64
+ x64
x64
x64
x64