310.tese 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #version 310 es
  2. #extension GL_EXT_tessellation_shader : enable
  3. #extension GL_OES_tessellation_shader : enable
  4. #extension GL_EXT_tessellation_shader : disable
  5. layout(vertices = 4) out; // ERROR
  6. layout(quads, cw) in;
  7. layout(triangles) in; // ERROR
  8. layout(isolines) in; // ERROR
  9. layout(ccw) in; // ERROR
  10. layout(cw) in;
  11. layout(fractional_odd_spacing) in;
  12. layout(equal_spacing) in; // ERROR
  13. layout(fractional_even_spacing) in; // ERROR
  14. layout(point_mode) in;
  15. patch in vec4 patchIn;
  16. patch out vec4 patchOut; // ERROR
  17. void main()
  18. {
  19. barrier(); // ERROR
  20. int a = gl_MaxTessEvaluationInputComponents +
  21. gl_MaxTessEvaluationOutputComponents +
  22. gl_MaxTessEvaluationTextureImageUnits +
  23. gl_MaxTessEvaluationUniformComponents +
  24. gl_MaxTessPatchComponents +
  25. gl_MaxPatchVertices +
  26. gl_MaxTessGenLevel;
  27. vec4 p = gl_in[1].gl_Position;
  28. float ps = gl_in[1].gl_PointSize; // ERROR, need point_size extension
  29. float cd = gl_in[1].gl_ClipDistance[2]; // ERROR, not in ES
  30. int pvi = gl_PatchVerticesIn;
  31. int pid = gl_PrimitiveID;
  32. vec3 tc = gl_TessCoord;
  33. float tlo = gl_TessLevelOuter[3];
  34. float tli = gl_TessLevelInner[1];
  35. gl_Position = p;
  36. gl_PointSize = ps; // ERROR, need point_size extension
  37. gl_ClipDistance[2] = cd; // ERROR, not in ES
  38. }
  39. smooth patch in vec4 badp1; // ERROR
  40. flat patch in vec4 badp2; // ERROR
  41. noperspective patch in vec4 badp3; // ERROR
  42. patch sample in vec3 badp4; // ERROR
  43. #extension GL_ARB_separate_shader_objects : enable
  44. in gl_PerVertex
  45. {
  46. vec4 gl_Position;
  47. } gl_in[];
  48. in gl_PerVertex // ERROR, second redeclaration of gl_in
  49. {
  50. vec4 gl_Position;
  51. } gl_in[];
  52. layout(quads, cw) out; // ERROR
  53. layout(triangles) out; // ERROR
  54. layout(isolines) out; // ERROR
  55. layout(cw) out; // ERROR
  56. layout(fractional_odd_spacing) out; // ERROR
  57. layout(equal_spacing) out; // ERROR
  58. layout(fractional_even_spacing) out; // ERROR
  59. layout(point_mode) out; // ERROR
  60. in vec2 ina; // ERROR, not array
  61. in vec2 inb[];
  62. in vec2 inc[18]; // ERROR, wrong size
  63. in vec2 ind[gl_MaxPatchVertices];
  64. in testbla { // ERROR, not array
  65. int f;
  66. } bla;
  67. in testblb {
  68. int f;
  69. } blb[];
  70. in testblc { // ERROR wrong size
  71. int f;
  72. } blc[18];
  73. in testbld {
  74. int f;
  75. } bld[gl_MaxPatchVertices];
  76. layout(location = 23) in vec4 ivla[];
  77. layout(location = 24) in vec4 ivlb[];
  78. layout(location = 24) in vec4 ivlc[]; // ERROR, overlap
  79. layout(location = 23) out vec4 ovla[2];
  80. layout(location = 24) out vec4 ovlb[2]; // ERROR, overlap
  81. in float gl_TessLevelOuter[4]; // ERROR, can't redeclare
  82. patch in pinbn {
  83. int a;
  84. } pinbi;
  85. centroid out vec3 myColor2;
  86. centroid in vec3 centr[];
  87. sample out vec4 perSampleColor; // ERROR without sample extensions
  88. #extension GL_OES_tessellation_point_size : enable
  89. void pointSize2()
  90. {
  91. float ps = gl_in[1].gl_PointSize; // ERROR, not in the redeclaration, but no error on use of gl_PointSize
  92. gl_PointSize = ps;
  93. }
  94. #extension GL_EXT_primitive_bounding_box : enable
  95. void bbbad()
  96. {
  97. gl_BoundingBoxOES; // ERROR, wrong stage
  98. }