Advertisement
illwieckz

Mesa GLSL error

Aug 14th, 2024
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDB 9.37 KB | None | 0 0
  1. diff --git a/src/engine/renderer/glsl_source/generic_vp.glsl b/src/engine/renderer/glsl_source/generic_vp.glsl
  2. index 2b4c21034..4bf94f569 100644
  3. --- a/src/engine/renderer/glsl_source/generic_vp.glsl
  4. +++ b/src/engine/renderer/glsl_source/generic_vp.glsl
  5. @@ -61,7 +61,7 @@ void DeformVertex( inout vec4 pos,
  6.  void   main()
  7.  {
  8.         #insert material_vp
  9. -
  10. +       a
  11.         vec4 position;
  12.         localBasis LB;
  13.         vec4 color;
  14.  
  15. -------------------------------
  16.  
  17. Debug: building generic shader permutation with macro: GENERIC_2D
  18. Warn: Source for shader program generic2D:
  19.    0: #version 460 core
  20.    1: #define HAVE_EXT_gpu_shader4 1
  21.    2: #define HAVE_ARB_gpu_shader5 1
  22.    3: #define HAVE_ARB_texture_gather 1
  23.    4: #define HAVE_EXT_texture_integer 1
  24.    5: #define HAVE_ARB_texture_rg 1
  25.    6: #define HAVE_ARB_uniform_buffer_object 1
  26.    7: #extension GL_ARB_shader_draw_parameters : require
  27.    8: #define HAVE_ARB_shader_draw_parameters 1
  28.    9: #define HAVE_ARB_shader_storage_buffer_object 1
  29.   10: #ifndef r_AmbientScale
  30.   11: #define r_AmbientScale 1.00000000e+00
  31.   12: #endif
  32.   13: #ifndef r_SpecularScale
  33.   14: #define r_SpecularScale 1.00000000e+00
  34.   15: #endif
  35.   16: #ifndef r_zNear
  36.   17: #define r_zNear 3.00000000e+00
  37.   18: #endif
  38.   19: #ifndef M_PI
  39.   20: #define M_PI 3.14159274e+00
  40.   21: #endif
  41.   22: #ifndef MAX_SHADOWMAPS
  42.   23: #define MAX_SHADOWMAPS 5
  43.   24: #endif
  44.   25: #ifndef MAX_REF_LIGHTS
  45.   26: #define MAX_REF_LIGHTS 1024
  46.   27: #endif
  47.   28: #ifndef TILE_SIZE
  48.   29: #define TILE_SIZE 16
  49.   30: #endif
  50.   31: #ifndef r_FBufSize
  51.   32: #define r_FBufSize vec2(2.56000000e+03, 1.44000000e+03)
  52.   33: #endif
  53.   34: #ifndef r_tileStep
  54.   35: #define r_tileStep vec2(6.25000009e-03, 1.11111114e-02)
  55.   36: #endif
  56.   37: #ifndef r_highPrecisionRendering
  57.   38: #define r_highPrecisionRendering 1
  58.   39: #endif
  59.   40: #ifndef r_precomputedLighting
  60.   41: #define r_precomputedLighting 1
  61.   42: #endif
  62.   43: #ifndef r_vertexSkinning
  63.   44: #define r_vertexSkinning 1
  64.   45: #endif
  65.   46: const int MAX_GLSL_BONES = 256;
  66.   47: #ifndef r_halfLambertLighting
  67.   48: #define r_halfLambertLighting 1
  68.   49: #endif
  69.   50: #ifndef r_rimLighting
  70.   51: #define r_rimLighting 1
  71.   52: #endif
  72.   53: const float r_RimExponent = 3.00000000e+00;
  73.   54: #ifndef r_normalMapping
  74.   55: #define r_normalMapping 1
  75.   56: #endif
  76.   57: #ifndef r_specularMapping
  77.   58: #define r_specularMapping 1
  78.   59: #endif
  79.   60: #ifndef r_physicalMapping
  80.   61: #define r_physicalMapping 1
  81.   62: #endif
  82.   63: #ifndef r_glowMapping
  83.   64: #define r_glowMapping 1
  84.   65: #endif
  85.   66: #ifndef r_zNear
  86.   67: #define r_zNear 3.00000000e+00
  87.   68: #endif
  88.   69: #define IN in
  89.   70: #define OUT(mode) mode out
  90.   71: #define textureCube texture
  91.   72: #define texture2D texture
  92.   73: #define texture2DProj textureProj
  93.   74: #define texture3D texture
  94.   75: OUT(flat) int in_drawID;
  95.   76: OUT(flat) int in_baseInstance;
  96.   77: #define drawID gl_DrawIDARB
  97.   78: #define baseInstance gl_BaseInstanceARB
  98.   79:
  99.   80: #ifndef GENERIC_2D
  100.   81: #define GENERIC_2D 1
  101.   82: #endif
  102.   83: /*
  103.   84: ===========================================================================
  104.   85: Copyright (C) 2006-2011 Robert Beckebans <trebor_7@users.sourceforge.net>
  105.   86:
  106.   87: This file is part of XreaL source code.
  107.   88:
  108.   89: XreaL source code is free software; you can redistribute it
  109.   90: and/or modify it under the terms of the GNU General Public License as
  110.   91: published by the Free Software Foundation; either version 2 of the License,
  111.   92: or (at your option) any later version.
  112.   93:
  113.   94: XreaL source code is distributed in the hope that it will be
  114.   95: useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  115.   96: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  116.   97: GNU General Public License for more details.
  117.   98:
  118.   99: You should have received a copy of the GNU General Public License
  119.  100: along with XreaL source code; if not, write to the Free Software
  120.  101: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  121.  102: ===========================================================================
  122.  103: */
  123.  104:
  124.  105: /* generic_vp.glsl */
  125.  106:
  126.  107: uniform mat4      u_TextureMatrix;
  127.  108: #if !defined(USE_VERTEX_SPRITE)
  128.  109: uniform vec3      u_ViewOrigin;
  129.  110: #endif
  130.  111:
  131.  112: uniform float     u_Time;
  132.  113:
  133.  114: uniform vec4      u_ColorModulate;
  134.  115: uniform vec4      u_Color;
  135.  116: #if defined(USE_TCGEN_ENVIRONMENT)
  136.  117: uniform mat4      u_ModelMatrix;
  137.  118: #endif
  138.  119: uniform mat4      u_ModelViewProjectionMatrix;
  139.  120:
  140.  121: #if defined(USE_VERTEX_SPRITE)
  141.  122: OUT(smooth) vec2  var_FadeDepth;
  142.  123: uniform mat4      u_ProjectionMatrixTranspose;
  143.  124: #elif defined(USE_DEPTH_FADE)
  144.  125: uniform float           u_DepthScale;
  145.  126: OUT(smooth) vec2  var_FadeDepth;
  146.  127: #endif
  147.  128:
  148.  129: OUT(smooth) vec2  var_TexCoords;
  149.  130: OUT(smooth) vec4  var_Color;
  150.  131:
  151.  132: void DeformVertex( inout vec4 pos,
  152.  133:          inout vec3 normal,
  153.  134:          inout vec2 st,
  154.  135:          inout vec4 color,
  155.  136:          in    float time);
  156.  137:
  157.  138: void  main()
  158.  139: {
  159. 10000: #line 10000 // material_vp.glsl
  160. 10001: /*
  161. 10002: ===========================================================================
  162. 10003:
  163. 10004: Daemon BSD Source Code
  164. 10005: Copyright (c) 2024 Daemon Developers
  165. 10006: All rights reserved.
  166. 10007:
  167. 10008: This file is part of the Daemon BSD Source Code (Daemon Source Code).
  168. 10009:
  169. 10010: Redistribution and use in source and binary forms, with or without
  170. 10011: modification, are permitted provided that the following conditions are met:
  171. 10012:     * Redistributions of source code must retain the above copyright
  172. 10013:       notice, this list of conditions and the following disclaimer.
  173. 10014:     * Redistributions in binary form must reproduce the above copyright
  174. 10015:       notice, this list of conditions and the following disclaimer in the
  175. 10016:       documentation and/or other materials provided with the distribution.
  176. 10017:     * Neither the name of the Daemon developers nor the
  177. 10018:       names of its contributors may be used to endorse or promote products
  178. 10019:       derived from this software without specific prior written permission.
  179. 10020:
  180. 10021: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  181. 10022: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  182. 10023: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  183. 10024: DISCLAIMED. IN NO EVENT SHALL DAEMON DEVELOPERS BE LIABLE FOR ANY
  184. 10025: DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  185. 10026: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  186. 10027: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  187. 10028: ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  188. 10029: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  189. 10030: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  190. 10031:
  191. 10032: ===========================================================================
  192. 10033: */
  193. 10034:
  194. 10035: /* material_vp.glsl */
  195. 10036:
  196. 10037: #if defined(USE_MATERIAL_SYSTEM)
  197. 10038:
  198. 10039: #ifdef HAVE_ARB_shader_draw_parameters
  199. 10040:   in_drawID = drawID;
  200. 10041:   in_baseInstance = baseInstance;
  201. 10042: #endif // !HAVE_ARB_shader_draw_parameters
  202. 10043:
  203. 10044: #endif // !USE_MATERIAL_SYSTEM
  204.  140: #line 140
  205.  141:
  206.  142:   vec4 position;
  207. ------  ------------^-
  208. 0:142(13): error: syntax error, unexpected NEW_IDENTIFIER, expecting ',' or ';'
  209.  
  210.  143:   localBasis LB;
  211.  144:   vec4 color;
  212.  145:   vec2 texCoord, lmCoord;
  213.  146:
  214.  147:   VertexFetch( position, LB, color, texCoord, lmCoord );
  215.  148:   color = color * u_ColorModulate + u_Color;
  216.  149:
  217.  150:   DeformVertex( position,
  218.  151:             LB.normal,
  219.  152:             texCoord,
  220.  153:             color,
  221.  154:             u_Time);
  222.  155:
  223.  156:   // transform vertex position into homogenous clip-space
  224.  157:   gl_Position = u_ModelViewProjectionMatrix * position;
  225.  158:
  226.  159:   // transform texcoords
  227.  160: #if defined(USE_TCGEN_ENVIRONMENT)
  228.  161:   {
  229.  162:       // TODO: Explain why only the rotational part of u_ModelMatrix is relevant
  230.  163:       position.xyz = mat3(u_ModelMatrix) * position.xyz;
  231.  164:
  232.  165:       vec3 viewer = normalize(u_ViewOrigin - position.xyz);
  233.  166:
  234.  167:       float d = dot(LB.normal, viewer);
  235.  168:
  236.  169:       vec3 reflected = LB.normal * 2.0 * d - viewer;
  237.  170:
  238.  171:       var_TexCoords = 0.5 + vec2(0.5, -0.5) * reflected.yz;
  239.  172:   }
  240.  173: #elif defined(USE_TCGEN_LIGHTMAP)
  241.  174:   var_TexCoords = (u_TextureMatrix * vec4(lmCoord, 0.0, 1.0)).xy;
  242.  175: #else
  243.  176:   var_TexCoords = (u_TextureMatrix * vec4(texCoord, 0.0, 1.0)).xy;
  244.  177: #endif
  245.  178:
  246.  179: #if defined(USE_DEPTH_FADE)
  247.  180:   // compute z of end of fading effect
  248.  181:   vec4 fadeDepth = u_ModelViewProjectionMatrix * (position - u_DepthScale * vec4(LB.normal, 0.0));
  249.  182:   var_FadeDepth = fadeDepth.zw;
  250.  183: #elif defined(USE_VERTEX_SPRITE)
  251.  184:   vec4 fadeDepth = u_ModelViewProjectionMatrix * (position - depthScale * vec4(LB.normal, 0.0));
  252.  185:   var_FadeDepth = fadeDepth.zw;
  253.  186: #endif
  254.  187:
  255.  188:   var_Color = color;
  256.  189: }
  257.  
  258. Warn: Compile log:
  259. Warn: 0:142(13): error: syntax error, unexpected NEW_IDENTIFIER, expecting ',' or ';'
  260.  
  261. Warn: Unhandled exception (15ShaderException): Couldn't compile vertex shader: generic2D
  262. Debug: ----- CL_Shutdown -----
  263.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement