@@ -18,7 +18,7 @@ debugging capabilities of hlsl coding in game, application and driver developmen
18
18
19
19
The dxil counterpart spirv has a similar feature,
20
20
[ NonSemantic.DebugPrintf extention] ( https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.DebugPrintf.asciidoc )
21
- to generate DebugPrintf spirvOp souced from hlsl/glsl. Based on the spirvOp
21
+ to generate DebugPrintf spirvOp sourced from hlsl/glsl. Based on the spirvOp
22
22
extention, some vendor drivers and Valve lunarG has
23
23
[ debug printf layer] ( https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/docs/debug_printf.md )
24
24
to dump printf expression, "hlsl/glsl variables" into stdio or file.
@@ -65,22 +65,15 @@ will be a variable arguments function.
65
65
66
66
## Detailed design
67
67
68
- 1 . The printf dxil op will be purely for debug purpose, it does not affect final hlsl
69
- code/algorithm in any way.
70
- To separate this kind of debug-purpose dxil ops to the normal non-debug dxil il ops,
71
- the debug printf dxil op code can be counted down from 0xffff, or 0xffffffff,
72
- e.g. op code is 0xfffe.
73
- So it will give a hint to the d3d debug layer to pick up debug printf dxil easily,
74
- or a underlying d3d driver to remove these dxil op codes safely.
75
- 2 . Add a option to enable printf dxil op generation to dxc, try to separate hlsl code for debugging
76
- and for production, if printf option is disabled, the printf in hlsl will be report a error
77
- 3 . We should not support dynamic string variable, a string variable content.
78
- retrieved from buffer. The string variable should be explicited defined and can
68
+ 1 . Add a option to enable printf dxil op generation to dxc, try to separate hlsl code for debugging
69
+ purpose and for production. The printf option is disabled by default,
70
+ and the printf expressions in hlsl will be report a error without a printf option.
71
+ 2 . We should not support dynamic string variable, a string variable content.
72
+ retrieved from buffer. The string variable should be explicitly defined and can
79
73
be retrieved directly/indirectly from global constant variable.
80
- 4 . The format string input to the dx.hl.op..void, could be llvm constant
74
+ 3 . The format string input to the dx.hl.op..void, could be llvm constant
81
75
expression, we need to retrieve global variable from the constant expression.
82
- 5 . The validation for the dxil overloading checking should be ignored. Because
76
+ 4 . The validation for the dxil overloading checking should be ignored. Because
83
77
of printf variable arguments, there is no definite function type can be validated.
84
- 6 . dxc does not valiate format specifier to the c/c++ format speicifer standard, or the matching relation between
85
- format specifier and argument. If the number and type don't match, they will produce undefined result from
86
- a underlying d3d driver or a debug driver
78
+ 5 . dxc will validate matching relation between format specifiers and arguments.
79
+ If the number or types don't match, dxc will produce a validation error.
0 commit comments