7#ifndef PXR_IMAGING_HGI_ENUMS_H
8#define PXR_IMAGING_HGI_ENUMS_H
11#include "pxr/imaging/hgi/api.h"
14PXR_NAMESPACE_OPEN_SCOPE
16using HgiBits = uint32_t;
63enum HgiDeviceCapabilitiesBits : HgiBits
65 HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
66 HgiDeviceCapabilitiesBitsBindlessBuffers = 1 << 1,
67 HgiDeviceCapabilitiesBitsConcurrentDispatch = 1 << 2,
68 HgiDeviceCapabilitiesBitsUnifiedMemory = 1 << 3,
69 HgiDeviceCapabilitiesBitsBuiltinBarycentrics = 1 << 4,
70 HgiDeviceCapabilitiesBitsShaderDrawParameters = 1 << 5,
71 HgiDeviceCapabilitiesBitsMultiDrawIndirect = 1 << 6,
72 HgiDeviceCapabilitiesBitsBindlessTextures = 1 << 7,
73 HgiDeviceCapabilitiesBitsShaderDoublePrecision = 1 << 8,
74 HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne = 1 << 9,
75 HgiDeviceCapabilitiesBitsCppShaderPadding = 1 << 10,
76 HgiDeviceCapabilitiesBitsConservativeRaster = 1 << 11,
77 HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12,
78 HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13,
79 HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14,
80 HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15,
81 HgiDeviceCapabilitiesBitsPrimitiveIdEmulation = 1 << 16,
82 HgiDeviceCapabilitiesBitsIndirectCommandBuffers = 1 << 17,
85using HgiDeviceCapabilities = HgiBits;
106 HgiTextureType1D = 0,
109 HgiTextureType1DArray,
110 HgiTextureType2DArray,
139enum HgiTextureUsageBits : HgiBits
141 HgiTextureUsageBitsColorTarget = 1 << 0,
142 HgiTextureUsageBitsDepthTarget = 1 << 1,
143 HgiTextureUsageBitsStencilTarget = 1 << 2,
144 HgiTextureUsageBitsShaderRead = 1 << 3,
145 HgiTextureUsageBitsShaderWrite = 1 << 4,
147 HgiTextureUsageCustomBitsBegin = 1 << 5,
150using HgiTextureUsage = HgiBits;
156enum HgiSamplerAddressMode
158 HgiSamplerAddressModeClampToEdge = 0,
159 HgiSamplerAddressModeMirrorClampToEdge,
160 HgiSamplerAddressModeRepeat,
161 HgiSamplerAddressModeMirrorRepeat,
162 HgiSamplerAddressModeClampToBorderColor,
164 HgiSamplerAddressModeCount
180 HgiSamplerFilterNearest = 0,
181 HgiSamplerFilterLinear = 1,
183 HgiSamplerFilterCount
201 HgiMipFilterNotMipmapped = 0,
202 HgiMipFilterNearest = 1,
203 HgiMipFilterLinear = 2,
220 HgiBorderColorTransparentBlack = 0,
221 HgiBorderColorOpaqueBlack = 1,
222 HgiBorderColorOpaqueWhite = 2,
237 HgiSampleCount16 = 16,
255enum HgiAttachmentLoadOp
257 HgiAttachmentLoadOpDontCare = 0,
258 HgiAttachmentLoadOpClear,
259 HgiAttachmentLoadOpLoad,
261 HgiAttachmentLoadOpCount
275enum HgiAttachmentStoreOp
277 HgiAttachmentStoreOpDontCare = 0,
278 HgiAttachmentStoreOpStore,
280 HgiAttachmentStoreOpCount
302enum HgiBufferUsageBits : HgiBits
304 HgiBufferUsageUniform = 1 << 0,
305 HgiBufferUsageIndex32 = 1 << 1,
306 HgiBufferUsageVertex = 1 << 2,
307 HgiBufferUsageStorage = 1 << 3,
308 HgiBufferUsageIndirect = 1 << 4,
310 HgiBufferUsageCustomBitsBegin = 1 << 5,
312using HgiBufferUsage = HgiBits;
342enum HgiShaderStageBits : HgiBits
344 HgiShaderStageVertex = 1 << 0,
345 HgiShaderStageFragment = 1 << 1,
346 HgiShaderStageCompute = 1 << 2,
347 HgiShaderStageTessellationControl = 1 << 3,
348 HgiShaderStageTessellationEval = 1 << 4,
349 HgiShaderStageGeometry = 1 << 5,
350 HgiShaderStagePostTessellationControl = 1 << 6,
351 HgiShaderStagePostTessellationVertex = 1 << 7,
352 HgiShaderStageCustomBitsBegin = 1 << 8,
354using HgiShaderStage = HgiBits;
382enum HgiBindResourceType
384 HgiBindResourceTypeSampler = 0,
385 HgiBindResourceTypeSampledImage,
386 HgiBindResourceTypeCombinedSamplerImage,
387 HgiBindResourceTypeStorageImage,
388 HgiBindResourceTypeUniformBuffer,
389 HgiBindResourceTypeStorageBuffer,
390 HgiBindResourceTypeTessFactors,
392 HgiBindResourceTypeCount
410 HgiPolygonModeFill = 0,
437 HgiCullModeFrontAndBack,
455 HgiWindingClockwise = 0,
456 HgiWindingCounterClockwise,
470 HgiBlendOpReverseSubtract,
483 HgiBlendFactorZero = 0,
485 HgiBlendFactorSrcColor,
486 HgiBlendFactorOneMinusSrcColor,
487 HgiBlendFactorDstColor,
488 HgiBlendFactorOneMinusDstColor,
489 HgiBlendFactorSrcAlpha,
490 HgiBlendFactorOneMinusSrcAlpha,
491 HgiBlendFactorDstAlpha,
492 HgiBlendFactorOneMinusDstAlpha,
493 HgiBlendFactorConstantColor,
494 HgiBlendFactorOneMinusConstantColor,
495 HgiBlendFactorConstantAlpha,
496 HgiBlendFactorOneMinusConstantAlpha,
497 HgiBlendFactorSrcAlphaSaturate,
498 HgiBlendFactorSrc1Color,
499 HgiBlendFactorOneMinusSrc1Color,
500 HgiBlendFactorSrc1Alpha,
501 HgiBlendFactorOneMinusSrc1Alpha,
511enum HgiColorMaskBits : HgiBits
513 HgiColorMaskRed = 1 << 0,
514 HgiColorMaskGreen = 1 << 1,
515 HgiColorMaskBlue = 1 << 2,
516 HgiColorMaskAlpha = 1 << 3,
518using HgiColorMask = HgiBits;
524enum HgiCompareFunction
526 HgiCompareFunctionNever = 0,
527 HgiCompareFunctionLess,
528 HgiCompareFunctionEqual,
529 HgiCompareFunctionLEqual,
530 HgiCompareFunctionGreater,
531 HgiCompareFunctionNotEqual,
532 HgiCompareFunctionGEqual,
533 HgiCompareFunctionAlways,
535 HgiCompareFunctionCount
544 HgiStencilOpKeep = 0,
547 HgiStencilOpIncrementClamp,
548 HgiStencilOpDecrementClamp,
550 HgiStencilOpIncrementWrap,
551 HgiStencilOpDecrementWrap,
560enum HgiComponentSwizzle
562 HgiComponentSwizzleZero = 0,
563 HgiComponentSwizzleOne,
564 HgiComponentSwizzleR,
565 HgiComponentSwizzleG,
566 HgiComponentSwizzleB,
567 HgiComponentSwizzleA,
569 HgiComponentSwizzleCount
595 HgiPrimitiveTypePointList = 0,
596 HgiPrimitiveTypeLineList,
597 HgiPrimitiveTypeLineStrip,
598 HgiPrimitiveTypeTriangleList,
599 HgiPrimitiveTypePatchList,
600 HgiPrimitiveTypeLineListWithAdjacency,
602 HgiPrimitiveTypeCount
624enum HgiVertexBufferStepFunction
626 HgiVertexBufferStepFunctionConstant = 0,
627 HgiVertexBufferStepFunctionPerVertex,
628 HgiVertexBufferStepFunctionPerInstance,
629 HgiVertexBufferStepFunctionPerPatch,
630 HgiVertexBufferStepFunctionPerPatchControlPoint,
631 HgiVertexBufferStepFunctionPerDrawCommand,
633 HgiVertexBufferStepFunctionCount
647enum HgiSubmitWaitType
649 HgiSubmitWaitTypeNoWait = 0,
650 HgiSubmitWaitTypeWaitUntilCompleted,
664enum HgiMemoryBarrierBits
666 HgiMemoryBarrierNone = 0,
667 HgiMemoryBarrierAll = 1 << 0
669using HgiMemoryBarrier = HgiBits;
700 HgiBindingTypeValue = 0,
701 HgiBindingTypeUniformValue,
703 HgiBindingTypeUniformArray,
704 HgiBindingTypePointer,
726enum HgiInterpolationType
728 HgiInterpolationDefault = 0,
729 HgiInterpolationFlat,
730 HgiInterpolationNoPerspective,
754 HgiSamplingDefault = 0,
774 HgiStorageDefault = 0,
791enum HgiShaderTextureType
793 HgiShaderTextureTypeTexture = 0,
794 HgiShaderTextureTypeShadowTexture,
795 HgiShaderTextureTypeArrayTexture
809enum HgiComputeDispatch
811 HgiComputeDispatchSerial = 0,
812 HgiComputeDispatchConcurrent
815PXR_NAMESPACE_CLOSE_SCOPE