You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Unfortunately I can't seem to find any documentation on the linker, but from what I saw from the command line tool and IDxcLinker class, it seems like there is no tool to optimize & validate multiple shader stage entries with each other. This would be very handy, because right now the ID3D12PipelineState will just report FAILED(hresult) if certain outputs/inputs are read from but not written to. This could be prevented if the linker would support multiple shader stage entrypoints and could output these binaries with an optimized form.
Right now the priority is mainly on just validation between this, but of course it could potentially be used for nice optimizations.
Spirv tools already has this functionality from what I'm told, so it would be nice to see this in DXC. If it's already available, I'd like to hear how this can be invoked.
I'm afraid there may be a misunderstanding on the term linker. The terminology from OpenGL and linking shader stages does not apply to the Dxil linker. The dxil linker is meant for linking libraries of functions together into entry points or other libraries, much like a C++ linker. It does not have anything to do with the "linking" between shader stages that you're thinking of.
Note that when the runtime reports a failure in pipeline state creation, if you enable debug layers (uses D3D12SDKLayers.dll - install Graphics Tools), then it should tell you why it failed.
If you want a tool to verify shader signatures are compatible between stages in advance, I'm afraid there isn't one I know of at the moment. We can take this as feedback that such a tool may be useful.
I believe such a tool may be very useful, since the validation layer isn't available to our users. This would mean that if you write a wrong shader it could crash at runtime and we'd have no idea if the shader was to blame and in what way. Linking them would allow us to make sure things like hull shaders are compatible with our other shaders, which reduces problems in the workflow. It would also potentially increase performance because targets that are unused between stages could be discarded.
Activity
tex3d commentedon Jan 30, 2021
I'm afraid there may be a misunderstanding on the term
linker. The terminology from OpenGL and linking shader stages does not apply to the Dxil linker. The dxil linker is meant for linking libraries of functions together into entry points or other libraries, much like a C++ linker. It does not have anything to do with the "linking" between shader stages that you're thinking of.Note that when the runtime reports a failure in pipeline state creation, if you enable debug layers (uses D3D12SDKLayers.dll - install Graphics Tools), then it should tell you why it failed.
If you want a tool to verify shader signatures are compatible between stages in advance, I'm afraid there isn't one I know of at the moment. We can take this as feedback that such a tool may be useful.
Nielsbishere commentedon Jan 30, 2021
I believe such a tool may be very useful, since the validation layer isn't available to our users. This would mean that if you write a wrong shader it could crash at runtime and we'd have no idea if the shader was to blame and in what way. Linking them would allow us to make sure things like hull shaders are compatible with our other shaders, which reduces problems in the workflow. It would also potentially increase performance because targets that are unused between stages could be discarded.
Bump urllib3 from 2.0.7 to 2.2.2 in /utils/git (#6699)
Bump urllib3 from 2.0.7 to 2.2.2 in /utils/git (microsoft#6699)