summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderview_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Renderer: get rid of QVariant for backend uniformsPaul Lemire2016-09-141-23/+23
| | | | | Change-Id: Ib4d6f178ec2f6bb19f26e09ad74ba77d2c752627 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enable QRenderCapture usage in the backendAntti Määttä2016-08-291-0/+5
| | | | | | | | Add relevant changes to backend so that the render capture can be used. Change-Id: I0d4eaf0b1830c4a7c11a2ef1ec41167a429bfd1e Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* RenderView: unset thread local storage after we are done with itPaul Lemire2016-08-091-1/+1
| | | | | Change-Id: I28d05464f22a0632fb12e1408063e7fa962e85c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Set the viewProjection and its inverse as uniforms if usedSean Harmer2016-08-081-0/+2
| | | | | | | | These are useful for performing ray marching in the fragment shader and for mapping from screenspace or NDC to world space in general. Change-Id: I1f273f16c85cdf6c46c03a63f80a6202305c7eaa Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* ClearsBuffers: make the RenderViews store clearbuffers valuesPaul Lemire2016-07-041-4/+13
| | | | | | | | | | This then allows to only do value lookup at submission time rather than accessing the backend node. This will be a great help when submission and frame processing are later on parallelized. Change-Id: I0d34251d67f8329f486626642d7d2eccef9ddf18 Task-number: QTBUG-54423 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Renderer/RenderView: store only renderTarget nodeIdPaul Lemire2016-07-041-3/+3
| | | | | | | | | | | | This avoids doing not necessary lookups to retrieve the id and will later allow to be sure that we are relying on data that is not going to change if the submission and frame processing are made in parallel. Also added small comment outlining the tasks to do in doRender Change-Id: Id1511a11e99100896f3e91ddd05ccd4b0c12524d Task-number: QTBUG-54423 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix race with UniformBlockBuilderPaul Lemire2016-07-041-1/+2
| | | | | | | | | Since there can be n jobs executed in parallel for a RenderView, the UniformBlockBuilder needs to be unique on a per thread basic and not on a RenderView one like it used to be. Change-Id: I4495a8474753f41c7a99d50056eb1fbf968ef5d4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Further job improvementsPaul Lemire2016-07-041-5/+12
| | | | | | | | | | | | | | The RenderViewInitialization job used to have to wait for the world transform job to be completed because it was used to set the viewProjectionMatrix. This patch adjust dependencies and adds a new job that sets the viewProjectionMatrix once the transform update job is complete. This allows to start most of the processing earlier and better use the available cpu cores. Change-Id: I77d751e0b20639934cc00be0cd9888f41f684f89 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Split RenderCommand building into more jobsPaul Lemire2016-07-031-17/+13
| | | | | | | Leads a 200% gain on bigscene with 12 threads. Change-Id: If6ba7b875fb7a8fa2b81e89fb8ad8d08a11ee683 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use the LightGathering jobPaul Lemire2016-07-031-1/+2
| | | | | Change-Id: I2f7b15a656268ea4dd6895613033dc62d42b1f0a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move LightSource to dedicated filePaul Lemire2016-07-031-9/+1
| | | | | Change-Id: I62751e0f8460ab4680a7bd80eda0cc2a8011b1ef Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Split RenderViewJobsPaul Lemire2016-07-031-73/+44
| | | | | Change-Id: I6c4f8970b14e39085480c029b8acdfcdbfc6fa8d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderView -> Q_DECL_NOEXCEPT -> Q_DECL_NOTHROWPaul Lemire2016-07-031-15/+15
| | | | | Change-Id: Id20b23bf7c19ed47b447cf005aae676025a2c8fa Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderViewJobUtils: small cleanupPaul Lemire2016-07-021-1/+1
| | | | | Change-Id: I981903c6263735b33c53cfc92423e5463fe3de21 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Entity: use QVector for componentsHandle/renderComponentsPaul Lemire2016-06-271-2/+2
| | | | | Change-Id: I8b7b53be17c91dbafeb46a6537b236a60f374f10 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Get rid of QLayer::namesKevin Ottens2016-05-041-6/+3
| | | | | | | | | | | | | Don't reinvent a variable naming system (string based global variables even) and instead use pointer to QLayer instance everywhere, even with QLayerFilter. The wave and deferred-renderer-cpp examples have been ported to the new API. Change-Id: I82a858770954a8743a5c3d2ce0c463e62844871f Task-number: QTBUG-51440 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Adjust LayerFilter's layers property behaviorKevin Ottens2016-05-041-0/+4
| | | | | | | | | | Now an empty list filters out all layers instead of letting everything go through. Also, enabled == false is now honored, a disabled filter lets everything go through (whatever is the layers list). Change-Id: I5ef183c27a9dd045f423c1bf13d563c61b432cfa Task-number: QTBUG-51440 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QClearBuffers: clear specific QRenderTargetOutputsWieland Hagen2016-05-031-28/+12
| | | | | | | | | | | | | If QClearBuffers::colorBuffer is set to a non-NULL value, only this color buffer will be affected by the Clear operation. Right now, only clamped color values are supported by the frontend. OpenGL also supports non-clamped float and integer values, depending on the type of the target buffer. Task-number: QTBUG-50116 Change-Id: I2786c0603b24b4af0d24751151d64be7504b3e92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-011-5/+5
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Moves QSortCriterion flag to QSortPolicy and remove itFranck Arrecot2016-04-261-2/+3
| | | | | | Change-Id: I44f71671ead23256d5fdc621545492885ff940a5 Task-id: QTBUG-51486 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QClearBuffers: Add BufferTypeFlags QFlagsWieland Hagen2016-04-161-3/+3
| | | | | Change-Id: I80d0f414252ccc3f96ac3312d8ac1f08ee49fab0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Consolidate some functionality into AttachmentPack.Wieland Hagen2016-04-161-3/+2
| | | | | | | | RenderTarget attachments to DrawBuffer mapping was done in different places. For now, lets do it centrally within AttachmentPack. Change-Id: I4f6aa78a9964cd420ab67a991cb4186c15b928ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderView: remove unneeded list of default attribute namesPaul Lemire2016-04-151-2/+0
| | | | | Change-Id: Ib0e87658b0118f7c229db65018d6aaef44c22068 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix surface size settingMiikka Heikkinen2016-04-111-1/+1
| | | | | | | | | | Now non-window sized viewports work, too. Task-number: QTBUG-52498 Change-Id: Icc4aba3f93d78b4266a3b565156fe8799797baef Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Set a valid surface size.Volker Krause2016-04-091-1/+2
| | | | | | | | This fixes the viewportMatrix uniform value, which fixes the tessellation and wireframe examples. Change-Id: Ic2a7bba66167673b026caac8461c4f38c68612f2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Prefer QVector to QListSean Harmer2016-03-311-1/+1
| | | | | | | Also make some functions inline whilst we are touching them anyway. Change-Id: If44398d56a82e42689f26f22f0e07dba229529c6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Added properties to QClearBuffersMike Krus2016-03-221-0/+8
| | | | | | | | | | - clearColor - clearDepthValue - clearStencilValue Task-number: QTBUG-51460 Change-Id: Ib31efde0b6ab97ef1f57d4ce71fb2fbca218dc85 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QClearBuffer to QClearBuffersMike Krus2016-03-201-4/+4
| | | | | | Task-number: QTBUG-51460 Change-Id: I3f522f5eaea7bf0f94dbcdc1e7463f2827c0fe3b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QRenderAttachment renamed to QRenderTargetOutputRobert Brock2016-03-031-1/+1
| | | | | | | As per API review Change-Id: Icaca9797c01100402e6d103be2a0425820a717ec Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QRenderAttachment renamed RenderAttachmentType to AttachmentPointRobert Brock2016-03-021-1/+1
| | | | | | | | | As per API review New name was better fitting to the actual description/usage Renamed point to attachmentPoint Change-Id: Id14a312acabdcc9bda49a4d30efe490342105660 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix uses of inefficient QList<QNodeId>Marc Mutz2016-03-011-2/+2
| | | | | | | | | | | | | QNodeId is a 64-bit type, so holding it in QList on 32-bit platforms is horribly inefficient. Fix by porting to QVector instead. [ChangeLog][Important Behavior Changes] QNodeIds are now passed and accepted in QVectors, not QLists. Change-Id: I3cbe35d639eb2ddf9d106294f542f65b431dc4a4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove ParameterMappingPaul Lemire2016-02-261-1/+1
| | | | | | | | | | | | | | * Bindings are now entirely deduced from shader introspection * Modified the BackendNodeDirtyFlags to remove the class at this prevents the operator~() to be called * Make the Renderer loop check for the ComputeDirty flag and don't unset it if set Note: uses a hack to reset m_changeSet in performCompute as right know we are sometimes missing the markDirty(ComputeDirty) set by the ComputeJob nodes. Will be sorted out later. Change-Id: Ic4fa71ecf01b625e885a58a66278387bf5b36339 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid recursion for bulk of render command buildingSean Harmer2016-02-221-1/+1
| | | | | | | Will allow to split sub tasks out as distinct jobs later. Change-Id: Id9f5a98826514c35c535d077eec4a787c54c2db3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use integer comparisons when filtering entities by layerSean Harmer2016-02-221-1/+4
| | | | | | | | Followup commit will split this phase out to avoid recursion in rest of the render command building. Change-Id: Ifa7cd7f2cea82c34bb827b3f114c442660d2598b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use a non polymorphic version of QUniformValueSean Harmer2016-02-211-17/+17
| | | | | | | | | Avoids use of the custom allocator which is spending a lot of time deallocating and also avoids use of virtuals and a vtable. Change-Id: I5565b8ab7b4e3b9110cd17a894b728bca700440b Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderViews: use int comparison rather than string for uniforms filteringPaul Lemire2016-02-211-3/+3
| | | | | | | Provides a non negligible gain in performance. Change-Id: I1165d1fcd044e3bdebf286539da2f5316f764540 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unify license header usageAntti Kokko2016-01-261-12/+15
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated picking-qml examplePaul Lemire2016-01-211-0/+4
| | | | | | | handle device pixel ratio and none full-window Scene3D Change-Id: Iadc504a00816d9363847bf9ec1e09d4b7c631666 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Store the surface to use in the RenderViewSean Harmer2016-01-171-0/+4
| | | | | Change-Id: I4dbdfe9315dc3b0bb89119372301d24a292520d9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Renderer: handle compute and draw render commandsPaul Lemire2016-01-131-1/+1
| | | | | Change-Id: I629dff26ce02fad1deaea8557d09a52e6d672ad7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView/GraphicsContext: support SSBO/UBO with buffer used as ParametersPaul Lemire2016-01-131-0/+4
| | | | | Change-Id: I347aa5deea6521b43b9033e2200ab2f8b272f671 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QUniformPack to ShaderParameterPackPaul Lemire2016-01-131-4/+4
| | | | | | | | This will make it more clear that it also contains other things like UBO/SSBO which are pure Uniform values. Change-Id: I641246798b8c868d7bfdfde381221d9a97ed2d35 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView: sliglty modified to later accommodate compute callsPaul Lemire2016-01-131-0/+4
| | | | | Change-Id: Ic821747677c9d2f117494d2ecfd89f47f982fa3f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView Compute handlingPaul Lemire2016-01-131-15/+22
| | | | | Change-Id: Ifbe93173010bf058f198990c62d5e93fea967a74 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QFrameAllocator privateKevin Ottens2015-12-081-1/+1
| | | | | Change-Id: Id69a161da691322184d8ec5ed7a1b375cf2038ed Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow multiple lights per entityLaszlo Agocs2015-11-271-4/+4
| | | | | Change-Id: I60a36fe289991143e82ac89f44f4dfbc59e01355 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Expose eye position as a uniformLaszlo Agocs2015-11-261-0/+1
| | | | | Change-Id: Ica74c5c1fe79a849dcd0dab8c57f47ea70311424 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-261-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderView: use FrameGraph to decide when frustum culling should be donePaul Lemire2015-11-241-0/+4
| | | | | Change-Id: I366876f68040dd571524d9d7137a2f7916a5b757 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* RenderView: frustum cullingPaul Lemire2015-11-241-2/+20
| | | | | Change-Id: Iacfcfce5d4a339acd29bcaacffb38ce339220ad2 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>