mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 07:59:19 +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.
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
#pragma once
|
|
#ifdef _WIN32
|
|
#include <windows.h> // before any import: its guard must be set here
|
|
#endif
|
|
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <memory>
|
|
#include <nvrhi/nvrhi.h>
|
|
|
|
|
|
#include "XeGTAO.h"
|
|
|
|
import eu07.glm;
|
|
struct NvSsao {
|
|
NvSsao(class NvRenderer* renderer);
|
|
void Init();
|
|
|
|
XeGTAO::GTAOSettings settings{};
|
|
|
|
class NvRendererBackend* m_backend;
|
|
struct NvGbuffer* m_gbuffer;
|
|
|
|
nvrhi::ShaderHandle m_CSPrefilterDepths16x16;
|
|
nvrhi::ComputePipelineHandle m_PSOPrefilterDepths;
|
|
nvrhi::BindingSetHandle m_BSPrefilterDepths;
|
|
|
|
nvrhi::SamplerHandle m_SamplerPoint;
|
|
|
|
nvrhi::ShaderHandle m_CSGTAOLow;
|
|
nvrhi::ShaderHandle m_CSGTAOMedium;
|
|
nvrhi::ShaderHandle m_CSGTAOHigh;
|
|
nvrhi::ShaderHandle m_CSGTAOUltra;
|
|
std::array<nvrhi::ComputePipelineHandle, 4> m_PSOGTAO;
|
|
nvrhi::BindingSetHandle m_BSGTAO;
|
|
|
|
nvrhi::ShaderHandle m_CSDenoisePass;
|
|
nvrhi::ShaderHandle m_CSDenoiseLastPass;
|
|
nvrhi::ComputePipelineHandle m_PSODenoise;
|
|
nvrhi::ComputePipelineHandle m_PSODenoiseLastPass;
|
|
nvrhi::BindingLayoutHandle m_BLDenoise;
|
|
nvrhi::BindingSetHandle m_BSDenoise;
|
|
|
|
nvrhi::ShaderHandle m_CSGenerateNormals;
|
|
nvrhi::ComputePipelineHandle m_PSOGenerateNormals;
|
|
nvrhi::BindingSetHandle m_BSGenerateNormals;
|
|
|
|
nvrhi::TextureHandle m_workingDepths;
|
|
nvrhi::TextureHandle m_workingEdges;
|
|
nvrhi::TextureHandle m_workingAOTerm;
|
|
nvrhi::TextureHandle m_workingAOTermPong;
|
|
nvrhi::TextureHandle m_workingNormals;
|
|
nvrhi::TextureHandle m_debugImage;
|
|
nvrhi::TextureHandle m_outputAO;
|
|
nvrhi::BufferHandle m_constantBuffer;
|
|
|
|
|
|
int m_width;
|
|
int m_height;
|
|
|
|
void Render(nvrhi::ICommandList* command_list, const glm::mat4& projection,
|
|
size_t frame_index);
|
|
|
|
void OnGui(bool open_now);
|
|
}; |