| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Mostly focused on ShaderData for now, RenderView unit tests will be completed
over time.
Change-Id: I279a49a294ff83d5ab5ec06c48e14796cf00b7b0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having a QNode* or QObservable as the subject of a change, we use
it's unique NodeId instead. That will prevent the ChangeArbiter from trying to
distribute changes by looking at a QNode/QObservable id when the
QNode/QObservable might have been destroyed in the meantime.
Change-Id: Ia419d5b841434fd65522c8c65de552089cfe97cf
Task-number: QTBUG-44628
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Note: Only test proper initialization, cleanup and that it matches a frontend
peer. Doesn't that shader loading as this requires a context, surface...
Change-Id: I05f6ef059005b4781b82876a8d73e46d41d44387
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
This was probably forgotten when the property name was changed fron QByteArray
to char *.
Change-Id: Idd6a988703a241519b3aba7b1d127adae5e1375e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Hopefully in the long term we can make the renderer smart enough
that it can automatically use instancing to render such things.
Change-Id: I9f5cfabeea11f5e6b925d5ad2466afa8e601e6f8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Because linking fails on Windows due to the benchmarks being release-only.
Change-Id: I386b38f10ec5018f34bbbd45c6ff29ad6925faa5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I7f6e37cd010b530bd36e15d8461e6d50da7a42b9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some of them do not compile:
tst_bench_qresourcesmanager.cpp(115) : error C2039: 'time' : is not a
member of 'std'
For now let's just skip them in wince builds.
Change-Id: Id58ef24431abeb2916836e7ab5a9a05f8c8eeb01
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
As for preparation for Qt5.5 release the copyright header is
updated to correspond the current license requirements.
Change-Id: I36632918b66f455539453b42c369689fb11298ec
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Thanks to QLockableObserverInterface I can finally unit tests the
changes I did in f446248.
Change-Id: Ica9c47417bd7036fa22dc0c5ddb38bb3754bec56
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
We introduce QLockableObserverInterface as an intermediate interface
before the QChangeArbiter and depend on that interface whenever
possible.
Change-Id: Ic92efec8d68c88344bb43f8fc7dc10b1212180af
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
RenderRenderPass is now storing pointers to backend objects as soon as
possible.
Change-Id: I6f8c4b92d18bcfe726df5731b978df0606a6a81c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
The backend is not supposed to keep pointers on frontend objects it
doesn't own. Instead store the data in RenderParameterMapping instances
as soon as possible.
Change-Id: I5f0ff04f06c54c2ad0fbe483051db9974f4aedf8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ifa1ee12959202093bea49d1e6c5b028d17eae01c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I587d4d9f6065e377e7254ca916fdab2c0527ac30
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Would have been nice to unit test the other end of this event handling
(namely QEntity) but it is tight coupled to ChangeArbiter.
Change-Id: I78a63a237cfac7502a0b2e48118559f5b1bec85a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Icc554960901833834dfd00ce2505b160d125e86a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I1e5f006b612a69e6b5cc98aecb6c8fdc3d6281b0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I91480d9a61accf313d10f5ddb21100fdc13481c2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
| |
Change-Id: I008e81fa698195b732c535a2728bd117ddd1b325
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: If25d1f71dfff62009db1cd4f72a1b0725b4c6d14
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
| |
Helps make sure that the methods are working as expected before being used by
the renderer.
Change-Id: If335bf4c7f9cb95d5e7b1f9bd862d438e71a3fe1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I0450a4d4708af1ccd3d4c8f2ddc5c9a5c9deca27
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I298fbaf819a118a5da4453082ec7f1484835480a
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Once we are happy with the API we can make this public for a future
release.
Change-Id: I914f087e10adddbadac1649a8b889b9f53f82fd2
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QAspectEngine is crashing upon shutdown so adding a test case to
investigate. Without a root entity set we just get warnings about
threads being killed whilst still running. With a root entity set, it
crashes. Need to solve these before we can test any more work towards
a clean shutdown. Next commit solves the crash so merge it together
with this one.
Change-Id: Ic90c0f130ed48b418bb376b38eb10f23ea90590e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also allows us to greatly simplify the code while at it.
If future subclasses ever become larger than our maxObjectSize,
we can either force them to overload operator new themselves
or increase the maxObjectSize in the allocator.
That never happens in practice and just increases the codesize
and also slows down the code. The benchmark now shows the following
numbers for perf's instr:k counter on my machine:
********* Start testing of tst_QFrameAllocator *********
Config: Using QtTest library 5.5.0, Qt 5.5.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC
4.9.2)
PASS : tst_QFrameAllocator::initTestCase()
PASS : tst_QFrameAllocator::benchmarkAllocateSmall()
RESULT : tst_QFrameAllocator::benchmarkAllocateSmall():
880,438 instructions per iteration (total: 880,438, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkAllocateBig()
RESULT : tst_QFrameAllocator::benchmarkAllocateBig():
965,937 instructions per iteration (total: 965,937, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateSmall()
RESULT : tst_QFrameAllocator::benchmarkDeallocateSmall():
701,573 instructions per iteration (total: 701,573, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateBig()
RESULT : tst_QFrameAllocator::benchmarkDeallocateBig():
701,572 instructions per iteration (total: 701,572, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkAllocateRaw()
RESULT : tst_QFrameAllocator::benchmarkAllocateRaw():
867,893 instructions per iteration (total: 867,893, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateRaw()
RESULT : tst_QFrameAllocator::benchmarkDeallocateRaw():
771,701 instructions per iteration (total: 771,701, iterations: 1)
PASS : tst_QFrameAllocator::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of tst_QFrameAllocator *********
Change-Id: I0500a206e8460e27b5157d6238a06bee355b7318
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Results for instr:k perf counter on my machine are:
********* Start testing of tst_QFrameAllocator *********
Config: Using QtTest library 5.5.0, Qt 5.5.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC
4.9.2)
PASS : tst_QFrameAllocator::initTestCase()
PASS : tst_QFrameAllocator::benchmarkAllocateSmall()
RESULT : tst_QFrameAllocator::benchmarkAllocateSmall():
1,060,442 instructions per iteration (total: 1,060,442, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkAllocateBig()
RESULT : tst_QFrameAllocator::benchmarkAllocateBig():
1,145,940 instructions per iteration (total: 1,145,940, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateSmall()
RESULT : tst_QFrameAllocator::benchmarkDeallocateSmall():
901,579 instructions per iteration (total: 901,579, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateBig()
RESULT : tst_QFrameAllocator::benchmarkDeallocateBig():
901,579 instructions per iteration (total: 901,579, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkAllocateRaw()
RESULT : tst_QFrameAllocator::benchmarkAllocateRaw():
1,067,539 instructions per iteration (total: 1,067,539, iterations: 1)
PASS : tst_QFrameAllocator::benchmarkDeallocateRaw()
RESULT : tst_QFrameAllocator::benchmarkDeallocateRaw():
971,701 instructions per iteration (total: 971,701, iterations: 1)
PASS : tst_QFrameAllocator::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of tst_QFrameAllocator *********
Change-Id: Iae2bcd53d4efcff4b8486b4571dc1d1acfcbc19d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before one could potentially fall into a trap when one would call
allocateRawMemory<BaseClass>(size);
When size belongs to a child class inheriting from BaseClass and
falls into a different (larger) bucket, the following deallocation
via
deallocateRawMemory<BaseClass>()
would fail. Because there we just picked the size of the BaseClass
to find the bucket.
Now the whole API is restructured to guard against this wrong usage:
- we only ever operator on void* in the *Raw* methods
- we pass on the size explictily
This also means we must use the safe operator deallocate overloads
that also take the size as a parameter.
The unit test was run first to check that this was indeed an issue.
Then it is ported to the new API and cleanup up a bit as well to
reduce duplicated code.
Change-Id: I559af1c0ffc633962fac12d6e3cadf87c09ef92d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I09aa2d0d7b95b809ba3da4841c05c04c47d377f8
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Should allow to easily replace QUuid by a custom quint64 based struct
Change-Id: Ib4ba57efd2e070317aa3417b37ce091f2b4779a0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicit registerArbiter/unregisterArbiter methods.
QNode: removed QReadWriteLock for the QChangeArbiter, no need to protect as
the QChangeArbiter is always set in the main thread.
QBackendNode: similar for the QBackend, all locks removed as we are always
locked when synching changes.
QObservable was removed.
Change-Id: I570afbf3e3230ac9d9613474fedd7849aba7412a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The overhead of a read/write lock should not be required for such
small critical sections. It will also allow us to cleanup the
code a bit more. Already, the code changes lead to a small improvement
before:
RESULT : tst_QResourcesManager::benchmarkAllocateSmallResources():
46,552,767 instructions per iteration (total: 46,552,767, iterations: 1)
RESULT : tst_QResourcesManager::benchmarkAllocateBigResources():
48,338,703 instructions per iteration (total: 48,338,703, iterations: 1)
after:
RESULT : tst_QResourcesManager::benchmarkAllocateSmallResources():
44,848,672 instructions per iteration (total: 44,848,672, iterations: 1)
RESULT : tst_QResourcesManager::benchmarkAllocateBigResources():
46,634,161 instructions per iteration (total: 46,634,161, iterations: 1)
Change-Id: I8ef0aa52be3caf8b4c8691579677f693a054565c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tricks applied are identical to those done previously for
ArrayAllocationPolicy:
We remove the obsolete hash for the index mapping and instead use
pointer differences directly, which is much faster and reduces
the memory consumption.
Some variables are also renamed to better reflect common allocator
nomenclature.
The added benchmark shows a reduction of the instruction count
by a factor of about 10.
Change-Id: Icabc354ab9e1e8ea0b1dc83c71a2f2cfe49d1da0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Startup memory usage is now 10% of what it was before.
Unit tests corrected and benchmarks added.
Benchmarks:
DynamicArrayPolicy
QResourcesManager
Change-Id: Idaeedba5156ac2d6a0a494e7399d9dcb141dc81c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Note: the Renderer aspect uses all those private headers, when we introduce
the QBackendNode class that will be a wrapper around those, we will be able to
remove those private includes.
Change-Id: I6240f754e6da251da158cafcf76029ae59000e05
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
This way we will avoid inconsistencies. It also means making some of the
copy() implementations more clever.
Change-Id: Ic79c9ec7c9c32f8951d5d9f5184592880bf8d5fd
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I903493cc3399b6680ac5947f1c81033a1f1c745c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move almost everything to private classes.
Assimp loading restored.
All examples working.
QNode hierachy is now handled through QObject::setParent, addChild,
removeChild are part of the private api.
Note: commented QChangeArbiter unit tests as they can no longer work with this
patch and will restore them when QChangeArbiter will have been made private.
Task-number: QTBUG-41470
Task-number: QTBUG-41523
Change-Id: I4430974b3aa7f3744c38714b451b122e0cb4d0c9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Note: As we are using QScene during cloning, it is important that node hierarchy
be created and added in the proper order (parent then child).
Change-Id: I8fd53f7ca696ec9aca19cc70dc116ccba4154911
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I60e9fd42191c14428b38ee9c343477dd4fac3596
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: If4fe9107b72b9efe9bec24e854f4f1b7e6b6553d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Allows to handle allocation of subclasses using the overloaded new operator
from the parent.
Change-Id: Ie587c81fb3a5cb5aa6735377bfcc57bb4407b117
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I1afb8408e03d4b5405e8ee82d1a3b6b4364d3f5d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Iba356b1266b820b50b86efcbd6590f120db80b79
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I3fbf2f71d2ef35d0f0cbe6ac2c8d1f539a6c0de7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Icaed79267790f6d17c2e3ba481a1a9bd3e65a95e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ifd585f5883e446d0569c38219d26ba581455e857
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I16b3d967e1244e3d47bffd36f6284a0e9ef0a89f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I0a0ebde1c107db8831b596eab1e512a2062979f7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|