tint/val: Fix HLSL validation with DXC

Unlike on Windows, where command line argument splitting is done by the
callee, on 'nix systems, the arguments need to be split by the caller.

Fixes issues where validation was different on windows to other
operating systems.

Change-Id: If55738c431586f706e3edf0ac683661f34b53391
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97144
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-07-26 14:19:54 +00:00
committed by Dawn LUCI CQ
parent 145cdafc5e
commit e9585f5548
2 changed files with 6 additions and 6 deletions

View File

@@ -65,11 +65,11 @@ Result HlslUsingDXC(const std::string& dxc_path,
// Match Dawn's compile flags
// See dawn\src\dawn_native\d3d12\RenderPipelineD3D12.cpp
// and dawn_native\d3d12\ShaderModuleD3D12.cpp (GetDXCArguments)
const char* compileFlags =
"/Zpr " // D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
"/Gis"; // D3DCOMPILE_IEEE_STRICTNESS
auto res = dxc(profile, "-E " + ep.first, compileFlags, file.Path());
auto res = dxc(profile,
"-E " + ep.first, // Entry point
"/Zpr", // D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
"/Gis", // D3DCOMPILE_IEEE_STRICTNESS
file.Path());
if (!res.out.empty()) {
if (!result.output.empty()) {
result.output += "\n";