| 1 | #pragma once |
| 2 | |
| 3 | namespace nn::gfx { |
| 4 | |
| 5 | namespace detail { |
| 6 | |
| 7 | enum FilterModeBit { |
| 8 | FilterModeBit_Point = 1, |
| 9 | FilterModeBit_Linear = 2, |
| 10 | FilterModeBit_MinFilterShift = 4, |
| 11 | FilterModeBit_MagFilterShift = 2, |
| 12 | FilterModeBit_MipFilterShift = 0, |
| 13 | FilterModeBit_MinPoint = FilterModeBit_Point << FilterModeBit_MinFilterShift, |
| 14 | FilterModeBit_MinLinear = FilterModeBit_Linear << FilterModeBit_MinFilterShift, |
| 15 | FilterModeBit_MagPoint = FilterModeBit_Point << FilterModeBit_MagFilterShift, |
| 16 | FilterModeBit_MagLinear = FilterModeBit_Linear << FilterModeBit_MagFilterShift, |
| 17 | FilterModeBit_MipPoint = FilterModeBit_Point << FilterModeBit_MipFilterShift, |
| 18 | FilterModeBit_MipLinear = FilterModeBit_Linear << FilterModeBit_MipFilterShift, |
| 19 | FilterModeBit_MinFilterMask = 3 << FilterModeBit_MinFilterShift, |
| 20 | FilterModeBit_MagFilterMask = 3 << FilterModeBit_MagFilterShift, |
| 21 | FilterModeBit_MipFilterMask = 3 << FilterModeBit_MipFilterShift, |
| 22 | FilterModeBit_Anisotropic = 0x40, |
| 23 | FilterModeBit_Comparison = 0x80, |
| 24 | FilterModeBit_Minimum = 0x100, |
| 25 | FilterModeBit_Maximum = 0x200 |
| 26 | }; |
| 27 | |
| 28 | } // namespace detail |
| 29 | |
| 30 | enum LogicOperation { |
| 31 | LogicOperation_Clear, |
| 32 | LogicOperation_And, |
| 33 | LogicOperation_AndReverse, |
| 34 | LogicOperation_Copy, |
| 35 | LogicOperation_AndInverted, |
| 36 | LogicOperation_NoOp, |
| 37 | LogicOperation_Xor, |
| 38 | LogicOperation_Or, |
| 39 | LogicOperation_Nor, |
| 40 | LogicOperation_Equiv, |
| 41 | LogicOperation_Invert, |
| 42 | LogicOperation_OrReverse, |
| 43 | LogicOperation_CopyInverted, |
| 44 | LogicOperation_OrInverted, |
| 45 | LogicOperation_Nand, |
| 46 | LogicOperation_Set, |
| 47 | LogicOperation_End |
| 48 | }; |
| 49 | |
| 50 | enum BlendFunction { |
| 51 | BlendFunction_Add, |
| 52 | BlendFunction_Subtract, |
| 53 | BlendFunction_ReverseSubtract, |
| 54 | BlendFunction_Min, |
| 55 | BlendFunction_Max, |
| 56 | BlendFunction_End |
| 57 | }; |
| 58 | |
| 59 | enum BlendFactor { |
| 60 | BlendFactor_Zero, |
| 61 | BlendFactor_One, |
| 62 | BlendFactor_SourceColor, |
| 63 | BlendFactor_OneMinusSourceColor, |
| 64 | BlendFactor_DestinationColor, |
| 65 | BlendFactor_OneMinusDestinationColor, |
| 66 | BlendFactor_SourceAlpha, |
| 67 | BlendFactor_OneMinusSourceAlpha, |
| 68 | BlendFactor_DestinationAlpha, |
| 69 | BlendFactor_OneMinusDestinationAlpha, |
| 70 | BlendFactor_ConstantColor, |
| 71 | BlendFactor_OneMinusConstantColor, |
| 72 | BlendFactor_ConstantAlpha, |
| 73 | BlendFactor_OneMinusConstantAlpha, |
| 74 | BlendFactor_SourceAlphaSaturate, |
| 75 | BlendFactor_Source1Color, |
| 76 | BlendFactor_OneMinusSource1Color, |
| 77 | BlendFactor_Source1Alpha, |
| 78 | BlendFactor_OneMinusSource1Alpha, |
| 79 | BlendFactor_End |
| 80 | }; |
| 81 | |
| 82 | enum StencilOperation { |
| 83 | StencilOperation_Keep, |
| 84 | StencilOperation_Zero, |
| 85 | StencilOperation_Replace, |
| 86 | StencilOperation_IncrementClamp, |
| 87 | StencilOperation_DecrementClamp, |
| 88 | StencilOperation_Invert, |
| 89 | StencilOperation_IncrementWrap, |
| 90 | StencilOperation_DecrementWrap, |
| 91 | StencilOperation_End |
| 92 | }; |
| 93 | |
| 94 | enum ChannelMask { |
| 95 | ChannelMask_Red = 1, |
| 96 | ChannelMask_Green = 2, |
| 97 | ChannelMask_Blue = 4, |
| 98 | ChannelMask_Alpha = 8, |
| 99 | ChannelMask_All = 15 |
| 100 | }; |
| 101 | |
| 102 | enum PrimitiveTopology { |
| 103 | PrimitiveTopology_PointList, |
| 104 | PrimitiveTopology_LineList, |
| 105 | PrimitiveTopology_LineStrip, |
| 106 | PrimitiveTopology_TriangleList, |
| 107 | PrimitiveTopology_TriangleStrip, |
| 108 | PrimitiveTopology_LineListAdjacency, |
| 109 | PrimitiveTopology_LineStripAdjacency, |
| 110 | PrimitiveTopology_TriangleListAdjacency, |
| 111 | PrimitiveTopology_TriangleStripAdjacency, |
| 112 | PrimitiveTopology_PatchList, |
| 113 | PrimitiveTopology_End |
| 114 | }; |
| 115 | |
| 116 | enum PrimitiveTopologyType { |
| 117 | PrimitiveTopologyType_Undefined, |
| 118 | PrimitiveTopologyType_Point, |
| 119 | PrimitiveTopologyType_Line, |
| 120 | PrimitiveTopologyType_Triangle, |
| 121 | PrimitiveTopologyType_Patch, |
| 122 | PrimitiveTopologyType_End |
| 123 | }; |
| 124 | |
| 125 | enum ConservativeRasterizationMode { |
| 126 | ConservativeRasterizationMode_Disable, |
| 127 | ConservativeRasterizationMode_Enable, |
| 128 | ConservativeRasterizationMode_End |
| 129 | }; |
| 130 | |
| 131 | enum IndexFormat { IndexFormat_Uint8, IndexFormat_Uint16, IndexFormat_Uint32, IndexFormat_End }; |
| 132 | |
| 133 | enum FillMode { FillMode_Wireframe = 1, FillMode_Solid, FillMode_End }; |
| 134 | |
| 135 | enum CullMode { CullMode_None, CullMode_Front, CullMode_Back, CullMode_End }; |
| 136 | |
| 137 | enum FrontFace { FrontFace_Ccw, FrontFace_Cw, FrontFace_End }; |
| 138 | |
| 139 | enum TextureAddressMode { |
| 140 | TextureAddressMode_Repeat, |
| 141 | TextureAddressMode_Mirror, |
| 142 | TextureAddressMode_ClampToEdge, |
| 143 | TextureAddressMode_ClampToBorder, |
| 144 | TextureAddressMode_MirrorClampToEdge, |
| 145 | TextureAddressMode_End |
| 146 | }; |
| 147 | |
| 148 | // todo: is this using detail::FilterModeBit? |
| 149 | enum FilterMode { |
| 150 | FilterMode_MinPoint_MagPoint_MipPoint = 21, |
| 151 | FilterMode_MinPoint_MagPoint_MipLinear, |
| 152 | FilterMode_MinPoint_MagLinear_MipPoint = 25, |
| 153 | FilterMode_MinPoint_MagLinear_MipLinear, |
| 154 | FilterMode_MinLinear_MagPoint_MipPoint = 37, |
| 155 | FilterMode_MinLinear_MagPoint_MipLinear, |
| 156 | FilterMode_MinLinear_MagLinear_MipPoint = 41, |
| 157 | FilterMode_MinLinear_MagLinear_MipLinear, |
| 158 | FilterMode_Anisotropic = 106, |
| 159 | FilterMode_Comparison_MinPoint_MagPoint_MipPoint = 149, |
| 160 | FilterMode_Comparison_MinPoint_MagPoint_MipLinear, |
| 161 | FilterMode_Comparison_MinPoint_MagLinear_MipPoint = 153, |
| 162 | FilterMode_Comparison_MinPoint_MagLinear_MipLinear, |
| 163 | FilterMode_Comparison_MinLinear_MagPoint_MipPoint = 165, |
| 164 | FilterMode_Comparison_MinLinear_MagPoint_MipLinear, |
| 165 | FilterMode_Comparison_MinLinear_MagLinear_MipPoint = 169, |
| 166 | FilterMode_Comparison_MinLinear_MagLinear_MipLinear, |
| 167 | FilterMode_Comparison_Anisotropic = 234, |
| 168 | FilterMode_Minimum_MinPoint_MagPoint_MipPoint = 277, |
| 169 | FilterMode_Minimum_MinPoint_MagPoint_MipLinear, |
| 170 | FilterMode_Minimum_MinPoint_MagLinear_MipPoint = 281, |
| 171 | FilterMode_Minimum_MinPoint_MagLinear_MipLinear, |
| 172 | FilterMode_Minimum_MinLinear_MagPoint_MipPoint = 293, |
| 173 | FilterMode_Minimum_MinLinear_MagPoint_MipLinear, |
| 174 | FilterMode_Minimum_MinLinear_MagLinear_MipPoint = 297, |
| 175 | FilterMode_Minimum_MinLinear_MagLinear_MipLinear, |
| 176 | FilterMode_Minimum_Anisotropic = 362, |
| 177 | FilterMode_Maximum_MinPoint_MagPoint_MipPoint = 533, |
| 178 | FilterMode_Maximum_MinPoint_MagPoint_MipLinear, |
| 179 | FilterMode_Maximum_MinPoint_MagLinear_MipPoint = 537, |
| 180 | FilterMode_Maximum_MinPoint_MagLinear_MipLinear, |
| 181 | FilterMode_Maximum_MinLinear_MagPoint_MipPoint = 549, |
| 182 | FilterMode_Maximum_MinLinear_MagPoint_MipLinear, |
| 183 | FilterMode_Maximum_MinLinear_MagLinear_MipPoint = 553, |
| 184 | FilterMode_Maximum_MinLinear_MagLinear_MipLinear, |
| 185 | FilterMode_Maximum_Anisotropic = 618 |
| 186 | }; |
| 187 | |
| 188 | enum ComparisonFunction { |
| 189 | ComparisonFunction_Never, |
| 190 | ComparisonFunction_Less, |
| 191 | ComparisonFunction_Equal, |
| 192 | ComparisonFunction_LessEqual, |
| 193 | ComparisonFunction_Greater, |
| 194 | ComparisonFunction_NotEqual, |
| 195 | ComparisonFunction_GreaterEqual, |
| 196 | ComparisonFunction_Always, |
| 197 | ComparisonFunction_End |
| 198 | }; |
| 199 | |
| 200 | enum TextureBorderColorType { |
| 201 | TextureBorderColorType_White, |
| 202 | TextureBorderColorType_TransparentBlack, |
| 203 | TextureBorderColorType_OpaqueBlack, |
| 204 | TextureBorderColorType_End |
| 205 | }; |
| 206 | |
| 207 | enum ImageStorageDimension { |
| 208 | ImageStorageDimension_Undefined, |
| 209 | ImageStorageDimension_1d, |
| 210 | ImageStorageDimension_2d, |
| 211 | ImageStorageDimension_3d |
| 212 | }; |
| 213 | |
| 214 | enum ImageDimension { |
| 215 | ImageDimension_1d, |
| 216 | ImageDimension_2d, |
| 217 | ImageDimension_3d, |
| 218 | ImageDimension_CubeMap, |
| 219 | ImageDimension_1dArray, |
| 220 | ImageDimension_2dArray, |
| 221 | ImageDimension_2dMultisample, |
| 222 | ImageDimension_2dMultisampleArray, |
| 223 | ImageDimension_CubeMapArray, |
| 224 | ImageDimension_End |
| 225 | }; |
| 226 | |
| 227 | enum ChannelFormat { |
| 228 | ChannelFormat_Undefined, |
| 229 | ChannelFormat_R4_G4, |
| 230 | ChannelFormat_R8, |
| 231 | ChannelFormat_R4_G4_B4_A4, |
| 232 | ChannelFormat_A4_B4_G4_R4, |
| 233 | ChannelFormat_R5_G5_B5_A1, |
| 234 | ChannelFormat_A1_B5_G5_R5, |
| 235 | ChannelFormat_R5_G6_B5, |
| 236 | ChannelFormat_B5_G6_R5, |
| 237 | ChannelFormat_R8_G8, |
| 238 | ChannelFormat_R16, |
| 239 | ChannelFormat_R8_G8_B8_A8, |
| 240 | ChannelFormat_B8_G8_R8_A8, |
| 241 | ChannelFormat_R9_G9_B9_E5, |
| 242 | ChannelFormat_R10_G10_B10_A2, |
| 243 | ChannelFormat_R11_G11_B10, |
| 244 | ChannelFormat_B10_G11_R11, |
| 245 | ChannelFormat_R10_G11_B11, |
| 246 | ChannelFormat_R16_G16, |
| 247 | ChannelFormat_R24_G8, |
| 248 | ChannelFormat_R32, |
| 249 | ChannelFormat_R16_G16_B16_A16, |
| 250 | ChannelFormat_R32_G8_X24, |
| 251 | ChannelFormat_R32_G32, |
| 252 | ChannelFormat_R32_G32_B32, |
| 253 | ChannelFormat_R32_G32_B32_A32, |
| 254 | ChannelFormat_Bc1, |
| 255 | ChannelFormat_Bc2, |
| 256 | ChannelFormat_Bc3, |
| 257 | ChannelFormat_Bc4, |
| 258 | ChannelFormat_Bc5, |
| 259 | ChannelFormat_Bc6, |
| 260 | ChannelFormat_Bc7, |
| 261 | ChannelFormat_Eac_R11, |
| 262 | ChannelFormat_Eac_R11_G11, |
| 263 | ChannelFormat_Etc1, |
| 264 | ChannelFormat_Etc2, |
| 265 | ChannelFormat_Etc2_Mask, |
| 266 | ChannelFormat_Etc2_Alpha, |
| 267 | ChannelFormat_Pvrtc1_2Bpp, |
| 268 | ChannelFormat_Pvrtc1_4Bpp, |
| 269 | ChannelFormat_Pvrtc1_Alpha_2Bpp, |
| 270 | ChannelFormat_Pvrtc1_Alpha_4Bpp, |
| 271 | ChannelFormat_Pvrtc2_Alpha_2Bpp, |
| 272 | ChannelFormat_Pvrtc2_Alpha_4Bpp, |
| 273 | ChannelFormat_Astc_4x4, |
| 274 | ChannelFormat_Astc_5x4, |
| 275 | ChannelFormat_Astc_5x5, |
| 276 | ChannelFormat_Astc_6x5, |
| 277 | ChannelFormat_Astc_6x6, |
| 278 | ChannelFormat_Astc_8x5, |
| 279 | ChannelFormat_Astc_8x6, |
| 280 | ChannelFormat_Astc_8x8, |
| 281 | ChannelFormat_Astc_10x5, |
| 282 | ChannelFormat_Astc_10x6, |
| 283 | ChannelFormat_Astc_10x8, |
| 284 | ChannelFormat_Astc_10x10, |
| 285 | ChannelFormat_Astc_12x10, |
| 286 | ChannelFormat_Astc_12x12, |
| 287 | ChannelFormat_B5_G5_R5_A1, |
| 288 | ChannelFormat_End |
| 289 | }; |
| 290 | |
| 291 | enum TypeFormat { |
| 292 | TypeFormat_Undefined, |
| 293 | TypeFormat_Unorm, |
| 294 | TypeFormat_Snorm, |
| 295 | TypeFormat_Uint, |
| 296 | TypeFormat_Sint, |
| 297 | TypeFormat_Float, |
| 298 | TypeFormat_UnormSrgb, |
| 299 | TypeFormat_DepthStencil, |
| 300 | TypeFormat_UintToFloat, |
| 301 | TypeFormat_SintToFloat, |
| 302 | TypeFormat_Ufloat, |
| 303 | TypeFormat_End, |
| 304 | TypeFormat_Bits = 8 |
| 305 | }; |
| 306 | |
| 307 | enum ImageFormat { |
| 308 | ImageFormat_Undefined, |
| 309 | ImageFormat_R8_Unorm = 513, |
| 310 | ImageFormat_R8_Snorm, |
| 311 | ImageFormat_R8_Uint, |
| 312 | ImageFormat_R8_Sint, |
| 313 | ImageFormat_R4_G4_B4_A4_Unorm = 769, |
| 314 | ImageFormat_A4_B4_G4_R4_Unorm = 1025, |
| 315 | ImageFormat_R5_G5_B5_A1_Unorm = 1281, |
| 316 | ImageFormat_A1_B5_G5_R5_Unorm = 1537, |
| 317 | ImageFormat_R5_G6_B5_Unorm = 1793, |
| 318 | ImageFormat_B5_G6_R5_Unorm = 2049, |
| 319 | ImageFormat_R8_G8_Unorm = 2305, |
| 320 | ImageFormat_R8_G8_Snorm, |
| 321 | ImageFormat_R8_G8_Uint, |
| 322 | ImageFormat_R8_G8_Sint, |
| 323 | ImageFormat_R16_Unorm = 2561, |
| 324 | ImageFormat_R16_Snorm, |
| 325 | ImageFormat_R16_Uint, |
| 326 | ImageFormat_R16_Sint, |
| 327 | ImageFormat_R16_Float, |
| 328 | ImageFormat_D16_Unorm = 2567, |
| 329 | ImageFormat_R8_G8_B8_A8_Unorm = 2817, |
| 330 | ImageFormat_R8_G8_B8_A8_Snorm, |
| 331 | ImageFormat_R8_G8_B8_A8_Uint, |
| 332 | ImageFormat_R8_G8_B8_A8_Sint, |
| 333 | ImageFormat_R8_G8_B8_A8_UnormSrgb = 2822, |
| 334 | ImageFormat_B8_G8_R8_A8_Unorm = 3073, |
| 335 | ImageFormat_B8_G8_R8_A8_Snorm, |
| 336 | ImageFormat_B8_G8_R8_A8_Uint, |
| 337 | ImageFormat_B8_G8_R8_A8_Sint, |
| 338 | ImageFormat_B8_G8_R8_A8_UnormSrgb = 3078, |
| 339 | ImageFormat_R9_G9_B9_E5_SharedExp = 3333, |
| 340 | ImageFormat_R10_G10_B10_A2_Unorm = 3585, |
| 341 | ImageFormat_R10_G10_B10_A2_Uint = 3587, |
| 342 | ImageFormat_R11_G11_B10_Float = 3845, |
| 343 | ImageFormat_B10_G11_R11_Float = 4101, |
| 344 | ImageFormat_R16_G16_Unorm = 4609, |
| 345 | ImageFormat_R16_G16_Snorm, |
| 346 | ImageFormat_R16_G16_Uint, |
| 347 | ImageFormat_R16_G16_Sint, |
| 348 | ImageFormat_R16_G16_Float, |
| 349 | ImageFormat_D24_Unorm_S8_Uint = 4871, |
| 350 | ImageFormat_R32_Uint = 5123, |
| 351 | ImageFormat_R32_Sint, |
| 352 | ImageFormat_R32_Float, |
| 353 | ImageFormat_D32_Float = 5127, |
| 354 | ImageFormat_R16_G16_B16_A16_Unorm = 5377, |
| 355 | ImageFormat_R16_G16_B16_A16_Snorm, |
| 356 | ImageFormat_R16_G16_B16_A16_Uint, |
| 357 | ImageFormat_R16_G16_B16_A16_Sint, |
| 358 | ImageFormat_R16_G16_B16_A16_Float, |
| 359 | ImageFormat_D32_Float_S8_Uint_X24 = 5639, |
| 360 | ImageFormat_R32_G32_Uint = 5891, |
| 361 | ImageFormat_R32_G32_Sint, |
| 362 | ImageFormat_R32_G32_Float, |
| 363 | ImageFormat_R32_G32_B32_Uint = 6147, |
| 364 | ImageFormat_R32_G32_B32_Sint, |
| 365 | ImageFormat_R32_G32_B32_Float, |
| 366 | ImageFormat_R32_G32_B32_A32_Uint = 6403, |
| 367 | ImageFormat_R32_G32_B32_A32_Sint, |
| 368 | ImageFormat_R32_G32_B32_A32_Float, |
| 369 | ImageFormat_Bc1_Unorm = 6657, |
| 370 | ImageFormat_Bc1_UnormSrgb = 6662, |
| 371 | ImageFormat_Bc2_Unorm = 6913, |
| 372 | ImageFormat_Bc2_UnormSrgb = 6918, |
| 373 | ImageFormat_Bc3_Unorm = 7169, |
| 374 | ImageFormat_Bc3_UnormSrgb = 7174, |
| 375 | ImageFormat_Bc4_Unorm = 7425, |
| 376 | ImageFormat_Bc4_Snorm, |
| 377 | ImageFormat_Bc5_Unorm = 7681, |
| 378 | ImageFormat_Bc5_Snorm, |
| 379 | ImageFormat_Bc6_Float = 7941, |
| 380 | ImageFormat_Bc6_Ufloat = 7946, |
| 381 | ImageFormat_Bc7_Unorm = 8193, |
| 382 | ImageFormat_Bc7_UnormSrgb = 8198, |
| 383 | ImageFormat_Eac_R11_Unorm = 8449, |
| 384 | ImageFormat_Eac_R11_Snorm, |
| 385 | ImageFormat_Eac_R11_G11_Unorm = 8705, |
| 386 | ImageFormat_Eac_R11_G11_Snorm, |
| 387 | ImageFormat_Etc1_Unorm = 8961, |
| 388 | ImageFormat_Etc2_Unorm = 9217, |
| 389 | ImageFormat_Etc2_UnormSrgb = 9222, |
| 390 | ImageFormat_Etc2_Mask_Unorm = 9473, |
| 391 | ImageFormat_Etc2_Mask_UnormSrgb = 9478, |
| 392 | ImageFormat_Etc2_Alpha_Unorm = 9729, |
| 393 | ImageFormat_Etc2_Alpha_UnormSrgb = 9734, |
| 394 | ImageFormat_Pvrtc1_2Bpp_Unorm = 9985, |
| 395 | ImageFormat_Pvrtc1_2Bpp_UnormSrgb = 9990, |
| 396 | ImageFormat_Pvrtc1_4Bpp_Unorm = 10241, |
| 397 | ImageFormat_Pvrtc1_4Bpp_UnormSrgb = 10246, |
| 398 | ImageFormat_Pvrtc1_Alpha_2Bpp_Unorm = 10497, |
| 399 | ImageFormat_Pvrtc1_Alpha_2Bpp_UnormSrgb = 10502, |
| 400 | ImageFormat_Pvrtc1_Alpha_4Bpp_Unorm = 10753, |
| 401 | ImageFormat_Pvrtc1_Alpha_4Bpp_UnormSrgb = 10758, |
| 402 | ImageFormat_Pvrtc2_Alpha_2Bpp_Unorm = 11009, |
| 403 | ImageFormat_Pvrtc2_Alpha_2Bpp_UnormSrgb = 11014, |
| 404 | ImageFormat_Pvrtc2_Alpha_4Bpp_Unorm = 11265, |
| 405 | ImageFormat_Pvrtc2_Alpha_4Bpp_UnormSrgb = 11270, |
| 406 | ImageFormat_Astc_4x4_Unorm = 11521, |
| 407 | ImageFormat_Astc_4x4_UnormSrgb = 11526, |
| 408 | ImageFormat_Astc_5x4_Unorm = 11777, |
| 409 | ImageFormat_Astc_5x4_UnormSrgb = 11782, |
| 410 | ImageFormat_Astc_5x5_Unorm = 12033, |
| 411 | ImageFormat_Astc_5x5_UnormSrgb = 12038, |
| 412 | ImageFormat_Astc_6x5_Unorm = 12289, |
| 413 | ImageFormat_Astc_6x5_UnormSrgb = 12294, |
| 414 | ImageFormat_Astc_6x6_Unorm = 12545, |
| 415 | ImageFormat_Astc_6x6_UnormSrgb = 12550, |
| 416 | ImageFormat_Astc_8x5_Unorm = 12801, |
| 417 | ImageFormat_Astc_8x5_UnormSrgb = 12806, |
| 418 | ImageFormat_Astc_8x6_Unorm = 13057, |
| 419 | ImageFormat_Astc_8x6_UnormSrgb = 13062, |
| 420 | ImageFormat_Astc_8x8_Unorm = 13313, |
| 421 | ImageFormat_Astc_8x8_UnormSrgb = 13318, |
| 422 | ImageFormat_Astc_10x5_Unorm = 13569, |
| 423 | ImageFormat_Astc_10x5_UnormSrgb = 13574, |
| 424 | ImageFormat_Astc_10x6_Unorm = 13825, |
| 425 | ImageFormat_Astc_10x6_UnormSrgb = 13830, |
| 426 | ImageFormat_Astc_10x8_Unorm = 14081, |
| 427 | ImageFormat_Astc_10x8_UnormSrgb = 14086, |
| 428 | ImageFormat_Astc_10x10_Unorm = 14337, |
| 429 | ImageFormat_Astc_10x10_UnormSrgb = 14342, |
| 430 | ImageFormat_Astc_12x10_Unorm = 14593, |
| 431 | ImageFormat_Astc_12x10_UnormSrgb = 14598, |
| 432 | ImageFormat_Astc_12x12_Unorm = 14849, |
| 433 | ImageFormat_Astc_12x12_UnormSrgb = 14854, |
| 434 | ImageFormat_B5_G5_R5_A1_Unorm = 15105 |
| 435 | }; |
| 436 | |
| 437 | enum AttributeFormat { |
| 438 | AttributeFormat_Undefined, |
| 439 | AttributeFormat_4_4_Unorm = 257, |
| 440 | AttributeFormat_8_Unorm = 513, |
| 441 | AttributeFormat_8_Snorm, |
| 442 | AttributeFormat_8_Uint, |
| 443 | AttributeFormat_8_Sint, |
| 444 | AttributeFormat_8_UintToFloat = 520, |
| 445 | AttributeFormat_8_SintToFloat, |
| 446 | AttributeFormat_8_8_Unorm = 2305, |
| 447 | AttributeFormat_8_8_Snorm, |
| 448 | AttributeFormat_8_8_Uint, |
| 449 | AttributeFormat_8_8_Sint, |
| 450 | AttributeFormat_8_8_UintToFloat = 2312, |
| 451 | AttributeFormat_8_8_SintToFloat, |
| 452 | AttributeFormat_16_Unorm = 2561, |
| 453 | AttributeFormat_16_Snorm, |
| 454 | AttributeFormat_16_Uint, |
| 455 | AttributeFormat_16_Sint, |
| 456 | AttributeFormat_16_Float, |
| 457 | AttributeFormat_16_UintToFloat = 2568, |
| 458 | AttributeFormat_16_SintToFloat, |
| 459 | AttributeFormat_8_8_8_8_Unorm = 2817, |
| 460 | AttributeFormat_8_8_8_8_Snorm, |
| 461 | AttributeFormat_8_8_8_8_Uint, |
| 462 | AttributeFormat_8_8_8_8_Sint, |
| 463 | AttributeFormat_8_8_8_8_UintToFloat = 2824, |
| 464 | AttributeFormat_8_8_8_8_SintToFloat, |
| 465 | AttributeFormat_10_10_10_2_Unorm = 3585, |
| 466 | AttributeFormat_10_10_10_2_Snorm, |
| 467 | AttributeFormat_10_10_10_2_Uint, |
| 468 | AttributeFormat_10_10_10_2_Sint, |
| 469 | AttributeFormat_16_16_Unorm = 4609, |
| 470 | AttributeFormat_16_16_Snorm, |
| 471 | AttributeFormat_16_16_Uint, |
| 472 | AttributeFormat_16_16_Sint, |
| 473 | AttributeFormat_16_16_Float, |
| 474 | AttributeFormat_16_16_UintToFloat = 4616, |
| 475 | AttributeFormat_16_16_SintToFloat, |
| 476 | AttributeFormat_32_Uint = 5123, |
| 477 | AttributeFormat_32_Sint, |
| 478 | AttributeFormat_32_Float, |
| 479 | AttributeFormat_16_16_16_16_Unorm = 5377, |
| 480 | AttributeFormat_16_16_16_16_Snorm, |
| 481 | AttributeFormat_16_16_16_16_Uint, |
| 482 | AttributeFormat_16_16_16_16_Sint, |
| 483 | AttributeFormat_16_16_16_16_Float, |
| 484 | AttributeFormat_16_16_16_16_UintToFloat = 5384, |
| 485 | AttributeFormat_16_16_16_16_SintToFloat, |
| 486 | AttributeFormat_32_32_Uint = 5891, |
| 487 | AttributeFormat_32_32_Sint, |
| 488 | AttributeFormat_32_32_Float, |
| 489 | AttributeFormat_32_32_32_Uint = 6147, |
| 490 | AttributeFormat_32_32_32_Sint, |
| 491 | AttributeFormat_32_32_32_Float, |
| 492 | AttributeFormat_32_32_32_32_Uint = 6403, |
| 493 | AttributeFormat_32_32_32_32_Sint, |
| 494 | AttributeFormat_32_32_32_32_Float |
| 495 | }; |
| 496 | |
| 497 | enum GpuAccess { |
| 498 | GpuAccess_Read = 0x1, |
| 499 | GpuAccess_Write = 0x2, |
| 500 | GpuAccess_VertexBuffer = 0x4, |
| 501 | GpuAccess_IndexBuffer = 0x8, |
| 502 | GpuAccess_ConstantBuffer = 0x10, |
| 503 | GpuAccess_Texture = 0x20, |
| 504 | GpuAccess_UnorderedAccessBuffer = 0x40, |
| 505 | GpuAccess_ColorBuffer = 0x80, |
| 506 | GpuAccess_DepthStencil = 0x100, |
| 507 | GpuAccess_IndirectBuffer = 0x200, |
| 508 | GpuAccess_ScanBuffer = 0x400, |
| 509 | GpuAccess_QueryBuffer = 0x800, |
| 510 | GpuAccess_Descriptor = 0x1000, |
| 511 | GpuAccess_ShaderCode = 0x2000, |
| 512 | GpuAccess_Image = 0x4000 |
| 513 | }; |
| 514 | |
| 515 | enum TileMode { TileMode_Optimal, TileMode_Linear, TileMode_End }; |
| 516 | |
| 517 | enum ShaderStage { |
| 518 | ShaderStage_Vertex, |
| 519 | ShaderStage_Hull, |
| 520 | ShaderStage_Domain, |
| 521 | ShaderStage_Geometry, |
| 522 | ShaderStage_Pixel, |
| 523 | ShaderStage_Compute, |
| 524 | ShaderStage_End |
| 525 | }; |
| 526 | |
| 527 | enum ShaderCodeType { |
| 528 | ShaderCodeType_Binary, |
| 529 | ShaderCodeType_Ir, |
| 530 | ShaderCodeType_Source, |
| 531 | ShaderCodeType_SourceArray, |
| 532 | ShaderCodeType_End |
| 533 | }; |
| 534 | |
| 535 | enum ShaderSourceFormat { |
| 536 | ShaderSourceFormat_Glsl, |
| 537 | ShaderSourceFormat_Hlsl, |
| 538 | ShaderSourceFormat_End |
| 539 | }; |
| 540 | |
| 541 | enum ChannelMapping { |
| 542 | ChannelMapping_Zero, |
| 543 | ChannelMapping_One, |
| 544 | ChannelMapping_Red, |
| 545 | ChannelMapping_Green, |
| 546 | ChannelMapping_Blue, |
| 547 | ChannelMapping_Alpha, |
| 548 | ChannelMapping_End |
| 549 | }; |
| 550 | |
| 551 | enum DepthStencilFetchMode { |
| 552 | DepthStencilFetchMode_DepthComponent, |
| 553 | DepthStencilFetchMode_StencilIndex, |
| 554 | DepthStencilFetchMode_End |
| 555 | }; |
| 556 | |
| 557 | enum DepthStencilClearMode { |
| 558 | DepthStencilClearMode_Depth = 1, |
| 559 | DepthStencilClearMode_Stencil, |
| 560 | DepthStencilClearMode_DepthStencil |
| 561 | }; |
| 562 | |
| 563 | enum ShaderInterfaceType { |
| 564 | ShaderInterfaceType_Input, |
| 565 | ShaderInterfaceType_Output, |
| 566 | ShaderInterfaceType_Sampler, |
| 567 | ShaderInterfaceType_ConstantBuffer, |
| 568 | ShaderInterfaceType_UnorderedAccessBuffer, |
| 569 | ShaderInterfaceType_Image, |
| 570 | ShaderInterfaceType_SeparateTexture, |
| 571 | ShaderInterfaceType_SeparateSampler, |
| 572 | ShaderInterfaceType_End |
| 573 | }; |
| 574 | |
| 575 | enum ColorChannel { |
| 576 | ColorChannel_Red, |
| 577 | ColorChannel_Green, |
| 578 | ColorChannel_Blue, |
| 579 | ColorChannel_Alpha, |
| 580 | ColorChannel_End |
| 581 | }; |
| 582 | |
| 583 | enum DescriptorPoolType { |
| 584 | DescriptorPoolType_BufferView, |
| 585 | DescriptorPoolType_TextureView, |
| 586 | DescriptorPoolType_Sampler, |
| 587 | DescriptorPoolType_End |
| 588 | }; |
| 589 | |
| 590 | enum DescriptorSlotType { |
| 591 | DescriptorSlotType_ConstantBuffer, |
| 592 | DescriptorSlotType_UnorderedAccessBuffer, |
| 593 | DescriptorSlotType_TextureSampler, |
| 594 | DescriptorSlotType_End |
| 595 | }; |
| 596 | |
| 597 | enum PipelineType { PipelineType_Graphics, PipelineType_Compute, PipelineType_End }; |
| 598 | |
| 599 | enum MemoryPoolProperty { |
| 600 | MemoryPoolProperty_CpuInvisible = 0x1, |
| 601 | MemoryPoolProperty_CpuUncached = 0x2, |
| 602 | MemoryPoolProperty_CpuCached = 0x4, |
| 603 | MemoryPoolProperty_GpuInvisible = 0x8, |
| 604 | MemoryPoolProperty_GpuUncached = 0x10, |
| 605 | MemoryPoolProperty_GpuCached = 0x20, |
| 606 | MemoryPoolProperty_ShaderCode = 0x40, |
| 607 | MemoryPoolProperty_Compressible = 0x80 |
| 608 | }; |
| 609 | |
| 610 | enum CommandBufferType { |
| 611 | CommandBufferType_Direct, |
| 612 | CommandBufferType_Nested, |
| 613 | CommandBufferType_End |
| 614 | }; |
| 615 | |
| 616 | enum BufferState { |
| 617 | BufferState_Undefined = 0x0, |
| 618 | BufferState_DataTransfer = 0x1, |
| 619 | BufferState_CopySource = 0x2, |
| 620 | BufferState_CopyDestination = 0x4, |
| 621 | BufferState_VertexBuffer = 0x8, |
| 622 | BufferState_IndexBuffer = 0x10, |
| 623 | BufferState_ConstantBuffer = 0x20, |
| 624 | BufferState_UnorderedAccessBuffer = 0x40, |
| 625 | BufferState_IndirectArgument = 0x80, |
| 626 | BufferState_QueryBuffer = 0x100 |
| 627 | }; |
| 628 | |
| 629 | enum TextureState { |
| 630 | TextureState_Undefined = 0x0, |
| 631 | TextureState_DataTransfer = 0x1, |
| 632 | TextureState_CopySource = 0x2, |
| 633 | TextureState_CopyDestination = 0x4, |
| 634 | TextureState_ShaderRead = 0x8, |
| 635 | TextureState_ShaderWrite = 0x10, |
| 636 | TextureState_ColorTarget = 0x20, |
| 637 | TextureState_DepthRead = 0x40, |
| 638 | TextureState_DepthWrite = 0x80, |
| 639 | TextureState_Clear = 0x100, |
| 640 | TextureState_ResolveSource = 0x200, |
| 641 | TextureState_ResolveDestination = 0x400, |
| 642 | TextureState_Present = 0x800 |
| 643 | }; |
| 644 | |
| 645 | enum ShaderStageBit { |
| 646 | ShaderStageBit_Vertex = 0x1, |
| 647 | ShaderStageBit_Hull = 0x2, |
| 648 | ShaderStageBit_Domain = 0x4, |
| 649 | ShaderStageBit_Geometry = 0x8, |
| 650 | ShaderStageBit_Pixel = 0x10, |
| 651 | ShaderStageBit_Compute = 0x20, |
| 652 | ShaderStageBit_All = ShaderStageBit_Vertex | ShaderStageBit_Hull | ShaderStageBit_Domain | |
| 653 | ShaderStageBit_Geometry | ShaderStageBit_Pixel | ShaderStageBit_Compute |
| 654 | }; |
| 655 | |
| 656 | enum PipelineStageBit { |
| 657 | PipelineStageBit_VertexInput = 0x1, |
| 658 | PipelineStageBit_VertexShader = 0x2, |
| 659 | PipelineStageBit_HullShader = 0x4, |
| 660 | PipelineStageBit_DomainShader = 0x8, |
| 661 | PipelineStageBit_GeometryShader = 0x10, |
| 662 | PipelineStageBit_PixelShader = 0x20, |
| 663 | PipelineStageBit_RenderTarget = 0x40, |
| 664 | PipelineStageBit_ComputeShader = 0x80 |
| 665 | }; |
| 666 | |
| 667 | enum DebugMode { DebugMode_Disable, DebugMode_Enable, DebugMode_Full, DebugMode_End }; |
| 668 | |
| 669 | enum QueryTarget { |
| 670 | QueryTarget_Timestamp, |
| 671 | QueryTarget_SamplesPassed, |
| 672 | QueryTarget_InputVertices, |
| 673 | QueryTarget_InputPrimitives, |
| 674 | QueryTarget_VertexShaderInvocations, |
| 675 | QueryTarget_GeometryShaderInvocations, |
| 676 | QueryTarget_GeometryShaderPrimitives, |
| 677 | QueryTarget_ClippingInputPrimitives, |
| 678 | QueryTarget_ClippingOutputPrimitives, |
| 679 | QueryTarget_PixelShaderInvocations, |
| 680 | QueryTarget_HullShaderInvocations, |
| 681 | QueryTarget_DomainShaderInvocations, |
| 682 | QueryTarget_ComputeShaderInvocations, |
| 683 | QueryTarget_End |
| 684 | }; |
| 685 | |
| 686 | enum ShaderInitializeResult { |
| 687 | ShaderInitializeResult_Success, |
| 688 | ShaderInitializeResult_InvalidType, |
| 689 | ShaderInitializeResult_InvalidFormat, |
| 690 | ShaderInitializeResult_SetupFailed |
| 691 | }; |
| 692 | |
| 693 | enum SyncResult { SyncResult_Success, SyncResult_TimeoutExpired }; |
| 694 | |
| 695 | enum AcquireScanBufferResult { AcquireScanBufferResult_Success, AcquireScanBufferResult_Failed }; |
| 696 | |
| 697 | } // namespace nn::gfx |