mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 10:27:32 +01:00
build betterRenderer against the modules
Verified locally now that Vulkan and DXC are installed: all 31 targets compile. glm has to come from eu07.glm only - having it both as a plain include and as an import made every overload ambiguous. nvrenderer.h is self-sufficient, since register.cpp includes nothing else. Fixes the vcpkg triplet, which was pinned to x64-windows.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <cmath>
|
||||
#include "imgui/imgui.h"
|
||||
import eu07.glm;
|
||||
|
||||
namespace XeGTAO
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <nvrhi/utils.h>
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
void Bloom::UpdateConstants(nvrhi::ICommandList* command_list) {
|
||||
BloomConstants constants{};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <nvrhi/nvrhi.h>
|
||||
import eu07.glm;
|
||||
|
||||
struct Bloom {
|
||||
struct BloomConstants {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
#include <glm/glm.hpp>
|
||||
import eu07.glm;
|
||||
|
||||
struct MaContactShadows {
|
||||
MaContactShadows(class NvRenderer* renderer, class NvGbuffer* gbuffer);
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
import eu07.utilities.globals;
|
||||
#include "gbuffer.h"
|
||||
#include "gbufferblitpass.h"
|
||||
import eu07.glm;
|
||||
#include <queue>
|
||||
|
||||
NvFSR::NvFSR(NvRenderer* renderer)
|
||||
: m_backend(renderer->m_backend.get()),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <ffx-fsr2-api/ffx_fsr2.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
import eu07.glm;
|
||||
|
||||
struct NvFSR {
|
||||
NvFSR(class NvRenderer* renderer);
|
||||
|
||||
@@ -11,6 +11,7 @@ import eu07.utilities.timer;
|
||||
#include "nvrendererbackend.h"
|
||||
#include "sky.h"
|
||||
#include "ssao.h"
|
||||
import eu07.glm;
|
||||
|
||||
GbufferBlitPass::GbufferBlitPass(NvRenderer* renderer, NvGbuffer* gbuffer,
|
||||
NvGbuffer* gbuffer_shadow, NvSsao* ssao,
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
#include <nvrhi/utils.h>
|
||||
|
||||
#include <glm/gtc/packing.hpp>
|
||||
|
||||
#include "gbuffer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include "ssao.h"
|
||||
#include "config.h"
|
||||
import eu07.glm;
|
||||
|
||||
void GbufferLighting::Init() {
|
||||
auto fb_info = m_renderer->m_gbuffer->m_framebuffer->getFramebufferInfo();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <nvrenderer/nvrenderer.h>
|
||||
#include <nvrhi/nvrhi.h>
|
||||
import eu07.glm;
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
struct GbufferLighting : public MaResourceRegistry {
|
||||
GbufferLighting(NvRenderer* renderer)
|
||||
|
||||
@@ -7,11 +7,12 @@ import eu07.utilities.globals;
|
||||
import eu07.utilities.logs;
|
||||
#include <fmt/format.h>
|
||||
import eu07.model.material;
|
||||
#include <parser.h>
|
||||
import eu07.utilities.parser;
|
||||
#include "utilities/utilities_macros.h"
|
||||
import eu07.utilities.utilities;
|
||||
#include <yaml-cpp/yaml.h>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
std::string_view MaterialAdapter::GetTexturePathForEntry(
|
||||
std::string_view key) const {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <string>
|
||||
import eu07.glm;
|
||||
|
||||
struct MaterialAdapterInternal {
|
||||
virtual ~MaterialAdapterInternal() = default;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <glm/glm.hpp>
|
||||
import eu07.glm;
|
||||
#include <cassert>
|
||||
|
||||
struct MotionCacheId {
|
||||
union {
|
||||
|
||||
@@ -8,7 +8,6 @@ import eu07.application.application;
|
||||
import eu07.simulation.simulation;
|
||||
|
||||
#include <future>
|
||||
#include <glm/gtx/transform.hpp>
|
||||
|
||||
#include "auto_exposure.h"
|
||||
#include "bloom.h"
|
||||
@@ -39,6 +38,9 @@ import eu07.simulation.simulation;
|
||||
#include "rt_model.h"
|
||||
#include "tinyexr.h"
|
||||
#include "windshield_rain.h"
|
||||
import eu07.glm;
|
||||
#include "utilities/utilities_macros.h"
|
||||
import eu07.utilities.utilities;
|
||||
|
||||
bool NvRenderer::Init(GLFWwindow *Window) {
|
||||
m_message_callback = std::make_shared<NvRendererMessageCallback>();
|
||||
|
||||
@@ -16,6 +16,7 @@ import eu07.utilities.logs;
|
||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
|
||||
#include "nvrendererbackend.h"
|
||||
#include <queue>
|
||||
|
||||
#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__))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <nvrhi/vulkan.h>
|
||||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
#include <queue>
|
||||
|
||||
class NvRendererBackend_Vulkan : public NvRendererBackend {
|
||||
friend class NvRenderer;
|
||||
|
||||
@@ -16,6 +16,7 @@ import eu07.utilities.logs;
|
||||
#include "stbi/stb_image.h"
|
||||
#define STB_IMAGE_RESIZE2_IMPLEMENTATION
|
||||
#include "stbi/stb_image_resize2.h"
|
||||
import eu07.model.texture;
|
||||
#undef STB_IMAGE_RESIZE2_IMPLEMENTATION
|
||||
|
||||
uint64_t NvTexture::s_change_counter = 0;
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#include <unordered_map>
|
||||
#include <nvrhi/nvrhi.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "global_include/interfaces/ITexture_macros.h"
|
||||
import eu07.global_include.interfaces.itexture;
|
||||
#include "nvrenderer/nvrenderer_enums.h"
|
||||
import eu07.glm;
|
||||
|
||||
enum MaTextureTraits {
|
||||
MaTextureTraits_Sharpen,
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <glm/vec3.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
|
||||
class TSubModel;
|
||||
class TModel3d;
|
||||
// TSubModel/TModel3d are owned by the simulation core; a forward
|
||||
// declaration here would be a second, conflicting declaration.
|
||||
import eu07.simcore;
|
||||
import eu07.glm;
|
||||
|
||||
namespace Rt {
|
||||
struct IRtModel {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include "nvrenderer_vulkan.h"
|
||||
#include <queue>
|
||||
|
||||
#if LIBMANUL_WITH_VULKAN
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "nvrendererbackend.h"
|
||||
import eu07.simulation.simulationenvironment;
|
||||
import eu07.simulation.simulationtime;
|
||||
#include "imgui/imgui.h"
|
||||
import eu07.glm;
|
||||
|
||||
namespace {
|
||||
static const float PI = 3.14159265358979323846f;
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
#include <nvrhi/nvrhi.h>
|
||||
#include <nvrhi/utils.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "XeGTAO.h"
|
||||
#include "gbuffer.h"
|
||||
#include "nvrenderer/nvrenderer.h"
|
||||
#include "nvrendererbackend.h"
|
||||
#include "imgui/imgui.h"
|
||||
import eu07.glm;
|
||||
|
||||
NvSsao::NvSsao(NvRenderer* renderer)
|
||||
: m_backend(renderer->m_backend.get()),
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#include <nvrhi/nvrhi.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include "XeGTAO.h"
|
||||
import eu07.glm;
|
||||
|
||||
struct NvSsao {
|
||||
NvSsao(class NvRenderer* renderer);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Model3d.h>
|
||||
import eu07.simcore;
|
||||
|
||||
struct MaTopologyUtils {
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
import eu07.utilities.timer;
|
||||
import eu07.simcore;
|
||||
import eu07.simulation.simulation;
|
||||
import eu07.glm;
|
||||
#include "utilities/utilities_macros.h"
|
||||
import eu07.utilities.utilities;
|
||||
import eu07.utilities.float3d;
|
||||
|
||||
namespace BatchingUtils {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user