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;
65enum HgiDeviceCapabilitiesBits : HgiBits
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 HgiDeviceCapabilitiesBitsSingleSlotResourceArrays = 1 << 19,
89using HgiDeviceCapabilities = HgiBits;
112 HgiTextureType1D = 0,
115 HgiTextureTypeCubemap,
116 HgiTextureType1DArray,
117 HgiTextureType2DArray,
146enum HgiTextureUsageBits : HgiBits
148 HgiTextureUsageBitsColorTarget = 1 << 0,
149 HgiTextureUsageBitsDepthTarget = 1 << 1,
150 HgiTextureUsageBitsStencilTarget = 1 << 2,
151 HgiTextureUsageBitsShaderRead = 1 << 3,
152 HgiTextureUsageBitsShaderWrite = 1 << 4,
154 HgiTextureUsageCustomBitsBegin = 1 << 5,
157using HgiTextureUsage = HgiBits;
163enum HgiSamplerAddressMode
165 HgiSamplerAddressModeClampToEdge = 0,
166 HgiSamplerAddressModeMirrorClampToEdge,
167 HgiSamplerAddressModeRepeat,
168 HgiSamplerAddressModeMirrorRepeat,
169 HgiSamplerAddressModeClampToBorderColor,
171 HgiSamplerAddressModeCount
187 HgiSamplerFilterNearest = 0,
188 HgiSamplerFilterLinear = 1,
190 HgiSamplerFilterCount
208 HgiMipFilterNotMipmapped = 0,
209 HgiMipFilterNearest = 1,
210 HgiMipFilterLinear = 2,
227 HgiBorderColorTransparentBlack = 0,
228 HgiBorderColorOpaqueBlack = 1,
229 HgiBorderColorOpaqueWhite = 2,
244 HgiSampleCount16 = 16,
262enum HgiAttachmentLoadOp
264 HgiAttachmentLoadOpDontCare = 0,
265 HgiAttachmentLoadOpClear,
266 HgiAttachmentLoadOpLoad,
268 HgiAttachmentLoadOpCount
282enum HgiAttachmentStoreOp
284 HgiAttachmentStoreOpDontCare = 0,
285 HgiAttachmentStoreOpStore,
287 HgiAttachmentStoreOpCount
309enum HgiBufferUsageBits : HgiBits
311 HgiBufferUsageUniform = 1 << 0,
312 HgiBufferUsageIndex32 = 1 << 1,
313 HgiBufferUsageVertex = 1 << 2,
314 HgiBufferUsageStorage = 1 << 3,
315 HgiBufferUsageIndirect = 1 << 4,
317 HgiBufferUsageCustomBitsBegin = 1 << 5,
319using HgiBufferUsage = HgiBits;
349enum HgiShaderStageBits : HgiBits
351 HgiShaderStageVertex = 1 << 0,
352 HgiShaderStageFragment = 1 << 1,
353 HgiShaderStageCompute = 1 << 2,
354 HgiShaderStageTessellationControl = 1 << 3,
355 HgiShaderStageTessellationEval = 1 << 4,
356 HgiShaderStageGeometry = 1 << 5,
357 HgiShaderStagePostTessellationControl = 1 << 6,
358 HgiShaderStagePostTessellationVertex = 1 << 7,
359 HgiShaderStageCustomBitsBegin = 1 << 8,
361using HgiShaderStage = HgiBits;
389enum HgiBindResourceType
391 HgiBindResourceTypeSampler = 0,
392 HgiBindResourceTypeSampledImage,
393 HgiBindResourceTypeCombinedSamplerImage,
394 HgiBindResourceTypeStorageImage,
395 HgiBindResourceTypeUniformBuffer,
396 HgiBindResourceTypeStorageBuffer,
397 HgiBindResourceTypeTessFactors,
399 HgiBindResourceTypeCount
417 HgiPolygonModeFill = 0,
444 HgiCullModeFrontAndBack,
462 HgiWindingClockwise = 0,
463 HgiWindingCounterClockwise,
477 HgiBlendOpReverseSubtract,
490 HgiBlendFactorZero = 0,
492 HgiBlendFactorSrcColor,
493 HgiBlendFactorOneMinusSrcColor,
494 HgiBlendFactorDstColor,
495 HgiBlendFactorOneMinusDstColor,
496 HgiBlendFactorSrcAlpha,
497 HgiBlendFactorOneMinusSrcAlpha,
498 HgiBlendFactorDstAlpha,
499 HgiBlendFactorOneMinusDstAlpha,
500 HgiBlendFactorConstantColor,
501 HgiBlendFactorOneMinusConstantColor,
502 HgiBlendFactorConstantAlpha,
503 HgiBlendFactorOneMinusConstantAlpha,
504 HgiBlendFactorSrcAlphaSaturate,
505 HgiBlendFactorSrc1Color,
506 HgiBlendFactorOneMinusSrc1Color,
507 HgiBlendFactorSrc1Alpha,
508 HgiBlendFactorOneMinusSrc1Alpha,
518enum HgiColorMaskBits : HgiBits
520 HgiColorMaskRed = 1 << 0,
521 HgiColorMaskGreen = 1 << 1,
522 HgiColorMaskBlue = 1 << 2,
523 HgiColorMaskAlpha = 1 << 3,
525using HgiColorMask = HgiBits;
531enum HgiCompareFunction
533 HgiCompareFunctionNever = 0,
534 HgiCompareFunctionLess,
535 HgiCompareFunctionEqual,
536 HgiCompareFunctionLEqual,
537 HgiCompareFunctionGreater,
538 HgiCompareFunctionNotEqual,
539 HgiCompareFunctionGEqual,
540 HgiCompareFunctionAlways,
542 HgiCompareFunctionCount
551 HgiStencilOpKeep = 0,
554 HgiStencilOpIncrementClamp,
555 HgiStencilOpDecrementClamp,
557 HgiStencilOpIncrementWrap,
558 HgiStencilOpDecrementWrap,
567enum HgiComponentSwizzle
569 HgiComponentSwizzleZero = 0,
570 HgiComponentSwizzleOne,
571 HgiComponentSwizzleR,
572 HgiComponentSwizzleG,
573 HgiComponentSwizzleB,
574 HgiComponentSwizzleA,
576 HgiComponentSwizzleCount
602 HgiPrimitiveTypePointList = 0,
603 HgiPrimitiveTypeLineList,
604 HgiPrimitiveTypeLineStrip,
605 HgiPrimitiveTypeTriangleList,
606 HgiPrimitiveTypePatchList,
607 HgiPrimitiveTypeLineListWithAdjacency,
609 HgiPrimitiveTypeCount
631enum HgiVertexBufferStepFunction
633 HgiVertexBufferStepFunctionConstant = 0,
634 HgiVertexBufferStepFunctionPerVertex,
635 HgiVertexBufferStepFunctionPerInstance,
636 HgiVertexBufferStepFunctionPerPatch,
637 HgiVertexBufferStepFunctionPerPatchControlPoint,
638 HgiVertexBufferStepFunctionPerDrawCommand,
640 HgiVertexBufferStepFunctionCount
654enum HgiSubmitWaitType
656 HgiSubmitWaitTypeNoWait = 0,
657 HgiSubmitWaitTypeWaitUntilCompleted,
671enum HgiMemoryBarrierBits
673 HgiMemoryBarrierNone = 0,
674 HgiMemoryBarrierAll = 1 << 0
676using HgiMemoryBarrier = HgiBits;
707 HgiBindingTypeValue = 0,
708 HgiBindingTypeUniformValue,
710 HgiBindingTypeUniformArray,
711 HgiBindingTypePointer,
733enum HgiInterpolationType
735 HgiInterpolationDefault = 0,
736 HgiInterpolationFlat,
737 HgiInterpolationNoPerspective,
761 HgiSamplingDefault = 0,
781 HgiStorageDefault = 0,
800enum HgiShaderTextureType
802 HgiShaderTextureTypeTexture = 0,
803 HgiShaderTextureTypeShadowTexture,
804 HgiShaderTextureTypeArrayTexture,
805 HgiShaderTextureTypeCubemapTexture
819enum HgiComputeDispatch
821 HgiComputeDispatchSerial = 0,
822 HgiComputeDispatchConcurrent
825PXR_NAMESPACE_CLOSE_SCOPE