You've already forked aurora
mirror of
https://github.com/CraftyBoss/aurora.git
synced 2026-07-14 05:07:24 -07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
ColumnLimit: 120
|
||||
UseTab: Never
|
||||
TabWidth: 2
|
||||
---
|
||||
Language: Cpp
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
IndentCaseLabels: false
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
Cpp11BracedListStyle: true
|
||||
NamespaceIndentation: None
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
SortIncludes: false
|
||||
AccessModifierOffset: -2
|
||||
ConstructorInitializerIndentWidth: 0
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
@@ -0,0 +1,8 @@
|
||||
.buildcache/
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vs/
|
||||
build/
|
||||
cmake-build-*/
|
||||
CMakeUserPresets.json
|
||||
out/
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
[submodule "extern/dawn"]
|
||||
path = extern/dawn
|
||||
url = https://github.com/encounter/dawn-cmake.git
|
||||
[submodule "extern/SDL"]
|
||||
path = extern/SDL
|
||||
url = https://github.com/encounter/SDL.git
|
||||
branch = merged
|
||||
[submodule "extern/imgui"]
|
||||
path = extern/imgui
|
||||
url = https://github.com/ocornut/imgui.git
|
||||
[submodule "extern/fmt"]
|
||||
path = extern/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
@@ -0,0 +1,86 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(aurora LANGUAGES C CXX)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
option(AURORA_NATIVE_MATRIX "Assume OpenGL-layout matrices, disables transposing" OFF)
|
||||
|
||||
add_subdirectory(extern)
|
||||
add_library(aurora STATIC
|
||||
lib/aurora.cpp
|
||||
lib/webgpu/gpu.cpp
|
||||
lib/imgui.cpp
|
||||
lib/input.cpp
|
||||
lib/window.cpp
|
||||
lib/dawn/BackendBinding.cpp
|
||||
lib/gfx/common.cpp
|
||||
lib/gfx/texture.cpp
|
||||
lib/gfx/gx.cpp
|
||||
lib/gfx/gx_shader.cpp
|
||||
lib/gfx/texture_convert.cpp
|
||||
lib/gfx/stream/shader.cpp
|
||||
lib/gfx/model/shader.cpp
|
||||
lib/dolphin/GXBump.cpp
|
||||
lib/dolphin/GXCull.cpp
|
||||
lib/dolphin/GXDispList.cpp
|
||||
lib/dolphin/GXDraw.cpp
|
||||
lib/dolphin/GXExtra.cpp
|
||||
lib/dolphin/GXFifo.cpp
|
||||
lib/dolphin/GXFrameBuffer.cpp
|
||||
lib/dolphin/GXGeometry.cpp
|
||||
lib/dolphin/GXGet.cpp
|
||||
lib/dolphin/GXLighting.cpp
|
||||
lib/dolphin/GXManage.cpp
|
||||
lib/dolphin/GXPerf.cpp
|
||||
lib/dolphin/GXPixel.cpp
|
||||
lib/dolphin/GXTev.cpp
|
||||
lib/dolphin/GXTexture.cpp
|
||||
lib/dolphin/GXTransform.cpp
|
||||
lib/dolphin/GXVert.cpp
|
||||
lib/dolphin/vi.cpp
|
||||
)
|
||||
add_library(aurora::aurora ALIAS aurora)
|
||||
target_compile_definitions(aurora PUBLIC AURORA TARGET_PC)
|
||||
if (AURORA_NATIVE_MATRIX)
|
||||
target_compile_definitions(aurora PRIVATE AURORA_NATIVE_MATRIX)
|
||||
endif ()
|
||||
target_include_directories(aurora PUBLIC include)
|
||||
target_include_directories(aurora PRIVATE ../imgui)
|
||||
if (NOT TARGET SDL2::SDL2-static)
|
||||
find_package(SDL2 REQUIRED)
|
||||
endif ()
|
||||
target_link_libraries(aurora PUBLIC SDL2::SDL2-static fmt::fmt imgui xxhash)
|
||||
target_link_libraries(aurora PRIVATE dawn_native dawncpp webgpu_dawn absl::btree absl::flat_hash_map)
|
||||
if (DAWN_ENABLE_VULKAN)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_VULKAN)
|
||||
target_sources(aurora PRIVATE lib/dawn/VulkanBinding.cpp)
|
||||
endif ()
|
||||
if (DAWN_ENABLE_METAL)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_METAL)
|
||||
target_sources(aurora PRIVATE lib/dawn/MetalBinding.mm)
|
||||
set_source_files_properties(lib/dawn/MetalBinding.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
endif ()
|
||||
if (DAWN_ENABLE_D3D12)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_D3D12)
|
||||
target_sources(aurora PRIVATE lib/dawn/D3D12Binding.cpp)
|
||||
endif ()
|
||||
if (DAWN_ENABLE_DESKTOP_GL OR DAWN_ENABLE_OPENGLES)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_OPENGL)
|
||||
if (DAWN_ENABLE_DESKTOP_GL)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_DESKTOP_GL)
|
||||
endif ()
|
||||
if (DAWN_ENABLE_OPENGLES)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_OPENGLES)
|
||||
endif ()
|
||||
target_sources(aurora PRIVATE lib/dawn/OpenGLBinding.cpp)
|
||||
endif ()
|
||||
if (DAWN_ENABLE_NULL)
|
||||
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_NULL)
|
||||
target_sources(aurora PRIVATE lib/dawn/NullBinding.cpp)
|
||||
endif ()
|
||||
|
||||
# Optional
|
||||
add_library(aurora_main STATIC lib/main.cpp)
|
||||
target_include_directories(aurora_main PUBLIC include)
|
||||
target_link_libraries(aurora_main PUBLIC SDL2::SDL2main)
|
||||
add_library(aurora::main ALIAS aurora_main)
|
||||
@@ -0,0 +1,266 @@
|
||||
# GX API Support
|
||||
|
||||
- GXBump
|
||||
- [x] GXSetNumIndStages
|
||||
- [x] GXSetIndTexOrder
|
||||
- [x] GXSetIndTexCoordScale
|
||||
- [x] GXSetIndTexMtx
|
||||
- [x] GXSetTevIndirect
|
||||
- [x] GXSetTevDirect
|
||||
- [x] GXSetTevIndWarp
|
||||
- [ ] GXSetTevIndTile
|
||||
- [ ] GXSetTevIndBumpST
|
||||
- [ ] GXSetTevIndBumpXYZ
|
||||
- [ ] GXSetTevIndRepeat
|
||||
- GXCull
|
||||
- [x] GXSetScissor
|
||||
- [x] GXSetCullMode
|
||||
- [ ] GXSetCoPlanar
|
||||
- GXDispList
|
||||
- [x] GXBeginDisplayList (stub)
|
||||
- [x] GXEndDisplayList (stub)
|
||||
- [x] GXCallDisplayList
|
||||
- GXDraw
|
||||
- [ ] GXDrawCylinder
|
||||
- [ ] GXDrawTorus
|
||||
- [ ] GXDrawSphere
|
||||
- [ ] GXDrawCube
|
||||
- [ ] GXDrawDodeca
|
||||
- [ ] GXDrawOctahedron
|
||||
- [ ] GXDrawIcosahedron
|
||||
- [ ] GXDrawSphere1
|
||||
- [ ] GXGenNormalTable
|
||||
- GXFifo
|
||||
- [x] GXGetGPStatus (stub)
|
||||
- [ ] GXGetFifoStatus
|
||||
- [x] GXGetFifoPtrs (stub)
|
||||
- [x] GXGetCPUFifo (stub)
|
||||
- [x] GXGetGPFifo (stub)
|
||||
- [ ] GXGetFifoBase
|
||||
- [ ] GXGetFifoSize
|
||||
- [ ] GXGetFifoLimits
|
||||
- [ ] GXSetBreakPtCallback
|
||||
- [ ] GXEnableBreakPt
|
||||
- [ ] GXDisableBreakPt
|
||||
- [x] GXInitFifoBase (stub)
|
||||
- [x] GXInitFifoPtrs (stub)
|
||||
- [ ] GXInitFifoLimits
|
||||
- [x] GXSetCPUFifo (stub)
|
||||
- [x] GXSetGPFifo (stub)
|
||||
- [x] GXSaveCPUFifo (stub)
|
||||
- [ ] GXSaveGPFifo
|
||||
- [ ] GXRedirectWriteGatherPipe
|
||||
- [ ] GXRestoreWriteGatherPipe
|
||||
- [ ] GXSetCurrentGXThread
|
||||
- [ ] GXGetCurrentGXThread
|
||||
- [ ] GXGetOverflowCount
|
||||
- [ ] GXResetOverflowCount
|
||||
- GXFrameBuffer
|
||||
- [x] GXAdjustForOverscan
|
||||
- [x] GXSetDispCopySrc (stub)
|
||||
- [x] GXSetTexCopySrc
|
||||
- [x] GXSetDispCopyDst (stub)
|
||||
- [x] GXSetTexCopyDst
|
||||
- [ ] GXSetDispCopyFrame2Field
|
||||
- [ ] GXSetCopyClamp
|
||||
- [x] GXSetDispCopyYScale (stub)
|
||||
- [x] GXSetCopyClear
|
||||
- [x] GXSetCopyFilter (stub)
|
||||
- [x] GXSetDispCopyGamma (stub)
|
||||
- [x] GXCopyDisp (stub)
|
||||
- [x] GXCopyTex
|
||||
- [ ] GXGetYScaleFactor
|
||||
- [ ] GXGetNumXfbLines
|
||||
- [ ] GXClearBoundingBox
|
||||
- [ ] GXReadBoundingBox
|
||||
- GXGeometry
|
||||
- [x] GXSetVtxDesc
|
||||
- [x] GXSetVtxDescv
|
||||
- [x] GXClearVtxDesc
|
||||
- [x] GXSetVtxAttrFmt
|
||||
- [ ] GXSetVtxAttrFmtv
|
||||
- [x] GXSetArray
|
||||
- [x] GXBegin
|
||||
- [x] GXEnd
|
||||
- [x] GXSetTexCoordGen2
|
||||
- [x] GXSetNumTexGens
|
||||
- [ ] GXInvalidateVtxCache
|
||||
- [ ] GXSetLineWidth
|
||||
- [ ] GXSetPointSize
|
||||
- [ ] GXEnableTexOffsets
|
||||
- GXGet
|
||||
- [ ] GXGetVtxDesc
|
||||
- [ ] GXGetVtxDescv
|
||||
- [ ] GXGetVtxAttrFmtv
|
||||
- [ ] GXGetLineWidth
|
||||
- [ ] GXGetPointSize
|
||||
- [x] GXGetVtxAttrFmt
|
||||
- [ ] GXGetViewportv
|
||||
- [x] GXGetProjectionv
|
||||
- [ ] GXGetScissor
|
||||
- [ ] GXGetCullMode
|
||||
- [x] GXGetLightAttnA
|
||||
- [x] GXGetLightAttnK
|
||||
- [x] GXGetLightPos
|
||||
- [x] GXGetLightDir
|
||||
- [x] GXGetLightColor
|
||||
- [x] GXGetTexObjData
|
||||
- [x] GXGetTexObjWidth
|
||||
- [x] GXGetTexObjHeight
|
||||
- [x] GXGetTexObjFmt
|
||||
- [x] GXGetTexObjWrapS
|
||||
- [x] GXGetTexObjWrapT
|
||||
- [x] GXGetTexObjMipMap
|
||||
- [ ] GXGetTexObjAll
|
||||
- [ ] GXGetTexObjMinFilt
|
||||
- [ ] GXGetTexObjMagFilt
|
||||
- [ ] GXGetTexObjMinLOD
|
||||
- [ ] GXGetTexObjMaxLOD
|
||||
- [ ] GXGetTexObjLODBias
|
||||
- [ ] GXGetTexObjBiasClamp
|
||||
- [ ] GXGetTexObjEdgeLOD
|
||||
- [ ] GXGetTexObjMaxAniso
|
||||
- [ ] GXGetTexObjLODAll
|
||||
- [ ] GXGetTexObjTlut
|
||||
- [ ] GXGetTlutObjData
|
||||
- [ ] GXGetTlutObjFmt
|
||||
- [ ] GXGetTlutObjNumEntries
|
||||
- [ ] GXGetTlutObjAll
|
||||
- [ ] GXGetTexRegionAll
|
||||
- [ ] GXGetTlutRegionAll
|
||||
- GXLighting
|
||||
- [x] GXInitLightAttn
|
||||
- [x] GXInitLightAttnA
|
||||
- [x] GXInitLightAttnK
|
||||
- [x] GXInitLightSpot
|
||||
- [x] GXInitLightDistAttn
|
||||
- [x] GXInitLightPos
|
||||
- [x] GXInitLightColor
|
||||
- [x] GXLoadLightObjImm
|
||||
- [ ] GXLoadLightObjIndx
|
||||
- [x] GXSetChanAmbColor
|
||||
- [x] GXSetChanMatColor
|
||||
- [x] GXSetNumChans
|
||||
- [x] GXInitLightDir
|
||||
- [x] GXInitSpecularDir
|
||||
- [x] GXInitSpecularDirHA
|
||||
- [x] GXSetChanCtrl
|
||||
- GXManage
|
||||
- [x] GXInit (stub)
|
||||
- [ ] GXAbortFrame
|
||||
- [ ] GXSetDrawSync
|
||||
- [ ] GXReadDrawSync
|
||||
- [ ] GXSetDrawSyncCallback
|
||||
- [x] GXDrawDone (stub)
|
||||
- [x] GXSetDrawDone (stub)
|
||||
- [ ] GXWaitDrawDone
|
||||
- [x] GXSetDrawDoneCallback (stub)
|
||||
- [ ] GXSetResetWritePipe
|
||||
- [x] GXFlush (stub)
|
||||
- [ ] GXResetWriteGatherPipe
|
||||
- [x] GXPixModeSync (stub)
|
||||
- [x] GXTexModeSync (stub)
|
||||
- [ ] IsWriteGatherBufferEmpty
|
||||
- [ ] GXSetMisc
|
||||
- GXPerf
|
||||
- [ ] GXSetGPMetric
|
||||
- [ ] GXClearGPMetric
|
||||
- [ ] GXReadGPMetric
|
||||
- [ ] GXReadGP0Metric
|
||||
- [ ] GXReadGP1Metric
|
||||
- [ ] GXReadMemMetric
|
||||
- [ ] GXClearMemMetric
|
||||
- [ ] GXReadPixMetric
|
||||
- [ ] GXClearPixMetric
|
||||
- [ ] GXSetVCacheMetric
|
||||
- [ ] GXReadVCacheMetric
|
||||
- [ ] GXClearVCacheMetric
|
||||
- [ ] GXReadXfRasMetric
|
||||
- [ ] GXInitXfRasMetric
|
||||
- [ ] GXReadClksPerVtx
|
||||
- GXPixel
|
||||
- [x] GXSetFog
|
||||
- [x] GXSetFogColor
|
||||
- [ ] GXInitFogAdjTable
|
||||
- [ ] GXSetFogRangeAdj
|
||||
- [x] GXSetBlendMode
|
||||
- [x] GXSetColorUpdate
|
||||
- [x] GXSetAlphaUpdate
|
||||
- [x] GXSetZMode
|
||||
- [ ] GXSetZCompLoc
|
||||
- [x] GXSetPixelFmt (stub)
|
||||
- [x] GXSetDither (stub)
|
||||
- [x] GXSetDstAlpha
|
||||
- [ ] GXSetFieldMask
|
||||
- [ ] GXSetFieldMode
|
||||
- GXTev
|
||||
- [x] GXSetTevOp
|
||||
- [x] GXSetTevColorIn
|
||||
- [x] GXSetTevAlphaIn
|
||||
- [x] GXSetTevColorOp
|
||||
- [x] GXSetTevAlphaOp
|
||||
- [x] GXSetTevColor
|
||||
- [x] GXSetTevColorS10
|
||||
- [x] GXSetAlphaCompare
|
||||
- [x] GXSetTevOrder
|
||||
- [ ] GXSetZTexture
|
||||
- [x] GXSetNumTevStages
|
||||
- [x] GXSetTevKColor
|
||||
- [x] GXSetTevKColorSel
|
||||
- [x] GXSetTevKAlphaSel
|
||||
- [x] GXSetTevSwapMode
|
||||
- [x] GXSetTevSwapModeTable
|
||||
- GXTexture
|
||||
- [x] GXInitTexObj
|
||||
- [x] GXInitTexObjCI
|
||||
- [x] GXInitTexObjLOD
|
||||
- [x] GXInitTexObjData
|
||||
- [x] GXInitTexObjWrapMode
|
||||
- [x] GXInitTexObjTlut
|
||||
- [ ] GXInitTexObjFilter
|
||||
- [ ] GXInitTexObjMaxLOD
|
||||
- [ ] GXInitTexObjMinLOD
|
||||
- [ ] GXInitTexObjLODBias
|
||||
- [ ] GXInitTexObjBiasClamp
|
||||
- [ ] GXInitTexObjEdgeLOD
|
||||
- [ ] GXInitTexObjMaxAniso
|
||||
- [ ] GXInitTexObjUserData
|
||||
- [ ] GXGetTexObjUserData
|
||||
- [x] GXLoadTexObj
|
||||
- [x] GXGetTexBufferSize
|
||||
- [x] GXInitTlutObj
|
||||
- [x] GXLoadTlut
|
||||
- [ ] GXInitTexCacheRegion
|
||||
- [ ] GXInitTexPreLoadRegion
|
||||
- [ ] GXInitTlutRegion
|
||||
- [ ] GXInvalidateTexRegion
|
||||
- [x] GXInvalidateTexAll (stub)
|
||||
- [ ] GXPreLoadEntireTexture
|
||||
- [ ] GXSetTexRegionCallback
|
||||
- [ ] GXSetTlutRegionCallback
|
||||
- [ ] GXLoadTexObjPreLoaded
|
||||
- [ ] GXSetTexCoordScaleManually
|
||||
- [ ] GXSetTexCoordCylWrap
|
||||
- [ ] GXSetTexCoordBias
|
||||
- GXTransform
|
||||
- [x] GXSetProjection
|
||||
- [ ] GXSetProjectionv
|
||||
- [x] GXLoadPosMtxImm
|
||||
- [ ] GXLoadPosMtxIndx
|
||||
- [x] GXLoadNrmMtxImm
|
||||
- [ ] GXLoadNrmMtxImm3x3
|
||||
- [ ] GXLoadNrmMtxIndx3x3
|
||||
- [x] GXSetCurrentMtx
|
||||
- [x] GXLoadTexMtxImm
|
||||
- [ ] GXLoadTexMtxIndx
|
||||
- [ ] GXProject
|
||||
- [x] GXSetViewport
|
||||
- [x] GXSetViewportJitter
|
||||
- [ ] GXSetZScaleOffset
|
||||
- [ ] GXSetScissorBoxOffset
|
||||
- [ ] GXSetClipMode
|
||||
- GXVert
|
||||
- [x] GXPosition\[n]\[t]
|
||||
- [x] GXNormal\[n]\[t]
|
||||
- [x] GXColor\[n]\[t]
|
||||
- [x] GXTexCoord\[n]\[t]
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2022 Luke Street
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,33 @@
|
||||
# Aurora
|
||||
|
||||
Aurora is a source-level GameCube & Wii compatibility layer intended for use with game reverse engineering projects.
|
||||
|
||||
Originally developed for use in [Metaforce](https://github.com/AxioDL/metaforce), a Metroid Prime reverse engineering
|
||||
project.
|
||||
|
||||
### Features
|
||||
|
||||
- GX compatibility layer
|
||||
- Graphics API support: D3D12, Vulkan, Metal, OpenGL 4.4+ and OpenGL ES 3.1+
|
||||
- *Planned: deko3d backend for Switch*
|
||||
- Application layer using SDL
|
||||
- Runs on Windows, Linux, macOS, iOS, tvOS (Android coming soon)
|
||||
- Audio support with SDL_audio
|
||||
- PAD compatibility layer
|
||||
- Utilizes SDL_GameController for wide controller support, including GameCube controllers.
|
||||
- *Planned: Wii remote support*
|
||||
- [Dear ImGui](https://github.com/ocornut/imgui) built-in for UI
|
||||
|
||||
### GX
|
||||
|
||||
The GX compatibility layer is built on top of [WebGPU](https://www.w3.org/TR/webgpu/), a cross-platform graphics API
|
||||
abstraction layer. WebGPU allows targeting all major platforms simultaneously with minimal overhead.
|
||||
|
||||
Currently, the WebGPU implementation used is Chromium's [Dawn](https://dawn.googlesource.com/dawn/).
|
||||
|
||||
See [GX API support](GX.md) for more information.
|
||||
|
||||
### PAD
|
||||
|
||||
The PAD compatibility layer utilizes SDL_GameController to automatically support & provide mappings for hundreds of
|
||||
controllers across all platforms.
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
set(DAWN_ENABLE_DESKTOP_GL ON CACHE BOOL "Enable compilation of the OpenGL backend" FORCE)
|
||||
endif ()
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
set(DAWN_ENABLE_OPENGLES ON CACHE BOOL "Enable compilation of the OpenGL ES backend" FORCE)
|
||||
endif ()
|
||||
add_subdirectory(dawn EXCLUDE_FROM_ALL)
|
||||
if (DAWN_ENABLE_VULKAN)
|
||||
target_compile_definitions(dawn_native PRIVATE
|
||||
DAWN_ENABLE_VULKAN_VALIDATION_LAYERS
|
||||
DAWN_VK_DATA_DIR="vulkandata")
|
||||
endif ()
|
||||
if (MSVC)
|
||||
target_compile_options(dawn_native PRIVATE /bigobj)
|
||||
else ()
|
||||
target_compile_options(SPIRV-Tools-static PRIVATE -Wno-implicit-fallthrough)
|
||||
target_compile_options(SPIRV-Tools-opt PRIVATE -Wno-implicit-fallthrough)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set(SDL_LIBC ON CACHE BOOL "Use the system C library" FORCE)
|
||||
endif ()
|
||||
add_subdirectory(SDL EXCLUDE_FROM_ALL)
|
||||
if (NOT MSVC)
|
||||
target_compile_options(SDL2-static PRIVATE -Wno-implicit-fallthrough -Wno-shadow)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(xxhash EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
||||
|
||||
add_library(imgui
|
||||
imgui/imgui.cpp
|
||||
imgui/imgui_demo.cpp
|
||||
imgui/imgui_draw.cpp
|
||||
imgui/imgui_tables.cpp
|
||||
imgui/imgui_widgets.cpp
|
||||
imgui/misc/cpp/imgui_stdlib.cpp)
|
||||
target_include_directories(imgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/imgui)
|
||||
+1
Submodule extern/SDL added at 34458fe9f4
+1
Submodule extern/dawn added at 64a23ce0ed
+1
Submodule extern/fmt added at 81f1cc74a7
+1
Submodule extern/imgui added at e99c4fc668
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
add_library(xxhash xxhash_impl.c)
|
||||
target_include_directories(xxhash PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(xxhash INTERFACE XXH_STATIC_LINKING_ONLY)
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
xxHash Library
|
||||
Copyright (c) 2012-2021 Yann Collet
|
||||
All rights reserved.
|
||||
|
||||
BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Vendored
+770
File diff suppressed because it is too large
Load Diff
Vendored
+85
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* xxHash - XXH3 Dispatcher for x86-based targets
|
||||
* Copyright (C) 2020-2021 Yann Collet
|
||||
*
|
||||
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You can contact the author at:
|
||||
* - xxHash homepage: https://www.xxhash.com
|
||||
* - xxHash source repository: https://github.com/Cyan4973/xxHash
|
||||
*/
|
||||
|
||||
#ifndef XXH_X86DISPATCH_H_13563687684
|
||||
#define XXH_X86DISPATCH_H_13563687684
|
||||
|
||||
#include "xxhash.h" /* XXH64_hash_t, XXH3_state_t */
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_dispatch(const void* input, size_t len);
|
||||
XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed);
|
||||
XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen);
|
||||
XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len);
|
||||
|
||||
XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_dispatch(const void* input, size_t len);
|
||||
XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed);
|
||||
XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen);
|
||||
XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len);
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* automatic replacement of XXH3 functions.
|
||||
* can be disabled by setting XXH_DISPATCH_DISABLE_REPLACE */
|
||||
#ifndef XXH_DISPATCH_DISABLE_REPLACE
|
||||
|
||||
# undef XXH3_64bits
|
||||
# define XXH3_64bits XXH3_64bits_dispatch
|
||||
# undef XXH3_64bits_withSeed
|
||||
# define XXH3_64bits_withSeed XXH3_64bits_withSeed_dispatch
|
||||
# undef XXH3_64bits_withSecret
|
||||
# define XXH3_64bits_withSecret XXH3_64bits_withSecret_dispatch
|
||||
# undef XXH3_64bits_update
|
||||
# define XXH3_64bits_update XXH3_64bits_update_dispatch
|
||||
|
||||
# undef XXH128
|
||||
# define XXH128 XXH3_128bits_withSeed_dispatch
|
||||
# undef XXH3_128bits
|
||||
# define XXH3_128bits XXH3_128bits_dispatch
|
||||
# undef XXH3_128bits_withSeed
|
||||
# define XXH3_128bits_withSeed XXH3_128bits_withSeed_dispatch
|
||||
# undef XXH3_128bits_withSecret
|
||||
# define XXH3_128bits_withSecret XXH3_128bits_withSecret_dispatch
|
||||
# undef XXH3_128bits_update
|
||||
# define XXH3_128bits_update XXH3_128bits_update_dispatch
|
||||
|
||||
#endif /* XXH_DISPATCH_DISABLE_REPLACE */
|
||||
|
||||
#endif /* XXH_X86DISPATCH_H_13563687684 */
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* xxHash - Extremely Fast Hash algorithm
|
||||
* Copyright (C) 2012-2021 Yann Collet
|
||||
*
|
||||
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You can contact the author at:
|
||||
* - xxHash homepage: https://www.xxhash.com
|
||||
* - xxHash source repository: https://github.com/Cyan4973/xxHash
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* xxhash.c instantiates functions defined in xxhash.h
|
||||
*/
|
||||
|
||||
#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */
|
||||
#define XXH_IMPLEMENTATION /* access definitions */
|
||||
|
||||
#include "xxhash.h"
|
||||
Vendored
+6074
File diff suppressed because it is too large
Load Diff
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
//#if defined(__x86_64__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64)
|
||||
//#include "xxh_x86dispatch.c"
|
||||
//#endif
|
||||
#include "xxhash.c"
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
//#if defined(__x86_64__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64)
|
||||
//#include "xxh_x86dispatch.h"
|
||||
//#else
|
||||
#include "xxhash.h"
|
||||
//#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user