internal/graphicsdriver/directx: limit d3dcompiler versions

For example, the verions 45/44 are alpha and should not be used.

Updates #2613
Updates #2618
This commit is contained in:
Hajime Hoshi 2023-03-30 17:53:49 +09:00
parent 99fb40f299
commit 61ced5127b

View File

@ -79,8 +79,8 @@ func init() {
// Enumerate possible DLL names for d3dcompiler_*.dll. // Enumerate possible DLL names for d3dcompiler_*.dll.
// https://walbourn.github.io/hlsl-fxc-and-d3dcompile/ // https://walbourn.github.io/hlsl-fxc-and-d3dcompile/
for v := 47; v >= 33; v-- { for _, name := range []string{"d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll"} {
dll := windows.NewLazySystemDLL(fmt.Sprintf("d3dcompiler_%d.dll", v)) dll := windows.NewLazySystemDLL(name)
if err := dll.Load(); err != nil { if err := dll.Load(); err != nil {
continue continue
} }