Merge branch 'master' of https://gitlab.flaxengine.com/flax/flaxengine
This commit is contained in:
BIN
Content/Editor/Particles/Smoke.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Smoke.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Particles/Sparks.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Sparks.flax
(Stored with Git LFS)
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
"Major": 1,
|
||||
"Minor": 7,
|
||||
"Revision": 0,
|
||||
"Build": 6403
|
||||
"Build": 6404
|
||||
},
|
||||
"Company": "Flax",
|
||||
"Copyright": "Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.",
|
||||
|
||||
@@ -82,7 +82,6 @@ public:
|
||||
|
||||
private:
|
||||
int32 _elementsCount = 0;
|
||||
int32 _deletedCount = 0;
|
||||
int32 _size = 0;
|
||||
AllocationData _allocation;
|
||||
|
||||
@@ -109,14 +108,11 @@ public:
|
||||
/// <param name="other">The other collection to move.</param>
|
||||
HashSet(HashSet&& other) noexcept
|
||||
: _elementsCount(other._elementsCount)
|
||||
, _deletedCount(other._deletedCount)
|
||||
, _size(other._size)
|
||||
{
|
||||
_elementsCount = other._elementsCount;
|
||||
_deletedCount = other._deletedCount;
|
||||
_size = other._size;
|
||||
other._elementsCount = 0;
|
||||
other._deletedCount = 0;
|
||||
other._size = 0;
|
||||
_allocation.Swap(other._allocation);
|
||||
}
|
||||
@@ -154,10 +150,8 @@ public:
|
||||
Clear();
|
||||
_allocation.Free();
|
||||
_elementsCount = other._elementsCount;
|
||||
_deletedCount = other._deletedCount;
|
||||
_size = other._size;
|
||||
other._elementsCount = 0;
|
||||
other._deletedCount = 0;
|
||||
other._size = 0;
|
||||
_allocation.Swap(other._allocation);
|
||||
}
|
||||
@@ -337,12 +331,12 @@ public:
|
||||
/// </summary>
|
||||
void Clear()
|
||||
{
|
||||
if (_elementsCount + _deletedCount != 0)
|
||||
if (_elementsCount != 0)
|
||||
{
|
||||
Bucket* data = _allocation.Get();
|
||||
for (int32 i = 0; i < _size; i++)
|
||||
data[i].Free();
|
||||
_elementsCount = _deletedCount = 0;
|
||||
_elementsCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +371,7 @@ public:
|
||||
oldAllocation.Swap(_allocation);
|
||||
const int32 oldSize = _size;
|
||||
const int32 oldElementsCount = _elementsCount;
|
||||
_deletedCount = _elementsCount = 0;
|
||||
_elementsCount = 0;
|
||||
if (capacity != 0 && (capacity & (capacity - 1)) != 0)
|
||||
{
|
||||
// Align capacity value to the next power of two (http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2)
|
||||
@@ -439,7 +433,7 @@ public:
|
||||
bool Add(const ItemType& item)
|
||||
{
|
||||
// Ensure to have enough memory for the next item (in case of new element insertion)
|
||||
EnsureCapacity(_elementsCount + _deletedCount + 1);
|
||||
EnsureCapacity(_elementsCount + 1);
|
||||
|
||||
// Find location of the item or place to insert it
|
||||
FindPositionResult pos;
|
||||
@@ -485,7 +479,6 @@ public:
|
||||
{
|
||||
_allocation.Get()[pos.ObjectIndex].Delete();
|
||||
_elementsCount--;
|
||||
_deletedCount++;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -504,7 +497,6 @@ public:
|
||||
ASSERT(_allocation.Get()[i._index].IsOccupied());
|
||||
_allocation.Get()[i._index].Delete();
|
||||
_elementsCount--;
|
||||
_deletedCount++;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -39,7 +39,7 @@ PrefabManagerService PrefabManagerServiceInstance;
|
||||
Actor* PrefabManager::SpawnPrefab(Prefab* prefab)
|
||||
{
|
||||
Actor* parent = Level::Scenes.Count() != 0 ? Level::Scenes.Get()[0] : nullptr;
|
||||
return SpawnPrefab(prefab, Transform::Identity, parent, nullptr);
|
||||
return SpawnPrefab(prefab, Transform(Vector3::Minimum), parent, nullptr);
|
||||
}
|
||||
|
||||
Actor* PrefabManager::SpawnPrefab(Prefab* prefab, const Vector3& position)
|
||||
@@ -73,12 +73,12 @@ Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, const Transform
|
||||
|
||||
Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent)
|
||||
{
|
||||
return SpawnPrefab(prefab, Transform::Identity, parent, nullptr);
|
||||
return SpawnPrefab(prefab, Transform(Vector3::Minimum), parent, nullptr);
|
||||
}
|
||||
|
||||
Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary<Guid, const void*>* objectsCache, bool withSynchronization)
|
||||
{
|
||||
return SpawnPrefab(prefab, Transform::Identity, parent, objectsCache, withSynchronization);
|
||||
return SpawnPrefab(prefab, Transform(Vector3::Minimum), parent, objectsCache, withSynchronization);
|
||||
}
|
||||
|
||||
Actor* PrefabManager::SpawnPrefab(Prefab* prefab, const Transform& transform, Actor* parent, Dictionary<Guid, const void*>* objectsCache, bool withSynchronization)
|
||||
@@ -191,7 +191,7 @@ Actor* PrefabManager::SpawnPrefab(Prefab* prefab, const Transform& transform, Ac
|
||||
parent->Children.Add(root);
|
||||
|
||||
// Move root to the right location
|
||||
if (transform != Transform::Identity)
|
||||
if (transform.Translation != Vector3::Minimum)
|
||||
root->SetTransform(transform);
|
||||
|
||||
// Link actors hierarchy
|
||||
|
||||
@@ -1334,7 +1334,8 @@ void ParticlesSystem::Job(int32 index)
|
||||
auto emitter = particleSystem->Emitters[track.AsEmitter.Index].Get();
|
||||
auto& data = instance.Emitters[track.AsEmitter.Index];
|
||||
ASSERT(emitter && emitter->IsLoaded());
|
||||
ASSERT(emitter->Capacity != 0 && emitter->Graph.Layout.Size != 0);
|
||||
if (emitter->Capacity == 0 || emitter->Graph.Layout.Size == 0)
|
||||
continue;
|
||||
PROFILE_CPU_ASSET(emitter);
|
||||
|
||||
// Calculate new time position
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "PhysicsColliderActor.h"
|
||||
#include "Engine/Scripting/Script.h"
|
||||
#include "RigidBody.h"
|
||||
|
||||
PhysicsColliderActor::PhysicsColliderActor(const SpawnParams& params)
|
||||
|
||||
@@ -117,9 +117,7 @@ void SimulationEventCallback::onContact(const PxContactPairHeader& pairHeader, c
|
||||
{
|
||||
// Skip sending events to removed actors
|
||||
if (pairHeader.flags & (PxContactPairHeaderFlag::eREMOVED_ACTOR_0 | PxContactPairHeaderFlag::eREMOVED_ACTOR_1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Collision c;
|
||||
PxContactPairExtraDataIterator j(pairHeader.extraDataStream, pairHeader.extraDataStreamSize);
|
||||
@@ -193,7 +191,7 @@ void SimulationEventCallback::onContact(const PxContactPairHeader& pairHeader, c
|
||||
RemovedCollisions.Add(c);
|
||||
}
|
||||
}
|
||||
ASSERT(!j.nextItemSet());
|
||||
//ASSERT(!j.nextItemSet());
|
||||
}
|
||||
|
||||
void SimulationEventCallback::onTrigger(PxTriggerPair* pairs, PxU32 count)
|
||||
|
||||
@@ -204,7 +204,7 @@ void DepthOfFieldPass::Render(RenderContext& renderContext, GPUTexture*& frame,
|
||||
{
|
||||
DepthOfFieldSettings& dofSettings = renderContext.List->Settings.DepthOfField;
|
||||
const bool useDoF = EnumHasAnyFlags(renderContext.View.Flags, ViewFlags::DepthOfField) && dofSettings.Enabled;
|
||||
if (!useDoF || _platformSupportsDoF || checkIfSkipPass())
|
||||
if (!useDoF || !_platformSupportsDoF || checkIfSkipPass())
|
||||
return;
|
||||
auto device = GPUDevice::Instance;
|
||||
auto context = device->GetMainContext();
|
||||
|
||||
9
Source/ThirdParty/volk/volk.Build.cs
vendored
9
Source/ThirdParty/volk/volk.Build.cs
vendored
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Flax.Build;
|
||||
using Flax.Build.NativeCpp;
|
||||
@@ -62,4 +63,12 @@ public class volk : ThirdPartyModule
|
||||
Log.ErrorOnce("Missing VulkanSDK.", ref _missingSDKError);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void GetFilesToDeploy(List<string> files)
|
||||
{
|
||||
base.GetFilesToDeploy(files);
|
||||
|
||||
files.Add(Path.Combine(FolderPath, "volk.h"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user