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
65enum HgiDeviceCapabilitiesBits : HgiBits
66{
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,
87};
88
89using HgiDeviceCapabilities = HgiBits;
90
110enum HgiTextureType
111{
112 HgiTextureType1D = 0,
113 HgiTextureType2D,
114 HgiTextureType3D,
115 HgiTextureTypeCubemap,
116 HgiTextureType1DArray,
117 HgiTextureType2DArray,
118
119 HgiTextureTypeCount
120};
121
146enum HgiTextureUsageBits : HgiBits
147{
148 HgiTextureUsageBitsColorTarget = 1 << 0,
149 HgiTextureUsageBitsDepthTarget = 1 << 1,
150 HgiTextureUsageBitsStencilTarget = 1 << 2,
151 HgiTextureUsageBitsShaderRead = 1 << 3,
152 HgiTextureUsageBitsShaderWrite = 1 << 4,
153
154 HgiTextureUsageCustomBitsBegin = 1 << 5,
155};
156
157using HgiTextureUsage = HgiBits;
158
163enum HgiSamplerAddressMode
164{
165 HgiSamplerAddressModeClampToEdge = 0,
166 HgiSamplerAddressModeMirrorClampToEdge,
167 HgiSamplerAddressModeRepeat,
168 HgiSamplerAddressModeMirrorRepeat,
169 HgiSamplerAddressModeClampToBorderColor,
170
171 HgiSamplerAddressModeCount
172};
173
185enum HgiSamplerFilter
186{
187 HgiSamplerFilterNearest = 0,
188 HgiSamplerFilterLinear = 1,
189
190 HgiSamplerFilterCount
191};
192
206enum HgiMipFilter
207{
208 HgiMipFilterNotMipmapped = 0,
209 HgiMipFilterNearest = 1,
210 HgiMipFilterLinear = 2,
211
212 HgiMipFilterCount
213};
214
225enum HgiBorderColor
226{
227 HgiBorderColorTransparentBlack = 0,
228 HgiBorderColorOpaqueBlack = 1,
229 HgiBorderColorOpaqueWhite = 2,
230
231 HgiBorderColorCount
232};
233
238enum HgiSampleCount
239{
240 HgiSampleCount1 = 1,
241 HgiSampleCount2 = 2,
242 HgiSampleCount4 = 4,
243 HgiSampleCount8 = 8,
244 HgiSampleCount16 = 16,
245
246 HgiSampleCountEnd
247};
248
262enum HgiAttachmentLoadOp
263{
264 HgiAttachmentLoadOpDontCare = 0,
265 HgiAttachmentLoadOpClear,
266 HgiAttachmentLoadOpLoad,
267
268 HgiAttachmentLoadOpCount
269};
270
282enum HgiAttachmentStoreOp
283{
284 HgiAttachmentStoreOpDontCare = 0,
285 HgiAttachmentStoreOpStore,
286
287 HgiAttachmentStoreOpCount
288};
289
311enum HgiBufferUsageBits : HgiBits
312{
313 HgiBufferUsageUniform = 1 << 0,
314 HgiBufferUsageIndex32 = 1 << 1,
315 HgiBufferUsageVertex = 1 << 2,
316 HgiBufferUsageStorage = 1 << 3,
317 HgiBufferUsageIndirect = 1 << 4,
318 HgiBufferUsageUpload = 1 << 5,
319
320 HgiBufferUsageCustomBitsBegin = 1 << 6,
321};
322using HgiBufferUsage = HgiBits;
323
352enum HgiShaderStageBits : HgiBits
353{
354 HgiShaderStageVertex = 1 << 0,
355 HgiShaderStageFragment = 1 << 1,
356 HgiShaderStageCompute = 1 << 2,
357 HgiShaderStageTessellationControl = 1 << 3,
358 HgiShaderStageTessellationEval = 1 << 4,
359 HgiShaderStageGeometry = 1 << 5,
360 HgiShaderStagePostTessellationControl = 1 << 6,
361 HgiShaderStagePostTessellationVertex = 1 << 7,
362 HgiShaderStageCustomBitsBegin = 1 << 8,
363};
364using HgiShaderStage = HgiBits;
365
392enum HgiBindResourceType
393{
394 HgiBindResourceTypeSampler = 0,
395 HgiBindResourceTypeSampledImage,
396 HgiBindResourceTypeCombinedSamplerImage,
397 HgiBindResourceTypeStorageImage,
398 HgiBindResourceTypeUniformBuffer,
399 HgiBindResourceTypeStorageBuffer,
400 HgiBindResourceTypeTessFactors,
401
402 HgiBindResourceTypeCount
403};
404
418enum HgiPolygonMode
419{
420 HgiPolygonModeFill = 0,
421 HgiPolygonModeLine,
422 HgiPolygonModePoint,
423
424 HgiPolygonModeCount
425};
426
442enum HgiCullMode
443{
444 HgiCullModeNone = 0,
445 HgiCullModeFront,
446 HgiCullModeBack,
447 HgiCullModeFrontAndBack,
448
449 HgiCullModeCount
450};
451
463enum HgiWinding
464{
465 HgiWindingClockwise = 0,
466 HgiWindingCounterClockwise,
467
468 HgiWindingCount
469};
470
471
476enum HgiBlendOp
477{
478 HgiBlendOpAdd = 0,
479 HgiBlendOpSubtract,
480 HgiBlendOpReverseSubtract,
481 HgiBlendOpMin,
482 HgiBlendOpMax,
483
484 HgiBlendOpCount
485};
486
491enum HgiBlendFactor
492{
493 HgiBlendFactorZero = 0,
494 HgiBlendFactorOne,
495 HgiBlendFactorSrcColor,
496 HgiBlendFactorOneMinusSrcColor,
497 HgiBlendFactorDstColor,
498 HgiBlendFactorOneMinusDstColor,
499 HgiBlendFactorSrcAlpha,
500 HgiBlendFactorOneMinusSrcAlpha,
501 HgiBlendFactorDstAlpha,
502 HgiBlendFactorOneMinusDstAlpha,
503 HgiBlendFactorConstantColor,
504 HgiBlendFactorOneMinusConstantColor,
505 HgiBlendFactorConstantAlpha,
506 HgiBlendFactorOneMinusConstantAlpha,
507 HgiBlendFactorSrcAlphaSaturate,
508 HgiBlendFactorSrc1Color,
509 HgiBlendFactorOneMinusSrc1Color,
510 HgiBlendFactorSrc1Alpha,
511 HgiBlendFactorOneMinusSrc1Alpha,
512
513 HgiBlendFactorCount
514};
515
521enum HgiColorMaskBits : HgiBits
522{
523 HgiColorMaskRed = 1 << 0,
524 HgiColorMaskGreen = 1 << 1,
525 HgiColorMaskBlue = 1 << 2,
526 HgiColorMaskAlpha = 1 << 3,
527};
528using HgiColorMask = HgiBits;
529
534enum HgiCompareFunction
535{
536 HgiCompareFunctionNever = 0,
537 HgiCompareFunctionLess,
538 HgiCompareFunctionEqual,
539 HgiCompareFunctionLEqual,
540 HgiCompareFunctionGreater,
541 HgiCompareFunctionNotEqual,
542 HgiCompareFunctionGEqual,
543 HgiCompareFunctionAlways,
544
545 HgiCompareFunctionCount
546};
547
552enum HgiStencilOp
553{
554 HgiStencilOpKeep = 0,
555 HgiStencilOpZero,
556 HgiStencilOpReplace,
557 HgiStencilOpIncrementClamp,
558 HgiStencilOpDecrementClamp,
559 HgiStencilOpInvert,
560 HgiStencilOpIncrementWrap,
561 HgiStencilOpDecrementWrap,
562
563 HgiStencilOpCount
564};
565
570enum HgiComponentSwizzle
571{
572 HgiComponentSwizzleZero = 0,
573 HgiComponentSwizzleOne,
574 HgiComponentSwizzleR,
575 HgiComponentSwizzleG,
576 HgiComponentSwizzleB,
577 HgiComponentSwizzleA,
578
579 HgiComponentSwizzleCount
580};
581
603enum HgiPrimitiveType
604{
605 HgiPrimitiveTypePointList = 0,
606 HgiPrimitiveTypeLineList,
607 HgiPrimitiveTypeLineStrip,
608 HgiPrimitiveTypeTriangleList,
609 HgiPrimitiveTypePatchList,
610 HgiPrimitiveTypeLineListWithAdjacency,
611
612 HgiPrimitiveTypeCount
613};
614
634enum HgiVertexBufferStepFunction
635{
636 HgiVertexBufferStepFunctionConstant = 0,
637 HgiVertexBufferStepFunctionPerVertex,
638 HgiVertexBufferStepFunctionPerInstance,
639 HgiVertexBufferStepFunctionPerPatch,
640 HgiVertexBufferStepFunctionPerPatchControlPoint,
641 HgiVertexBufferStepFunctionPerDrawCommand,
642
643 HgiVertexBufferStepFunctionCount
644};
645
657enum HgiSubmitWaitType
658{
659 HgiSubmitWaitTypeNoWait = 0,
660 HgiSubmitWaitTypeWaitUntilCompleted,
661};
662
674enum HgiMemoryBarrierBits
675{
676 HgiMemoryBarrierNone = 0,
677 HgiMemoryBarrierAll = 1 << 0
678};
679using HgiMemoryBarrier = HgiBits;
680
708enum HgiBindingType
709{
710 HgiBindingTypeValue = 0,
711 HgiBindingTypeUniformValue,
712 HgiBindingTypeArray,
713 HgiBindingTypeUniformArray,
714 HgiBindingTypePointer,
715};
716
736enum HgiInterpolationType
737{
738 HgiInterpolationDefault = 0,
739 HgiInterpolationFlat,
740 HgiInterpolationNoPerspective,
741};
742
762enum HgiSamplingType
763{
764 HgiSamplingDefault = 0,
765 HgiSamplingCentroid,
766 HgiSamplingSample,
767};
768
782enum HgiStorageType
783{
784 HgiStorageDefault = 0,
785 HgiStoragePatch,
786};
787
803enum HgiShaderTextureType
804{
805 HgiShaderTextureTypeTexture = 0,
806 HgiShaderTextureTypeShadowTexture,
807 HgiShaderTextureTypeArrayTexture,
808 HgiShaderTextureTypeCubemapTexture
809};
810
822enum HgiComputeDispatch
823{
824 HgiComputeDispatchSerial = 0,
825 HgiComputeDispatchConcurrent
826};
827
828PXR_NAMESPACE_CLOSE_SCOPE
829
830#endif