Ah, ok, I missed that. Still there are a few points I don't completely like:
- I don't like using `dcl_param`, which looks like the instructions that appear in the SHEX stream, while being a rather different beast; I find that confusing; rather, if you use the leading dot convention for meta instructions I'd use `.param`; just `param` if you feel the leading dot doesn't apply there, but I'd avoid the `dcl_` prefix.
Sure; either of those works for me.
- I don't like assigning a write mask to a semantic name. Does this happen anywhere with the native compiler? It doesn't make a lot of sense to me. And anyway I guess the two masks are meant to be the write mask and the used mask, but I see what's the logic of assigning one to the semantic name and the other to the register name.
The way I think of it, "SV_IsFrontFace.x" is the external (i.e., input layout) side, and "v1.x" is the internal (i.e., shader) side, and we're defining a mapping between them.
- WRT specifying registers, as I said sometimes other register names are used instead of `v`, for example `oDepth`. In DXBC AFAICT this is marked by setting the register field to -1. Putting a register name there makes everything a little more complicated, because you have to know the mapping between the semantics and which register name they need; which is not terribly difficult, I think, but still is essentially for nothing (since a -1 is going to be there anyway) and the idea I have in mind is this is largely an internal feature, so it doesn't have to be terribly polished.
Well, it's going to be available through the public API, right?
For all of these reasons I'd rather propose something as:
.param SV_IsFrontFace, x, 1, x, uint, FFACE
What do you think about that?
Works for me. I think "SV_IsFrontFace.x" and "v1.x" would be more convenient when writing these, and arguably when looking at disassembled shaders in debug logs, but ultimately I'm not especially attached to a specific format.
BTW, why doesn't `SV_Position` have any write mask? Are you assuming that it's the full one if it's not specified?
Right, much like how some of the other information is optional as well.