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
63enum HgiDeviceCapabilitiesBits : HgiBits
64{
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,
83};
84
85using HgiDeviceCapabilities = HgiBits;
86
104enum HgiTextureType
105{
106 HgiTextureType1D = 0,
107 HgiTextureType2D,
108 HgiTextureType3D,
109 HgiTextureType1DArray,
110 HgiTextureType2DArray,
111
112 HgiTextureTypeCount
113};
114
139enum HgiTextureUsageBits : HgiBits
140{
141 HgiTextureUsageBitsColorTarget = 1 << 0,
142 HgiTextureUsageBitsDepthTarget = 1 << 1,
143 HgiTextureUsageBitsStencilTarget = 1 << 2,
144 HgiTextureUsageBitsShaderRead = 1 << 3,
145 HgiTextureUsageBitsShaderWrite = 1 << 4,
146
147 HgiTextureUsageCustomBitsBegin = 1 << 5,
148};
149
150using HgiTextureUsage = HgiBits;
151
156enum HgiSamplerAddressMode
157{
158 HgiSamplerAddressModeClampToEdge = 0,
159 HgiSamplerAddressModeMirrorClampToEdge,
160 HgiSamplerAddressModeRepeat,
161 HgiSamplerAddressModeMirrorRepeat,
162 HgiSamplerAddressModeClampToBorderColor,
163
164 HgiSamplerAddressModeCount
165};
166
178enum HgiSamplerFilter
179{
180 HgiSamplerFilterNearest = 0,
181 HgiSamplerFilterLinear = 1,
182
183 HgiSamplerFilterCount
184};
185
199enum HgiMipFilter
200{
201 HgiMipFilterNotMipmapped = 0,
202 HgiMipFilterNearest = 1,
203 HgiMipFilterLinear = 2,
204
205 HgiMipFilterCount
206};
207
218enum HgiBorderColor
219{
220 HgiBorderColorTransparentBlack = 0,
221 HgiBorderColorOpaqueBlack = 1,
222 HgiBorderColorOpaqueWhite = 2,
223
224 HgiBorderColorCount
225};
226
231enum HgiSampleCount
232{
233 HgiSampleCount1 = 1,
234 HgiSampleCount2 = 2,
235 HgiSampleCount4 = 4,
236 HgiSampleCount8 = 8,
237 HgiSampleCount16 = 16,
238
239 HgiSampleCountEnd
240};
241
255enum HgiAttachmentLoadOp
256{
257 HgiAttachmentLoadOpDontCare = 0,
258 HgiAttachmentLoadOpClear,
259 HgiAttachmentLoadOpLoad,
260
261 HgiAttachmentLoadOpCount
262};
263
275enum HgiAttachmentStoreOp
276{
277 HgiAttachmentStoreOpDontCare = 0,
278 HgiAttachmentStoreOpStore,
279
280 HgiAttachmentStoreOpCount
281};
282
302enum HgiBufferUsageBits : HgiBits
303{
304 HgiBufferUsageUniform = 1 << 0,
305 HgiBufferUsageIndex32 = 1 << 1,
306 HgiBufferUsageVertex = 1 << 2,
307 HgiBufferUsageStorage = 1 << 3,
308 HgiBufferUsageIndirect = 1 << 4,
309
310 HgiBufferUsageCustomBitsBegin = 1 << 5,
311};
312using HgiBufferUsage = HgiBits;
313
342enum HgiShaderStageBits : HgiBits
343{
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,
353};
354using HgiShaderStage = HgiBits;
355
382enum HgiBindResourceType
383{
384 HgiBindResourceTypeSampler = 0,
385 HgiBindResourceTypeSampledImage,
386 HgiBindResourceTypeCombinedSamplerImage,
387 HgiBindResourceTypeStorageImage,
388 HgiBindResourceTypeUniformBuffer,
389 HgiBindResourceTypeStorageBuffer,
390 HgiBindResourceTypeTessFactors,
391
392 HgiBindResourceTypeCount
393};
394
408enum HgiPolygonMode
409{
410 HgiPolygonModeFill = 0,
411 HgiPolygonModeLine,
412 HgiPolygonModePoint,
413
414 HgiPolygonModeCount
415};
416
432enum HgiCullMode
433{
434 HgiCullModeNone = 0,
435 HgiCullModeFront,
436 HgiCullModeBack,
437 HgiCullModeFrontAndBack,
438
439 HgiCullModeCount
440};
441
453enum HgiWinding
454{
455 HgiWindingClockwise = 0,
456 HgiWindingCounterClockwise,
457
458 HgiWindingCount
459};
460
461
466enum HgiBlendOp
467{
468 HgiBlendOpAdd = 0,
469 HgiBlendOpSubtract,
470 HgiBlendOpReverseSubtract,
471 HgiBlendOpMin,
472 HgiBlendOpMax,
473
474 HgiBlendOpCount
475};
476
481enum HgiBlendFactor
482{
483 HgiBlendFactorZero = 0,
484 HgiBlendFactorOne,
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,
502
503 HgiBlendFactorCount
504};
505
511enum HgiColorMaskBits : HgiBits
512{
513 HgiColorMaskRed = 1 << 0,
514 HgiColorMaskGreen = 1 << 1,
515 HgiColorMaskBlue = 1 << 2,
516 HgiColorMaskAlpha = 1 << 3,
517};
518using HgiColorMask = HgiBits;
519
524enum HgiCompareFunction
525{
526 HgiCompareFunctionNever = 0,
527 HgiCompareFunctionLess,
528 HgiCompareFunctionEqual,
529 HgiCompareFunctionLEqual,
530 HgiCompareFunctionGreater,
531 HgiCompareFunctionNotEqual,
532 HgiCompareFunctionGEqual,
533 HgiCompareFunctionAlways,
534
535 HgiCompareFunctionCount
536};
537
542enum HgiStencilOp
543{
544 HgiStencilOpKeep = 0,
545 HgiStencilOpZero,
546 HgiStencilOpReplace,
547 HgiStencilOpIncrementClamp,
548 HgiStencilOpDecrementClamp,
549 HgiStencilOpInvert,
550 HgiStencilOpIncrementWrap,
551 HgiStencilOpDecrementWrap,
552
553 HgiStencilOpCount
554};
555
560enum HgiComponentSwizzle
561{
562 HgiComponentSwizzleZero = 0,
563 HgiComponentSwizzleOne,
564 HgiComponentSwizzleR,
565 HgiComponentSwizzleG,
566 HgiComponentSwizzleB,
567 HgiComponentSwizzleA,
568
569 HgiComponentSwizzleCount
570};
571
593enum HgiPrimitiveType
594{
595 HgiPrimitiveTypePointList = 0,
596 HgiPrimitiveTypeLineList,
597 HgiPrimitiveTypeLineStrip,
598 HgiPrimitiveTypeTriangleList,
599 HgiPrimitiveTypePatchList,
600 HgiPrimitiveTypeLineListWithAdjacency,
601
602 HgiPrimitiveTypeCount
603};
604
624enum HgiVertexBufferStepFunction
625{
626 HgiVertexBufferStepFunctionConstant = 0,
627 HgiVertexBufferStepFunctionPerVertex,
628 HgiVertexBufferStepFunctionPerInstance,
629 HgiVertexBufferStepFunctionPerPatch,
630 HgiVertexBufferStepFunctionPerPatchControlPoint,
631 HgiVertexBufferStepFunctionPerDrawCommand,
632
633 HgiVertexBufferStepFunctionCount
634};
635
647enum HgiSubmitWaitType
648{
649 HgiSubmitWaitTypeNoWait = 0,
650 HgiSubmitWaitTypeWaitUntilCompleted,
651};
652
664enum HgiMemoryBarrierBits
665{
666 HgiMemoryBarrierNone = 0,
667 HgiMemoryBarrierAll = 1 << 0
668};
669using HgiMemoryBarrier = HgiBits;
670
698enum HgiBindingType
699{
700 HgiBindingTypeValue = 0,
701 HgiBindingTypeUniformValue,
702 HgiBindingTypeArray,
703 HgiBindingTypeUniformArray,
704 HgiBindingTypePointer,
705};
706
726enum HgiInterpolationType
727{
728 HgiInterpolationDefault = 0,
729 HgiInterpolationFlat,
730 HgiInterpolationNoPerspective,
731};
732
752enum HgiSamplingType
753{
754 HgiSamplingDefault = 0,
755 HgiSamplingCentroid,
756 HgiSamplingSample,
757};
758
772enum HgiStorageType
773{
774 HgiStorageDefault = 0,
775 HgiStoragePatch,
776};
777
791enum HgiShaderTextureType
792{
793 HgiShaderTextureTypeTexture = 0,
794 HgiShaderTextureTypeShadowTexture,
795 HgiShaderTextureTypeArrayTexture
796};
797
809enum HgiComputeDispatch
810{
811 HgiComputeDispatchSerial = 0,
812 HgiComputeDispatchConcurrent
813};
814
815PXR_NAMESPACE_CLOSE_SCOPE
816
817#endif