24#ifndef PXR_IMAGING_HGI_ENUMS_H
25#define PXR_IMAGING_HGI_ENUMS_H
28#include "pxr/imaging/hgi/api.h"
31PXR_NAMESPACE_OPEN_SCOPE
33using HgiBits = uint32_t;
80enum HgiDeviceCapabilitiesBits : HgiBits
82 HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
83 HgiDeviceCapabilitiesBitsBindlessBuffers = 1 << 1,
84 HgiDeviceCapabilitiesBitsConcurrentDispatch = 1 << 2,
85 HgiDeviceCapabilitiesBitsUnifiedMemory = 1 << 3,
86 HgiDeviceCapabilitiesBitsBuiltinBarycentrics = 1 << 4,
87 HgiDeviceCapabilitiesBitsShaderDrawParameters = 1 << 5,
88 HgiDeviceCapabilitiesBitsMultiDrawIndirect = 1 << 6,
89 HgiDeviceCapabilitiesBitsBindlessTextures = 1 << 7,
90 HgiDeviceCapabilitiesBitsShaderDoublePrecision = 1 << 8,
91 HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne = 1 << 9,
92 HgiDeviceCapabilitiesBitsCppShaderPadding = 1 << 10,
93 HgiDeviceCapabilitiesBitsConservativeRaster = 1 << 11,
94 HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12,
95 HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13,
96 HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14,
97 HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15,
98 HgiDeviceCapabilitiesBitsPrimitiveIdEmulation = 1 << 16,
99 HgiDeviceCapabilitiesBitsIndirectCommandBuffers = 1 << 17,
102using HgiDeviceCapabilities = HgiBits;
123 HgiTextureType1D = 0,
126 HgiTextureType1DArray,
127 HgiTextureType2DArray,
156enum HgiTextureUsageBits : HgiBits
158 HgiTextureUsageBitsColorTarget = 1 << 0,
159 HgiTextureUsageBitsDepthTarget = 1 << 1,
160 HgiTextureUsageBitsStencilTarget = 1 << 2,
161 HgiTextureUsageBitsShaderRead = 1 << 3,
162 HgiTextureUsageBitsShaderWrite = 1 << 4,
164 HgiTextureUsageCustomBitsBegin = 1 << 5,
167using HgiTextureUsage = HgiBits;
173enum HgiSamplerAddressMode
175 HgiSamplerAddressModeClampToEdge = 0,
176 HgiSamplerAddressModeMirrorClampToEdge,
177 HgiSamplerAddressModeRepeat,
178 HgiSamplerAddressModeMirrorRepeat,
179 HgiSamplerAddressModeClampToBorderColor,
181 HgiSamplerAddressModeCount
197 HgiSamplerFilterNearest = 0,
198 HgiSamplerFilterLinear = 1,
200 HgiSamplerFilterCount
218 HgiMipFilterNotMipmapped = 0,
219 HgiMipFilterNearest = 1,
220 HgiMipFilterLinear = 2,
237 HgiBorderColorTransparentBlack = 0,
238 HgiBorderColorOpaqueBlack = 1,
239 HgiBorderColorOpaqueWhite = 2,
254 HgiSampleCount16 = 16,
272enum HgiAttachmentLoadOp
274 HgiAttachmentLoadOpDontCare = 0,
275 HgiAttachmentLoadOpClear,
276 HgiAttachmentLoadOpLoad,
278 HgiAttachmentLoadOpCount
292enum HgiAttachmentStoreOp
294 HgiAttachmentStoreOpDontCare = 0,
295 HgiAttachmentStoreOpStore,
297 HgiAttachmentStoreOpCount
319enum HgiBufferUsageBits : HgiBits
321 HgiBufferUsageUniform = 1 << 0,
322 HgiBufferUsageIndex32 = 1 << 1,
323 HgiBufferUsageVertex = 1 << 2,
324 HgiBufferUsageStorage = 1 << 3,
325 HgiBufferUsageIndirect = 1 << 4,
327 HgiBufferUsageCustomBitsBegin = 1 << 5,
329using HgiBufferUsage = HgiBits;
359enum HgiShaderStageBits : HgiBits
361 HgiShaderStageVertex = 1 << 0,
362 HgiShaderStageFragment = 1 << 1,
363 HgiShaderStageCompute = 1 << 2,
364 HgiShaderStageTessellationControl = 1 << 3,
365 HgiShaderStageTessellationEval = 1 << 4,
366 HgiShaderStageGeometry = 1 << 5,
367 HgiShaderStagePostTessellationControl = 1 << 6,
368 HgiShaderStagePostTessellationVertex = 1 << 7,
369 HgiShaderStageCustomBitsBegin = 1 << 8,
371using HgiShaderStage = HgiBits;
399enum HgiBindResourceType
401 HgiBindResourceTypeSampler = 0,
402 HgiBindResourceTypeSampledImage,
403 HgiBindResourceTypeCombinedSamplerImage,
404 HgiBindResourceTypeStorageImage,
405 HgiBindResourceTypeUniformBuffer,
406 HgiBindResourceTypeStorageBuffer,
407 HgiBindResourceTypeTessFactors,
409 HgiBindResourceTypeCount
427 HgiPolygonModeFill = 0,
454 HgiCullModeFrontAndBack,
472 HgiWindingClockwise = 0,
473 HgiWindingCounterClockwise,
487 HgiBlendOpReverseSubtract,
500 HgiBlendFactorZero = 0,
502 HgiBlendFactorSrcColor,
503 HgiBlendFactorOneMinusSrcColor,
504 HgiBlendFactorDstColor,
505 HgiBlendFactorOneMinusDstColor,
506 HgiBlendFactorSrcAlpha,
507 HgiBlendFactorOneMinusSrcAlpha,
508 HgiBlendFactorDstAlpha,
509 HgiBlendFactorOneMinusDstAlpha,
510 HgiBlendFactorConstantColor,
511 HgiBlendFactorOneMinusConstantColor,
512 HgiBlendFactorConstantAlpha,
513 HgiBlendFactorOneMinusConstantAlpha,
514 HgiBlendFactorSrcAlphaSaturate,
515 HgiBlendFactorSrc1Color,
516 HgiBlendFactorOneMinusSrc1Color,
517 HgiBlendFactorSrc1Alpha,
518 HgiBlendFactorOneMinusSrc1Alpha,
528enum HgiColorMaskBits : HgiBits
530 HgiColorMaskRed = 1 << 0,
531 HgiColorMaskGreen = 1 << 1,
532 HgiColorMaskBlue = 1 << 2,
533 HgiColorMaskAlpha = 1 << 3,
535using HgiColorMask = HgiBits;
541enum HgiCompareFunction
543 HgiCompareFunctionNever = 0,
544 HgiCompareFunctionLess,
545 HgiCompareFunctionEqual,
546 HgiCompareFunctionLEqual,
547 HgiCompareFunctionGreater,
548 HgiCompareFunctionNotEqual,
549 HgiCompareFunctionGEqual,
550 HgiCompareFunctionAlways,
552 HgiCompareFunctionCount
561 HgiStencilOpKeep = 0,
564 HgiStencilOpIncrementClamp,
565 HgiStencilOpDecrementClamp,
567 HgiStencilOpIncrementWrap,
568 HgiStencilOpDecrementWrap,
577enum HgiComponentSwizzle
579 HgiComponentSwizzleZero = 0,
580 HgiComponentSwizzleOne,
581 HgiComponentSwizzleR,
582 HgiComponentSwizzleG,
583 HgiComponentSwizzleB,
584 HgiComponentSwizzleA,
586 HgiComponentSwizzleCount
612 HgiPrimitiveTypePointList = 0,
613 HgiPrimitiveTypeLineList,
614 HgiPrimitiveTypeLineStrip,
615 HgiPrimitiveTypeTriangleList,
616 HgiPrimitiveTypePatchList,
617 HgiPrimitiveTypeLineListWithAdjacency,
619 HgiPrimitiveTypeCount
641enum HgiVertexBufferStepFunction
643 HgiVertexBufferStepFunctionConstant = 0,
644 HgiVertexBufferStepFunctionPerVertex,
645 HgiVertexBufferStepFunctionPerInstance,
646 HgiVertexBufferStepFunctionPerPatch,
647 HgiVertexBufferStepFunctionPerPatchControlPoint,
648 HgiVertexBufferStepFunctionPerDrawCommand,
650 HgiVertexBufferStepFunctionCount
664enum HgiSubmitWaitType
666 HgiSubmitWaitTypeNoWait = 0,
667 HgiSubmitWaitTypeWaitUntilCompleted,
681enum HgiMemoryBarrierBits
683 HgiMemoryBarrierNone = 0,
684 HgiMemoryBarrierAll = 1 << 0
686using HgiMemoryBarrier = HgiBits;
717 HgiBindingTypeValue = 0,
718 HgiBindingTypeUniformValue,
720 HgiBindingTypeUniformArray,
721 HgiBindingTypePointer,
743enum HgiInterpolationType
745 HgiInterpolationDefault = 0,
746 HgiInterpolationFlat,
747 HgiInterpolationNoPerspective,
771 HgiSamplingDefault = 0,
791 HgiStorageDefault = 0,
808enum HgiShaderTextureType
810 HgiShaderTextureTypeTexture = 0,
811 HgiShaderTextureTypeShadowTexture,
812 HgiShaderTextureTypeArrayTexture
826enum HgiComputeDispatch
828 HgiComputeDispatchSerial = 0,
829 HgiComputeDispatchConcurrent
832PXR_NAMESPACE_CLOSE_SCOPE