You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3148556 on 2016/10/03 by Ben.Marsh
EC: Add settings for building PhysX libs from Dev-Physics.
Change 3148819 on 2016/10/03 by Ori.Cohen
Copying //UE4/Dev-Physics-Upgrade to //UE4/Dev-Physics (Source: //UE4/Dev-Physics-Upgrade @ 3148792)
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3141681 on 2016/09/27 by Ales.Borovicka
[From trunk] 21196241 - [PX-753] Keep kinematics awake for an adidtional frame (now 2 frames) after they've reached their target. This ensures that objects that lost a touch with the moving kinematic are woken correctly. Based on an Epic request. Reviewed by Michelle
p4rmerge of Change 21201351 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21201351.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3141684 on 2016/09/27 by Ales.Borovicka
[From trunk] 21196284 - [3.4 trunk][PX-755] Fixed bug with empty constraint partitions in islands with articulations. It could have previously led to empty batch headers being created containing uninitialized garbage memory. Addresses bug reported by Square Enix. Reviewed by Michelle.
p4rmerge of Change 21201352 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21201352.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3141686 on 2016/09/27 by Ales.Borovicka
[From trunk] 21196768 - [PX-754] Adaptive force now uses the correct counter (the number of touching interactions, rather than total number of interactions). Removed "numUniqueInteractions" and doubled up the usage of "numBodyInteractions" to conditionally either produce the number of touching interactions or the number of unique body-body interactions affecting a given body, depending on whether adaptive force or stabilization are in use. NumBodyInteractions is only used if one or the other is in use. Reviewed by Michelle
p4rmerge of Change 21201353 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21201353.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3141687 on 2016/09/27 by Ales.Borovicka
[From trunk] 21196787 - Missing file from last submission.
p4rmerge of Change 21201354 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21201354.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3141689 on 2016/09/27 by Ales.Borovicka
[From trunk] 21201177 - PX-756 - Investigate assert in MBP
Review: Kier
So what's going on?
?
We add some objects to a region:
MBP_Index Region::addObject(const MBP_AABB& bounds, MBP_Handle mbpHandle, bool isStatic)
We hit the normal codepath so basically just:
MBP_Index handle;
handle = MBP_Index(mNbObjects);
mNbObjects++;
And:
PxU32 boxIndex;
boxIndex = mNbDynamicBoxes++;
mDynamicBoxes[boxIndex] = bounds;
mInToOut_Dynamic[boxIndex] = handle;
And:
mObjects[handle].mIndex = boxIndex;
mObjects[handle].mMBPHandle = mbpHandle;
return handle;
So we return 'handle', which is a const for the lifetime of this object, so it is always going to index the same position in mObjects.
In particular if we add 8 objects (mNbObjects==8), mObjects[7] is a valid entry.
?
Then we release object 3. In the following function, 'handle'==3. Note the assert against mMaxNbObjects there:
void Region::removeObject(MBP_Index handle)
{
PX_ASSERT(handle<mMaxNbObjects);
MBPEntry& object = mObjects[handle];
/const/ PxU32 removedBoxIndex = object.mIndex; <==== 3
MBP_Index* PX_RESTRICT mapping;
MBP_AABB* PX_RESTRICT boxes;
PxU32 lastIndex;
PxU32 maxNbBoxes;
if(!object.isStatic())
{
mPrevNbUpdatedBoxes = 0;
mNeedsSortingSleeping = true;
PX_ASSERT(mInToOut_Dynamic[removedBoxIndex]==handle);
const bool isUpdated = removedBoxIndex<mNbUpdatedBoxes;
PX_ASSERT(isUpdated==object.mUpdated);
if(isUpdated)
{ ... }
mapping = mInToOut_Dynamic;
boxes = mDynamicBoxes;
lastIndex = --mNbDynamicBoxes; <==== 8 goes to 7
maxNbBoxes = mMaxNbDynamicBoxes;
}
else
{ ... }
remove(mObjects, mapping, boxes, removedBoxIndex, lastIndex);
...
object.mIndex = mFirstFree;
object.mMBPHandle = INVALID_ID;
mFirstFree = handle;
mNbObjects--;
...
}
Which calls this with 'removedBoxIndex'==3, 'lastIndex'==7:
static PX_FORCE_INLINE void remove(MBPEntry* PX_RESTRICT objects, MBP_Index* PX_RESTRICT mapping, MBP_AABB* PX_RESTRICT boxes, PxU32 removedBoxIndex, PxU32 lastIndex)
{ const PxU32 movedBoxHandle = mapping[lastIndex]; boxes[removedBoxIndex] = boxes[lastIndex]; // Relocate box data mapping[removedBoxIndex] = MBP_Index(movedBoxHandle); // Relocate mapping data MBPEntry& movedObject = objects[movedBoxHandle]; PX_ASSERT(movedObject.mIndex==lastIndex); // Checks index of moved box was indeed its old location movedObject.mIndex = removedBoxIndex; // Adjust index of moved box to reflect its new location }
=> so we update the mIndex of movedObject, but the moved object's position (movedBoxHandle==7) remains valid. We don't actually move the object within mObjects. This makes sense since it's indexed by const handles sent to the higher level MBP class.
So mNbObjects is decreased, but mObjects[7] remains valid. Just before returning it has an mIndex of 3 and an mMBPHandle of 28.
?
Then we shift the origin. We end up with:
const PxU32 nbObjects = mMBP_Objects.size();
MBP_Object* objects = mMBP_Objects.begin();
With 'nbObjects'==8. We crash at i==7, i.e. on the last object.
If we access the supposedly invalid object it has an mIndex of 6 and an mMBPHandle of 28. Which is valid.
In other words, the assert is wrong.
p4rmerge of Change 21201358 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21201358.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3142216 on 2016/09/27 by Dmitry.Rekman
Do not link to APEX_Loader (UE-24918).
#tests Compiled and ran Linux and Mac editors.
Change 3143844 on 2016/09/28 by Ori.Cohen
Remove UPROPERTY on aggregate threshold which is always read from the physics settings.
Change 3145276 on 2016/09/29 by Ori.Cohen
Workaround for physx refilter not working on aggregates. Use supress for everything for now. Fixes ragdolls falling through BSP.
#JIRA UE-UE-36598
Change 3145597 on 2016/09/29 by Dmitry.Rekman
PhysX: fix native compilation.
- Fix a case-sensitivity error.
- Allow native architecture.
Change 3146338 on 2016/09/30 by Ales.Borovicka
[From trunk] 21214360 - increased significantly tolerance in quickhullgen to refuse newly added points, the tolerance is still better than legacy inflation hull
p4rmerge of Change 21214366 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21214366.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3146720 on 2016/09/30 by Dmitry.Rekman
PhysX: Remove restrict from memMove.
- Also optimize to -O3 and not -O2 to match other platforms.
Change 3146771 on 2016/09/30 by Ales.Borovicka
[From trunk] 21214415 - [PX-761]Divide by zero in segment-triangle distance function [Reviewer: Pierre]
p4rmerge of Change 21215656 by aborovicka
from w:\physx\sw\physx\Releases\distro_mirrors\PhysX_3.4_APEX_1.4_Epic_scripts\patch/cl-21215656.p4r
moved from //sw/physx/Releases/distro_mirrors/PhysX_3.4_APEX_1.4_Epic/ to //UE4/Dev-Physics-Upgrade/Engine/Source/ThirdParty/PhysX/
Change 3147891 on 2016/10/01 by Nick.Shin
cleanup - removing old HTML5 PhysX libs
Change 3147892 on 2016/10/01 by Nick.Shin
library postfix name fixups
compiler errors fixup - HOWEVER, this will also require a new emscripten toolchain - TBD
in the meantime will continue to hunt for a solution to the "zext <4 x i1> %300 to <4 x i32>" error while using the current emsdk toolchain
#code.review ori.cohen josh.adams
Change 3148516 on 2016/10/03 by Thomas.Sarkanen
Merging //UE4/Dev-Physics to Dev-Physics-Upgrade (//UE4/Dev-Physics-Upgrade)
[CL 3148839 by Ori Cohen in Main branch]