Advertisement
illwieckz

llvmpipe example GLSL error log

Aug 13th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.07 KB | None | 0 0
  1. Debug: building generic shader permutation with macro: GENERIC_2D
  2. Warn: Unableto parse shader info log errors: unknown format
  3. Warn: Source for shader program generic2D:
  4. 0: #version 450 core
  5. 1: #define HAVE_EXT_gpu_shader4 1
  6. 2: #define HAVE_ARB_gpu_shader5 1
  7. 3: #define HAVE_ARB_texture_gather 1
  8. 4: #define HAVE_EXT_texture_integer 1
  9. 5: #define HAVE_ARB_texture_rg 1
  10. 6: #define HAVE_ARB_uniform_buffer_object 1
  11. 7: #extension GL_ARB_shader_draw_parameters : require
  12. 8: #define HAVE_ARB_shader_draw_parameters 1
  13. 9: #define HAVE_ARB_shader_storage_buffer_object 1
  14. 10: #ifndef r_AmbientScale
  15. 11: #define r_AmbientScale 1.00000000e+00
  16. 12: #endif
  17. 13: #ifndef r_SpecularScale
  18. 14: #define r_SpecularScale 1.00000000e+00
  19. 15: #endif
  20. 16: #ifndef r_zNear
  21. 17: #define r_zNear 3.00000000e+00
  22. 18: #endif
  23. 19: #ifndef M_PI
  24. 20: #define M_PI 3.14159274e+00
  25. 21: #endif
  26. 22: #ifndef MAX_SHADOWMAPS
  27. 23: #define MAX_SHADOWMAPS 5
  28. 24: #endif
  29. 25: #ifndef MAX_REF_LIGHTS
  30. 26: #define MAX_REF_LIGHTS 1024
  31. 27: #endif
  32. 28: #ifndef TILE_SIZE
  33. 29: #define TILE_SIZE 16
  34. 30: #endif
  35. 31: #ifndef r_FBufSize
  36. 32: #define r_FBufSize vec2(6.40000000e+02, 4.80000000e+02)
  37. 33: #endif
  38. 34: #ifndef r_tileStep
  39. 35: #define r_tileStep vec2(2.49999985e-02, 3.33333313e-02)
  40. 36: #endif
  41. 37: #ifndef r_highPrecisionRendering
  42. 38: #define r_highPrecisionRendering 1
  43. 39: #endif
  44. 40: #ifndef r_precomputedLighting
  45. 41: #define r_precomputedLighting 1
  46. 42: #endif
  47. 43: #ifndef r_vertexSkinning
  48. 44: #define r_vertexSkinning 1
  49. 45: #endif
  50. 46: const int MAX_GLSL_BONES = 256;
  51. 47: #ifndef r_halfLambertLighting
  52. 48: #define r_halfLambertLighting 1
  53. 49: #endif
  54. 50: #ifndef r_glowMapping
  55. 51: #define r_glowMapping 1
  56. 52: #endif
  57. 53: #ifndef r_zNear
  58. 54: #define r_zNear 3.00000000e+00
  59. 55: #endif
  60. 56: #define IN in
  61. 57: #define OUT(mode) mode out
  62. 58: #define textureCube texture
  63. 59: #define texture2D texture
  64. 60: #define texture2DProj textureProj
  65. 61: #define texture3D texture
  66. 62: OUT(flat) int in_drawID;
  67. 63: OUT(flat) int in_baseInstance;
  68. 64: #define drawID gl_DrawIDARB
  69. 65: #define baseInstance gl_BaseInstanceARB
  70. 66:
  71. 67: #ifndef GENERIC_2D
  72. 68: #define GENERIC_2D 1
  73. 69: #endif
  74. 70: /*
  75. 71: ===========================================================================
  76. 72: Copyright (C) 2006-2011 Robert Beckebans <trebor_7@users.sourceforge.net>
  77. 73:
  78. 74: This file is part of XreaL source code.
  79. 75:
  80. 76: XreaL source code is free software; you can redistribute it
  81. 77: and/or modify it under the terms of the GNU General Public License as
  82. 78: published by the Free Software Foundation; either version 2 of the License,
  83. 79: or (at your option) any later version.
  84. 80:
  85. 81: XreaL source code is distributed in the hope that it will be
  86. 82: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  87. 83: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  88. 84: GNU General Public License for more details.
  89. 85:
  90. 86: You should have received a copy of the GNU General Public License
  91. 87: along with XreaL source code; if not, write to the Free Software
  92. 88: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  93. 89: ===========================================================================
  94. 90: */
  95. 91:
  96. 92: /* generic_vp.glsl */
  97. 93:
  98. 10000: #line 10000 // vertexSimple_vp.glsl
  99. 10001: /*
  100. 10002: ===========================================================================
  101. 10003: Copyright (C) 2010 Robert Beckebans <trebor_7@users.sourceforge.net>
  102. 10004:
  103. 10005: This file is part of XreaL source code.
  104. 10006:
  105. 10007: XreaL source code is free software; you can redistribute it
  106. 10008: and/or modify it under the terms of the GNU General Public License as
  107. 10009: published by the Free Software Foundation; either version 2 of the License,
  108. 10010: or (at your option) any later version.
  109. 10011:
  110. 10012: XreaL source code is distributed in the hope that it will be
  111. 10013: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  112. 10014: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  113. 10015: GNU General Public License for more details.
  114. 10016:
  115. 10017: You should have received a copy of the GNU General Public License
  116. 10018: along with XreaL source code; if not, write to the Free Software
  117. 10019: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  118. 10020: ===========================================================================
  119. 10021: */
  120. 10022: // vertexSimple_vp.glsl - simple vertex fetch
  121. 10023:
  122. 10024: struct localBasis {
  123. 10025: vec3 normal;
  124. 10026: vec3 tangent, binormal;
  125. 10027: };
  126. 10028:
  127. 10029: vec3 QuatTransVec(in vec4 quat, in vec3 vec) {
  128. 10030: vec3 tmp = 2.0 * cross( quat.xyz, vec );
  129. 10031: return vec + quat.w * tmp + cross( quat.xyz, tmp );
  130. 10032: }
  131. 10033:
  132. 10034: void QTangentToLocalBasis( in vec4 qtangent, out localBasis LB ) {
  133. 10035: LB.normal = QuatTransVec( qtangent, vec3( 0.0, 0.0, 1.0 ) );
  134. 10036: LB.tangent = QuatTransVec( qtangent, vec3( 1.0, 0.0, 0.0 ) );
  135. 10037: LB.tangent *= sign( qtangent.w );
  136. 10038: LB.binormal = QuatTransVec( qtangent, vec3( 0.0, 1.0, 0.0 ) );
  137. 10039: }
  138. 10040:
  139. 10041: #if !defined(USE_VERTEX_ANIMATION) && !defined(USE_VERTEX_SKINNING) && !defined(USE_VERTEX_SPRITE)
  140. 10042:
  141. 10043: IN vec3 attr_Position;
  142. 10044: IN vec4 attr_Color;
  143. 10045: IN vec4 attr_QTangent;
  144. 10046: IN vec4 attr_TexCoord0;
  145. 10047:
  146. 10048: void VertexFetch(out vec4 position,
  147. 10049: out localBasis normalBasis,
  148. 10050: out vec4 color,
  149. 10051: out vec2 texCoord,
  150. 10052: out vec2 lmCoord)
  151. 10053: {
  152. 10054: position = vec4( attr_Position, 1.0 );
  153. 10055: QTangentToLocalBasis( attr_QTangent, normalBasis );
  154. 10056: color = attr_Color;
  155. 10057: texCoord = attr_TexCoord0.xy;
  156. 10058: lmCoord = attr_TexCoord0.zw;
  157. 10059: }
  158. 10060: #endif
  159. 92: #line 92
  160. 20000: #line 20000 // vertexSkinning_vp.glsl
  161. 20001: /*
  162. 20002: ===========================================================================
  163. 20003: Copyright (C) 2009-2011 Robert Beckebans <trebor_7@users.sourceforge.net>
  164. 20004:
  165. 20005: This file is part of XreaL source code.
  166. 20006:
  167. 20007: XreaL source code is free software; you can redistribute it
  168. 20008: and/or modify it under the terms of the GNU General Public License as
  169. 20009: published by the Free Software Foundation; either version 2 of the License,
  170. 20010: or (at your option) any later version.
  171. 20011:
  172. 20012: XreaL source code is distributed in the hope that it will be
  173. 20013: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  174. 20014: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  175. 20015: GNU General Public License for more details.
  176. 20016:
  177. 20017: You should have received a copy of the GNU General Public License
  178. 20018: along with XreaL source code; if not, write to the Free Software
  179. 20019: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  180. 20020: ===========================================================================
  181. 20021: */
  182. 20022: // vertexSkinning_vp.glsl - GPU vertex skinning for skeletal meshes
  183. 20023:
  184. 20024: #if defined(USE_VERTEX_SKINNING)
  185. 20025:
  186. 20026: IN vec3 attr_Position;
  187. 20027: IN vec2 attr_TexCoord0;
  188. 20028: IN vec4 attr_Color;
  189. 20029: IN vec4 attr_QTangent;
  190. 20030: IN vec4 attr_BoneFactors;
  191. 20031:
  192. 20032: // even elements are rotation quat, odd elements are translation + scale (in .w)
  193. 20033: uniform vec4 u_Bones[ 2 * MAX_GLSL_BONES ];
  194. 20034:
  195. 20035: void VertexFetch(out vec4 position,
  196. 20036: out localBasis LB,
  197. 20037: out vec4 color,
  198. 20038: out vec2 texCoord,
  199. 20039: out vec2 lmCoord)
  200. 20040: {
  201. 20041: const float scale = 1.0 / 256.0;
  202. 20042: const float weightScale = 1.0 / 255.0;
  203. 20043: localBasis inLB;
  204. 20044:
  205. 20045: // Unpack data from "bone factors". This used to have the index in the high byte and the weight
  206. 20046: // in the low byte, which may seem a bit more logical, but it triggered issues with some
  207. 20047: // Nvidia shader compilers (https://github.com/DaemonEngine/Daemon/issues/472).
  208. 20048: vec4 ipart = floor( attr_BoneFactors * scale );
  209. 20049: vec4 fpart = attr_BoneFactors * scale - ipart;
  210. 20050: // idx = 2 times the original bone index (the index input to boneFactor)
  211. 20051: ivec4 idx = ivec4( fpart * 512.0 );
  212. 20052: vec4 weights = ipart * weightScale;
  213. 20053:
  214. 20054: vec4 quat = u_Bones[ idx.x ];
  215. 20055: vec4 trans = u_Bones[ idx.x + 1 ];
  216. 20056:
  217. 20057: QTangentToLocalBasis( attr_QTangent, inLB );
  218. 20058:
  219. 20059: position.xyz = weights.x * (QuatTransVec( quat, attr_Position ) * trans.w + trans.xyz);
  220. 20060: LB.normal = weights.x * (QuatTransVec( quat, inLB.normal ));
  221. 20061: LB.tangent = weights.x * (QuatTransVec( quat, inLB.tangent ));
  222. 20062: LB.binormal = weights.x * (QuatTransVec( quat, inLB.binormal ));
  223. 20063:
  224. 20064: quat = u_Bones[ idx.y ];
  225. 20065: trans = u_Bones[ idx.y + 1 ];
  226. 20066:
  227. 20067: position.xyz += weights.y * (QuatTransVec( quat, attr_Position ) * trans.w + trans.xyz);
  228. 20068: LB.normal += weights.y * (QuatTransVec( quat, inLB.normal ));
  229. 20069: LB.tangent += weights.y * (QuatTransVec( quat, inLB.tangent ));
  230. 20070: LB.binormal += weights.y * (QuatTransVec( quat, inLB.binormal ));
  231. 20071:
  232. 20072: quat = u_Bones[ idx.z ];
  233. 20073: trans = u_Bones[ idx.z + 1 ];
  234. 20074:
  235. 20075: position.xyz += weights.z * (QuatTransVec( quat, attr_Position ) * trans.w + trans.xyz);
  236. 20076: LB.normal += weights.z * (QuatTransVec( quat, inLB.normal ));
  237. 20077: LB.tangent += weights.z * (QuatTransVec( quat, inLB.tangent ));
  238. 20078: LB.binormal += weights.z * (QuatTransVec( quat, inLB.binormal ));
  239. 20079:
  240. 20080: quat = u_Bones[ idx.w ];
  241. 20081: trans = u_Bones[ idx.w + 1 ];
  242. 20082:
  243. 20083: position.xyz += weights.w * (QuatTransVec( quat, attr_Position ) * trans.w + trans.xyz);
  244. 20084: LB.normal += weights.w * (QuatTransVec( quat, inLB.normal ));
  245. 20085: LB.tangent += weights.w * (QuatTransVec( quat, inLB.tangent ));
  246. 20086: LB.binormal += weights.w * (QuatTransVec( quat, inLB.binormal ));
  247. 20087:
  248. 20088: position.w = 1.0;
  249. 20089: LB.normal = normalize(LB.normal);
  250. 20090: LB.tangent = normalize(LB.tangent);
  251. 20091: LB.binormal = normalize(LB.binormal);
  252. 20092:
  253. 20093: color = attr_Color;
  254. 20094: texCoord = attr_TexCoord0;
  255. 20095: lmCoord = attr_TexCoord0;
  256. 20096: }
  257. 20097: #endif
  258. 93: #line 93
  259. 30000: #line 30000 // vertexAnimation_vp.glsl
  260. 30001: /*
  261. 30002: ===========================================================================
  262. 30003: Copyright (C) 2010 Robert Beckebans <trebor_7@users.sourceforge.net>
  263. 30004:
  264. 30005: This file is part of XreaL source code.
  265. 30006:
  266. 30007: XreaL source code is free software; you can redistribute it
  267. 30008: and/or modify it under the terms of the GNU General Public License as
  268. 30009: published by the Free Software Foundation; either version 2 of the License,
  269. 30010: or (at your option) any later version.
  270. 30011:
  271. 30012: XreaL source code is distributed in the hope that it will be
  272. 30013: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  273. 30014: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  274. 30015: GNU General Public License for more details.
  275. 30016:
  276. 30017: You should have received a copy of the GNU General Public License
  277. 30018: along with XreaL source code; if not, write to the Free Software
  278. 30019: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  279. 30020: ===========================================================================
  280. 30021: */
  281. 30022: // vertexAnimation_vp.glsl - interpolates .md3/.mdc vertex animations
  282. 30023:
  283. 30024: #if defined(USE_VERTEX_ANIMATION)
  284. 30025:
  285. 30026: IN vec3 attr_Position;
  286. 30027: IN vec4 attr_Color;
  287. 30028: IN vec4 attr_QTangent;
  288. 30029: IN vec2 attr_TexCoord0;
  289. 30030: IN vec3 attr_Position2;
  290. 30031: IN vec4 attr_QTangent2;
  291. 30032:
  292. 30033: uniform float u_VertexInterpolation;
  293. 30034:
  294. 30035: void VertexAnimation_P_N( vec3 fromPosition, vec3 toPosition,
  295. 30036: vec4 fromQTangent, vec4 toQTangent,
  296. 30037: float frac,
  297. 30038: inout vec4 position, inout vec3 normal)
  298. 30039: {
  299. 30040: vec3 fromNormal = QuatTransVec( fromQTangent, vec3( 0.0, 0.0, 1.0 ) );
  300. 30041: vec3 toNormal = QuatTransVec( toQTangent, vec3( 0.0, 0.0, 1.0 ) );
  301. 30042:
  302. 30043: position.xyz = 512.0 * mix(fromPosition, toPosition, frac);
  303. 30044: position.w = 1;
  304. 30045:
  305. 30046: normal = normalize(mix(fromNormal, toNormal, frac));
  306. 30047: }
  307. 30048:
  308. 30049: void VertexFetch(out vec4 position,
  309. 30050: out localBasis LB,
  310. 30051: out vec4 color,
  311. 30052: out vec2 texCoord,
  312. 30053: out vec2 lmCoord)
  313. 30054: {
  314. 30055: localBasis fromLB, toLB;
  315. 30056:
  316. 30057: QTangentToLocalBasis( attr_QTangent, fromLB );
  317. 30058: QTangentToLocalBasis( attr_QTangent2, toLB );
  318. 30059:
  319. 30060: position.xyz = 512.0 * mix(attr_Position, attr_Position2, u_VertexInterpolation);
  320. 30061: position.w = 1;
  321. 30062:
  322. 30063: LB.normal = normalize(mix(fromLB.normal, toLB.normal, u_VertexInterpolation));
  323. 30064: LB.tangent = normalize(mix(fromLB.tangent, toLB.tangent, u_VertexInterpolation));
  324. 30065: LB.binormal = normalize(mix(fromLB.binormal, toLB.binormal, u_VertexInterpolation));
  325. 30066:
  326. 30067: color = attr_Color;
  327. 30068: texCoord = attr_TexCoord0;
  328. 30069: lmCoord = attr_TexCoord0;
  329. 30070: }
  330. 30071: #endif
  331. 94: #line 94
  332. 40000: #line 40000 // vertexSprite_vp.glsl
  333. 40001: /*
  334. 40002: ===========================================================================
  335. 40003: Copyright (C) 2010 Robert Beckebans <trebor_7@users.sourceforge.net>
  336. 40004:
  337. 40005: This file is part of XreaL source code.
  338. 40006:
  339. 40007: XreaL source code is free software; you can redistribute it
  340. 40008: and/or modify it under the terms of the GNU General Public License as
  341. 40009: published by the Free Software Foundation; either version 2 of the License,
  342. 40010: or (at your option) any later version.
  343. 40011:
  344. 40012: XreaL source code is distributed in the hope that it will be
  345. 40013: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  346. 40014: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  347. 40015: GNU General Public License for more details.
  348. 40016:
  349. 40017: You should have received a copy of the GNU General Public License
  350. 40018: along with XreaL source code; if not, write to the Free Software
  351. 40019: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  352. 40020: ===========================================================================
  353. 40021: */
  354. 40022: // vertexSprite_vp.glsl - sprite vertex fetch
  355. 40023:
  356. 40024: #if defined(USE_VERTEX_SPRITE)
  357. 40025:
  358. 40026: IN vec3 attr_Position;
  359. 40027: IN vec4 attr_Color;
  360. 40028: IN vec4 attr_TexCoord0;
  361. 40029: IN vec4 attr_Orientation;
  362. 40030:
  363. 40031: uniform vec3 u_ViewOrigin;
  364. 40032: uniform vec3 u_ViewUp;
  365. 40033:
  366. 40034: float depthScale;
  367. 40035:
  368. 40036: void VertexFetch(out vec4 position,
  369. 40037: out localBasis normalBasis,
  370. 40038: out vec4 color,
  371.  
  372. Warn: Compile log:
  373. Warn: 0:132(2): error: syntax error, unexpected BASIC_TYPE_TOK, expecting ',' or ';'
  374.  
  375. Warn: Unhandled exception (15ShaderException): Couldn't compile vertex shader: generic2D
  376.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement