420.tesc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #version 420 core
  2. #extension GL_ARB_separate_shader_objects : enable
  3. layout(vertices = 4) out;
  4. out gl_PerVertex {
  5. vec4 gl_Position;
  6. } gl_out[3]; // ERROR, wrong size
  7. out int a[gl_out.length()];
  8. out int outb[5]; // ERROR, wrong size
  9. out int outc[];
  10. void main()
  11. {
  12. vec4 p = gl_in[1].gl_Position;
  13. float ps = gl_in[1].gl_PointSize;
  14. float cd = gl_in[1].gl_ClipDistance[2];
  15. int pvi = gl_PatchVerticesIn;
  16. int pid = gl_PrimitiveID;
  17. int iid = gl_InvocationID;
  18. gl_out[gl_InvocationID].gl_Position = p;
  19. gl_out[gl_InvocationID].gl_PointSize = ps; // ERROR
  20. }
  21. out float outf; // ERROR, no array
  22. layout (location = 0) in dmat2x4 vs_tcs_first[];
  23. layout (location = 12) in dmat2x4 vs_tcs_last[];
  24. void foo()
  25. {
  26. if ((dmat2x4(dvec4(-0.625, -0.5, -0.375lf, -0.25), dvec4(-0.375, -0.25, -0.125, 0)) != vs_tcs_first[0]) ||
  27. (dmat2x4(dvec4(0.375, 0.5, 0.625, 0.75), dvec4(0.625, 0.75, 0.875, -0.625)) != vs_tcs_last[0]))
  28. {
  29. ;
  30. }
  31. }
  32. layout(vertices = 0) out; // ERROR, can't be 0