diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-26 12:03:19 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-31 12:42:10 +0000 |
commit | ea22206baf208d3a811279b7fe5c1fe3396d0be3 (patch) | |
tree | 20109cd20dde8c25d0edb3229f42f8a22d4b76eb /src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp | |
parent | c9cffe61291d265e05f05087275daa6625b1aea2 (diff) |
D3D12: Drop QVectors from QSGD3D12Engine
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>
Diffstat (limited to 'src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp index b4288c2ef5..e335fac0b0 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp @@ -318,7 +318,7 @@ void QSGD3D12ShaderEffectMaterial::preparePipeline(QSGD3D12PipelineState *pipeli pipelineState->shaders.ps = reinterpret_cast<const quint8 *>(linker.fs.constData()); pipelineState->shaders.psSize = linker.fs.size(); - pipelineState->shaders.rootSig.textureViews.resize(textureProviders.count()); + pipelineState->shaders.rootSig.textureViewCount = textureProviders.count(); } static inline QColor qsg_premultiply_color(const QColor &c) |