My idea was to use comments (introduced by `//`) to stay compatible (and actually become more similar) to the native compiler. The format you suggest is technically incompatible in both directions. Is that intended?
Yes. The assembler wouldn't have much to be compatible with, so I don't think we particularly care there, but the disassembler would probably need some kind of formatting flag or other compilation option to output in this format. Without that, I think we should just match the fxc output. I'd like to avoid assembling things from comments, at least by default.
WRT the specific syntax, there is no slot for the register number. I guess that you take for implicit that the order is used, but AFAIU there are a few complications:
"dcl_param SV_IsFrontFace.x, v1.x, uint, FFACE" would parse as ```c { .semantic_name = "SV_IsFrontFace", .semantic_index = 0, .stream_index = 0, .sysval_semantic = VKD3D_SHADER_SV_IS_FRONT_FACE, .component_type = VKD3D_SHADER_COMPONENT_FLOAT, .register_index = 1, .mask = VKD3DSP_WRITEMASK_0, .used_mask = VKD3DSP_WRITEMASK_0, .min_precision = VKD3D_SHADER_MINIMUM_PRECISION_NONE, } ``` I.e., the register number would be taken from "v1". Am I missing something?