7 #ifndef PXR_IMAGING_HGI_ENUMS_H 8 #define PXR_IMAGING_HGI_ENUMS_H 11 #include "pxr/imaging/hgi/api.h" 14 PXR_NAMESPACE_OPEN_SCOPE
16 using HgiBits = uint32_t;
68 enum HgiDeviceCapabilitiesBits : HgiBits
70 HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
71 HgiDeviceCapabilitiesBitsBindlessBuffers = 1 << 1,
72 HgiDeviceCapabilitiesBitsConcurrentDispatch = 1 << 2,
73 HgiDeviceCapabilitiesBitsUnifiedMemory = 1 << 3,
74 HgiDeviceCapabilitiesBitsBuiltinBarycentrics = 1 << 4,
75 HgiDeviceCapabilitiesBitsShaderDrawParameters = 1 << 5,
76 HgiDeviceCapabilitiesBitsMultiDrawIndirect = 1 << 6,
77 HgiDeviceCapabilitiesBitsBindlessTextures = 1 << 7,
78 HgiDeviceCapabilitiesBitsShaderDoublePrecision = 1 << 8,
79 HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne = 1 << 9,
80 HgiDeviceCapabilitiesBitsCppShaderPadding = 1 << 10,
81 HgiDeviceCapabilitiesBitsConservativeRaster = 1 << 11,
82 HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12,
83 HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13,
84 HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14,
85 HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15,
86 HgiDeviceCapabilitiesBitsPrimitiveIdEmulation = 1 << 16,
87 HgiDeviceCapabilitiesBitsIndirectCommandBuffers = 1 << 17,
88 HgiDeviceCapabilitiesBitsRoundPoints = 1 << 18,
89 HgiDeviceCapabilitiesBitsSingleSlotResourceArrays = 1 << 19,
90 HgiDeviceCapabilitiesForceEarlyFragmentTest = 1 << 20,
93 using HgiDeviceCapabilities = HgiBits;
116 HgiTextureType1D = 0,
119 HgiTextureTypeCubemap,
120 HgiTextureType1DArray,
121 HgiTextureType2DArray,
150 enum HgiTextureUsageBits : HgiBits
152 HgiTextureUsageBitsColorTarget = 1 << 0,
153 HgiTextureUsageBitsDepthTarget = 1 << 1,
154 HgiTextureUsageBitsStencilTarget = 1 << 2,
155 HgiTextureUsageBitsShaderRead = 1 << 3,
156 HgiTextureUsageBitsShaderWrite = 1 << 4,
158 HgiTextureUsageCustomBitsBegin = 1 << 5,
161 using HgiTextureUsage = HgiBits;
167 enum HgiSamplerAddressMode
169 HgiSamplerAddressModeClampToEdge = 0,
170 HgiSamplerAddressModeMirrorClampToEdge,
171 HgiSamplerAddressModeRepeat,
172 HgiSamplerAddressModeMirrorRepeat,
173 HgiSamplerAddressModeClampToBorderColor,
175 HgiSamplerAddressModeCount
189 enum HgiSamplerFilter
191 HgiSamplerFilterNearest = 0,
192 HgiSamplerFilterLinear = 1,
194 HgiSamplerFilterCount
212 HgiMipFilterNotMipmapped = 0,
213 HgiMipFilterNearest = 1,
214 HgiMipFilterLinear = 2,
231 HgiBorderColorTransparentBlack = 0,
232 HgiBorderColorOpaqueBlack = 1,
233 HgiBorderColorOpaqueWhite = 2,
248 HgiSampleCount16 = 16,
266 enum HgiAttachmentLoadOp
268 HgiAttachmentLoadOpDontCare = 0,
269 HgiAttachmentLoadOpClear,
270 HgiAttachmentLoadOpLoad,
272 HgiAttachmentLoadOpCount
286 enum HgiAttachmentStoreOp
288 HgiAttachmentStoreOpDontCare = 0,
289 HgiAttachmentStoreOpStore,
291 HgiAttachmentStoreOpCount
315 enum HgiBufferUsageBits : HgiBits
317 HgiBufferUsageUniform = 1 << 0,
318 HgiBufferUsageIndex32 = 1 << 1,
319 HgiBufferUsageVertex = 1 << 2,
320 HgiBufferUsageStorage = 1 << 3,
321 HgiBufferUsageIndirect = 1 << 4,
322 HgiBufferUsageUpload = 1 << 5,
324 HgiBufferUsageCustomBitsBegin = 1 << 6,
326 using HgiBufferUsage = HgiBits;
356 enum HgiShaderStageBits : HgiBits
358 HgiShaderStageVertex = 1 << 0,
359 HgiShaderStageFragment = 1 << 1,
360 HgiShaderStageCompute = 1 << 2,
361 HgiShaderStageTessellationControl = 1 << 3,
362 HgiShaderStageTessellationEval = 1 << 4,
363 HgiShaderStageGeometry = 1 << 5,
364 HgiShaderStagePostTessellationControl = 1 << 6,
365 HgiShaderStagePostTessellationVertex = 1 << 7,
366 HgiShaderStageCustomBitsBegin = 1 << 8,
367 HgiShaderStageAllGraphics = HgiShaderStageVertex
368 | HgiShaderStageFragment
369 | HgiShaderStageTessellationControl
370 | HgiShaderStageTessellationEval
371 | HgiShaderStageGeometry
372 | HgiShaderStagePostTessellationControl
373 | HgiShaderStagePostTessellationVertex,
374 HgiShaderStageAll = 0xFFFFFFFF
377 using HgiShaderStage = HgiBits;
405 enum HgiBindResourceType
407 HgiBindResourceTypeSampler = 0,
408 HgiBindResourceTypeSampledImage,
409 HgiBindResourceTypeCombinedSamplerImage,
410 HgiBindResourceTypeStorageImage,
411 HgiBindResourceTypeUniformBuffer,
412 HgiBindResourceTypeStorageBuffer,
413 HgiBindResourceTypeTessFactors,
415 HgiBindResourceTypeCount
433 HgiPolygonModeFill = 0,
460 HgiCullModeFrontAndBack,
478 HgiWindingClockwise = 0,
479 HgiWindingCounterClockwise,
493 HgiBlendOpReverseSubtract,
506 HgiBlendFactorZero = 0,
508 HgiBlendFactorSrcColor,
509 HgiBlendFactorOneMinusSrcColor,
510 HgiBlendFactorDstColor,
511 HgiBlendFactorOneMinusDstColor,
512 HgiBlendFactorSrcAlpha,
513 HgiBlendFactorOneMinusSrcAlpha,
514 HgiBlendFactorDstAlpha,
515 HgiBlendFactorOneMinusDstAlpha,
516 HgiBlendFactorConstantColor,
517 HgiBlendFactorOneMinusConstantColor,
518 HgiBlendFactorConstantAlpha,
519 HgiBlendFactorOneMinusConstantAlpha,
520 HgiBlendFactorSrcAlphaSaturate,
521 HgiBlendFactorSrc1Color,
522 HgiBlendFactorOneMinusSrc1Color,
523 HgiBlendFactorSrc1Alpha,
524 HgiBlendFactorOneMinusSrc1Alpha,
534 enum HgiColorMaskBits : HgiBits
536 HgiColorMaskRed = 1 << 0,
537 HgiColorMaskGreen = 1 << 1,
538 HgiColorMaskBlue = 1 << 2,
539 HgiColorMaskAlpha = 1 << 3,
541 using HgiColorMask = HgiBits;
547 enum HgiCompareFunction
549 HgiCompareFunctionNever = 0,
550 HgiCompareFunctionLess,
551 HgiCompareFunctionEqual,
552 HgiCompareFunctionLEqual,
553 HgiCompareFunctionGreater,
554 HgiCompareFunctionNotEqual,
555 HgiCompareFunctionGEqual,
556 HgiCompareFunctionAlways,
558 HgiCompareFunctionCount
567 HgiStencilOpKeep = 0,
570 HgiStencilOpIncrementClamp,
571 HgiStencilOpDecrementClamp,
573 HgiStencilOpIncrementWrap,
574 HgiStencilOpDecrementWrap,
583 enum HgiComponentSwizzle
585 HgiComponentSwizzleZero = 0,
586 HgiComponentSwizzleOne,
587 HgiComponentSwizzleR,
588 HgiComponentSwizzleG,
589 HgiComponentSwizzleB,
590 HgiComponentSwizzleA,
592 HgiComponentSwizzleCount
616 enum HgiPrimitiveType
618 HgiPrimitiveTypePointList = 0,
619 HgiPrimitiveTypeLineList,
620 HgiPrimitiveTypeLineStrip,
621 HgiPrimitiveTypeTriangleList,
622 HgiPrimitiveTypePatchList,
623 HgiPrimitiveTypeLineListWithAdjacency,
625 HgiPrimitiveTypeCount
647 enum HgiVertexBufferStepFunction
649 HgiVertexBufferStepFunctionConstant = 0,
650 HgiVertexBufferStepFunctionPerVertex,
651 HgiVertexBufferStepFunctionPerInstance,
652 HgiVertexBufferStepFunctionPerPatch,
653 HgiVertexBufferStepFunctionPerPatchControlPoint,
654 HgiVertexBufferStepFunctionPerDrawCommand,
656 HgiVertexBufferStepFunctionCount
670 enum HgiSubmitWaitType
672 HgiSubmitWaitTypeNoWait = 0,
673 HgiSubmitWaitTypeWaitUntilCompleted,
687 enum HgiMemoryBarrierBits
689 HgiMemoryBarrierNone = 0,
690 HgiMemoryBarrierAll = 1 << 0
692 using HgiMemoryBarrier = HgiBits;
723 HgiBindingTypeValue = 0,
724 HgiBindingTypeUniformValue,
726 HgiBindingTypeUniformArray,
727 HgiBindingTypePointer,
749 enum HgiInterpolationType
751 HgiInterpolationDefault = 0,
752 HgiInterpolationFlat,
753 HgiInterpolationNoPerspective,
777 HgiSamplingDefault = 0,
797 HgiStorageDefault = 0,
816 enum HgiShaderTextureType
818 HgiShaderTextureTypeTexture = 0,
819 HgiShaderTextureTypeShadowTexture,
820 HgiShaderTextureTypeArrayTexture,
821 HgiShaderTextureTypeCubemapTexture
835 enum HgiComputeDispatch
837 HgiComputeDispatchSerial = 0,
838 HgiComputeDispatchConcurrent
841 PXR_NAMESPACE_CLOSE_SCOPE