rigs-of-rods icon indicating copy to clipboard operation
rigs-of-rods copied to clipboard

Null program bound (Shaders fail to compile)

Open CuriousMike56 opened this issue 5 years ago • 6 comments

From: https://forum.rigsofrods.org/threads/error-on-startup.1829/

It appears that on some integrated Intel graphics chips a few shaders fail to compile, causing RoR to crash at the main menu:

10:09:11: Parsing script StdQuad_vp.program
10:09:11: Ogre::RenderingAPIException::RenderingAPIException: Cannot assemble D3D9 high-level shader Ogre/Compositor/StdQuad_HLSL_vp in D3D9HLSLProgram::loadFromSource at c:\conan\.conan\data\ogre\1.11.5\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\rendersystems\direct3d9\src\ogred3d9hlslprogram.cpp (line 292)
10:09:11: High-level program 'Ogre/Compositor/StdQuad_HLSL_vp' is not supported: Cannot assemble D3D9 high-level shader Ogre/Compositor/StdQuad_HLSL_vp
10:09:11: Ogre::InvalidParametersException::InvalidParametersException: Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at c:\conan\.conan\data\ogre\1.11.5\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\ogremain\src\ogregpuprogramparams.cpp (line 1661)
10:09:11: Error: ScriptCompiler - invalid parameters in StdQuad_vp.program(119): setting of constant failed
...
10:09:12: Ogre::RenderingAPIException::RenderingAPIException: Cannot assemble D3D9 high-level shader imgui/VP/D3D9 in D3D9HLSLProgram::loadFromSource at c:\conan\.conan\data\ogre\1.11.5\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\rendersystems\direct3d9\src\ogred3d9hlslprogram.cpp (line 292)
10:09:12: High-level program 'imgui/VP/D3D9' is not supported: Cannot assemble D3D9 high-level shader imgui/VP/D3D9
10:09:12: Ogre::RenderingAPIException::RenderingAPIException: Cannot assemble D3D9 high-level shader imgui/FP/D3D9 in D3D9HLSLProgram::loadFromSource at c:\conan\.conan\data\ogre\1.11.5\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\rendersystems\direct3d9\src\ogred3d9hlslprogram.cpp (line 292)
10:09:12: High-level program 'imgui/FP/D3D9' is not supported: Cannot assemble D3D9 high-level shader imgui/FP/D3D9
...
...
10:09:13: [RoR|GVar]             app_state:  ApplyPending(), new: "MAIN_MENU", old: "BOOTSTRAP"
10:09:13: Ogre::RenderingAPIException::RenderingAPIException: Null program bound. in D3D9RenderSystem::bindGpuProgram at c:\conan\.conan\data\ogre\1.11.5\anotherfoxguy\stable\build\2d13f0c58bafe8a9fae74369aea9c086e652e9f3\rendersystems\direct3d9\src\ogred3d9rendersystem.cpp (line 3640)

The full log files can be found on the above thread. Not sure if it's possible to fix, but figured I'd post it here.

CuriousMike56 avatar Jul 06 '19 13:07 CuriousMike56

@paroj any idea about this?

tritonas00 avatar Jul 06 '19 16:07 tritonas00

the imgui shaders fail to compile, however the log does not say what exactly fails there.

as noted before, you should upgrade to https://github.com/OGRECave/ogre-imgui, which only uses FFP if availble and falls back to the RTSS otherwise. (aside of a slew of other bugfixes)

paroj avatar Jul 06 '19 18:07 paroj

@AnotherFoxGuy is this very time consuming to do?

just updating the files will not work?

tritonas00 avatar Aug 04 '19 07:08 tritonas00

hey - is this still work in progress? I have tried running latest stable version on both snap and wine and seem to be getting the same underlying error that this thread is related:

RenderingAPIException: Null program bound. in GLRenderSystem::bindGpuProgram at /build/rigs-of-rods/parts/ogre/src/RenderSystems/GL/src/OgreGLRenderSystem.cpp (line 2755)

I attach the full RoR log file. Cheers for the effort in resolving. RoR.log

sparky-git avatar Mar 11 '20 21:03 sparky-git

@sparky-git RoR will be updated to OGRE 1.12 fairly soon, which has IMGUI built-in. Should hopefully be resolved then.

CuriousMike56 avatar Mar 12 '20 01:03 CuriousMike56

imgui is now updated in current master, can you try now @sparky-git ?

tritonas00 avatar Oct 17 '20 11:10 tritonas00