steve-lunarg | 858c928 | 2017-01-07 08:54:10 -0700 | [diff] [blame] | 1 | // *** |
| 2 | // invocation ID coming from input to entry point |
| 3 | // *** |
| 4 | |
| 5 | struct VS_OUT |
| 6 | { |
| 7 | float3 cpoint : CPOINT; |
| 8 | }; |
| 9 | |
| 10 | struct HS_CONSTANT_OUT |
| 11 | { |
| 12 | float edges[2] : SV_TessFactor; |
| 13 | }; |
| 14 | |
| 15 | struct HS_OUT |
| 16 | { |
| 17 | float3 cpoint : CPOINT; |
| 18 | }; |
| 19 | |
| 20 | [domain("isoline")] |
| 21 | [partitioning("integer")] |
| 22 | [outputtopology("line")] |
| 23 | [outputcontrolpoints(4)] |
| 24 | [patchconstantfunc("PCF")] |
| 25 | HS_OUT main(InputPatch<VS_OUT, 4> ip, uint m_cpid : SV_OutputControlPointID) |
| 26 | { |
| 27 | HS_OUT output; |
| 28 | output.cpoint = ip[0].cpoint; |
| 29 | return output; |
| 30 | } |
| 31 | |
| 32 | HS_CONSTANT_OUT PCF(uint pid : SV_PrimitiveId) |
| 33 | { |
| 34 | HS_CONSTANT_OUT output; |
| 35 | |
| 36 | output.edges[0] = 2.0f; |
| 37 | output.edges[1] = 8.0f; |
| 38 | return output; |
| 39 | } |