//META: generated=true
//META: model=claude-opus-4-7
//META: generated_at=2026-05-21T00:00:00Z
//META: source_commit=60db9042207670b39b0524118887efacb7a3d42d
//META: doc_ref=docs/generated/design/ir-reference/decorations.md#interpolation-and-shader-io
//META: doc_section_digest=4430d3efb9516cd383356961351a223b29ad1c948e7c5ea9bf0a36d832a4b940
//META: purpose=Boundary - a TEXCOORDn with the index baked into the semantic name (TEXCOORD3) lowers to semantic("TEXCOORD3", -1:Int); the index is fused with the name rather than carried in the second operand.
//META: intent=boundary
//META: pipeline_stage=lower
//META: warning=Auto-generated. May drift from source. Do not edit by hand.

// Boundary - the doc records semantic with two operands
// (semanticNameOperand, semanticIndexOperand). When the user
// writes `TEXCOORD3` the trailing digit becomes part of the name
// operand and the explicit index operand remains -1; this pins
// that observed encoding for a non-zero-index semantic.

//TEST:SIMPLE(filecheck=CHECK):-target spirv-asm -dump-ir -o /dev/null -entry main -stage compute

uniform RWStructuredBuffer<float> buf;

struct V
{
    float u : TEXCOORD3;
};

[numthreads(1, 1, 1)]
void main(uint3 tid : SV_DispatchThreadID, V v)
{
    buf[0] = v.u + float(tid.x);
}

// CHECK: [semantic("TEXCOORD3", -1 : Int)]
