aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/d3d12/qsgd3d12renderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* D3D12: Fix some compiler warnings emitted by clang-clFriedemann Kleint2017-10-061-6/+6
| | | | | | | | | | | | | | | qsgd3d12renderer.cpp(72,7): warning: field 'm_renderList' will be initialized after field 'm_vboData' [-Wreorder] qsgd3d12renderer.cpp(450,11): warning: 'scissorRect' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] qsgd3d12renderer.cpp(451,10): warning: 'scissorEnabled' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] ^ qsgd3d12renderer.cpp(452,9): warning: 'stencilValue' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] qsgd3d12renderer.cpp(453,10): warning: 'stencilEnabled' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] qsgd3d12builtinmaterials.cpp(463,7): warning: field 'm_font' will be initialized after field 'm_rc' [-Wreorder] qsgd3d12shadereffectnode.cpp(174,32): warning: comparison of two values with different enumeration types ('QVariant::Type' and 'QMetaType::Type') [-Wenum-compare] qsgd3d12engine.cpp(347,5): warning: delete called on non-final 'QSGD3D12EnginePrivate' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] qsgd3d12engine.cpp(2097,9): warning: variable 'topology' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] Change-Id: Id4179ccbe6f13c3068b445c2ae2a093a67851158 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix d3d12 plugin compilation after QSGGeometry API reviewLaszlo Agocs2016-10-141-3/+4
| | | | | | | Missed the fact the semantic is now attributeType in the public API. Change-Id: I9c967fd24d904c2886054768bb626a62d291b8ba Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix enums in QSGGeometryLaszlo Agocs2016-10-121-1/+1
| | | | | | | | | | | | | | | | Minor fixes based on comments from the 5.8 API changes review: Revert to using Qt-style enum values (POSITION -> PositionAttribute). Use ByteType, FloatType, etc. instead of TypeByte, TypeFloat, ... Add comments about magic GL values. Add missing docs for Attribute::createWithAttributeType(). Change-Id: I1b8242efd3936f000ce8df6c11ff9ab7affb5713 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* software: Add support for QSGRenderNodeLaszlo Agocs2016-07-191-0/+1
| | | | | | | | | | | | | | | | | Have to change getResource() a bit since it turns out it is not suitable currently for backends that do not have a per-window rendercontext and do not implement the interface on the rendercontext. Pass in the window to make sure it can always figure out which window we want the resources for. (we do not want rendererInterface() to return window-specific instances created on the fly, with ownership issues, so stick with the simple model where backends implement the interface on one of their existing classes) To support clipping, QSGRenderNode::RenderState is extended accordingly. Also updated the docs since some claims in the rendernode docs are not true since Qt 5.3. Change-Id: I34779c83926f5231b888fcab7131e873ae97964f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Get rid of the material's RenderState duplicationLaszlo Agocs2016-06-011-6/+6
| | | | | Change-Id: Icd42a1bfff0f12f8162e888f204ad9b3a79aa911 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Make matrix and clipList setters' appearance more internalLaszlo Agocs2016-05-311-2/+2
| | | | | | | And start using them from the batch renderer as well. Change-Id: I20adc3962b06ac712267dc2be95e9e28cea82e21 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Drop QVectors from QSGD3D12EngineLaszlo Agocs2016-05-311-2/+1
| | | | | | | | | | | | | | | Results in a more than 3x drop (and now below GL, as expected) in CPU usage in the 500 Image elements test. There is zero value in using a dynamic data structure for these anyhow, apart from getting == and qHash. However, writing our own hash provides further opportunities for optimizing, for instance there is not much point in hashing the individual input elements since the same shader code pointers imply that the input elements match too. Thus hashing becomes faster without more collisions in practice. Change-Id: Iae766bd44d30ec37080369c8b37677e633c37a88 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make rendernode suitable for public consumptionLaszlo Agocs2016-04-201-10/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-OpenGL APIs the primary (and likely the only) way to add custom rendering into the Qt Quick scene is via the render node. Other approaches,like the before/afterRendering signals, QQuickFramebufferObject, remain OpenGL-only. (although QQuickFramebufferObject may get a multi-API replacement based on QSGRenderNode at a later time) Note that this is not a generic 3D content integration enabler. It targets creating 2D and 2.5D Quick items with custom rendering via the graphics API in use. Make QSGRenderNode public, enhance the docs a bit and add a releaseResources(). Add a QSGRendererInterface with a query function in QQuickWindow and QSGEngine. The scenegraph adaptation can then return a custom implementation of the interface. This will be necessary to query API-specific values, f.ex. the ID3D12Device and ID3D12CommandList when running with the d3d12 backend. The interface allows querying the API and void* resources. Resources that we know about in advance are enum-based to prevent the QPlatformNativeInterface-like ugliness of string keys. Support is there in the batch renderer already, fix this up according to the new public API, and implement the corresponding bits for the D3D12 renderer. For D3D12, fix also an issue with QSGNode destruction where graphics resources in use were attempted to be final-released without a proper wait. The semantics of changedStates() in QSGRenderNode is changed so that it can be called at any time, including before render(). This is very useful since we can implement some state restoring in a more efficient manner. Added a new example as well. Documentation for QSGRenderNode is heavily expanded. Change-Id: I4c4a261c55791d0e38743a784bc4c05a53b3462d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Convert d3d12 backend into a pluginLaszlo Agocs2016-04-131-0/+710
Change-Id: I4300ba81800e44c0b5e2a86e72b1cf96434c323d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>