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:
parent
145cdafc5e
commit
e9585f5548
|
@ -164,7 +164,7 @@ Command::Output Command::Exec(std::initializer_list<std::string> arguments) cons
|
|||
// run the target command.
|
||||
//
|
||||
// The parent process is responsible for feeding any input to the stdin_pipe
|
||||
// and collectting output from the std[out,err]_pipes.
|
||||
// and collecting output from the std[out,err]_pipes.
|
||||
|
||||
int child_id = fork();
|
||||
if (child_id < 0) {
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue