-
-
Notifications
You must be signed in to change notification settings - Fork 225
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Operating system
Windows
Name of the script
Increase DirectX Layer Performance
Documentation/References
This script disables logging and debug settings of Direct3D or DirectX. This script also increases the layer performance of Direct3D or DirectX.
Code
:: ----------------------------------------------------------
:: -------Increase DirectX Layer Performance--------
:: ----------------------------------------------------------
echo --- Increase DirectX Layer Performance
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D!D3D10Debug"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D'; $data = '2'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D' /v 'D3D10Debug' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D!D3D10Debug"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D'; $data = '2'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D' /v 'D3D10Debug' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D!AllowTearing"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D'; $data = '1'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D' /v 'AllowTearing' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D!AllowTearing"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D'; $data = '1'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D' /v 'AllowTearing' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D!SoftwareOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D' /v 'SoftwareOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D!SoftwareOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D' /v 'SoftwareOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\DirectX!UseDebugLayer"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\DirectX'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\DirectX' /v 'UseDebugLayer' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX!UseDebugLayer"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX' /v 'UseDebugLayer' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\DirectX!EnableStereo"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\DirectX'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\DirectX' /v 'EnableStereo' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX!EnableStereo"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX' /v 'EnableStereo' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\DirectX!AllowTearing"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\DirectX'; $data = '1'; reg add 'HKLM\SOFTWARE\Microsoft\DirectX' /v 'AllowTearing' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX!AllowTearing"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX'; $data = '1'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX' /v 'AllowTearing' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers!SoftwareOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D\Drivers'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D\Drivers' /v 'SoftwareOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers!SoftwareOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers' /v 'SoftwareOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers!EmulationOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D\Drivers'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D\Drivers' /v 'EmulationOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers!EmulationOnly"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\Drivers' /v 'EmulationOnly' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D!MaxFrameLatency"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D'; $data = '1'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D' /v 'MaxFrameLatency' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D!MaxFrameLatency"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D'; $data = '1'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D' /v 'MaxFrameLatency' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice!Force10Level9"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice' /v 'Force10Level9' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice!Force10Level9"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice' /v 'Force10Level9' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice!DisableDriverManagement"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice'; $data = '0'; reg add 'HKLM\SOFTWARE\Microsoft\Direct3D\ReferenceDevice' /v 'DisableDriverManagement' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Set the registry value: "HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice!DisableDriverManagement"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice'; $data = '0'; reg add 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Direct3D\ReferenceDevice' /v 'DisableDriverManagement' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: ----------------------------------------------------------
Revert code
No response
Suggested category
No response
Recommendation level
None
Additional information
This script is used on Windows 10 - Home Edition - 22H2 (64-bit) (OS Build 19045.4894).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request