Ray tracing works on linux for some reason
This commit is contained in:
@@ -1,77 +0,0 @@
|
|||||||
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
|
|
||||||
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
|
|
||||||
name: CMake on multiple platforms
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
# Set up a matrix to run the following 3 configurations:
|
|
||||||
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
|
|
||||||
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
|
|
||||||
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
|
|
||||||
#
|
|
||||||
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest]
|
|
||||||
build_type: [Release]
|
|
||||||
c_compiler: [gcc, clang, cl]
|
|
||||||
include:
|
|
||||||
- os: windows-latest
|
|
||||||
c_compiler: cl
|
|
||||||
cpp_compiler: cl
|
|
||||||
- os: ubuntu-latest
|
|
||||||
c_compiler: gcc
|
|
||||||
cpp_compiler: g++
|
|
||||||
- os: ubuntu-latest
|
|
||||||
c_compiler: clang
|
|
||||||
cpp_compiler: clang++
|
|
||||||
exclude:
|
|
||||||
- os: windows-latest
|
|
||||||
c_compiler: gcc
|
|
||||||
- os: windows-latest
|
|
||||||
c_compiler: clang
|
|
||||||
- os: ubuntu-latest
|
|
||||||
c_compiler: cl
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set reusable strings
|
|
||||||
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
|
|
||||||
id: strings
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: run-vcpkg
|
|
||||||
uses: lukka/run-vcpkg@v11.5
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
|
||||||
run: >
|
|
||||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}
|
|
||||||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
|
||||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
||||||
-S ${{ github.workspace }}
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
|
||||||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
working-directory: ${{ steps.strings.outputs.build-output-dir }}
|
|
||||||
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
|
||||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
|
||||||
run: ctest --build-config ${{ matrix.build_type }}
|
|
||||||
Vendored
+83
-2
@@ -31,6 +31,87 @@
|
|||||||
"slang.slangdLocation": "C:\\Users\\Dynamitos\\slang\\build\\Release\\bin\\slangd.exe",
|
"slang.slangdLocation": "C:\\Users\\Dynamitos\\slang\\build\\Release\\bin\\slangd.exe",
|
||||||
"slang.searchInAllWorkspaceDirectories": false,
|
"slang.searchInAllWorkspaceDirectories": false,
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"type_traits": "cpp"
|
"type_traits": "cpp",
|
||||||
}
|
"any": "cpp",
|
||||||
|
"array": "cpp",
|
||||||
|
"atomic": "cpp",
|
||||||
|
"bit": "cpp",
|
||||||
|
"bitset": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"charconv": "cpp",
|
||||||
|
"chrono": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"codecvt": "cpp",
|
||||||
|
"compare": "cpp",
|
||||||
|
"concepts": "cpp",
|
||||||
|
"condition_variable": "cpp",
|
||||||
|
"csignal": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"deque": "cpp",
|
||||||
|
"forward_list": "cpp",
|
||||||
|
"list": "cpp",
|
||||||
|
"map": "cpp",
|
||||||
|
"set": "cpp",
|
||||||
|
"string": "cpp",
|
||||||
|
"unordered_map": "cpp",
|
||||||
|
"unordered_set": "cpp",
|
||||||
|
"vector": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"iterator": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"memory_resource": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"optional": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"ratio": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"system_error": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"format": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"future": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"mutex": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"numbers": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"queue": "cpp",
|
||||||
|
"ranges": "cpp",
|
||||||
|
"semaphore": "cpp",
|
||||||
|
"shared_mutex": "cpp",
|
||||||
|
"span": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"stdfloat": "cpp",
|
||||||
|
"stop_token": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"text_encoding": "cpp",
|
||||||
|
"thread": "cpp",
|
||||||
|
"typeinfo": "cpp",
|
||||||
|
"valarray": "cpp",
|
||||||
|
"variant": "cpp"
|
||||||
|
},
|
||||||
|
"github.copilot.advanced": {
|
||||||
|
"debug.overrideProxyUrl": "http://localhost:11437"
|
||||||
|
},
|
||||||
|
"http.proxy": "http://localhost:11435",
|
||||||
|
"http.proxyStrictSSL": false
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ set(BUILD_SHARED_LIBS OFF)
|
|||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
set(VCPKG_INSTALL_OPTIONS "--allow-unsupported")
|
set(VCPKG_INSTALL_OPTIONS "--allow-unsupported")
|
||||||
|
set(VCPKG_BUILD_TYPE release)
|
||||||
|
|
||||||
set(ENGINE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/src/Engine)
|
set(ENGINE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/src/Engine)
|
||||||
set(EXTERNAL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/external)
|
set(EXTERNAL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/external)
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@
|
|||||||
"description": "Release build without sanitizers",
|
"description": "Release build without sanitizers",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"description": "Release build with Address Sanitizer",
|
"description": "Release build with Address Sanitizer",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"binaryDir": "${sourceDir}/build",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_CXX_FLAGS": "-fsanitize=address -fno-omit-frame-pointer",
|
"CMAKE_CXX_FLAGS": "-fsanitize=address -fno-omit-frame-pointer",
|
||||||
"CMAKE_C_FLAGS": "-fsanitize=address -fno-omit-frame-pointer",
|
"CMAKE_C_FLAGS": "-fsanitize=address -fno-omit-frame-pointer",
|
||||||
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address",
|
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address",
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ void EnvironmentLoader::import(EnvironmentImportArgs args, PEnvironmentMapAsset
|
|||||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(-1.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f)),
|
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(-1.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f)),
|
||||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f), Vector(0.0f, 0.0f, 1.0f)),
|
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 1.0f, 0.0f), Vector(0.0f, 0.0f, 1.0f)),
|
||||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, -1.0f, 0.0f), Vector(0.0f, 0.0f, -1.0f)),
|
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, -1.0f, 0.0f), Vector(0.0f, 0.0f, -1.0f)),
|
||||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 0.0f, 1.0f), Vector(0.0f, 1.0f, 0.0f)),
|
|
||||||
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 0.0f, -1.0f), Vector(0.0f, 1.0f, 0.0f)),
|
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 0.0f, -1.0f), Vector(0.0f, 1.0f, 0.0f)),
|
||||||
|
glm::lookAt(Vector(0.0f, 0.0f, 0.0f), Vector(0.0f, 0.0f, 1.0f), Vector(0.0f, 1.0f, 0.0f)),
|
||||||
};
|
};
|
||||||
Gfx::PDescriptorSet set = cubeRenderLayout->allocateDescriptorSet();
|
Gfx::PDescriptorSet set = cubeRenderLayout->allocateDescriptorSet();
|
||||||
set->updateConstants("view", 0, captureViews);
|
set->updateConstants("view", 0, captureViews);
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ void MeshLoader::loadMaterials(const aiScene* scene, const Array<PTextureAsset>&
|
|||||||
|
|
||||||
brdf.variables["normal"] = "NormalSub";
|
brdf.variables["normal"] = "NormalSub";
|
||||||
}
|
}
|
||||||
aiShadingMode mode;
|
aiShadingMode mode = aiShadingMode_CookTorrance;
|
||||||
material->Get(AI_MATKEY_SHADING_MODEL, mode);
|
material->Get(AI_MATKEY_SHADING_MODEL, mode);
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case aiShadingMode_Phong:
|
case aiShadingMode_Phong:
|
||||||
|
|||||||
@@ -271,15 +271,16 @@ void VertexData::loadMesh(MeshId id, Array<Vector> loadedPositions, Array<uint32
|
|||||||
// load LOD 0
|
// load LOD 0
|
||||||
size_t previousMeshletsStart = meshlets.size(); // todo:
|
size_t previousMeshletsStart = meshlets.size(); // todo:
|
||||||
loadMeshlets(id, loadedPositions, loadedIndices);
|
loadMeshlets(id, loadedPositions, loadedIndices);
|
||||||
|
std::memcpy(positions.data() + mesh.vertexOffset, loadedPositions.data(), loadedPositions.size() * sizeof(Vector));
|
||||||
|
|
||||||
/* const int maxLod = 25;
|
/*const int maxLod = 25;
|
||||||
for (int lod = 0; lod < maxLod; ++lod) {
|
for (int lod = 0; lod < maxLod; ++lod) {
|
||||||
float tLod = lod / (float)maxLod;
|
float tLod = lod / (float)maxLod;
|
||||||
|
|
||||||
std::span<MeshletDescription> previousLevelMeshlets =
|
std::span<MeshletDescription> previousLevelMeshlets =
|
||||||
std::span{meshlets.data() + previousMeshletsStart, meshlets.size() - previousMeshletsStart};
|
std::span{meshlets.data() + previousMeshletsStart, meshlets.size() - previousMeshletsStart};
|
||||||
if (previousLevelMeshlets.size() <= 1) {
|
if (previousLevelMeshlets.size() <= 1) {
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
auto groups = groupMeshlets(previousLevelMeshlets);
|
auto groups = groupMeshlets(previousLevelMeshlets);
|
||||||
const uint32 newMeshletStart = meshlets.size();
|
const uint32 newMeshletStart = meshlets.size();
|
||||||
@@ -291,7 +292,8 @@ void VertexData::loadMesh(MeshId id, Array<Vector> loadedPositions, Array<uint32
|
|||||||
size_t start = groupVertexIndices.size();
|
size_t start = groupVertexIndices.size();
|
||||||
groupVertexIndices.resize(start + meshlet.primitiveIndices.size * 3);
|
groupVertexIndices.resize(start + meshlet.primitiveIndices.size * 3);
|
||||||
for (size_t j = 0; j < meshlet.primitiveIndices.size * 3; ++j) {
|
for (size_t j = 0; j < meshlet.primitiveIndices.size * 3; ++j) {
|
||||||
groupVertexIndices[j + start] = vertexIndices[meshlet.vertexIndices.offset + primitiveIndices[meshlet.primitiveIndices.offset + j]];
|
groupVertexIndices[j + start] =
|
||||||
|
vertexIndices[meshlet.vertexIndices.offset + primitiveIndices[meshlet.primitiveIndices.offset + j]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const float threshold = 0.5f;
|
const float threshold = 0.5f;
|
||||||
@@ -316,7 +318,6 @@ void VertexData::loadMesh(MeshId id, Array<Vector> loadedPositions, Array<uint32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
std::memcpy(positions.data() + mesh.vertexOffset, loadedPositions.data(), loadedPositions.size() * sizeof(Vector));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VertexData::removeMesh(MeshId id) {
|
void VertexData::removeMesh(MeshId id) {
|
||||||
|
|||||||
@@ -801,7 +801,7 @@ void Graphics::pickPhysicalDevice() {
|
|||||||
shaderFloatControls = true;
|
shaderFloatControls = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rayTracingEnabled = false && rayTracingPipelineSupport && accelerationStructureSupport && hostOperationsSupport && deviceAddressSupport &&
|
rayTracingEnabled = rayTracingPipelineSupport && accelerationStructureSupport && hostOperationsSupport && deviceAddressSupport &&
|
||||||
descriptorIndexingSupport && spirv14Support && shaderFloatControls;
|
descriptorIndexingSupport && spirv14Support && shaderFloatControls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user