gongminmin / KlayGE

KlayGE is a cross-platform open source game engine with plugin-based architecture.
http://www.klayge.org
GNU General Public License v2.0
2.1k stars 349 forks source link

Get shader compiling errors when deploy to android #12

Closed linuxaged closed 8 years ago

linuxaged commented 8 years ago

ndk version: r10e compiler: gcc 4.9 target arch: armeabi-v7a target platform: android 4.3

(ERROR) KlayGE: C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\Shader@0x000000BF10769FE0(1863,31-37): warning X3203: signed
/unsigned mismatch, unsigned assumed
(INFO) KlayGE: ...
(INFO) KlayGE: 1947
(INFO) KlayGE: 1948 #if LIGHT_BATCH > 4
(INFO) KlayGE: 1949             for (uint comp = 0, li = 0; li < nl; ++ comp, li += 8)
(INFO) KlayGE: 1950             {
(INFO) KlayGE: 1951                     uint index = li + 7;
(INFO) KlayGE: ...
(ERROR) KlayGE: C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\Shader@0x000000BF10769FE0(1949,31-37): warning X3203: signed
/unsigned mismatch, unsigned assumed
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\LightIndexedDeferredRendering32.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\MultiRes.kfx.
(ERROR) KlayGE: Error when compiling ParticleVS2:
(ERROR) KlayGE: (0): error X3501: 'ParticleVS2': entrypoint not found
(ERROR) KlayGE:
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\Particle.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\PostToneMapping.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\Resizer.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\RSM2VPLs.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SkyBox.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SSGI.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SSR.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SSS.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SSVO.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\SumLum.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\TAA.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\TileBasedDeferredRendering.kfx.
(ERROR) KlayGE: Error when compiling ToneMapping30VS:
(ERROR) KlayGE: (0): error X3501: 'ToneMapping30VS': entrypoint not found
(ERROR) KlayGE:
(ERROR) KlayGE: Error when compiling ToneMapping30PS:
(ERROR) KlayGE: (0): error X3501: 'ToneMapping30PS': entrypoint not found
(ERROR) KlayGE:
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\ToneMapping.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\VPLsLighting.kfx.
Compiled kfx has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\UI.kfx.
Binary model has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\sphere_high.meshml.model_bin.
Binary model has been saved to C:\workspace\KlayGE\KlayGE\Samples\Build\gcc49_android_armeabi-v7a-Debug\AreaLighting\assets\sponza_crytek.meshml.model_bin.
'android' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
make[2]: *** [AreaLighting/libs/armeabi-v7a/libAreaLighting_d.so] Error 1
make[1]: *** [AreaLighting/CMakeFiles/AreaLighting.dir/all] Error 2
make: *** [all] Error 2
[E] Build Samples failed.
gongminmin commented 8 years ago

The shader compiling error is harmless. All those failed shaders have backup ones for mobile platform.

Couldn't find 'android' is a real problem. You need to add your android SDK pathes into PATH. Normally they are "C:\Users\AppData\Local\Android\android-sdk\tools" and "C:\Users\AppData\Local\Android\android-sdk\platform-tools".

linuxaged commented 8 years ago

And then I got another error: the IntegratedBRDF.dds file was not found

Error copying file "C:/workspace/KlayGE/KlayGE/Samples/media/EnvLighting/IntegratedBRDF.dds" to "C:/workspace/KlayGE/KlayG
E/Samples/Build/gcc49_android_armeabi-v7a-Debug/EnvLighting/assets/IntegratedBRDF.dds".
make[2]: *** [EnvLighting/libs/armeabi-v7a/libEnvLighting_d.so] Error 1
make[1]: *** [EnvLighting/CMakeFiles/EnvLighting.dir/all] Error 2
make: *** [all] Error 2
[E] Build Samples failed.