NFSIISE: gles2 renderer - GLSL shader compilation error (aarch64 Linux / Panfrost)
First off, thank you so much for this excellent Linux port of NFS II SE!
I have been attempting to get the GLES renderer working on a couple of devices running JELOS. Both devices are runnning mainline Linux 6.7.5 aarch64 kernels and Mesa 24.1.0 with Panfrost GPU drivers compiled with OpenGL ES 1 and 2 support included and 32-bit libs built. One has a RockChip RK3326 SOC with a Mali G31 GPU, and the other has an Amlogic S922X SOC with a Mali G52 GPU. Both devices support OpenGL ES 3.1 and OpenGL 3.1 according to Panfrost Mesa driver docs.
The OpenGL 1 and 2 renderers work fine and the game runs well. But the GLES render is producing the following error:
RK3326:/roms/ports/nfs2se # MESA_GLSL=dump ./nfs2se
Need For Speed II SE
Wrapper v1.3.0
Game v1.1.2-cpp_r5
OpenGL ES 2
Mesa: info: GLSL source for vertex shader 1:
Mesa: info: precision mediump float;attribute vec4 aPosition;attribute vec4 aTexCoord;attribute vec4 aColor;attribute float aFog;varying vec4 vTexCoord;varying vec4 vColor;varying float vFog;uniform mat4 uMatrix;void main(){vTexCoord = aTexCoord;vColor = aColor;vFog = aFog;gl_Position = uMatrix * aPosition;}
Mesa: info: GLSL shader 1 failed to compile.
Mesa: info: GLSL shader 1 info log:
Mesa: info: 0:1(1): error: syntax error, unexpected NEW_IDENTIFIER
0:1(1): error: syntax error, unexpected NEW_IDENTIFIER
Aborted
It seems to be crashing in /src/Glide2x/OpenGL2.c
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Fix setting the GLESv2 profile Closes #112 — committed to parhelia512/NFSIISE by zaps166 4 months ago
Because I don’t use cast, in C it can compile 😄 However I don’t have these warnings. Maybe different compiler version? I see Clang 10, I use newer Clang.
32-bit Arch Linux,
./compile_nfs cpp
. It runs normally there.I copy floating-point data to aligned stack and use VFP there, so it shouldn’t happen.
Could you try
./compile_nfs cpp debug
?After some changes, GL(ES)2 is now default renderer.
@zaps166 was able to compile at commit 06c357106827eee5f9845a749aa3d4869cb34cc9 in a docker container, and the gles2 renderer is now working on the Panfrost devices. Thank you for the fix!
Brilliant thank you, I’ll give it a test!
🤦 It’s my bug 🤣
Thank you for that information, good to know that OpenGL 1 is the preferred renderer.
It can’t compile GLES shader, hmm. I remember same on R-Pi, but this works on Android. If OpenGL1 works correctly, use it, GL1 is best here.