Convert the DXIL addrspace value into string
Hand de-mangle pointer name
DXC:
%3 = getelementptr [6 x float], [6 x float] addrspace(3)* @"\01?s_x@@3@$$A.1dim", i32 0, i32 %9
RD:
GroupShared float* _3 = s_x[0] + _9;
Shows entry point inputs & outputs
Decodes "dx.op.loadInput" and "dx.op.StoreOutput" to show the input/output name
Change identifier prefix to "_" instead of "%"
Print floats in more natural format using %#g
Print type before assignments
* These will not be in the reflection data, so we can't try to process them and
fill out their variables as there won't be anything to map to.
* Signature elements which are 'unused' by not being referenced but are present
in a pre-1.4 SPIR-V module will be considered used still.
Capture the mappings into a type usage tree
Update elements of the tree as overlapping mappings are encountered, sub-elements of a previously mapped variable i.e. single component of a vector, single array element, member in a structure.
After processing all mappings convert the finalized type usage tree into source variable mappings.
Loop over the scope downwards (parent -> child) then inside that loop iterate upwards from the current scope (child -> parent) to detect mappings which might be superseded
Generated using DirectShaderCompile python file "utils/hct/hctdb.py"
for inst in db.instr:
out = inst.name
out += "("
for i in range(2,len(inst.ops)):
if i > 2:
out += ","
op = inst.ops[i]
out += op.name
out += ")"
print(out)
Disable dxcStyleFormatting when making RD disassembly
Change float printing to use "%#g" when dxcStyleFormatting is disabled
Before (DXC style)
%7 = fmul fast float %4, 2.000000e+00
%14 = fcmp fast olt float %13, 1.000000e-06
After (RD style)
%7 = fmul fast float %4, 2.00000;
%14 = fcmp fast olt float %13, 1.00000e-06;
First pass to settle the IDs common between disassembly styles
Second pass to display the disassembly
Divide existing MakeDXCDisassemblyString() method into helper methods to be shared
Currently not exposed to the UI and code uses the existing DXC compatibile DXIL disassembly
Add bool parameter to DXBC::GetDisassembly()
Add bool parameter to DXIL::GetDisassembly()
Add void DXIL::MakeDXCDisassemblyString()
Add void DXIL::MakeRDDisassemblyString()
* This shifts from reporting from the old style bindset/bind to the new system
of only referencing by shader interface and index (independent of binding
model).
* The vulkan shader debugger re-uses the replay interface to cache descriptor
access and descriptor contents in a fashion friendly to interface-index
lookup.
* Previously this was provided by the ShaderBindpointMapping, but since we plan
to remove that we add the information here. These will be purely for
informational purposes and will not be used to look up bound resources etc.
They exist for display only, or for API-specific interpretation if e.g. the
bindpoint is known ahead of time it can be identified here without having to
jump through hoops to get which descriptor a given bind accesses and get the
register number for that descriptor.
* On OpenGL this information will not be present because bindings are mutable
(even if they are declared in the shader). The only way to identify a
particular binding by register will be with those hoops