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
68enum HgiDeviceCapabilitiesBits : HgiBits
69{
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,
91};
92
93using HgiDeviceCapabilities = HgiBits;
94
114enum HgiTextureType
115{
116 HgiTextureType1D = 0,
117 HgiTextureType2D,
118 HgiTextureType3D,
119 HgiTextureTypeCubemap,
120 HgiTextureType1DArray,
121 HgiTextureType2DArray,
122
123 HgiTextureTypeCount
124};
125
150enum HgiTextureUsageBits : HgiBits
151{
152 HgiTextureUsageBitsColorTarget = 1 << 0,
153 HgiTextureUsageBitsDepthTarget = 1 << 1,
154 HgiTextureUsageBitsStencilTarget = 1 << 2,
155 HgiTextureUsageBitsShaderRead = 1 << 3,
156 HgiTextureUsageBitsShaderWrite = 1 << 4,
157
158 HgiTextureUsageCustomBitsBegin = 1 << 5,
159};
160
161using HgiTextureUsage = HgiBits;
162
167enum HgiSamplerAddressMode
168{
169 HgiSamplerAddressModeClampToEdge = 0,
170 HgiSamplerAddressModeMirrorClampToEdge,
171 HgiSamplerAddressModeRepeat,
172 HgiSamplerAddressModeMirrorRepeat,
173 HgiSamplerAddressModeClampToBorderColor,
174
175 HgiSamplerAddressModeCount
176};
177
189enum HgiSamplerFilter
190{
191 HgiSamplerFilterNearest = 0,
192 HgiSamplerFilterLinear = 1,
193
194 HgiSamplerFilterCount
195};
196
210enum HgiMipFilter
211{
212 HgiMipFilterNotMipmapped = 0,
213 HgiMipFilterNearest = 1,
214 HgiMipFilterLinear = 2,
215
216 HgiMipFilterCount
217};
218
229enum HgiBorderColor
230{
231 HgiBorderColorTransparentBlack = 0,
232 HgiBorderColorOpaqueBlack = 1,
233 HgiBorderColorOpaqueWhite = 2,
234
235 HgiBorderColorCount
236};
237
242enum HgiSampleCount
243{
244 HgiSampleCount1 = 1,
245 HgiSampleCount2 = 2,
246 HgiSampleCount4 = 4,
247 HgiSampleCount8 = 8,
248 HgiSampleCount16 = 16,
249
250 HgiSampleCountEnd
251};
252
266enum HgiAttachmentLoadOp
267{
268 HgiAttachmentLoadOpDontCare = 0,
269 HgiAttachmentLoadOpClear,
270 HgiAttachmentLoadOpLoad,
271
272 HgiAttachmentLoadOpCount
273};
274
286enum HgiAttachmentStoreOp
287{
288 HgiAttachmentStoreOpDontCare = 0,
289 HgiAttachmentStoreOpStore,
290
291 HgiAttachmentStoreOpCount
292};
293
315enum HgiBufferUsageBits : HgiBits
316{
317 HgiBufferUsageUniform = 1 << 0,
318 HgiBufferUsageIndex32 = 1 << 1,
319 HgiBufferUsageVertex = 1 << 2,
320 HgiBufferUsageStorage = 1 << 3,
321 HgiBufferUsageIndirect = 1 << 4,
322 HgiBufferUsageUpload = 1 << 5,
323
324 HgiBufferUsageCustomBitsBegin = 1 << 6,
325};
326using HgiBufferUsage = HgiBits;
327
356enum HgiShaderStageBits : HgiBits
357{
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};
368using HgiShaderStage = HgiBits;
369
396enum HgiBindResourceType
397{
398 HgiBindResourceTypeSampler = 0,
399 HgiBindResourceTypeSampledImage,
400 HgiBindResourceTypeCombinedSamplerImage,
401 HgiBindResourceTypeStorageImage,
402 HgiBindResourceTypeUniformBuffer,
403 HgiBindResourceTypeStorageBuffer,
404 HgiBindResourceTypeTessFactors,
405
406 HgiBindResourceTypeCount
407};
408
422enum HgiPolygonMode
423{
424 HgiPolygonModeFill = 0,
425 HgiPolygonModeLine,
426 HgiPolygonModePoint,
427
428 HgiPolygonModeCount
429};
430
446enum HgiCullMode
447{
448 HgiCullModeNone = 0,
449 HgiCullModeFront,
450 HgiCullModeBack,
451 HgiCullModeFrontAndBack,
452
453 HgiCullModeCount
454};
455
467enum HgiWinding
468{
469 HgiWindingClockwise = 0,
470 HgiWindingCounterClockwise,
471
472 HgiWindingCount
473};
474
475
480enum HgiBlendOp
481{
482 HgiBlendOpAdd = 0,
483 HgiBlendOpSubtract,
484 HgiBlendOpReverseSubtract,
485 HgiBlendOpMin,
486 HgiBlendOpMax,
487
488 HgiBlendOpCount
489};
490
495enum HgiBlendFactor
496{
497 HgiBlendFactorZero = 0,
498 HgiBlendFactorOne,
499 HgiBlendFactorSrcColor,
500 HgiBlendFactorOneMinusSrcColor,
501 HgiBlendFactorDstColor,
502 HgiBlendFactorOneMinusDstColor,
503 HgiBlendFactorSrcAlpha,
504 HgiBlendFactorOneMinusSrcAlpha,
505 HgiBlendFactorDstAlpha,
506 HgiBlendFactorOneMinusDstAlpha,
507 HgiBlendFactorConstantColor,
508 HgiBlendFactorOneMinusConstantColor,
509 HgiBlendFactorConstantAlpha,
510 HgiBlendFactorOneMinusConstantAlpha,
511 HgiBlendFactorSrcAlphaSaturate,
512 HgiBlendFactorSrc1Color,
513 HgiBlendFactorOneMinusSrc1Color,
514 HgiBlendFactorSrc1Alpha,
515 HgiBlendFactorOneMinusSrc1Alpha,
516
517 HgiBlendFactorCount
518};
519
525enum HgiColorMaskBits : HgiBits
526{
527 HgiColorMaskRed = 1 << 0,
528 HgiColorMaskGreen = 1 << 1,
529 HgiColorMaskBlue = 1 << 2,
530 HgiColorMaskAlpha = 1 << 3,
531};
532using HgiColorMask = HgiBits;
533
538enum HgiCompareFunction
539{
540 HgiCompareFunctionNever = 0,
541 HgiCompareFunctionLess,
542 HgiCompareFunctionEqual,
543 HgiCompareFunctionLEqual,
544 HgiCompareFunctionGreater,
545 HgiCompareFunctionNotEqual,
546 HgiCompareFunctionGEqual,
547 HgiCompareFunctionAlways,
548
549 HgiCompareFunctionCount
550};
551
556enum HgiStencilOp
557{
558 HgiStencilOpKeep = 0,
559 HgiStencilOpZero,
560 HgiStencilOpReplace,
561 HgiStencilOpIncrementClamp,
562 HgiStencilOpDecrementClamp,
563 HgiStencilOpInvert,
564 HgiStencilOpIncrementWrap,
565 HgiStencilOpDecrementWrap,
566
567 HgiStencilOpCount
568};
569
574enum HgiComponentSwizzle
575{
576 HgiComponentSwizzleZero = 0,
577 HgiComponentSwizzleOne,
578 HgiComponentSwizzleR,
579 HgiComponentSwizzleG,
580 HgiComponentSwizzleB,
581 HgiComponentSwizzleA,
582
583 HgiComponentSwizzleCount
584};
585
607enum HgiPrimitiveType
608{
609 HgiPrimitiveTypePointList = 0,
610 HgiPrimitiveTypeLineList,
611 HgiPrimitiveTypeLineStrip,
612 HgiPrimitiveTypeTriangleList,
613 HgiPrimitiveTypePatchList,
614 HgiPrimitiveTypeLineListWithAdjacency,
615
616 HgiPrimitiveTypeCount
617};
618
638enum HgiVertexBufferStepFunction
639{
640 HgiVertexBufferStepFunctionConstant = 0,
641 HgiVertexBufferStepFunctionPerVertex,
642 HgiVertexBufferStepFunctionPerInstance,
643 HgiVertexBufferStepFunctionPerPatch,
644 HgiVertexBufferStepFunctionPerPatchControlPoint,
645 HgiVertexBufferStepFunctionPerDrawCommand,
646
647 HgiVertexBufferStepFunctionCount
648};
649
661enum HgiSubmitWaitType
662{
663 HgiSubmitWaitTypeNoWait = 0,
664 HgiSubmitWaitTypeWaitUntilCompleted,
665};
666
678enum HgiMemoryBarrierBits
679{
680 HgiMemoryBarrierNone = 0,
681 HgiMemoryBarrierAll = 1 << 0
682};
683using HgiMemoryBarrier = HgiBits;
684
712enum HgiBindingType
713{
714 HgiBindingTypeValue = 0,
715 HgiBindingTypeUniformValue,
716 HgiBindingTypeArray,
717 HgiBindingTypeUniformArray,
718 HgiBindingTypePointer,
719};
720
740enum HgiInterpolationType
741{
742 HgiInterpolationDefault = 0,
743 HgiInterpolationFlat,
744 HgiInterpolationNoPerspective,
745};
746
766enum HgiSamplingType
767{
768 HgiSamplingDefault = 0,
769 HgiSamplingCentroid,
770 HgiSamplingSample,
771};
772
786enum HgiStorageType
787{
788 HgiStorageDefault = 0,
789 HgiStoragePatch,
790};
791
807enum HgiShaderTextureType
808{
809 HgiShaderTextureTypeTexture = 0,
810 HgiShaderTextureTypeShadowTexture,
811 HgiShaderTextureTypeArrayTexture,
812 HgiShaderTextureTypeCubemapTexture
813};
814
826enum HgiComputeDispatch
827{
828 HgiComputeDispatchSerial = 0,
829 HgiComputeDispatchConcurrent
830};
831
832PXR_NAMESPACE_CLOSE_SCOPE
833
834#endif