RavEngine
Loading...
Searching...
No Matches
NvFlowTypes.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2014-2022 NVIDIA Corporation. All rights reserved.
26
27#ifndef NV_FLOW_TYPES_H
28#define NV_FLOW_TYPES_H
29
30#include "shaders/NvFlowShaderTypes.h"
31
33#if defined(_WIN32)
34#if defined(__cplusplus)
35#define NV_FLOW_API extern "C" __declspec(dllexport)
36#else
37#define NV_FLOW_API __declspec(dllexport)
38#endif
39#define NV_FLOW_ABI __cdecl
40#else
41#if defined(__cplusplus)
42#define NV_FLOW_API extern "C"
43#else
44#define NV_FLOW_API
45#endif
46#define NV_FLOW_ABI
47#endif
48
49#if defined(__cplusplus)
50#define NV_FLOW_INLINE inline
51#else
52#define NV_FLOW_INLINE static
53#endif
54
55#if defined(_WIN32)
56#define NV_FLOW_FORCE_INLINE inline __forceinline
57#else
58#define NV_FLOW_FORCE_INLINE inline __attribute__((always_inline))
59#endif
60
61// #define NV_FLOW_DEBUG_ALLOC
62
64
65typedef enum NvFlowLogLevel
66{
67 eNvFlowLogLevel_error = 0,
68 eNvFlowLogLevel_warning = 1,
69 eNvFlowLogLevel_info = 2,
70
71 eNvFlowLogLevel_maxEnum = 0x7FFFFFFF
72}NvFlowLogLevel;
73
74typedef void(NV_FLOW_ABI* NvFlowLogPrint_t)(NvFlowLogLevel level, const char* format, ...);
75
76#define NV_FLOW_FALSE 0
77#define NV_FLOW_TRUE 1
78
79typedef enum NvFlowType
80{
81 eNvFlowType_unknown = 0,
82 eNvFlowType_void = 1,
83 eNvFlowType_function = 2,
84 eNvFlowType_struct = 3,
85 eNvFlowType_int = 4,
86 eNvFlowType_int2 = 5,
87 eNvFlowType_int3 = 6,
88 eNvFlowType_int4 = 7,
89 eNvFlowType_uint = 8,
90 eNvFlowType_uint2 = 9,
91 eNvFlowType_uint3 = 10,
92 eNvFlowType_uint4 = 11,
93 eNvFlowType_float = 12,
94 eNvFlowType_float2 = 13,
95 eNvFlowType_float3 = 14,
96 eNvFlowType_float4 = 15,
97 eNvFlowType_float4x4 = 16,
98 eNvFlowType_bool32 = 17,
99 eNvFlowType_uint8 = 18,
100 eNvFlowType_uint16 = 19,
101 eNvFlowType_uint64 = 20,
102 eNvFlowType_char = 21,
103 eNvFlowType_double = 22,
104
105 eNvFlowType_count = 23,
106 eNvFlowType_maxEnum = 0x7FFFFFFF
107}NvFlowType;
108
109typedef enum NvFlowContextApi
110{
111 eNvFlowContextApi_abstract = 0,
112 eNvFlowContextApi_vulkan = 1,
113 eNvFlowContextApi_d3d12 = 2,
114 eNvFlowContextApi_cpu = 3,
115
116 eNvFlowContextApi_count = 4,
117 eNvFlowContextApi_maxEnum = 0x7FFFFFFF
118}NvFlowContextApi;
119
120typedef enum NvFlowFormat
121{
122 eNvFlowFormat_unknown = 0,
123
124 eNvFlowFormat_r32g32b32a32_float = 1,
125 eNvFlowFormat_r32g32b32a32_uint = 2,
126 eNvFlowFormat_r32g32b32a32_sint = 3,
127
128 eNvFlowFormat_r32g32b32_float = 4,
129 eNvFlowFormat_r32g32b32_uint = 5,
130 eNvFlowFormat_r32g32b32_sint = 6,
131
132 eNvFlowFormat_r16g16b16a16_float = 7,
133 eNvFlowFormat_r16g16b16a16_unorm = 8,
134 eNvFlowFormat_r16g16b16a16_uint = 9,
135 eNvFlowFormat_r16g16b16a16_snorm = 10,
136 eNvFlowFormat_r16g16b16a16_sint = 11,
137
138 eNvFlowFormat_r32g32_float = 12,
139 eNvFlowFormat_r32g32_uint = 13,
140 eNvFlowFormat_r32g32_sint = 14,
141
142 eNvFlowFormat_r10g10b10a2_unorm = 15,
143 eNvFlowFormat_r10g10b10a2_uint = 16,
144 eNvFlowFormat_r11g11b10_float = 17,
145
146 eNvFlowFormat_r8g8b8a8_unorm = 18,
147 eNvFlowFormat_r8g8b8a8_unorm_srgb = 19,
148 eNvFlowFormat_r8g8b8a8_uint = 20,
149 eNvFlowFormat_r8g8b8a8_snorm = 21,
150 eNvFlowFormat_r8g8b8a8_sint = 22,
151
152 eNvFlowFormat_r16g16_float = 23,
153 eNvFlowFormat_r16g16_unorm = 24,
154 eNvFlowFormat_r16g16_uint = 25,
155 eNvFlowFormat_r16g16_snorm = 26,
156 eNvFlowFormat_r16g16_sint = 27,
157
158 eNvFlowFormat_r32_float = 28,
159 eNvFlowFormat_r32_uint = 29,
160 eNvFlowFormat_r32_sint = 30,
161
162 eNvFlowFormat_r8g8_unorm = 31,
163 eNvFlowFormat_r8g8_uint = 32,
164 eNvFlowFormat_r8g8_snorm = 33,
165 eNvFlowFormat_r8g8_sint = 34,
166
167 eNvFlowFormat_r16_float = 35,
168 eNvFlowFormat_r16_unorm = 36,
169 eNvFlowFormat_r16_uint = 37,
170 eNvFlowFormat_r16_snorm = 38,
171 eNvFlowFormat_r16_sint = 39,
172
173 eNvFlowFormat_r8_unorm = 40,
174 eNvFlowFormat_r8_uint = 41,
175 eNvFlowFormat_r8_snorm = 42,
176 eNvFlowFormat_r8_sint = 43,
177
178 eNvFlowFormat_b8g8r8a8_unorm = 44,
179 eNvFlowFormat_b8g8r8a8_unorm_srgb = 45,
180
181 eNvFlowFormat_count = 256,
182 eNvFlowFormat_maxEnum = 0x7FFFFFFF
183}NvFlowFormat;
184
185#endif