Skip to content

Commit

Permalink
suppress some compiler warning and update tinygltf, stb_image
Browse files Browse the repository at this point in the history
  • Loading branch information
K1ngst0m committed Nov 10, 2023
1 parent 6ab8129 commit 223e172
Show file tree
Hide file tree
Showing 14 changed files with 716 additions and 28,960 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ build/
/external/*
!/external/backward-cpp
!/external/reckless
!/external/stb
!/external/tinygltf
!/external/tinyktx
!/external/volk
!/external/vulkan
Expand Down
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ Branch: master

[unordered_dense]
Branch: v4.1.2

[tinygltf]
Branch: v2.8.18
4 changes: 3 additions & 1 deletion cmake/AphCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ function(aph_compiler_options TARGET)

# setup target compile warning
target_compile_options(${TARGET} PRIVATE
-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
-Wall -Wextra -Wshadow

# TODO
-Wno-non-virtual-dtor
-Wno-sign-compare -Wcast-align -Wno-missing-field-initializers -Wno-unused-parameter
)

Expand Down
1 change: 1 addition & 0 deletions cmake/AphExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ add_subdirectory(${APH_EXTERNAL_DIR}/volk EXCLUDE_FROM_ALL)
add_subdirectory(${APH_EXTERNAL_DIR}/spirv-cross EXCLUDE_FROM_ALL)
add_subdirectory(${APH_EXTERNAL_DIR}/imgui EXCLUDE_FROM_ALL)
add_subdirectory(${APH_EXTERNAL_DIR}/slang EXCLUDE_FROM_ALL)
add_subdirectory(${APH_EXTERNAL_DIR}/tinygltf EXCLUDE_FROM_ALL)
add_subdirectory(${APH_EXTERNAL_DIR}/unordered_dense EXCLUDE_FROM_ALL)

find_package(PkgConfig REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions engine/api/vulkan/physicalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ VkFormat PhysicalDevice::findSupportedFormat(const std::vector<VkFormat>& candid

const std::vector<uint32_t>& PhysicalDevice::getQueueFamilyIndexByFlags(QueueType flags)
{
for (auto i = static_cast<int>(flags); i >= 0; --i)
for(auto i = static_cast<int>(flags); i >= 0; --i)
{
QueueType type = static_cast<QueueType>(i);
QueueType queueType = static_cast<QueueType>(i);

if (m_queueFamilyMap.contains(type))
if(m_queueFamilyMap.contains(queueType))
{
return m_queueFamilyMap.at(type);
return m_queueFamilyMap.at(queueType);
}
CM_LOG_WARN("could not found queue type (transfer or compute), fallback to next.");
}
Expand Down
1 change: 0 additions & 1 deletion engine/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ target_include_directories(common PRIVATE
${APH_ENGINE_DIR}
${APH_EXTERNAL_DIR}/backward-cpp/include
${APH_EXTERNAL_DIR}/unordered_dense/include
${APH_EXTERNAL_DIR}/stb/include
)
2 changes: 0 additions & 2 deletions engine/common/common.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "common.h"
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>

#define BACKWARD_HAS_DW 1
#define BACKWARD_HAS_BACKTRACE_SYMBOL 1
Expand Down
2 changes: 1 addition & 1 deletion engine/resource/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ target_include_directories(resource PRIVATE
${APH_EXTERNAL_DIR}/volk
${APH_EXTERNAL_DIR}/slang
${APH_EXTERNAL_DIR}/tinyktx
${APH_EXTERNAL_DIR}/tinygltf/include
${APH_EXTERNAL_DIR}/stb/include
${APH_EXTERNAL_DIR}/tinygltf
${APH_EXTERNAL_DIR}/unordered_dense/include
)

Expand Down
5 changes: 3 additions & 2 deletions engine/resource/resourceLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
#define TINYGLTF_IMPLEMENTATION
#define TINYGLTF_NO_INCLUDE_STB_IMAGE
#define TINYGLTF_NO_STB_IMAGE_WRITE
#include <stb/stb_image.h>
#include <tinygltf/tiny_gltf.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#include "tiny_gltf.h"

#include "filesystem/filesystem.h"

Expand Down
Loading

0 comments on commit 223e172

Please sign in to comment.