Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Materials #79

Merged
merged 14 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "Decentraland.Protocol.GeneratedCode",
"rootNamespace": "",
"references": [
"GUID:32414f40c5c02494097836a15ff47eac",
"GUID:f51ebe6a0ceec4240a699833d6309b23"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"Google.Protobuf.dll",
"Google.Api.CommonProtos.dll"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"name": "Decentraland.Protocol.GeneratedCode",
"rootNamespace": "",
"references": [
"GUID:f51ebe6a0ceec4240a699833d6309b23"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"Google.Protobuf.dll",
"Google.Api.CommonProtos.dll"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 4 additions & 3 deletions Explorer/Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ MonoBehaviour:
sceneLauncher:
ui: {fileID: 2137356831}
scenes:
- cube_waves
- cube_wave_v2
- cube_waves_primitives
- cube-wave-16x16
- cube-wave-v2
- Smoke
- primitives-wave
--- !u!1 &705507993
GameObject:
m_ObjectHideFlags: 0
Expand Down
6 changes: 3 additions & 3 deletions Explorer/Assets/Scripts/CRDT/CRDTTests/CRDTTests.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "CRDTTests",
"rootNamespace": "",
"references": [
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"CRDT"
"GUID:27619889b8ba8c24980f49ee34dbb44a",
"GUID:0acc523941302664db1f4e527237feb3",
"GUID:0f4c0f120707fb74497f5d581b9858f8"
],
"includePlatforms": [
"Editor"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"reference": "GUID:49a1704285e9ee043a0c6d7d13fdd6db"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 36 additions & 34 deletions Explorer/Assets/Scripts/CRDT/Memory/Tests/MemoryAllocatorShould.cs
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
using CRDT.Memory;
using NUnit.Framework;
using System;
using System.Buffers;
using UnityEngine.Profiling;

public class MemoryAllocatorShould
namespace CRDT.Memory.Tests
{
[TestCase(1000)]
[TestCase(10000)]
[TestCase(100000)]
public void PoolNotAllocating(int arraySize)
public class MemoryAllocatorShould
{
var crdtPooledMemoryAllocator = CRDTPooledMemoryAllocator.Create();
[TestCase(1000)]
[TestCase(10000)]
[TestCase(100000)]
public void PoolNotAllocating(int arraySize)
{
var crdtPooledMemoryAllocator = CRDTPooledMemoryAllocator.Create();

var data = new byte[arraySize];
var random = new Random();
random.NextBytes(data);
IMemoryOwner<byte> allocation = crdtPooledMemoryAllocator.GetMemoryBuffer(data);
var data = new byte[arraySize];
var random = new Random();
random.NextBytes(data);
IMemoryOwner<byte> allocation = crdtPooledMemoryAllocator.GetMemoryBuffer(data);

for (var i = 0; i < 100; i++)
{
Profiler.BeginSample($"Debug: CRDT Pooled Memory {arraySize}");
allocation.Dispose();
allocation = crdtPooledMemoryAllocator.GetMemoryBuffer(data);
Profiler.EndSample();
for (var i = 0; i < 100; i++)
{
Profiler.BeginSample($"Debug: CRDT Pooled Memory {arraySize}");
allocation.Dispose();
allocation = crdtPooledMemoryAllocator.GetMemoryBuffer(data);
Profiler.EndSample();
}
}
}

[TestCase(1000)]
[TestCase(10000)]
[TestCase(100000)]
public void OriginalMemorySlicerAllocating(int arraySize)
{
var originalMemorySlicer = CRDTOriginalMemorySlicer.Create();
var data = new byte[arraySize];
var random = new Random();
random.NextBytes(data);
IMemoryOwner<byte> allocation = originalMemorySlicer.GetMemoryBuffer(data);

for (var i = 0; i < 100; i++)
[TestCase(1000)]
[TestCase(10000)]
[TestCase(100000)]
public void OriginalMemorySlicerAllocating(int arraySize)
{
Profiler.BeginSample($"Debug: CRDT Memory Slicer {arraySize}");
allocation.Dispose();
allocation = originalMemorySlicer.GetMemoryBuffer(data);
Profiler.EndSample();
var originalMemorySlicer = CRDTOriginalMemorySlicer.Create();
var data = new byte[arraySize];
var random = new Random();
random.NextBytes(data);
IMemoryOwner<byte> allocation = originalMemorySlicer.GetMemoryBuffer(data);

for (var i = 0; i < 100; i++)
{
Profiler.BeginSample($"Debug: CRDT Memory Slicer {arraySize}");
allocation.Dispose();
allocation = originalMemorySlicer.GetMemoryBuffer(data);
Profiler.EndSample();
}
}
}
}

This file was deleted.

10 changes: 10 additions & 0 deletions Explorer/Assets/Scripts/CrdtEcsBridge/CRDT.ECS.Bridge.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "CRDT.ECS.Bridge",
"references": [
"GUID:0f4c0f120707fb74497f5d581b9858f8",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:6e2b4bed29ad1c549ab19b744f36f388",
"GUID:83cc766db25f4a84b0fdfaf8a091122d",
"GUID:3c7b57a14671040bd8c549056adc04f5"
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"reference": "GUID:0f97099b5ec951d49873af5ee593b2c0"
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"reference": "GUID:0f97099b5ec951d49873af5ee593b2c0"
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"name": "EngineImplementation",
"rootNamespace": "",
"references": [
"GUID:0b3eab7834a09c24ca4e84fe0d8a43ce",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:0f4c0f120707fb74497f5d581b9858f8",
"GUID:96825943f4e14954b5172da80fdee63d",
"GUID:40fef18dccdc4e119f7635452380fe9f",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:f46e65eba0ab46d084015ff77e7e2ad5"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"name": "EngineImplementation",
"rootNamespace": "",
"references": [
"GUID:0b3eab7834a09c24ca4e84fe0d8a43ce",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:0f4c0f120707fb74497f5d581b9858f8",
"GUID:96825943f4e14954b5172da80fdee63d",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:d414ef88f3b15f746a4b97636b50dfb4"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
Loading