Skip to content

Commit

Permalink
Remove VKBP_DISABLE_WARNINGS
Browse files Browse the repository at this point in the history
  • Loading branch information
jherico committed Mar 11, 2024
1 parent fb5bb55 commit 13273ba
Show file tree
Hide file tree
Showing 46 changed files with 66 additions and 156 deletions.
6 changes: 2 additions & 4 deletions app/plugins/file_logger/file_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2021-2023, Arm Limited and Contributors
* Copyright (c) 2021-2023, Sascha Willems
/* Copyright (c) 2021-2024, Arm Limited and Contributors
* Copyright (c) 2021-2024, Sascha Willems
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -20,11 +20,9 @@

#include "apps.h"

VKBP_DISABLE_WARNINGS()
#include <fmt/format.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
VKBP_ENABLE_WARNINGS()

namespace plugins
{
Expand Down
4 changes: 1 addition & 3 deletions components/core/include/core/util/error.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2023, Thomas Atkinson
/* Copyright (c) 2024, Thomas Atkinson
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -50,10 +50,8 @@
__pragma(warning(pop))
#endif

VKBP_DISABLE_WARNINGS()
// TODO: replace with a direct fmt submodule
#include <fmt/format.h>
VKBP_ENABLE_WARNINGS()

#include <stdexcept>

Expand Down
4 changes: 1 addition & 3 deletions components/core/tests/strings.test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2023, Thomas Atkinson
/* Copyright (c) 2024, Thomas Atkinson
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -17,9 +17,7 @@

#include <core/util/error.hpp>

VKBP_DISABLE_WARNINGS()
#include <catch2/catch_test_macros.hpp>
VKBP_ENABLE_WARNINGS()

#include <core/util/strings.hpp>

Expand Down
4 changes: 1 addition & 3 deletions framework/camera.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019, Sascha Willems
/* Copyright (c) 2019-2024, Sascha Willems
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -19,11 +19,9 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand Down
2 changes: 1 addition & 1 deletion framework/common/error.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2023, Arm Limited and Contributors
/* Copyright (c) 2018-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
8 changes: 3 additions & 5 deletions framework/common/helpers.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2022, Arm Limited and Contributors
/* Copyright (c) 2018-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -36,10 +36,8 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
#include <glm/gtx/hash.hpp>
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand Down Expand Up @@ -102,7 +100,7 @@ inline void read(std::istringstream &is, std::array<T, N> &value)
}

template <typename T, typename... Args>
inline void read(std::istringstream &is, T &first_arg, Args &... args)
inline void read(std::istringstream &is, T &first_arg, Args &...args)
{
read(is, first_arg);

Expand Down Expand Up @@ -157,7 +155,7 @@ inline void write(std::ostringstream &os, const std::array<T, N> &value)
}

template <typename T, typename... Args>
inline void write(std::ostringstream &os, const T &first_arg, const Args &... args)
inline void write(std::ostringstream &os, const T &first_arg, const Args &...args)
{
write(os, first_arg);

Expand Down
4 changes: 1 addition & 3 deletions framework/common/utils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2018-2023, Arm Limited and Contributors
/* Copyright (c) 2018-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -19,10 +19,8 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
#include "glm/gtx/quaternion.hpp"
VKBP_ENABLE_WARNINGS()

#include "platform/filesystem.h"
#include "rendering/pipeline_state.h"
Expand Down
4 changes: 1 addition & 3 deletions framework/core/command_buffer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -23,9 +23,7 @@
#include "rendering/render_frame.h"
#include "rendering/subpass.h"

VKBP_DISABLE_WARNINGS()
#include <glm/gtc/type_ptr.hpp>
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand Down
2 changes: 0 additions & 2 deletions framework/core/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@

#include "device.h"

VKBP_DISABLE_WARNINGS()
#define VMA_IMPLEMENTATION
#include <vk_mem_alloc.h>
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand Down
4 changes: 1 addition & 3 deletions framework/debug_info.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -23,9 +23,7 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
VKBP_ENABLE_WARNINGS()

#include "common/helpers.h"

Expand Down
6 changes: 2 additions & 4 deletions framework/geometry/frustum.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2022, Sascha Willems
/* Copyright (c) 2019-2024, Sascha Willems
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -21,9 +21,7 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand All @@ -38,7 +36,7 @@ enum Side
};

/**
* @brief Represents a matrix by extracting its planes. Responsible for doing
* @brief Represents a matrix by extracting its planes. Responsible for doing
* intersection tests
*/
class Frustum
Expand Down
4 changes: 1 addition & 3 deletions framework/glsl_compiler.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -17,14 +17,12 @@

#include "glsl_compiler.h"

