-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7e3beea
Showing
155 changed files
with
27,941 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
--- | ||
Language: Cpp | ||
Standard: Latest | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: DontAlign | ||
AlignArrayOfStructures: Right | ||
AlignConsecutiveAssignments: Consecutive | ||
AlignConsecutiveBitFields: Consecutive | ||
AlignConsecutiveDeclarations: Consecutive | ||
AlignConsecutiveMacros: Consecutive | ||
AlignEscapedNewlines: Left | ||
AlignOperands: AlignAfterOperator | ||
AlignTrailingComments: true | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllConstructorInitializersOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: Empty | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: Inline | ||
AllowShortIfStatementsOnASingleLine: WithoutElse | ||
AllowShortLambdasOnASingleLine: Inline | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BitFieldColonSpacing: Both | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: Always | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
BeforeLambdaBody: false | ||
BeforeWhile: true | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: false | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Custom | ||
BreakBeforeConceptDeclarations: true | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakInheritanceList: BeforeComma | ||
BreakStringLiterals: false | ||
ColumnLimit: 110 | ||
CompactNamespaces: false | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DeriveLineEnding: false | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
EmptyLineAfterAccessModifier: Never | ||
EmptyLineBeforeAccessModifier: Always | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^"' | ||
Priority: 1 | ||
- Regex: '^<' | ||
Priority: 2 | ||
IncludeIsMainSourceRegex: '(.inl)$' | ||
IndentAccessModifiers: false | ||
IndentCaseBlocks: false | ||
IndentCaseLabels: false | ||
IndentExternBlock: NoIndent | ||
IndentGotoLabels: false | ||
IndentPPDirectives: AfterHash | ||
IndentRequires: false | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
#InsertTrailingCommas: Wrapped | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
LambdaBodyIndentation: Signature | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
PPIndentWidth: -1 | ||
PackConstructorInitializers: Never | ||
PointerAlignment: Right | ||
QualifierAlignment: Custom | ||
QualifierOrder: ['inline', 'static', 'constexpr', 'volatile', 'type', 'restrict', 'const' ] | ||
ReferenceAlignment: Pointer | ||
ReflowComments: true | ||
SeparateDefinitionBlocks: Always | ||
ShortNamespaceLines: 0 | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: false | ||
SpaceAroundPointerQualifiers: Default | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCaseColon: false | ||
SpaceBeforeCpp11BracedList: true | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceBeforeSquareBrackets: false | ||
SpaceInEmptyBlock: false | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInConditionalStatement: false | ||
SpacesInContainerLiterals: false | ||
SpacesInLineCommentPrefix: | ||
Minimum: 1 | ||
Maximum: 1 | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
TabWidth: 4 | ||
UseCRLF: false | ||
UseTab: Never | ||
... | ||
|
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,12 @@ | ||
|
||
[*.{c,c++,cc,config,cp,cpp,cu,cxx,h,hh,hpp,hxx,inc,inl] | ||
indent_style=space | ||
indent_size=4 | ||
tab_width=4 | ||
|
||
[*] | ||
|
||
# Standard properties | ||
end_of_line=lf | ||
insert_final_newline=true | ||
max_line_length=120 |
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,69 @@ | ||
* text eol=lf | ||
|
||
# Documents | ||
*.docx diff=astextplain | ||
*.pdf diff=astextplain | ||
*.md text diff=markdown | ||
|
||
# Graphics | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.tif binary | ||
*.tiff binary | ||
*.ico binary | ||
*.exr binary | ||
|
||
# Scripts | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
*.ps1 text eol=crlf | ||
|
||
# Archives | ||
*.7z binary | ||
*.gz binary | ||
*.tar binary | ||
*.tgz binary | ||
*.zip binary | ||
|
||
# Sources | ||
*.c text diff=cpp | ||
*.cc text diff=cpp | ||
*.cxx text diff=cpp | ||
*.cpp text diff=cpp | ||
*.c++ text diff=cpp | ||
*.hpp text diff=cpp | ||
*.h text diff=cpp | ||
*.h++ text diff=cpp | ||
*.hh text diff=cpp | ||
*.inl text diff=cpp | ||
|
||
# Compiled Object files | ||
*.slo binary | ||
*.lo binary | ||
*.o binary | ||
*.obj binary | ||
|
||
# Precompiled Headers | ||
*.gch binary | ||
*.pch binary | ||
|
||
# Compiled Dynamic libraries | ||
*.so binary | ||
*.dylib binary | ||
*.dll binary | ||
|
||
# Compiled Static libraries | ||
*.lai binary | ||
*.la binary | ||
*.a binary | ||
*.lib binary | ||
|
||
# Executables | ||
*.exe binary | ||
*.out binary | ||
*.app binary | ||
|
||
# Program Data Base | ||
*.pdb binary |
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,4 @@ | ||
build | ||
.DS_Store | ||
imgui.ini | ||
.vscode |
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 @@ | ||
[submodule "third_party/gfx"] | ||
path = third_party/gfx | ||
url = https://github.com/gboisse/gfx.git | ||
[submodule "third_party/CLI11"] | ||
path = third_party/CLI11 | ||
url = https://github.com/CLIUtils/CLI11 | ||
[submodule "third_party/tinyexr"] | ||
path = third_party/tinyexr | ||
url = https://github.com/syoyo/tinyexr | ||
[submodule "third_party/miniz"] | ||
path = third_party/miniz | ||
url = https://github.com/richgel999/miniz.git | ||
[submodule "assets/CapsaicinTestMedia"] | ||
path = assets/CapsaicinTestMedia | ||
url = ../CapsaicinTestMedia.git |
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,82 @@ | ||
cmake_minimum_required(VERSION 3.10.0) | ||
|
||
project(Capsaicin | ||
VERSION 1.0.0 | ||
DESCRIPTION "AMD experimental real-time rendering framework designed for graphics research and development" | ||
) | ||
|
||
set(GFX_BUILD_EXAMPLES OFF CACHE BOOL "Build gfx examples") | ||
set(TINYGLTF_BUILD_LOADER_EXAMPLE OFF CACHE BOOL "Build loader_example") | ||
|
||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
# Set preprocessor definitions | ||
add_definitions(/MP | ||
-D_HAS_ITERATOR_DEBUGGING=0 | ||
) | ||
|
||
# Gather dependencies | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/gfx) | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/CLI11) | ||
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE) | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/miniz) | ||
|
||
# Set linker flags | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS") | ||
|
||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
# Organize third party projects | ||
set_target_properties(uninstall PROPERTIES FOLDER "third_party") | ||
set_target_properties(miniz PROPERTIES FOLDER "third_party") | ||
set_target_properties(gfx PROPERTIES FOLDER "third_party") | ||
set_target_properties(CLI11 PROPERTIES FOLDER "third_party") | ||
set_target_properties(tinyobjloader PROPERTIES FOLDER "third_party/gfx_deps") | ||
set_target_properties(ktx PROPERTIES FOLDER "third_party/gfx_deps") | ||
set_target_properties(astcenc-avx2-static PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(ktx_read PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(ktx_version PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(obj_basisu_cbind PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(objUtil PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
|
||
if(TARGET mkvk) | ||
set_target_properties(mkvk PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(makedfd2vk PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(makevk2dfd PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
set_target_properties(mkvkformatfiles PROPERTIES FOLDER "third_party/gfx_deps/ktx_deps") | ||
endif() | ||
|
||
# Set project output directory variables. | ||
IF(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY) | ||
SET(CAPSAICIN_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for runtime output files") | ||
ELSE() | ||
SET(CAPSAICIN_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} CACHE STRING "Path for runtime output files") | ||
ENDIF() | ||
|
||
IF(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY) | ||
SET(CAPSAICIN_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin" CACHE STRING "Path for library output files") | ||
ELSE() | ||
SET(CAPSAICIN_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE STRING "Path for library output files") | ||
ENDIF() | ||
|
||
IF(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY) | ||
SET(CAPSAICIN_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" CACHE STRING "Path for archive output files") | ||
ELSE() | ||
SET(CAPSAICIN_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} CACHE STRING "Path for archive output files") | ||
ENDIF() | ||
|
||
# Build Capsaicin | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
|
||
# Set up startup project | ||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
PROPERTY VS_STARTUP_PROJECT scene_viewer) | ||
|
||
# Install assets and shaders directories | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION . FILES_MATCHING PATTERN "*.*") | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/core/shaders DESTINATION src/core FILES_MATCHING PATTERN "*.*") | ||
|
||
# Configure CPack | ||
set(CPACK_GENERATOR "ZIP") | ||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}") | ||
include(CPack) |
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,19 @@ | ||
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. | ||
|
||
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. |
Oops, something went wrong.