"${capability:opt}\n"
"${extension:opt}\n"
"OpMemoryModel Logical GLSL450\n"
- "OpEntryPoint TessellationControl %BP_main \"main\" %BP_out_color %BP_gl_InvocationID %BP_in_color %BP_gl_out %BP_gl_in %BP_gl_TessLevelOuter %BP_gl_TessLevelInner ${IF_entrypoint:opt} \n"
+ "OpEntryPoint TessellationControl %BP_main \"main\" %BP_out_color %BP_gl_InvocationID %BP_gl_PrimitiveID %BP_in_color %BP_gl_out %BP_gl_in %BP_gl_TessLevelOuter %BP_gl_TessLevelInner ${IF_entrypoint:opt} \n"
"OpExecutionMode %BP_main OutputVertices 3\n"
"${debug:opt}\n"
"OpName %BP_main \"main\"\n"
"OpName %test_code \"testfun(vf4;\"\n"
"OpName %BP_out_color \"out_color\"\n"
"OpName %BP_gl_InvocationID \"gl_InvocationID\"\n"
+ "OpName %BP_gl_PrimitiveID \"gl_PrimitiveID\"\n"
"OpName %BP_in_color \"in_color\"\n"
"OpName %BP_gl_PerVertex \"gl_PerVertex\"\n"
"OpMemberName %BP_gl_PerVertex 0 \"gl_Position\"\n"
"OpName %BP_gl_TessLevelInner \"gl_TessLevelInner\"\n"
"OpDecorate %BP_out_color Location 1\n"
"OpDecorate %BP_gl_InvocationID BuiltIn InvocationId\n"
+ "OpDecorate %BP_gl_PrimitiveID BuiltIn PrimitiveId\n"
"OpDecorate %BP_in_color Location 1\n"
"OpMemberDecorate %BP_gl_PerVertex 0 BuiltIn Position\n"
"OpMemberDecorate %BP_gl_PerVertex 1 BuiltIn PointSize\n"
SPIRV_ASSEMBLY_ARRAYS
"%BP_out_color = OpVariable %op_a3v4f32 Output\n"
"%BP_gl_InvocationID = OpVariable %ip_i32 Input\n"
+ "%BP_gl_PrimitiveID = OpVariable %ip_i32 Input\n"
"%BP_in_color = OpVariable %ip_a32v4f32 Input\n"
"%BP_gl_PerVertex = OpTypeStruct %v4f32 %f32 %a1f32 %a1f32\n"
"%BP_a3_gl_PerVertex = OpTypeArray %BP_gl_PerVertex %c_u32_3\n"
"%isUniqueIdZero = OpFunction %bool None %bool_function\n"
"%getId_label = OpLabel\n"
"%invocation_id = OpLoad %i32 %BP_gl_InvocationID\n"
- "%is_id_0 = OpIEqual %bool %invocation_id %c_i32_0\n"
+ "%primitive_id = OpLoad %i32 %BP_gl_PrimitiveID\n"
+ "%is_invocation_0 = OpIEqual %bool %invocation_id %c_i32_0\n"
+ "%is_primitive_0 = OpIEqual %bool %primitive_id %c_i32_0\n"
+ "%is_id_0 = OpLogicalAnd %bool %is_invocation_0 %is_primitive_0\n"
"OpReturnValue %is_id_0\n"
"OpFunctionEnd\n"