Commit Graph

9 Commits

Author SHA1 Message Date
Campbell Barton
8e8a6b80cf Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")
This shows the text as part of the assertion message.
2021-07-15 18:29:01 +10:00
Sergey Sharybin
1b4f0bf32a Fix T87989: Crash using OpenCL in compositor
Initial report was mentioning the Classroom demo scene, but this is
probably because the scene was pre-configured to be used with OpenCL.
Would expect any OpenCL compositing to be failing prior to this fix.

The reason why crash was happening is due to OpenCL queue being
released from OpenCLDevice destructor. Is not that obvious, but
when Vector (including std::vector) is holding elements by value
a destructor will be called on "old" memory when vector capacitance
changes.

Solved by making forbidding copy semantic for compositor devices and
forcing move semantic to be used.

Also use emplace semantic in the devices vector initialization.
2021-05-03 15:07:14 +02:00
Jeroen Bakker
1a7b94236e Compositor: Keep WorkPackages and Data Around.
WorkPackages struct was created when scheduled. This patch keeps the
WorkPackages around and stores additional data with the workpackages.

The speedup is to small to notice, but it is needed as preparation
to introduce a faster scheduling method.
2021-03-31 14:43:14 +02:00
Jeroen Bakker
25c02ea703 Cleanup: Add namespace to compositor. 2021-03-29 08:18:33 +02:00
Jeroen Bakker
0d5cef9898 Cleanup: removed unnecessary allocations. 2021-03-24 14:30:22 +01:00
Jeroen Bakker
a9e64d8613 Cleanup: Use uint8_t for num of channels. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
260e50ed82 Cleanup: Use ref to read from encapsuled data.
MemoryBuffer->getRect was returning a ptr.
2021-03-19 17:11:47 +01:00
Jeroen Bakker
c905dd24b6 Cleanup: Replace ptr with ref (COM_MemoryBuffer). 2021-03-19 17:11:47 +01:00
Jeroen Bakker
1775ea74c1 Cleanup: Change extension .cpp to .cc 2021-03-08 13:41:52 +01:00