Loading...
Searching...
No Matches
enums.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HGI_ENUMS_H
8#define PXR_IMAGING_HGI_ENUMS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hgi/api.h"
12#include <cstdint>
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16using HgiBits = uint32_t;
17
18
65enum HgiDeviceCapabilitiesBits : HgiBits
66{
67 HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
68 HgiDeviceCapabilitiesBitsBindlessBuffers = 1 << 1,
69 HgiDeviceCapabilitiesBitsConcurrentDispatch = 1 << 2,
70 HgiDeviceCapabilitiesBitsUnifiedMemory = 1 << 3,
71 HgiDeviceCapabilitiesBitsBuiltinBarycentrics = 1 << 4,
72 HgiDeviceCapabilitiesBitsShaderDrawParameters = 1 << 5,
73 HgiDeviceCapabilitiesBitsMultiDrawIndirect = 1 << 6,
74 HgiDeviceCapabilitiesBitsBindlessTextures = 1 << 7,
75 HgiDeviceCapabilitiesBitsShaderDoublePrecision = 1 << 8,
76 HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne = 1 << 9,
77 HgiDeviceCapabilitiesBitsCppShaderPadding = 1 << 10,
78 HgiDeviceCapabilitiesBitsConservativeRaster = 1 << 11,
79 HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12,
80 HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13,
81 HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14,
82 HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15,
83 HgiDeviceCapabilitiesBitsPrimitiveIdEmulation = 1 << 16,
84 HgiDeviceCapabilitiesBitsIndirectCommandBuffers = 1 << 17,
85 HgiDeviceCapabilitiesBitsRoundPoints = 1 << 18,
86};
87
88using HgiDeviceCapabilities = HgiBits;
89
107enum HgiTextureType
108{
109 HgiTextureType1D = 0,
110 HgiTextureType2D,
111 HgiTextureType3D,
112 HgiTextureType1DArray,
113 HgiTextureType2DArray,
114
115 HgiTextureTypeCount
116};
117
142enum HgiTextureUsageBits : HgiBits
143{
144 HgiTextureUsageBitsColorTarget = 1 << 0,
145 HgiTextureUsageBitsDepthTarget = 1 << 1,
146 HgiTextureUsageBitsStencilTarget = 1 << 2,
147 HgiTextureUsageBitsShaderRead = 1 << 3,
148 HgiTextureUsageBitsShaderWrite = 1 << 4,
149
150 HgiTextureUsageCustomBitsBegin = 1 << 5,
151};
152
153using HgiTextureUsage = HgiBits;
154
159enum HgiSamplerAddressMode
160{
161 HgiSamplerAddressModeClampToEdge = 0,
162 HgiSamplerAddressModeMirrorClampToEdge,
163 HgiSamplerAddressModeRepeat,
164 HgiSamplerAddressModeMirrorRepeat,
165 HgiSamplerAddressModeClampToBorderColor,
166
167 HgiSamplerAddressModeCount
168};
169
181enum HgiSamplerFilter
182{
183 HgiSamplerFilterNearest = 0,
184 HgiSamplerFilterLinear = 1,
185
186 HgiSamplerFilterCount
187};
188
202enum HgiMipFilter
203{
204 HgiMipFilterNotMipmapped = 0,
205 HgiMipFilterNearest = 1,
206 HgiMipFilterLinear = 2,
207
208 HgiMipFilterCount
209};
210
221enum HgiBorderColor
222{
223 HgiBorderColorTransparentBlack = 0,
224 HgiBorderColorOpaqueBlack = 1,
225 HgiBorderColorOpaqueWhite = 2,
226
227 HgiBorderColorCount
228};
229
234enum HgiSampleCount
235{
236 HgiSampleCount1 = 1,
237 HgiSampleCount2 = 2,
238 HgiSampleCount4 = 4,
239 HgiSampleCount8 = 8,
240 HgiSampleCount16 = 16,
241
242 HgiSampleCountEnd
243};
244
258enum HgiAttachmentLoadOp
259{
260 HgiAttachmentLoadOpDontCare = 0,
261 HgiAttachmentLoadOpClear,
262 HgiAttachmentLoadOpLoad,
263
264 HgiAttachmentLoadOpCount
265};
266
278enum HgiAttachmentStoreOp
279{
280 HgiAttachmentStoreOpDontCare = 0,
281 HgiAttachmentStoreOpStore,
282
283 HgiAttachmentStoreOpCount
284};
285
305enum HgiBufferUsageBits : HgiBits
306{
307 HgiBufferUsageUniform = 1 << 0,
308 HgiBufferUsageIndex32 = 1 << 1,
309 HgiBufferUsageVertex = 1 << 2,
310 HgiBufferUsageStorage = 1 << 3,
311 HgiBufferUsageIndirect = 1 << 4,
312
313 HgiBufferUsageCustomBitsBegin = 1 << 5,
314};
315using HgiBufferUsage = HgiBits;
316
345enum HgiShaderStageBits : HgiBits
346{
347 HgiShaderStageVertex = 1 << 0,
348 HgiShaderStageFragment = 1 << 1,
349 HgiShaderStageCompute = 1 << 2,
350 HgiShaderStageTessellationControl = 1 << 3,
351 HgiShaderStageTessellationEval = 1 << 4,
352 HgiShaderStageGeometry = 1 << 5,
353 HgiShaderStagePostTessellationControl = 1 << 6,
354 HgiShaderStagePostTessellationVertex = 1 << 7,
355 HgiShaderStageCustomBitsBegin = 1 << 8,
356};
357using HgiShaderStage = HgiBits;
358
385enum HgiBindResourceType
386{
387 HgiBindResourceTypeSampler = 0,
388 HgiBindResourceTypeSampledImage,
389 HgiBindResourceTypeCombinedSamplerImage,
390 HgiBindResourceTypeStorageImage,
391 HgiBindResourceTypeUniformBuffer,
392 HgiBindResourceTypeStorageBuffer,
393 HgiBindResourceTypeTessFactors,
394
395 HgiBindResourceTypeCount
396};
397
411enum HgiPolygonMode
412{
413 HgiPolygonModeFill = 0,
414 HgiPolygonModeLine,
415 HgiPolygonModePoint,
416
417 HgiPolygonModeCount
418};
419
435enum HgiCullMode
436{
437 HgiCullModeNone = 0,
438 HgiCullModeFront,
439 HgiCullModeBack,
440 HgiCullModeFrontAndBack,
441
442 HgiCullModeCount
443};
444
456enum HgiWinding
457{
458 HgiWindingClockwise = 0,
459 HgiWindingCounterClockwise,
460
461 HgiWindingCount
462};
463
464
469enum HgiBlendOp
470{
471 HgiBlendOpAdd = 0,
472 HgiBlendOpSubtract,
473 HgiBlendOpReverseSubtract,
474 HgiBlendOpMin,
475 HgiBlendOpMax,
476
477 HgiBlendOpCount
478};
479
484enum HgiBlendFactor
485{
486 HgiBlendFactorZero = 0,
487 HgiBlendFactorOne,
488 HgiBlendFactorSrcColor,
489 HgiBlendFactorOneMinusSrcColor,
490 HgiBlendFactorDstColor,
491 HgiBlendFactorOneMinusDstColor,
492 HgiBlendFactorSrcAlpha,
493 HgiBlendFactorOneMinusSrcAlpha,
494 HgiBlendFactorDstAlpha,
495 HgiBlendFactorOneMinusDstAlpha,
496 HgiBlendFactorConstantColor,
497 HgiBlendFactorOneMinusConstantColor,
498 HgiBlendFactorConstantAlpha,
499 HgiBlendFactorOneMinusConstantAlpha,
500 HgiBlendFactorSrcAlphaSaturate,
501 HgiBlendFactorSrc1Color,
502 HgiBlendFactorOneMinusSrc1Color,
503 HgiBlendFactorSrc1Alpha,
504 HgiBlendFactorOneMinusSrc1Alpha,
505
506 HgiBlendFactorCount
507};
508
514enum HgiColorMaskBits : HgiBits
515{
516 HgiColorMaskRed = 1 << 0,
517 HgiColorMaskGreen = 1 << 1,
518 HgiColorMaskBlue = 1 << 2,
519 HgiColorMaskAlpha = 1 << 3,
520};
521using HgiColorMask = HgiBits;
522
527enum HgiCompareFunction
528{
529 HgiCompareFunctionNever = 0,
530 HgiCompareFunctionLess,
531 HgiCompareFunctionEqual,
532 HgiCompareFunctionLEqual,
533 HgiCompareFunctionGreater,
534 HgiCompareFunctionNotEqual,
535 HgiCompareFunctionGEqual,
536 HgiCompareFunctionAlways,
537
538 HgiCompareFunctionCount
539};
540
545enum HgiStencilOp
546{
547 HgiStencilOpKeep = 0,
548 HgiStencilOpZero,
549 HgiStencilOpReplace,
550 HgiStencilOpIncrementClamp,
551 HgiStencilOpDecrementClamp,
552 HgiStencilOpInvert,
553 HgiStencilOpIncrementWrap,
554 HgiStencilOpDecrementWrap,
555
556 HgiStencilOpCount
557};
558
563enum HgiComponentSwizzle
564{
565 HgiComponentSwizzleZero = 0,
566 HgiComponentSwizzleOne,
567 HgiComponentSwizzleR,
568 HgiComponentSwizzleG,
569 HgiComponentSwizzleB,
570 HgiComponentSwizzleA,
571
572 HgiComponentSwizzleCount
573};
574
596enum HgiPrimitiveType
597{
598 HgiPrimitiveTypePointList = 0,
599 HgiPrimitiveTypeLineList,
600 HgiPrimitiveTypeLineStrip,
601 HgiPrimitiveTypeTriangleList,
602 HgiPrimitiveTypePatchList,
603 HgiPrimitiveTypeLineListWithAdjacency,
604
605 HgiPrimitiveTypeCount
606};
607
627enum HgiVertexBufferStepFunction
628{
629 HgiVertexBufferStepFunctionConstant = 0,
630 HgiVertexBufferStepFunctionPerVertex,
631 HgiVertexBufferStepFunctionPerInstance,
632 HgiVertexBufferStepFunctionPerPatch,
633 HgiVertexBufferStepFunctionPerPatchControlPoint,
634 HgiVertexBufferStepFunctionPerDrawCommand,
635
636 HgiVertexBufferStepFunctionCount
637};
638
650enum HgiSubmitWaitType
651{
652 HgiSubmitWaitTypeNoWait = 0,
653 HgiSubmitWaitTypeWaitUntilCompleted,
654};
655
667enum HgiMemoryBarrierBits
668{
669 HgiMemoryBarrierNone = 0,
670 HgiMemoryBarrierAll = 1 << 0
671};
672using HgiMemoryBarrier = HgiBits;
673
701enum HgiBindingType
702{
703 HgiBindingTypeValue = 0,
704 HgiBindingTypeUniformValue,
705 HgiBindingTypeArray,
706 HgiBindingTypeUniformArray,
707 HgiBindingTypePointer,
708};
709
729enum HgiInterpolationType
730{
731 HgiInterpolationDefault = 0,
732 HgiInterpolationFlat,
733 HgiInterpolationNoPerspective,
734};
735
755enum HgiSamplingType
756{
757 HgiSamplingDefault = 0,
758 HgiSamplingCentroid,
759 HgiSamplingSample,
760};
761
775enum HgiStorageType
776{
777 HgiStorageDefault = 0,
778 HgiStoragePatch,
779};
780
794enum HgiShaderTextureType
795{
796 HgiShaderTextureTypeTexture = 0,
797 HgiShaderTextureTypeShadowTexture,
798 HgiShaderTextureTypeArrayTexture
799};
800
812enum HgiComputeDispatch
813{
814 HgiComputeDispatchSerial = 0,
815 HgiComputeDispatchConcurrent
816};
817
818PXR_NAMESPACE_CLOSE_SCOPE
819
820#endif