diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-01-17 11:57:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-17 08:57:06 -0800 |
| commit | 91430870a8a6ec2825969823b892a9c8a0d588ab (patch) | |
| tree | fc78378a51cc1456729d61c0f8e7c9dbd8d6690d /tests/wgsl | |
| parent | e743c17f72ab332f7eb467f02dd9567f3f8d3de0 (diff) | |
hoist entry point params for wgsl (#6116)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/wgsl')
| -rw-r--r-- | tests/wgsl/nested-varying-input.slang | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/wgsl/nested-varying-input.slang b/tests/wgsl/nested-varying-input.slang index 2cdf4f7eb..d2566a6b9 100644 --- a/tests/wgsl/nested-varying-input.slang +++ b/tests/wgsl/nested-varying-input.slang @@ -22,17 +22,17 @@ struct NestedVertexOutput struct VertexOutput { - //VERT: @builtin(position) position - //FRAG: @builtin(position) position - float4 position : SV_Position; - //VERT: @location(0) uv - //FRAG: @location(0) uv + //FRAG-DAG: @location(0) uv float2 uv : TEXCOORD0; //VERT: @location(1) color - //FRAG: @location(1) color + //FRAG-DAG: @location(1) color NestedVertexOutput nested; + + //VERT: @builtin(position) position + //FRAG-DAG: @builtin(position) position + float4 position : SV_Position; }; VertexOutput vertexMain() @@ -44,10 +44,12 @@ VertexOutput vertexMain() return out; } -FragmentOutput fragmentMain(VertexOutput input) +//FRAG-DAG: @location(3) color3 +//FRAG-DAG: @location(6) color6 +FragmentOutput fragmentMain(VertexOutput input, float4 color3: COLOR3, float4 color6: COLOR6) { FragmentOutput out; - out.color0 = input.nested.color; - out.color1 = input.nested.color; + out.color0 = input.nested.color + color3; + out.color1 = input.nested.color + color6; return out; } |
