mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
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:
committed by
Dawn LUCI CQ
parent
e9585f5548
commit
0fba14e3c6
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user