DXC is an open-source shader compiler by Microsoft, supporting SPIR-V (Vulkan) and DXIL (DirectX 12) intermediate languages.
Questions tagged [dxc]
8 questions
1
vote
1 answer
HLSL 6+ uniform variables and compilation
I'm coming from a DX9 background, using the now outdated FX framework, where uniform variables can be used as a sort of preprocessor value that changes the compilation of a shader. This allowed the developer to easily and effortlessly compile a…

Robert
- 413
- 4
- 12
1
vote
0 answers
Generated SPIR-V with -fvk-use-scalar-layout flag using DirectxShaderCompiler causes validation layer error
I have a fairly simple HLSL shader that is being compiled into SPIR-V using DirectxShaderCompiler. Though, using scalar layout causes validation layer error. I have enabled the VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME extension while creating the…

Tunti
- 79
- 6
1
vote
2 answers
Running Shaders in DXIL
I'm trying to run a DirectX 12 app using the Dxc compiler located here. The shader source compiles successfully, however the D3D api fails to read the shader byte code.
I'm using the D3DCompiler DXC Bridge. According to the docs I need to rename it…

Gabriel Ortega
- 481
- 5
- 18
0
votes
0 answers
Prevent DXC from not compiling symbols?
DXC strips out any unused symbols such as uniforms, structured buffers, functions...
When debugging shaders this is annoying as I must hack values that I want to comment out while I am toggling functionality to diagnose behaviour.
Is there a flag or…

Makogan
- 8,208
- 7
- 44
- 112
0
votes
0 answers
How to create defines with quotes using dxc's -D argument?
I'm trying to implement material shaders with a common entry file main.hlsl. It needs to include different files with implementation of shading function to handle different material types. I want to achieve this by using a macro to control the…

Martin Z He
- 83
- 5
0
votes
0 answers
FXC and DXC Shader Compiler Macro Expansion differences
Using the FXC Shader compiler a macro could be defined like this:
#define OUT_MACRO(index) SV_Target##index
float4 PSMain(VSOutput In) : OUT_MACRO(0)
{...}
This fails using the DXC compiler though with various errors messages which basically are…

TheFighter007_s
- 1
- 1
0
votes
1 answer
How to disable built-in HLSL compiler for Visual Studio 2019
The topic may sound like a duplicate question but the problem in my case is that I don't have any HLSL files included in the project. Thus, I can not manually disable/change the dxc compiler. Though, I have added a pre-build command using CMake to…

Tunti
- 79
- 6
0
votes
1 answer
How to "fully bind" a constant buffer view to a descriptor range?
I am currently learning DirectX 12 and trying to get a demo application running. I am currently stuck at creating a pipeline state object using a root signature. I am using dxc to compile my vertex shader:
./dxc -T vs_6_3 -E main -Fo…

Carsten
- 11,287
- 7
- 39
- 62