-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on arch, added jolt and entt
- Loading branch information
Nikita Krupitskas
committed
Aug 13, 2024
1 parent
fa4f7f1
commit 5f73ac7
Showing
33 changed files
with
379 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#pragma once | ||
#include "Material.hpp" | ||
|
||
namespace ysn | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,7 @@ | |
|
||
namespace ysn | ||
{ | ||
|
||
class Material | ||
{ | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
#include "Mesh.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#pragma once | ||
|
||
class Mesh | ||
namespace ysn | ||
{ | ||
}; | ||
class Mesh | ||
{ | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "ColorBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class ColorBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "DepthBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class DepthBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "GpuBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
|
||
class GpuBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
wil::com_ptr<ID3D12Resource> m_resource; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "GpuReadbackBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class GpuReadbackBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class GpuResource | ||
{ | ||
public: | ||
|
||
private: | ||
wil::com_ptr<ID3D12Resource> m_resource; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "GpuUploadBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class GpuUploadBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "PixelBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class PixelBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "RootSignature.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
|
||
namespace ysn | ||
{ | ||
class RootSignature | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "ShadowBuffer.hpp" | ||
|
||
namespace ysn | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <d3dx12.h> | ||
#include <wil/com.h> | ||
|
||
namespace ysn | ||
{ | ||
class ShadowBuffer | ||
{ | ||
public: | ||
|
||
private: | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#pragma once | ||
|
||
#include <System/Math.hpp> | ||
|
||
// This requires SSE4.2 which is present on Intel Nehalem (Nov. 2008) | ||
// and AMD Bulldozer (Oct. 2011) processors. I could put a runtime | ||
// check for this, but I'm just going to assume people playing with | ||
// DirectX 12 on Windows 10 have fairly recent machines. | ||
#ifdef _M_X64 | ||
#define ENABLE_SSE_CRC32 1 | ||
#else | ||
#define ENABLE_SSE_CRC32 0 | ||
#endif | ||
|
||
#if ENABLE_SSE_CRC32 | ||
#pragma intrinsic(_mm_crc32_u32) | ||
#pragma intrinsic(_mm_crc32_u64) | ||
#endif | ||
|
||
namespace ysn | ||
{ | ||
inline size_t HashRange(const uint32_t* const Begin, const uint32_t* const End, size_t Hash) | ||
{ | ||
#if ENABLE_SSE_CRC32 | ||
const uint64_t* Iter64 = (const uint64_t*)AlignUp(Begin, 8); | ||
const uint64_t* const End64 = (const uint64_t* const)AlignDown(End, 8); | ||
|
||
// If not 64-bit aligned, start with a single u32 | ||
if ((uint32_t*)Iter64 > Begin) | ||
Hash = _mm_crc32_u32((uint32_t)Hash, *Begin); | ||
|
||
// Iterate over consecutive u64 values | ||
while (Iter64 < End64) | ||
Hash = _mm_crc32_u64((uint64_t)Hash, *Iter64++); | ||
|
||
// If there is a 32-bit remainder, accumulate that | ||
if ((uint32_t*)Iter64 < End) | ||
Hash = _mm_crc32_u32((uint32_t)Hash, *(uint32_t*)Iter64); | ||
#else | ||
// An inexpensive hash for CPUs lacking SSE4.2 | ||
for (const uint32_t* Iter = Begin; Iter < End; ++Iter) | ||
Hash = 16777619U * Hash ^ *Iter; | ||
#endif | ||
|
||
return Hash; | ||
} | ||
|
||
template <typename T> inline size_t HashState( const T* StateDesc, size_t Count = 1, size_t Hash = 2166136261U ) | ||
{ | ||
static_assert((sizeof(T) & 3) == 0 && alignof(T) >= 4, "State object is not word-aligned"); | ||
return HashRange((uint32_t*)StateDesc, (uint32_t*)(StateDesc + Count), Hash); | ||
} | ||
} |
Oops, something went wrong.