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
309enum HgiBufferUsageBits : HgiBits
310{
311 HgiBufferUsageUniform = 1 << 0,
312 HgiBufferUsageIndex32 = 1 << 1,
313 HgiBufferUsageVertex = 1 << 2,
314 HgiBufferUsageStorage = 1 << 3,
315 HgiBufferUsageIndirect = 1 << 4,
316
317 HgiBufferUsageCustomBitsBegin = 1 << 5,
318};
319using HgiBufferUsage = HgiBits;
320
349enum HgiShaderStageBits : HgiBits
350{
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,
360};
361using HgiShaderStage = HgiBits;
362
389enum HgiBindResourceType
390{
391 HgiBindResourceTypeSampler = 0,
392 HgiBindResourceTypeSampledImage,
393 HgiBindResourceTypeCombinedSamplerImage,
394 HgiBindResourceTypeStorageImage,
395 HgiBindResourceTypeUniformBuffer,
396 HgiBindResourceTypeStorageBuffer,
397 HgiBindResourceTypeTessFactors,
398
399 HgiBindResourceTypeCount
400};
401
415enum HgiPolygonMode
416{
417 HgiPolygonModeFill = 0,
418 HgiPolygonModeLine,
419 HgiPolygonModePoint,
420
421 HgiPolygonModeCount
422};
423
439enum HgiCullMode
440{
441 HgiCullModeNone = 0,
442 HgiCullModeFront,
443 HgiCullModeBack,
444 HgiCullModeFrontAndBack,
445
446 HgiCullModeCount
447};
448
460enum HgiWinding
461{
462 HgiWindingClockwise = 0,
463 HgiWindingCounterClockwise,
464
465 HgiWindingCount
466};
467
468
473enum HgiBlendOp
474{
475 HgiBlendOpAdd = 0,
476 HgiBlendOpSubtract,
477 HgiBlendOpReverseSubtract,
478 HgiBlendOpMin,
479 HgiBlendOpMax,
480
481 HgiBlendOpCount
482};
483
488enum HgiBlendFactor
489{
490 HgiBlendFactorZero = 0,
491 HgiBlendFactorOne,
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,
509
510 HgiBlendFactorCount
511};
512
518enum HgiColorMaskBits : HgiBits
519{
520 HgiColorMaskRed = 1 << 0,
521 HgiColorMaskGreen = 1 << 1,
522 HgiColorMaskBlue = 1 << 2,
523 HgiColorMaskAlpha = 1 << 3,
524};
525using HgiColorMask = HgiBits;
526
531enum HgiCompareFunction
532{
533 HgiCompareFunctionNever = 0,
534 HgiCompareFunctionLess,
535 HgiCompareFunctionEqual,
536 HgiCompareFunctionLEqual,
537 HgiCompareFunctionGreater,
538 HgiCompareFunctionNotEqual,
539 HgiCompareFunctionGEqual,
540 HgiCompareFunctionAlways,
541
542 HgiCompareFunctionCount
543};
544
549enum HgiStencilOp
550{
551 HgiStencilOpKeep = 0,
552 HgiStencilOpZero,
553 HgiStencilOpReplace,
554 HgiStencilOpIncrementClamp,
555 HgiStencilOpDecrementClamp,
556 HgiStencilOpInvert,
557 HgiStencilOpIncrementWrap,
558 HgiStencilOpDecrementWrap,
559
560 HgiStencilOpCount
561};
562
567enum HgiComponentSwizzle
568{
569 HgiComponentSwizzleZero = 0,
570 HgiComponentSwizzleOne,
571 HgiComponentSwizzleR,
572 HgiComponentSwizzleG,
573 HgiComponentSwizzleB,
574 HgiComponentSwizzleA,
575
576 HgiComponentSwizzleCount
577};
578
600enum HgiPrimitiveType
601{
602 HgiPrimitiveTypePointList = 0,
603 HgiPrimitiveTypeLineList,
604 HgiPrimitiveTypeLineStrip,
605 HgiPrimitiveTypeTriangleList,
606 HgiPrimitiveTypePatchList,
607 HgiPrimitiveTypeLineListWithAdjacency,
608
609 HgiPrimitiveTypeCount
610};
611
631enum HgiVertexBufferStepFunction
632{
633 HgiVertexBufferStepFunctionConstant = 0,
634 HgiVertexBufferStepFunctionPerVertex,
635 HgiVertexBufferStepFunctionPerInstance,
636 HgiVertexBufferStepFunctionPerPatch,
637 HgiVertexBufferStepFunctionPerPatchControlPoint,
638 HgiVertexBufferStepFunctionPerDrawCommand,
639
640 HgiVertexBufferStepFunctionCount
641};
642
654enum HgiSubmitWaitType
655{
656 HgiSubmitWaitTypeNoWait = 0,
657 HgiSubmitWaitTypeWaitUntilCompleted,
658};
659
671enum HgiMemoryBarrierBits
672{
673 HgiMemoryBarrierNone = 0,
674 HgiMemoryBarrierAll = 1 << 0
675};
676using HgiMemoryBarrier = HgiBits;
677
705enum HgiBindingType
706{
707 HgiBindingTypeValue = 0,
708 HgiBindingTypeUniformValue,
709 HgiBindingTypeArray,
710 HgiBindingTypeUniformArray,
711 HgiBindingTypePointer,
712};
713
733enum HgiInterpolationType
734{
735 HgiInterpolationDefault = 0,
736 HgiInterpolationFlat,
737 HgiInterpolationNoPerspective,
738};
739
759enum HgiSamplingType
760{
761 HgiSamplingDefault = 0,
762 HgiSamplingCentroid,
763 HgiSamplingSample,
764};
765
779enum HgiStorageType
780{
781 HgiStorageDefault = 0,
782 HgiStoragePatch,
783};
784
800enum HgiShaderTextureType
801{
802 HgiShaderTextureTypeTexture = 0,
803 HgiShaderTextureTypeShadowTexture,
804 HgiShaderTextureTypeArrayTexture,
805 HgiShaderTextureTypeCubemapTexture
806};
807
819enum HgiComputeDispatch
820{
821 HgiComputeDispatchSerial = 0,
822 HgiComputeDispatchConcurrent
823};
824
825PXR_NAMESPACE_CLOSE_SCOPE
826
827#endif