run-cts: add bin directory to DLL directories
On Windows, this ensures that Dawn loads the dxcompiler.dll in the bin
directory. This is needed because dawn.node is run out of the CTS root
directory.
Without this change, Dawn loads dxcompiler.dll found in PATH; or if not
found, silently revert to using FXC, neither of which is great.
Change-Id: I1fbb0c8402d332d5330146d6c25d404a514b2096
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/174921
Kokoro: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/tools/src/cmd/run-cts/node/cmd.go b/tools/src/cmd/run-cts/node/cmd.go
index c315a3b..6064260 100644
--- a/tools/src/cmd/run-cts/node/cmd.go
+++ b/tools/src/cmd/run-cts/node/cmd.go
@@ -243,6 +243,9 @@
return fmt.Errorf("only a single query can be provided")
}
+ // For Windows, set the DLL directory to bin so that Dawn loads dxcompiler.dll from there.
+ c.flags.dawn.Set("dlldir=" + c.flags.bin)
+
// Forward the backend and adapter to use, if specified.
if c.flags.backend != "default" {
fmt.Println("Forcing backend to", c.flags.backend)