Page 11 of 14
Re: OpenGL 3+ RenderSystem
Posted: Thu May 16, 2013 7:19 am
by masterfalcon
Luckily I have answers for all your questions.
Binary programs haven't been really tested yet and may not work right.
Actually both of those should be included at least for now. Mainly just as a temporary measure during development. However, at this point I may be able to skip adding the regular GLSL directory.
Yes, not all of the shaders have been updated yet. I may actually have that one done locally, I'll have to check.
Re: OpenGL 3+ RenderSystem
Posted: Thu May 16, 2013 8:02 am
by dermont
masterfalcon wrote:
Binary programs haven't been really tested yet and may not work right.
Yeah I can delete cache.bin between runs.
masterfalcon wrote:
Yes, not all of the shaders have been updated yet. I may actually have that one done locally, I'll have to check.
After updating it hardware skinning is enabled but only if software blending technique is removed, why is this?
Out of interest I was trying to get retrieve the source from a unified vertex program via getSource but it appears that I need a further step via the program returned by _getBindingDelegate(). How does the RTShaderLib handle this?
Also the browser samples and the libraries I tried updating btOgre/ogreode appear to be 30% slower than GL2.
Thanks for all your help so far and sorry for all the dumb questions; I'm not familiar with ogre sample framework/sdktrays so it's pretty difficult finding exactly what is need for GL3.
Re: OpenGL 3+ RenderSystem
Posted: Fri May 17, 2013 5:46 am
by masterfalcon
I haven't profiled yet but I would bet that a large amount of the performance decrease is due to the RTSS generated shaders.
Re: OpenGL 3+ RenderSystem
Posted: Mon May 27, 2013 9:57 am
by dermont
It appears that the GL3 renderer segfaults on Linux startup:
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0xb7c09ff8 in Ogre::GpuProgramManager::setSaveMicrocodesToCache(bool) ()
from /home/dermont/TEST/build/v1-9/lib/libOgreMain.so.1.9.0
(gdb) bt
#0 0xb7c09ff8 in Ogre::GpuProgramManager::setSaveMicrocodesToCache(bool) ()
from /home/dermont/TEST/build/v1-9/lib/libOgreMain.so.1.9.0
#1 0xb3e29685 in Ogre::GL3PlusRenderSystem::createRenderSystemCapabilities() const () from /home/dermont/TEST/build/v1-9/lib/RenderSystem_GL3Plus.so.1.9.0
#2 0xb3e3b199 in Ogre::GL3PlusRenderSystem::_createRenderWindow(std::string const&, unsigned int, unsigned int, bool, std::map<std::string, std::string, std::less<std::string>, Ogre::STLAllocator<std::pair<std::string const, std::string>, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) ()
from /home/dermont/TEST/build/v1-9/lib/RenderSystem_GL3Plus.so.1.9.0
#3 0xb3dfec21 in Ogre::GLXGLSupport::createWindow(bool, Ogre::GL3PlusRenderSystem*, std::string const&) ()
from /home/dermont/TEST/build/v1-9/lib/RenderSystem_GL3Plus.so.1.9.0
#4 0xb3e40e27 in Ogre::GL3PlusRenderSystem::_initialise(bool, std::string const&) () from /home/dermont/TEST/build/v1-9/lib/RenderSystem_GL3Plus.so.1.9.0
#5 0xb7e16fed in Ogre::Root::initialise(bool, std::string const&, std::string const&) () from /home/dermont/TEST/build/v1-9/lib/libOgreMain.so.1.9.0
#6 0x08052b04 in OgreBites::SampleBrowser::createWindow() ()
#7 0x08063cc0 in OgreBites::SampleBrowser::setup() ()
#8 0x080526df in OgreBites::SampleContext::initApp(OgreBites::Sample*) ()
#9 0x08052538 in OgreBites::SampleContext::go(OgreBites::Sample*) ()
#10 0x0804ff4c in main ()
If I revert the setSaveMicrocodesToCache to how it was set previously in initialiseFromRenderSystemCapabilities after the GL3PlusGpuProgramManager is instantiated it runs OK. Hopefully this isn't related to the recent fix for the unity build.
One more thing when running VTests via the cfg file and the GL3 renderer fails it appears to fall back to running the tests for the GL renderer or does it run the tests for all render systems.
Re: OpenGL 3+ RenderSystem
Posted: Mon May 27, 2013 6:02 pm
by masterfalcon
I don't think that it's related to that build fix. However do you recall which revision made that change?
I'm not very concerned about the visual tests running at this moment. Hopefully I'll be able to revisits them soon though.
Re: OpenGL 3+ RenderSystem
Posted: Mon May 27, 2013 6:17 pm
by dermont
Unity build fix (second one where you had to update for OSX)
https://bitbucket.org/sinbad/ogre/commi ... 1e6adfa42e
https://bitbucket.org/sinbad/ogre/commi ... 0585cb2037
The setSaveMicrocodesToCache update.
https://bitbucket.org/sinbad/ogre/diff/ ... 8e&at=v1-9
Sorry looking at the cache update it is very recent (10 hours ago) - you probably haven't had time to fully test.
Re: OpenGL 3+ RenderSystem
Posted: Tue May 28, 2013 12:00 am
by masterfalcon
Yeah, I also don't really have a machine that fully supports that extension either, I don't think. I'll have to get back to you on that
Re: OpenGL 3+ RenderSystem
Posted: Wed May 29, 2013 7:48 am
by dermont
Sorry not quite user what extension you are referring to.
The cause of the segfault is simply that you are calling mGpuProgramManager->setSaveMicrocodesToCache before mGpuProgramManager (GL3PlusGpuProgramManager) has even been created.
Re: OpenGL 3+ RenderSystem
Posted: Wed May 29, 2013 5:41 pm
by masterfalcon
My linux machine isn't working at the moment so I can't test out a situation where retrieving program binaries is possible. Would you be able to test this out?
Code: Select all
diff --git a/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp b/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
--- a/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
+++ b/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
@@ -447,9 +447,6 @@
if (mGLSupport->checkExtension("GL_ARB_get_program_binary") || gl3wIsSupported(4, 1))
{
rsc->setCapability(RSC_CAN_GET_COMPILED_SHADER_BUFFER);
-
- // Enable microcache
- mGpuProgramManager->setSaveMicrocodesToCache(true);
}
if (mGLSupport->checkExtension("GL_ARB_instanced_arrays") || gl3wIsSupported(3, 3))
@@ -518,6 +515,12 @@
// Create the texture manager
mTextureManager = new GL3PlusTextureManager(*mGLSupport);
+ if (caps->hasCapability(RSC_CAN_GET_COMPILED_SHADER_BUFFER))
+ {
+ // Enable microcache
+ mGpuProgramManager->setSaveMicrocodesToCache(true);
+ }
+
mGLInitialised = true;
}
Re: OpenGL 3+ RenderSystem
Posted: Wed May 29, 2013 7:03 pm
by dermont
masterfalcon wrote:My linux machine isn't working at the moment so I can't test out a situation where retrieving program binaries is possible. Would you be able to test this out?
Yes that works it's pretty much how I updated.
Also when RTShaderSystem is disabled the build fails.
Code: Select all
diff --git a/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp b/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
--- a/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
+++ b/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp
@@ -154,7 +154,9 @@
mCurrentDomainProgram = 0;
mCurrentComputeProgram = 0;
mPolygonMode = GL_FILL;
+#ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
mEnableFixedPipeline = false;
+#endif
}
GL3PlusRenderSystem::~GL3PlusRenderSystem()
Since the SampleBrowser will not run without the RTShaderSystem lib it's not possible to test this, so it's your choice whether you implement this.
Re: OpenGL 3+ RenderSystem
Posted: Wed May 29, 2013 7:15 pm
by masterfalcon
The RTSS is required for GL3+ just like it is for DX11 and GL ES 2. None of them have a fixed function pipeline and need the RTSS for emulation of that functionality.
Re: OpenGL 3+ RenderSystem
Posted: Thu May 30, 2013 5:47 am
by dermont
OK I had been using one version of Ogre built with RTSS disabled to test simple shader based materials. So this is not possible?
For me it is next to impossible to track down via RTSS why RTTS is implementing it's own fragment/vertex shader code for my shader based materials (using ShaderGeneratorTechniqueResolverListener) and what this code looks like so at least I can update accordingly.
Re: OpenGL 3+ RenderSystem
Posted: Thu May 30, 2013 6:25 am
by masterfalcon
What do your material and shaders look like? It could be a simple issue.
Re: OpenGL 3+ RenderSystem
Posted: Thu May 30, 2013 4:59 pm
by holocronweaver
Not sure if this is the right thread to discuss OpenGL ES matters.
I managed to compile your ogre-glesw branch, but cannot remember what tests you wanted done. Could you refresh my memory? I am using the AMD OpenGL ES SDK on Linux (Ubuntu 13.04 x64).
Re: OpenGL 3+ RenderSystem
Posted: Thu May 30, 2013 5:52 pm
by masterfalcon
Nope, let's keep that out of this thread. I really just wanted to make sure that it works for everyone. Let me know on twitter.
Re: OpenGL 3+ RenderSystem
Posted: Wed Jun 05, 2013 6:22 am
by uelkfr
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 1:11 am
by holocronweaver
Anyone else having trouble with GL3+ in the SampleBrowser in Linux recently? It was running fine until I did my first pull in about a month and now I get allot of INVALID_OPERATION GLSL linker errors:
ERROR: error(#401) Function: FFP_TransformTexCoord(fv1;fv2;fv2; is not implemented
Looking in GLSL150/FFPLib_Texturing.glsl, this function is definitely defined, so something further up the RTSS chain or in the SampleBrowser must be awry.
(Legacy OpenGL works fine with the SampleBrowser.)
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 1:37 am
by masterfalcon
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 1:53 am
by masterfalcon
Nevermind. I figured out when I broke it.
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 1:56 am
by holocronweaver
I was just hunting down the revision myself.

Which was it? How did you figure it out?
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 2:11 am
by masterfalcon
Revision 4693. I tracked it down with a regular binary search. I added new shader parameters but forgot to notify the RTSS of the changes.
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 2:21 am
by holocronweaver
masterfalcon wrote:I tracked it down with a regular binary search.
Do you mean via a debugger, or Mercurial? I am pretty new to Mercurial so I am not sure what tools are available for quickly figuring out what revision broke what. I was rewinding revisions in my local repo until I reached a point that everything worked (in my case, 4680), then fastforward from there to each revision that seemed relevant.
EDIT:
BTW, I tested your commit and the SampleBrowser lives once more.
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 2:27 am
by masterfalcon
I did it via mercurial. Just go back a ways, and check it out.
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 2:57 am
by holocronweaver
*faceplam* I did not know about hg bisect. That is much easier than what I was doing.
Edit: Is there a way to get around recompiling Ogre from scratch each time I want to test a revision?
Re: OpenGL 3+ RenderSystem
Posted: Mon Jun 10, 2013 8:29 am
by syedhs
Maybe you can enable unity build in CMAKE configuration which is a lot quicker.