Skip to content

dxc.exe works in cmd but not works in Windows PowerShell #6377

@taoyafan

Description

@taoyafan

Description
I'm compile the same shader using dxc.exe.
It succeed in cmd but failed in Windows PowerShell.
I'm not sure, is this a problem?

Steps to Reproduce
Download latest Pre-built Releases of DXC.
Copy shader from https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/Samples/UWP/D3D12SM6WaveIntrinsics/src/wave.hlsl to local.

Open windows terminal (Windows PowerShell) or cmd and goto the folder where the shader is.
Run the compile cmd:
dxc /Zi /E"VSMain" /Vn"g_Wave_VS" /Tvs_6_0 /Fh"wave_vs.hlsl.h" /nologo wave.hlsl

Actual Behavior

In Command Prompt, it shows:

D:\Share\Tools\DXCompiler\bin\x64>dxc /Zi /E"VSMain" /Vn"g_Wave_VS" /Tvs_6_0 /Fh"wave_vs.hlsl.h" /nologo wave.hlsl
warning: no output provided for debug - embedding PDB in shader container.  Use -Qembed_debug to silence this warning.

And it generate the output file wave_vs.hlsl.h

But in Windows PowerShell, it shows:

PS D:\Share\Tools\DXCompiler\bin\x64> dxc /Zi /E"VSMain" /Vn"g_Wave_VS" /Tvs_6_0 /Fh"wave_vs.hlsl.h" /nologo wave.hlsl
warning: no output provided for debug - embedding PDB in shader container.  Use -Qembed_debug to silence this warning.
error: validation errors
error: Container part 'Program Input Signature' does not match expected for module.
error: Container part 'Program Output Signature' does not match expected for module.
Validation failed.

And no output is generated.

I just found that dxc --version doesn't works in Windows PowerShell, but dxc --help works.

Environment

  • DXC version: dxcompiler.dll: 1.7 - 1.7.2308.7 (69e54e290); dxil.dll: 1.7(101.7.2308.12)
  • Host Operating System: Microsoft Windows [Version 10.0.19045.3930]

Metadata

Metadata

Assignees

Labels

questionQuestion or inquiry

Type

No type

Projects

Status

Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions