420.geom 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #version 420 core
  2. // testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
  3. int i;
  4. void foo()
  5. {
  6. gl_in.length(); // ERROR
  7. gl_in[1].gl_Position;
  8. gl_in[i].gl_Position; // ERROR
  9. }
  10. layout(triangles) in;
  11. in vec4 color3[3];
  12. void foo3()
  13. {
  14. gl_in.length();
  15. gl_in[i].gl_Position;
  16. color3.length();
  17. }
  18. uniform sampler2D s2D;
  19. in vec2 coord[];
  20. uniform vec4 v4;
  21. void foo4()
  22. {
  23. const ivec2 offsets[5] =
  24. {
  25. ivec2(0,1),
  26. ivec2(1,-2),
  27. ivec2(0,3),
  28. ivec2(-3,0),
  29. ivec2(2,1)
  30. };
  31. vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
  32. offsets[i].xy = ivec2(3); // ERROR
  33. v4.x = 3.2; // ERROR
  34. v4.xy; // should have non-uniform type
  35. }
  36. out gl_PerVertex {
  37. float gl_PointSize[1]; // ERROR, adding array
  38. float gl_ClipDistance; // ERROR, removing array
  39. };
  40. float foo5()
  41. {
  42. return i; // implicit conversion of return type
  43. }