tint/val: Make DXC validation output stable

Replace the temporary file name with 'shader.hlsl', so that
skip-expectations can be stably re-generated.

Change-Id: I5ead2235e6e0d84ad67c8d90f8d06b812c8fd593
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97145
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2022-07-26 14:23:24 +00:00
committed by Dawn LUCI CQ
parent e9585f5548
commit 0fba14e3c6
129 changed files with 2127 additions and 1180 deletions

View File

@@ -16,6 +16,7 @@
#include "src/tint/utils/io/command.h"
#include "src/tint/utils/io/tmpfile.h"
#include "src/tint/utils/string.h"
#ifdef _WIN32
#include <Windows.h>
@@ -83,6 +84,9 @@ Result HlslUsingDXC(const std::string& dxc_path,
result.output += res.err;
}
result.failed = (res.error_code != 0);
// Remove the temporary file name from the output to keep output deterministic
result.output = utils::ReplaceAll(result.output, file.Path(), "shader.hlsl");
}
if (entry_points.empty()) {