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
Running dxc -spirv ... without -Fo for object output, or explicitly requesting a disassembly file with -Fc emits human-readable SPIR-V disassembly. However, it seems this functionality is only available in the dxc executable (and tracing it back to dxclib), but not in libdxcompiler.so.
Confusion/caveats
For one, it seems that CompileWithDebug does not output a debug ppDebugBlob/ppDebugBlobName (despite the _COM_Outptr_opt_/_Outptr_opt_result_z_ annotation stating that Parameter may be null, but in the post-state the pointed-to location can't be null and must be valid), and this data originates from DXC_OUT_PDB which is not in the returned IDxcResult for a SPIR-V compilation unit (SPIR-V doesn't define a separate debug/disassemble-able file/format).
(Then, I'm not sure about this, does Disassemble have enough data when a DXIL object is compiled with -Zi -Qembed_debug or does it require the full PDB here? It seems it cannot disassemble DXC_OUT_OBJECT output regardless of the flags, but may be lacking validation for example)
Goal/request
Since spirv_tools are already used in dxcompiler, would it be possible to move this functionality from dxclib to be reachable via the ::Disassemble APIs (and simply switch on the header magic), allowing dxcompiler to be used for SPIR-V disassembly in a more streamlined manner like DXIL?
The text was updated successfully, but these errors were encountered:
Backstory
Running
dxc -spirv ...
without-Fo
for object output, or explicitly requesting a disassembly file with-Fc
emits human-readable SPIR-V disassembly. However, it seems this functionality is only available in thedxc
executable (and tracing it back todxclib
), but not inlibdxcompiler.so
.Confusion/caveats
For one, it seems that
CompileWithDebug
does not output a debugppDebugBlob
/ppDebugBlobName
(despite the_COM_Outptr_opt_
/_Outptr_opt_result_z_
annotation stating thatParameter may be null, but in the post-state the pointed-to location can't be null and must be valid
), and this data originates fromDXC_OUT_PDB
which is not in the returnedIDxcResult
for aSPIR-V
compilation unit (SPIR-V doesn't define a separate debug/disassemble-able file/format).(Then, I'm not sure about this, does
Disassemble
have enough data when a DXIL object is compiled with-Zi -Qembed_debug
or does it require the full PDB here? It seems it cannot disassembleDXC_OUT_OBJECT
output regardless of the flags, but may be lacking validation for example)Goal/request
Since
spirv_tools
are already used indxcompiler
, would it be possible to move this functionality fromdxclib
to be reachable via the::Disassemble
APIs (and simply switch on the header magic), allowingdxcompiler
to be used forSPIR-V
disassembly in a more streamlined manner like DXIL?The text was updated successfully, but these errors were encountered: