run-cts: Add `--dump-shaders` flag
A helper alias for `--verbose --flag=enable-dawn-features=dump_shaders`, which is hard to remember. Change-Id: I4795a2c3b6f20834cf81d2d6ec4bfca67d29a6f6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96400 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
e634752fc8
commit
69cafb99e4
|
@ -129,7 +129,7 @@ func run() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
var dawnNode, cts, node, npx, resultsPath, expectationsPath, logFilename, backend string
|
var dawnNode, cts, node, npx, resultsPath, expectationsPath, logFilename, backend string
|
||||||
var printStdout, verbose, isolated, build bool
|
var printStdout, verbose, isolated, build, dumpShaders bool
|
||||||
var numRunners int
|
var numRunners int
|
||||||
var flags dawnNodeFlags
|
var flags dawnNodeFlags
|
||||||
flag.StringVar(&dawnNode, "dawn-node", "", "path to dawn.node module")
|
flag.StringVar(&dawnNode, "dawn-node", "", "path to dawn.node module")
|
||||||
|
@ -148,6 +148,7 @@ func run() error {
|
||||||
flag.Var(&flags, "flag", "flag to pass to dawn-node as flag=value. multiple flags must be passed in individually")
|
flag.Var(&flags, "flag", "flag to pass to dawn-node as flag=value. multiple flags must be passed in individually")
|
||||||
flag.StringVar(&backend, "backend", backendDefault, "backend to use: default|null|webgpu|d3d11|d3d12|metal|vulkan|opengl|opengles."+
|
flag.StringVar(&backend, "backend", backendDefault, "backend to use: default|null|webgpu|d3d11|d3d12|metal|vulkan|opengl|opengles."+
|
||||||
" set to 'vulkan' if VK_ICD_FILENAMES environment variable is set, 'default' otherwise")
|
" set to 'vulkan' if VK_ICD_FILENAMES environment variable is set, 'default' otherwise")
|
||||||
|
flag.BoolVar(&dumpShaders, "dump-shaders", false, "dump WGSL shaders. Enables --verbose")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
// Create a thread-safe, color supporting stdout wrapper.
|
// Create a thread-safe, color supporting stdout wrapper.
|
||||||
|
@ -219,6 +220,10 @@ func run() error {
|
||||||
if !disableDawnFeaturesFound {
|
if !disableDawnFeaturesFound {
|
||||||
flags = append(flags, "disable-dawn-features=disallow_unsafe_apis")
|
flags = append(flags, "disable-dawn-features=disallow_unsafe_apis")
|
||||||
}
|
}
|
||||||
|
if dumpShaders {
|
||||||
|
flags = append(flags, "enable-dawn-features=dump_shaders")
|
||||||
|
verbose = true
|
||||||
|
}
|
||||||
|
|
||||||
r := runner{
|
r := runner{
|
||||||
numRunners: numRunners,
|
numRunners: numRunners,
|
||||||
|
|
Loading…
Reference in New Issue