I found some things that can explain my stability issues (Qt 5.8) : 1. We can not let a parameter with a nullptr value - It will lead to an unsupported uniform type - I have to detach my texture parameter in this case, but add/removeParameter method are slow - I had try to use the enable flag instead, but it doenst works 2. I can't share the QShaderProgram instances between my materials, I get an assert that I don't really know I it came from me or just because QShaderProgram shouldn't be shared. - Having one instance of QShaderProgram per material seems to be unoptimal in my case as I can generate a key for our ubershader and having a map
The assert came from the method void Renderer::prepareCommandsSubmission(const QVector<RenderView *> &renderViews) : Q_ASSERT(rGeometry && rGeometryRenderer && shader); My goal is to be able to change often the ubershader generated code and the corresponding uniforms of materials. I am trying to optimize it, because it is easy on our side to do it and avoiding Qt3D thread synchronization,... 2016-10-21 18:15 GMT+02:00 Xavier Bigand <flamaros.xav...@gmail.com>: > I am actually use Qt 5.8 branch from Git, I have some performances and > stability regression compared to the 5.7 release. > > I can't run my application in Debug mode (tested with mingw and VS 2013) > with both Qt versions (5.7 and 5.8=), it runs in release but behavior > change fast when I do very small changes in my code. > It seems that the version 5.7 is able to support more complexe scenes than > Qt 5.8 and performances are twice better. > > As much as I can tell for the moment stability/performances issues cames > from threading management. > > > When trying to load a scene in debug mode with Qt 5.8 it often break in T > QGenericAtomicOps::load(const T &_q_value) from a pooled thread. > > Here is the full call stack : > > Qt53DRenderd.dll!QGenericAtomicOps<QAtomicOpsBySize<4> > >::load<int>(const int & _q_value) Line 90 C++ > Qt53DRenderd.dll!QBasicAtomicInteger<int>::load() Line 99 C++ > Qt53DRenderd.dll!QtPrivate::RefCount::isShared() Line 101 C++ > Qt53DRenderd.dll!QVector<Qt3DRender::Render::ClearBufferInfo>::isDetached() > Line 108 C++ > Qt53DRenderd.dll!QVector<Qt3DRender::Render::ClearBufferInfo>::detach() > Line 384 C++ > Qt53DRenderd.dll!QVector<Qt3DRender::Render::ClearBufferInfo>::begin() > Line 204 C++ > > Qt53DRenderd.dll!Qt3DRender::Render::FrameGraphVisitor::visit::__l78::<lambda>() > Line 326 C++ > Qt53DRenderd.dll!Qt3DRender::Render::GenericLambdaJob<void > <lambda>(void) >::run() Line 78 C++ > Qt53DCored.dll!Qt3DCore::AspectTaskRunnable::run() Line 91 C++ > Qt5Cored.dll!QThreadPoolThread::run() Line 99 C++ > Qt5Cored.dll!QThreadPrivate::start(void * arg) Line 380 C++ > [External Code] > [Frames below may be incorrect and/or missing, no symbols loaded for > kernel32.dll] > > It breaks because the QBasicAtomicInteger pointer is allready free > (0xFEEEFEEE). > > And for performance issues it seems to come from synchronization between > thread, so I am trying to reduce the number of Qt3D objects > (QShaderProgram, Texture,...) by sharing them, but doing this can lead in > rendering issues or crashs. > > > I want to help to improve stability (first) and performances, but I don't > have a great experience in thread debugging and on how the Qt3D backend > works. So I would be happy to get some hints to improve my feedbacks or > doing more to help. > > > -- > Xavier > -- Xavier
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest