Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
416fb19
Fixes for Linux build success
Zakhrov Jul 24, 2019
de2f755
more fixes
Zakhrov Jul 24, 2019
7ef67e5
Update README with Linux build instructions
Zakhrov Jul 24, 2019
caf5ac3
fix DirectXMath under MSVC
Mixaill Jul 28, 2019
c8ce6aa
fix compilation under MSVC
Mixaill Jul 28, 2019
4d4b149
other: add .gitignore
Mixaill Jul 28, 2019
9b4efed
replace MSVC `_countof()` macro with std::size()
Mixaill Jul 28, 2019
1be7d5f
libs: add dxgiformat.h header for non-windows platforms
Mixaill Jul 28, 2019
00099ed
Added submodule libs/DirectXMath
Mixaill Jul 28, 2019
61e3bc2
fix DirectXMath includes
Mixaill Jul 28, 2019
ef568c6
replace NULL with nullptr
Mixaill Jul 28, 2019
cdf63ff
disable windows-specific things
Mixaill Jul 28, 2019
f7f2f49
fix includes and data types
Mixaill Jul 28, 2019
a70eba6
update nlohmann-json
Mixaill Jul 28, 2019
ffea323
fix compilation
Mixaill Jul 28, 2019
bc3e486
src/common: fix build script (disable -M flag)
Mixaill Jul 28, 2019
06f2a5b
fix Framework_Common compilation under Linux
Mixaill Jul 28, 2019
2157e26
libs/DirectXMath: improved GCC support
Mixaill Jul 28, 2019
12b4504
Merge branch 'linux-fixes' of https://github.com/Mixaill/Cauldron
Zakhrov Jul 30, 2019
a68358d
remove DirectXMath
Zakhrov Jul 30, 2019
01d3ada
Linux fixes
Zakhrov Jul 30, 2019
c0f8000
Fixes for Linux build success
Zakhrov Jul 24, 2019
b076ed2
more fixes
Zakhrov Jul 24, 2019
f63e6c5
Update README with Linux build instructions
Zakhrov Jul 24, 2019
f176a93
other: add .gitignore
Mixaill Jul 28, 2019
becc102
replace MSVC `_countof()` macro with std::size()
Mixaill Jul 28, 2019
4ff4551
libs: add dxgiformat.h header for non-windows platforms
Mixaill Jul 28, 2019
c49f0bb
Added submodule libs/DirectXMath
Mixaill Jul 28, 2019
acd1960
fix DirectXMath includes
Mixaill Jul 28, 2019
5bbdd57
replace NULL with nullptr
Mixaill Jul 28, 2019
905ff61
disable windows-specific things
Mixaill Jul 28, 2019
3e88791
fix includes and data types
Mixaill Jul 28, 2019
6343a09
update nlohmann-json
Mixaill Jul 28, 2019
6406121
fix compilation
Mixaill Jul 28, 2019
59a3de2
src/common: fix build script (disable -M flag)
Mixaill Jul 28, 2019
6d47a8e
fix DirectXMath under MSVC
Mixaill Jul 28, 2019
73d1484
fix compilation under MSVC
Mixaill Jul 28, 2019
161ad59
fix Framework_Common compilation under Linux
Mixaill Jul 28, 2019
c0ea032
libs/DirectXMath: improved GCC support
Mixaill Jul 28, 2019
a89e412
remove DirectXMath
Zakhrov Jul 30, 2019
e99aef2
Linux fixes
Zakhrov Jul 30, 2019
afe1005
Add build to gitignore"
Zakhrov Sep 30, 2019
54d27ae
Merge branch 'master' of https://github.com/Zakhrov/Cauldron
Zakhrov Sep 30, 2019
7914446
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/…
Zakhrov Jul 16, 2021
356b474
Merge branch 'GPUOpen-LibrariesAndSDKs-master'
Zakhrov Jul 16, 2021
6c50024
Fix 1.4.1 build errors on Linux.
Zakhrov Jul 16, 2021
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
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.4)

if(MSVC)
set(CMAKE_GENERATOR_PLATFORM x64)
endif()

project (Framework_${GFX_API})

Expand All @@ -11,18 +14,18 @@ foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )

# reference libs used by both backends
add_subdirectory(src/Common)
add_subdirectory(src/common)
add_subdirectory(libs/json)
add_subdirectory(libs/ImGUI)
add_subdirectory(libs/imgui)

if(GFX_API STREQUAL DX12)
if(GFX_API STREQUAL DX12)
add_subdirectory(libs/d3d12x)
add_subdirectory(libs/ags)
add_subdirectory(libs/ags)
add_subdirectory(libs/dxc)
add_subdirectory(src/DX12)
add_subdirectory(src/DX12)
elseif(GFX_API STREQUAL VK)
find_package(Vulkan REQUIRED)
add_subdirectory(libs/VulkanMemoryAllocator)
add_subdirectory(libs/VulkanMemoryAllocator)
add_subdirectory(src/VK)
else()
message(STATUS "----------------------------------------------------------------------------------------")
Expand All @@ -38,4 +41,3 @@ else()
message(STATUS "----------------------------------------------------------------------------------------")
message(FATAL_ERROR "")
endif()

9 changes: 0 additions & 9 deletions build/GenerateSolutions.bat

This file was deleted.

22 changes: 16 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Cauldron is compiled as a static library, hence the sample application has to st
- [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) File loader
- Animation for cameras, objects, skeletons and lights
- Skinning
- PBR Materials
- Metallic-Roughness
- PBR Materials
- Metallic-Roughness
- Specular-Glossiness (KHR_materials_pbrSpecularGlossiness)
- Lighting (KHR_lights_punctual extension)
- Spot Lights w/ Shadows (up to 4)
Expand All @@ -39,7 +39,7 @@ Cauldron is compiled as a static library, hence the sample application has to st
- Light Frustums
- Window management & swapchain creation
- Fullscreen/Windowed Modes
- Support for DXC/SM6.x
- Support for DXC/SM6.x
- Shader Binary & PSO caching

# Directory Structure
Expand All @@ -49,7 +49,7 @@ Cauldron is compiled as a static library, hence the sample application has to st
- `AGS` : AMD helper library for querying GPU info
- `VulkanMemoryAllocator` : Helper library for memory management with Vulkan applications
- `d3d12x` : The D3D12 helper library
- `dxc` : DirectX Shader Compiler
- `dxc` : DirectX Shader Compiler
- `imgui` : Graphical User Interface library
- `json` : Library for adding JSON support w/ C++ syntax
- `media` : Builtin textures and other data
Expand All @@ -62,20 +62,30 @@ Note: more info on the rendering backends can be found in the Readme of their re

# Build

## Prerequisites
## Windows Prerequisites

- [CMake 3.4](https://cmake.org/download/)
- [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/)
- [Windows 10 SDK 10.0.17763.0](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
- [Vulkan SDK 1.1.106](https://www.lunarg.com/vulkan-sdk/)

## Linux Prerequisites

- [CMake 3.4](https://cmake.org/download/)
- [GLM](https://glm.g-truc.net/0.9.9/index.html)
- [GCC 8.0 or higher](https://gcc.gnu.org/)
- [Vulkan SDK 1.1.106](https://www.lunarg.com/vulkan-sdk/)


## How-to-Build

- Linux (Vulkan Only) run `cmake .. -DGFX_API=VK ` in the `build` directory
- Run the `GenerateSolutions.bat` file in the `build` directory.
- `build/VK` and `build/DX12` folders will contain the `Framework_*.sln` files
- Simply build the solution file for the desired API
- `build/DX12/src/DX12/` directory will contain the compiled static library `Framework_DX12.lib` for DX12 (similar for VK) under the selected configuration (Debug/Release) folder.


# Framework Architecture

Every feature in Cauldron has been implemented in a single file using C++11.
Expand Down Expand Up @@ -108,7 +118,7 @@ Cauldron was originally written using DX12 and later on ported to Vulkan using t

# Known Issues

Please bear in mind that in order to keep Cauldron simple we are only covering the most frequently used features (for now).
Please bear in mind that in order to keep Cauldron simple we are only covering the most frequently used features (for now).

Please feel free to [open an issue](TODO:LinkToGitHubRepoIssuesPage) for bug reports.

Expand Down
12 changes: 5 additions & 7 deletions src/DX12/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project (Framework_DX12)

add_compile_options(/MP)
add_compile_options(-M)

set(GLTF_src
GLTF/GltfBBoxPass.cpp
Expand Down Expand Up @@ -91,10 +91,10 @@ set(Shaders_src

set(media_src
${CMAKE_CURRENT_SOURCE_DIR}/../../media/brdfLut.dds
)
)

function(copyCommand list dest)
foreach(fullFileName ${list})
foreach(fullFileName ${list})
get_filename_component(file ${fullFileName} NAME)
message("Generating custom command for ${fullFileName}")
add_custom_command(
Expand All @@ -103,9 +103,9 @@ function(copyCommand list dest)
COMMAND cmake -E make_directory ${dest}
COMMAND cmake -E copy ${fullFileName} ${dest}
MAIN_DEPENDENCY ${fullFileName}
COMMENT "Updating ${file} into ${dest}"
COMMENT "Updating ${file} into ${dest}"
)
endforeach()
endforeach()
endfunction()

copyCommand("${media_src}" ${CMAKE_HOME_DIRECTORY}/bin)
Expand All @@ -125,5 +125,3 @@ source_group("media" FILES ${media_src})

set_source_files_properties(${Shaders_src} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${media_src} PROPERTIES VS_TOOL_OVERRIDE "Media")


21 changes: 12 additions & 9 deletions src/VK/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
project (Framework_VK)

add_compile_options(/MP)
if(MSVC)
add_compile_options(/MP)
else()
add_compile_options(-M)
endif()

set(GLTF_src
GLTF/GltfBBoxPass.cpp
Expand Down Expand Up @@ -37,8 +41,8 @@ set(Base_src
base/CommandListRing.h
base/DebugMarkersExt.cpp
base/DebugMarkersExt.h
base/ValidationExt.cpp
base/ValidationExt.h
base/validationExt.cpp
base/validationExt.h
base/Device.cpp
base/Device.h
base/DeviceProperties.cpp
Expand Down Expand Up @@ -102,11 +106,11 @@ set(Shaders_src
)

set(media_src
${CMAKE_CURRENT_SOURCE_DIR}/../../media/brdfLut.dds
)
${CMAKE_CURRENT_SOURCE_DIR}/../../media/BrdfLut.dds
)

function(copyCommand list dest)
foreach(fullFileName ${list})
foreach(fullFileName ${list})
get_filename_component(file ${fullFileName} NAME)
message("Generating custom command for ${fullFileName}")
add_custom_command(
Expand All @@ -115,9 +119,9 @@ function(copyCommand list dest)
COMMAND cmake -E make_directory ${dest}
COMMAND cmake -E copy ${fullFileName} ${dest}
MAIN_DEPENDENCY ${fullFileName}
COMMENT "Updating ${file} into ${dest}"
COMMENT "Updating ${file} into ${dest}"
)
endforeach()
endforeach()
endfunction()

copyCommand("${media_src}" ${CMAKE_HOME_DIRECTORY}/bin)
Expand All @@ -137,4 +141,3 @@ source_group("media" FILES ${media_src})

set_source_files_properties(${Shaders_src} PROPERTIES VS_TOOL_OVERRIDE "Text")
set_source_files_properties(${media_src} PROPERTIES VS_TOOL_OVERRIDE "Media")

14 changes: 7 additions & 7 deletions src/VK/GLTF/GLTFTexturesAndBuffers.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AMD AMDUtils code
//
//
// Copyright(c) 2018 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
Expand All @@ -17,12 +17,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "stdafx.h"
#include "GltfHelpers.h"
#include "Base\UploadHeap.h"

#include "glTFHelpers.h"
#include "base/UploadHeap.h"
#include "GLTFTexturesAndBuffers.h"
#include "Misc\Misc.h"
#include "Misc\ThreadPool.h"
#include "Misc/Misc.h"
#include "Misc/threadpool.h"

namespace CAULDRON_VK
{
Expand Down Expand Up @@ -53,7 +53,7 @@ namespace CAULDRON_VK
{
// Identify what material uses this texture, this helps:
// 1) determine the color space if the texture and also the cut out level. Authoring software saves albedo and emissive images in SRGB mode, the rest are linear mode
// 2) tell the cutOff value, to prevent thinning of alpha tested PNGs when lower mips are used.
// 2) tell the cutOff value, to prevent thinning of alpha tested PNGs when lower mips are used.
//
bool useSRGB = false;
float cutOff = 1.0f; // no cutoff
Expand Down
12 changes: 6 additions & 6 deletions src/VK/GLTF/GLTFTexturesAndBuffers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AMD AMDUtils code
//
//
// Copyright(c) 2018 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
Expand All @@ -17,10 +17,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#pragma once
#include "GLTF\GltfCommon.h"
#include "Base\Texture.h"
#include "Base\StaticBufferPool.h"
#include "Base\DynamicBufferRing.h"
#include "GLTF/GltfCommon.h"
#include "base/Texture.h"
#include "base/StaticBufferPool.h"
#include "base/DynamicBufferRing.h"

namespace CAULDRON_VK
{
Expand Down Expand Up @@ -65,4 +65,4 @@ namespace CAULDRON_VK
void SetSkinningMatricesForSkeletons();
void SetPerFrameConstants();
};
}
}
10 changes: 5 additions & 5 deletions src/VK/GLTF/GltfBBoxPass.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AMD AMDUtils code
//
//
// Copyright(c) 2018 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
Expand All @@ -17,11 +17,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "stdafx.h"
#include "Base\DebugMarkersExt.h"

#include "base/DebugMarkersExt.h"
#include "GltfBBoxPass.h"
#include "GltfHelpers.h"
#include "Base\ShaderCompilerHelper.h"
#include "glTFHelpers.h"
#include "base/ShaderCompilerHelper.h"

namespace CAULDRON_VK
{
Expand Down
14 changes: 6 additions & 8 deletions src/VK/GLTF/GltfBBoxPass.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AMD AMDUtils code
//
//
// Copyright(c) 2018 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
Expand All @@ -18,12 +18,12 @@
// THE SOFTWARE.
#pragma once

#include "Base\Device.h"
#include "Base\StaticBufferPool.h"
#include "Base\ResourceViewHeaps.h"
#include "Base\DynamicBufferRing.h"
#include "base/Device.h"
#include "base/StaticBufferPool.h"
#include "base/ResourceViewHeaps.h"
#include "base/DynamicBufferRing.h"
#include "GLTFTexturesAndBuffers.h"
#include "Widgets\WireframeBox.h"
#include "widgets/WireframeBox.h"

namespace CAULDRON_VK
{
Expand All @@ -46,5 +46,3 @@ namespace CAULDRON_VK
WireframeBox m_wireframeBox;
};
}


Loading