mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 14:20:28 +01:00
include what you use in betterRenderer
Its sources reached the standard library through the project headers they included; those are imports now. 178 headers across 56 files, plus 18 C library headers elsewhere for memcpy/printf and friends. MSVC's STL does not supply these transitively the way libstdc++ does.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
|
||||
namespace IntelTAA
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "config.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include <cstdint>
|
||||
|
||||
MaAutoExposure::MaAutoExposure(NvRenderer *renderer)
|
||||
: MaResourceRegistry(renderer), m_backend(renderer->GetBackend()) {}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "nvrenderer/resource_registry.h"
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
#include <cstdint>
|
||||
|
||||
class NvRenderer;
|
||||
class NvRendererBackend;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
import eu07.glm;
|
||||
#include <vector>
|
||||
|
||||
struct Bloom {
|
||||
struct BloomConstants {
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
void MaConfig::Init(const std::filesystem::path& config_file) {
|
||||
Init(YAML::LoadFile(config_file.generic_string()));
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct MaConfig {
|
||||
enum MaTonemapType { Default_Srgb = 0, Linear_Rec2020 };
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "gbuffer.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include <cstdint>
|
||||
|
||||
MaContactShadows::MaContactShadows(NvRenderer* renderer, NvGbuffer* gbuffer)
|
||||
: m_backend(renderer->GetBackend()),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
import eu07.glm;
|
||||
#include <cstdint>
|
||||
|
||||
struct MaContactShadows {
|
||||
MaContactShadows(class NvRenderer* renderer, class NvGbuffer* gbuffer);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "config.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
MaShadowMap::MaShadowMap(NvRenderer* renderer)
|
||||
: MaResourceRegistry(renderer), m_backend(renderer->m_backend.get()) {}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nvrhi/nvrhi.h>
|
||||
|
||||
#include "nvrenderer/resource_registry.h"
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
struct MaShadowMap : public MaResourceRegistry {
|
||||
MaShadowMap(class NvRenderer* renderer);
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
#include "nvtexture.h"
|
||||
import eu07.simulation.simulationenvironment;
|
||||
#include "sky.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
int MaEnvironment::GetCurrentSetIndex() {
|
||||
if (m_locked_set_index >= 0 && IsReady()) {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#include "fullscreenpass.h"
|
||||
#include "nvrenderer/resource_registry.h"
|
||||
#include "nvrhi/nvrhi.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
struct MaEnvironment : public MaResourceRegistry {
|
||||
nvrhi::TextureHandle m_skybox;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
import eu07.glm;
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
struct NvFSR {
|
||||
NvFSR(class NvRenderer* renderer);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "fullscreenpass.h"
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include <cstring>
|
||||
|
||||
FullScreenPass::FullScreenPass(NvRendererBackend* backend)
|
||||
: m_backend(backend) {}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include <cstdint>
|
||||
|
||||
NvGbuffer::NvGbuffer(NvRenderer* renderer)
|
||||
: m_backend(renderer->m_backend.get()) {}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
struct NvGbuffer {
|
||||
NvGbuffer(class NvRenderer* renderer);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "ssao.h"
|
||||
#include "config.h"
|
||||
import eu07.glm;
|
||||
#include <cstdint>
|
||||
|
||||
void GbufferLighting::Init() {
|
||||
auto fb_info = m_renderer->m_gbuffer->m_framebuffer->getFramebufferInfo();
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
#include <nvrenderer/nvrenderer.h>
|
||||
#include <nvrhi/nvrhi.h>
|
||||
import eu07.glm;
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
struct GbufferLighting : public MaResourceRegistry {
|
||||
|
||||
@@ -53,6 +53,9 @@ SOFTWARE.
|
||||
#include "imgui_nvrhi.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include "config.h"
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
struct VERTEX_CONSTANT_BUFFER
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ SOFTWARE.
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
#include "nvtexture.h"
|
||||
#include <cstddef>
|
||||
|
||||
struct ImGui_NVRHI
|
||||
{
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
struct InstanceCacheId {
|
||||
gfx::geometry_handle m_geometry;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#include "nvtexture.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <ios>
|
||||
#include <string>
|
||||
|
||||
bool NvTexture::LoadDDS(std::string &data, int size_bias) {
|
||||
ddspp::Descriptor desc{};
|
||||
|
||||
@@ -13,6 +13,10 @@ import eu07.utilities.utilities;
|
||||
#include <yaml-cpp/yaml.h>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
std::string_view MaterialAdapter::GetTexturePathForEntry(
|
||||
std::string_view key) const {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <functional>
|
||||
import eu07.glm;
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <unordered_map>
|
||||
|
||||
struct MotionCacheId {
|
||||
union {
|
||||
|
||||
@@ -12,6 +12,12 @@ import eu07.utilities.logs;
|
||||
#include "nvrendererbackend.h"
|
||||
#include "nvtexture.h"
|
||||
#include "sky.h"
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
bool NvRenderer::MaterialTemplate::CreateBindingSet(size_t pipeline_index,
|
||||
MaterialCache &cache) {
|
||||
|
||||
@@ -41,6 +41,20 @@ import eu07.simulation.simulation;
|
||||
import eu07.glm;
|
||||
#include "utilities/utilities_macros.h"
|
||||
import eu07.utilities.utilities;
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
bool NvRenderer::Init(GLFWwindow *Window) {
|
||||
m_message_callback = std::make_shared<NvRendererMessageCallback>();
|
||||
|
||||
@@ -14,6 +14,10 @@ import eu07.utilities.logs;
|
||||
#include <nvrhi/validation.h>
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#define HR_RETURN(op) \
|
||||
hr = (HRESULT)(op); \
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <dxgi1_6.h>
|
||||
#include <dxgidebug.h>
|
||||
#include <nvrhi/d3d12.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class NvRendererBackend_D3D12 : public NvRendererBackend {
|
||||
friend class NvRenderer;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "imgui_nvrhi.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include <memory>
|
||||
|
||||
class NvImguiRenderer : public imgui_renderer {
|
||||
virtual bool Init() override;
|
||||
|
||||
@@ -17,6 +17,16 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include <queue>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#define MA_ERROR_LOG(fmt_str, ...) ErrorLog(fmt::format(fmt_str, __VA_ARGS__))
|
||||
#define MA_INFO_LOG(fmt_str, ...) WriteLog(fmt::format(fmt_str, __VA_ARGS__))
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <queue>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
class NvRendererBackend_Vulkan : public NvRendererBackend {
|
||||
friend class NvRenderer;
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
import eu07.utilities.logs;
|
||||
#include <fmt/format.h>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
void NvRendererMessageCallback::message(nvrhi::MessageSeverity severity,
|
||||
const char *messageText) {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#include <nvrhi/nvrhi.h>
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
struct ShaderDefine {
|
||||
std::string m_name;
|
||||
|
||||
@@ -17,6 +17,16 @@ import eu07.utilities.logs;
|
||||
#define STB_IMAGE_RESIZE2_IMPLEMENTATION
|
||||
#include "stbi/stb_image_resize2.h"
|
||||
import eu07.model.texture;
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <cstring>
|
||||
#undef STB_IMAGE_RESIZE2_IMPLEMENTATION
|
||||
|
||||
uint64_t NvTexture::s_change_counter = 0;
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
import eu07.global_include.interfaces.itexture;
|
||||
#include "nvrenderer/nvrenderer_enums.h"
|
||||
import eu07.glm;
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
enum MaTextureTraits {
|
||||
MaTextureTraits_Sharpen,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "nvrenderer/quadtree.h"
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
void QuadTreeBuilder::Node::Insert(uint32_t index, glm::dvec3 min_,
|
||||
glm::dvec3 max_, int level) {
|
||||
|
||||
@@ -4,6 +4,11 @@ import eu07.utilities.logs;
|
||||
#include "fmt/compile.h"
|
||||
#include "nvtexture.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
MaResourceMappingSet& MaResourceMappingSet::Add(
|
||||
const MaResourceMapping& mapping) {
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
#include <vector>
|
||||
|
||||
import eu07.simcore;
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Rt {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include "nvrenderer_d3d12.h"
|
||||
#include <string>
|
||||
|
||||
#if LIBMANUL_WITH_D3D12
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "nvrenderer_vulkan.h"
|
||||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#if LIBMANUL_WITH_VULKAN
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import eu07.simulation.simulationenvironment;
|
||||
import eu07.simulation.simulationtime;
|
||||
#include "imgui/imgui.h"
|
||||
import eu07.glm;
|
||||
#include <array>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
namespace {
|
||||
static const float PI = 3.14159265358979323846f;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "fullscreenpass.h"
|
||||
#include "nvrenderer/resource_registry.h"
|
||||
#include <memory>
|
||||
|
||||
struct Sky : public MaResourceRegistry {
|
||||
Sky(class NvRenderer* renderer, struct MaEnvironment *environment);
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "nvrendererbackend.h"
|
||||
#include "imgui/imgui.h"
|
||||
import eu07.glm;
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
NvSsao::NvSsao(NvRenderer* renderer)
|
||||
: m_backend(renderer->m_backend.get()),
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "XeGTAO.h"
|
||||
import eu07.glm;
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
struct NvSsao {
|
||||
NvSsao(class NvRenderer* renderer);
|
||||
|
||||
@@ -11,6 +11,15 @@ import eu07.glm;
|
||||
#include "utilities/utilities_macros.h"
|
||||
import eu07.utilities.utilities;
|
||||
import eu07.utilities.float3d;
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace BatchingUtils {
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "nvrendererbackend.h"
|
||||
#include "nvrhi/utils.h"
|
||||
#include "nvtexture.h"
|
||||
#include <cstddef>
|
||||
|
||||
void WindshieldRain::Init(NvRenderer* in_renderer) {
|
||||
renderer = in_renderer;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
|
||||
struct WindshieldRain {
|
||||
void Init(NvRenderer *in_renderer);
|
||||
|
||||
Reference in New Issue
Block a user