VKBP_DISABLE_WARNINGS()
#include <SPIRV/GLSL.std.450.h>
#include <SPIRV/GlslangToSpv.h>
#include <StandAlone/DirStackFileIncluder.h>
#include <glslang/Include/ShHandle.h>
#include <glslang/OSDependent/osinclude.h>
#include <glslang/Public/ResourceLimits.h>
VKBP_ENABLE_WARNINGS()

namespace vkb
{
Expand Down
10 changes: 4 additions & 6 deletions framework/glsl_compiler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2020, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -22,9 +22,7 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include <glslang/Public/ShaderLang.h>
VKBP_ENABLE_WARNINGS()

#include "common/vk_common.h"
#include "core/shader_module.h"
Expand Down Expand Up @@ -64,9 +62,9 @@ class GLSLCompiler
*/
bool compile_to_spirv(VkShaderStageFlagBits stage,
const std::vector<uint8_t> &glsl_source,
const std::string & entry_point,
const ShaderVariant & shader_variant,
const std::string &entry_point,
const ShaderVariant &shader_variant,
std::vector<std::uint32_t> &spirv,
std::string & info_log);
std::string &info_log);
};
} // namespace vkb
10 changes: 4 additions & 6 deletions framework/gltf_loader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2018-2023, Arm Limited and Contributors
* Copyright (c) 2019-2023, Sascha Willems
/* Copyright (c) 2018-2024, Arm Limited and Contributors
* Copyright (c) 2019-2024, Sascha Willems
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -24,10 +24,8 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
#include <glm/gtc/type_ptr.hpp>
VKBP_ENABLE_WARNINGS()

#include "api_vulkan_sample.h"
#include "common/logging.h"
Expand Down Expand Up @@ -1468,7 +1466,7 @@ std::unique_ptr<sg::Sampler> GLTFLoader::parse_sampler(const tinygltf::Sampler &

VkSamplerAddressMode address_mode_u = find_wrap_mode(gltf_sampler.wrapS);
VkSamplerAddressMode address_mode_v = find_wrap_mode(gltf_sampler.wrapT);
VkSamplerAddressMode address_mode_w = find_wrap_mode(gltf_sampler.wrapR);
VkSamplerAddressMode address_mode_w = find_wrap_mode(gltf_sampler.wrapT);

VkSamplerCreateInfo sampler_info{VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO};

Expand Down Expand Up @@ -1507,7 +1505,7 @@ std::unique_ptr<sg::Sampler> GLTFLoader::create_default_sampler()

gltf_sampler.wrapS = TINYGLTF_TEXTURE_WRAP_REPEAT;
gltf_sampler.wrapT = TINYGLTF_TEXTURE_WRAP_REPEAT;
gltf_sampler.wrapR = TINYGLTF_TEXTURE_WRAP_REPEAT;
// gltf_sampler.wrapR = TINYGLTF_TEXTURE_WRAP_REPEAT;

return parse_sampler(gltf_sampler);
}
Expand Down
2 changes: 0 additions & 2 deletions framework/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
#include <glm/gtc/matrix_transform.hpp>
VKBP_ENABLE_WARNINGS()

#include "buffer_pool.h"
#include "common/logging.h"
Expand Down
4 changes: 1 addition & 3 deletions framework/heightmap.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Sascha Willems
/* Copyright (c) 2019-2024, Sascha Willems
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -21,9 +21,7 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include "common/glm_common.h"
VKBP_ENABLE_WARNINGS()

#include "platform/filesystem.h"

Expand Down
4 changes: 1 addition & 3 deletions framework/platform/android/android_platform.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -25,13 +25,11 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#include <fmt/format.h>
#include <imgui.h>
#include <jni.h>
#include <spdlog/sinks/android_sink.h>
#include <spdlog/sinks/basic_file_sink.h>
VKBP_ENABLE_WARNINGS()

#include "apps.h"
#include "common/logging.h"
Expand Down
4 changes: 1 addition & 3 deletions framework/platform/filesystem.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -19,10 +19,8 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h>
VKBP_ENABLE_WARNINGS()

#include "platform/platform.h"

Expand Down
4 changes: 1 addition & 3 deletions framework/platform/glfw_window.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2019-2023, Arm Limited and Contributors
/* Copyright (c) 2019-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -21,13 +21,11 @@

#include "common/error.h"

VKBP_DISABLE_WARNINGS()
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#include <fmt/format.h>
#include <spdlog/sinks/stdout_color_sinks.h>
VKBP_ENABLE_WARNINGS()

#include "common/logging.h"
#include "platform/platform.h"
Expand Down
Loading

0 comments on commit 13273ba

Please sign in to comment.