mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 10:19:20 +02:00
Six module interfaces carry windows.h in their fragment, and a fragment's include guard does not cross the boundary, so a unit that imported first and included the SDK afterwards parsed it twice: clang reports it as conflicting redeclarations of BroadcastSystemMessageEx and mismatched uuids all through the SDK. Same shape as the basic_filebuf failure, one level further out - the header arrives through d3d12.h, not directly. Thirty units get a guarded windows.h ahead of everything; on Linux it is a no-op. Vendored single-header libraries are left alone, and the block goes after a BOM rather than before it.
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#pragma once
|
|
#ifdef _WIN32
|
|
#include <windows.h> // before any import: its guard must be set here
|
|
#endif
|
|
|
|
#include <cstddef>
|
|
#include <string>
|
|
#include <ffx-fsr2-api/ffx_fsr2.h>
|
|
|
|
#include "nvrendererbackend.h"
|
|
|
|
import eu07.glm;
|
|
struct NvFSR {
|
|
NvFSR(class NvRenderer* renderer);
|
|
void Init();
|
|
void Render(nvrhi::ICommandList* command_list, double far_plane,
|
|
double near_plane, double fov);
|
|
|
|
FfxFsr2Interface m_fsr2_interface;
|
|
FfxFsr2Context m_fsr2_context;
|
|
std::string m_scratch_buffer;
|
|
|
|
nvrhi::ITexture* m_color;
|
|
nvrhi::ITexture* m_auto_exposure_buffer;
|
|
nvrhi::ITexture* m_depth;
|
|
nvrhi::ITexture* m_motion;
|
|
nvrhi::TextureHandle m_output;
|
|
|
|
FfxResource GetFfxResource(
|
|
nvrhi::ITexture* texture, wchar_t const* name = nullptr,
|
|
FfxResourceStates state = FFX_RESOURCE_STATE_COMPUTE_READ);
|
|
|
|
int m_input_width;
|
|
int m_input_height;
|
|
|
|
int m_width;
|
|
int m_height;
|
|
glm::vec2 m_current_jitter;
|
|
|
|
class NvRendererBackend* m_backend;
|
|
struct NvGbuffer* m_gbuffer;
|
|
struct GbufferBlitPass* m_inputpass;
|
|
struct MaAutoExposure* m_auto_exposure;
|
|
|
|
size_t m_current_frame = 0;
|
|
|
|
void BeginFrame();
|
|
glm::dmat4 GetJitterMatrix() const;
|
|
void ComputeJitter();
|
|
}; |