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.
Yes, but which mask is the write mask and which one is the used mask? And why does it make sense to associate one to the external and one to the internal side? Having to choose I'd say that the write mask is the "external" one and the used mask is the "internal" one, but it's a weaker link than I'd put in a public interface.
For example: ```hlsl float4 main(in float3 i : INPUT) : OUTPUT { return float4(i.xy, 0.0, 1.0); } ```
which fxc compiles to: ``` // // Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // INPUT 0 xyz 0 NONE float xy // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // OUTPUT 0 xyzw 0 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_input v0.xy dcl_output o0.xyzw mov o0.xy, v0.xyxx mov o0.zw, l(0,0,0,1.000000) ret // Approximately 3 instruction slots used ```
The input signature would then look like this: ``` .section ISGN .param INPUT.xyz, v0.xy ```
I.e., "INPUT" matches what we would put in the input layout: ```c { .SemanticName = "INPUT", .Format = DXGI_FORMAT_R32G32B32_FLOAT, [...] } D3D11_INPUT_ELEMENT_DESC; ```
while "v0.xy" simply matches "dcl_input_ps linear v0.xy". I.e., "Mask" is the external interface, while "Used" indicates what's actually used by the shader, largely analogous to the HLSL.