-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathRtxdiResources.h
47 lines (39 loc) · 1.51 KB
/
RtxdiResources.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/***************************************************************************
# Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
**************************************************************************/
#pragma once
#include <nvrhi/nvrhi.h>
namespace rtxdi
{
class ReSTIRDIContext;
}
class RtxdiResources
{
public:
nvrhi::BufferHandle TaskBuffer;
nvrhi::BufferHandle LightDataBuffer;
nvrhi::BufferHandle NeighborOffsetsBuffer;
nvrhi::BufferHandle LightReservoirBuffer;
nvrhi::BufferHandle GeometryInstanceToLightBuffer;
RtxdiResources(
nvrhi::IDevice* device,
const rtxdi::ReSTIRDIContext& context,
uint32_t maxEmissiveMeshes,
uint32_t maxEmissiveTriangles,
uint32_t maxMeshInstances);
void InitializeNeighborOffsets(nvrhi::ICommandList* commandList, uint32_t neighborOffsetCount);
uint32_t GetMaxEmissiveMeshes() const;
uint32_t GetMaxEmissiveTriangles() const;
uint32_t GetMaxGeometryInstances() const;
private:
bool m_neighborOffsetsInitialized;
uint32_t m_maxEmissiveMeshes;
uint32_t m_maxEmissiveTriangles;
uint32_t m_maxGeometryInstances;
};