1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 17:49:55 +00:00
openmw-tes3mp/components/nif
scrawl 115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
2017-01-19 22:23:41 +01:00
..
base.hpp NIF reader cleanup: move definitions to cpp file 2015-02-22 19:17:28 +01:00
controlled.cpp Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
controlled.hpp Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
controller.cpp Implement planar collider for particles (Fixes #2149) 2015-03-25 04:57:01 +01:00
controller.hpp Implement planar collider for particles (Fixes #2149) 2015-03-25 04:57:01 +01:00
data.cpp Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580) 2017-01-19 22:23:41 +01:00
data.hpp Fully read NiPixelData 2016-02-18 19:37:56 +01:00
effect.cpp Implement support for sphere map NiTextureEffects (Fixes #1827) 2016-02-24 21:06:41 +01:00
effect.hpp Implement support for sphere map NiTextureEffects (Fixes #1827) 2016-02-24 21:06:41 +01:00
extra.cpp Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers. 2015-02-23 21:06:10 +01:00
extra.hpp NIF reader cleanup: move definitions to cpp file 2015-02-22 19:17:28 +01:00
niffile.cpp Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
niffile.hpp Make NIFFilePtr const 2016-07-10 17:10:19 +02:00
nifkey.hpp Don't read forward/backward values for Quaternion key lists 2015-12-04 00:18:54 +01:00
nifstream.cpp Remove redundant allocations for NIF meshes 2015-06-18 01:26:45 +02:00
nifstream.hpp Remove redundant allocations for NIF meshes 2015-06-18 01:26:45 +02:00
niftypes.hpp Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform 2015-06-15 02:06:04 +02:00
node.cpp Merge branch 'master' of https://github.com/OpenMW/openmw into osg 2015-03-27 17:30:48 +01:00
node.hpp Do not discard root node transformations if the root node is named 'bip01' (Bug #3118) 2016-01-02 01:30:06 +01:00
property.cpp Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers. 2015-02-23 21:06:10 +01:00
property.hpp Fully implement NiStencilProperty (Feature #1057) 2015-03-24 23:05:20 +01:00
record.hpp Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
recordptr.hpp fixed warning C4099: 2015-03-06 21:36:42 +13:00