summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/renderer/renderviewbuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the OpenGL renderer a pluginPaul Lemire2020-02-051-803/+0
| | | | | | | | By default the QRenderAspect will try to load this plugin Change-Id: Ie55e207fb8e6d0b64f717bbb99699eb669eaa3f2 Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix usage of C++14 featuresMike Krus2020-01-141-2/+2
| | | | | Change-Id: Ibd460eceafdd29d7d88ac2418496dc7002de1095 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderViewBuilder: fix leak with EntityRenderCommandDataPaul Lemire2019-12-161-7/+7
| | | | | | | | | | | | | EntityRenderCommandData would only be released in a separate job than the one it was allocated in. However this would only happen if there was at least a single renderable objects after filtering. In case there was no renderable following filtering, the EntityRenderCommandData was leaked. To fix the issue and make it less error prone, we now switch to using shared pointers to avoid having to handle all possible leak cases with raw pointers. Change-Id: I842d50d2b35ebba8303f6d6c4e72a2427ce31da3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Adequately split work among RenderViewCommandBuilderPaul Lemire2019-12-031-26/+35
| | | | | | | | | Try to give at least 100 entities per worker. Ideally we'd find a way to only add the required number of jobs but ThreadPooler doesn't easily allow that. Change-Id: Ieaf21b66eefd6c3e3b85b949917ea93b73834838 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderViewCommandUpdaterJob: stop copying renderables dataPaul Lemire2019-12-021-17/+14
| | | | | | | | This makes the post command update synchronization job a lot faster. Change-Id: I845c39cd4e2c0e56e8eefa05bbdd20d0bc3d2454 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* FilterProximityJob: only run it if our RV requires proximity filteringPaul Lemire2019-11-131-1/+2
| | | | | | | | Which is only very rarely required by user applications. Avoid useless memory allocations every frame Change-Id: I69ea73ebfffdbe928f99333b4d1dd90cf4ada430 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Convert EntityRenderCommandData to struct of vectorsPaul Lemire2019-10-291-13/+13
| | | | | Change-Id: Ib290491476b083e6aa4cff5c112a802c4e198987 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Compute renderables/computables/lights once instead of once per RVPaul Lemire2019-10-291-188/+14
| | | | | | | | All RV end up using exactly the same vector before filtering it down on per RV specifics. No point in compute RV times the same thing. Change-Id: Ia674095627771c8e9ada090fa47623cbbbd8a3f8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Split RenderCommand generation and uniform updatePaul Lemire2019-10-211-132/+295
| | | | | | | | | | | | | | | | In most cases, we can generate the RenderCommands once and reuse them in subsequent frames only updating the uniforms. We still have to copy the RenderCommands as the renderer renders while we start preparing the next frame. This is still faster than regenerating them entirely. Regenerating the entire commands will happen only when FrameGraph or Scene structure changes. That should rarely be happening on a per frame basis. Next step could be to look at how to only update commands for Entity with Parameters that have changed. Change-Id: I202870850a46fcd3946f81bffddb7027d192f374 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch origin/5.13 into devPaul Lemire2019-04-151-1/+4
|\ | | | | | | Change-Id: Ib5c04e9941aeea1a4cd27519b94b9a53e8349ea3
| * Set OptimalParallelJobCount to at most 4Paul Lemire2019-02-221-1/+4
| | | | | | | | | | | | | | | | | | Profiling reveals that on fast cpus, having more jobs is counter productive. Set it to at most 4 as it seems to be a good all around values while waiting to fine tune it later on based on platform and hardware. Change-Id: I95033e34f10d7f37dfafe0b21c6724466eb78fae Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Cache light/renderable/computable vectorsJames Turner2019-02-201-37/+169
|/ | | | | | | | This avoids running these jobs when lights / renderables have not changed in a frame Change-Id: I604180fe3442ab67648c4ba5d9effb8639c68ef7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix race condition when executing multiple filterlayerjobs at oncePaul Lemire2018-06-251-0/+1
| | | | | | | | | | The updating of referenced layer ids for each Entity should only be performed once and not by multiple jobs. Therefore, this update was moved into a dedicated job which is now a dependency of the filterentityjob instances. Change-Id: Ie8ecc49a7c6c7d41a1f1f0d18619b5e142b68204 Task-number: QTBUG-68942 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* MaterialParameterGathererJob: remove unneeded renderer memberPaul Lemire2018-03-191-1/+0
| | | | | Change-Id: I05bef741048fbb29fab261b48f48a20d1d131bcc Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Move Renderer specific classes into new folderPaul Lemire2018-03-191-0/+672
This is another step toward isolating the renderer from the render aspect Change-Id: I4031675b961d6645b65bbe05cf62d150993038b0 Task-number: QTBUG-61151 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>