Loading...
Searching...
No Matches
enums.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_IMAGING_HGI_ENUMS_H
25#define PXR_IMAGING_HGI_ENUMS_H
26
27#include "pxr/pxr.h"
28#include "pxr/imaging/hgi/api.h"
29#include <cstdint>
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33using HgiBits = uint32_t;
34
35
80enum HgiDeviceCapabilitiesBits : HgiBits
81{
82 HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
83 HgiDeviceCapabilitiesBitsBindlessBuffers = 1 << 1,
84 HgiDeviceCapabilitiesBitsConcurrentDispatch = 1 << 2,
85 HgiDeviceCapabilitiesBitsUnifiedMemory = 1 << 3,
86 HgiDeviceCapabilitiesBitsBuiltinBarycentrics = 1 << 4,
87 HgiDeviceCapabilitiesBitsShaderDrawParameters = 1 << 5,
88 HgiDeviceCapabilitiesBitsMultiDrawIndirect = 1 << 6,
89 HgiDeviceCapabilitiesBitsBindlessTextures = 1 << 7,
90 HgiDeviceCapabilitiesBitsShaderDoublePrecision = 1 << 8,
91 HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne = 1 << 9,
92 HgiDeviceCapabilitiesBitsCppShaderPadding = 1 << 10,
93 HgiDeviceCapabilitiesBitsConservativeRaster = 1 << 11,
94 HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12,
95 HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13,
96 HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14,
97 HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15,
98 HgiDeviceCapabilitiesBitsPrimitiveIdEmulation = 1 << 16,
99 HgiDeviceCapabilitiesBitsIndirectCommandBuffers = 1 << 17,
100};
101
102using HgiDeviceCapabilities = HgiBits;
103
121enum HgiTextureType
122{
123 HgiTextureType1D = 0,
124 HgiTextureType2D,
125 HgiTextureType3D,
126 HgiTextureType1DArray,
127 HgiTextureType2DArray,
128
129 HgiTextureTypeCount
130};
131
156enum HgiTextureUsageBits : HgiBits
157{
158 HgiTextureUsageBitsColorTarget = 1 << 0,
159 HgiTextureUsageBitsDepthTarget = 1 << 1,
160 HgiTextureUsageBitsStencilTarget = 1 << 2,
161 HgiTextureUsageBitsShaderRead = 1 << 3,
162 HgiTextureUsageBitsShaderWrite = 1 << 4,
163
164 HgiTextureUsageCustomBitsBegin = 1 << 5,
165};
166
167using HgiTextureUsage = HgiBits;
168
173enum HgiSamplerAddressMode
174{
175 HgiSamplerAddressModeClampToEdge = 0,
176 HgiSamplerAddressModeMirrorClampToEdge,
177 HgiSamplerAddressModeRepeat,
178 HgiSamplerAddressModeMirrorRepeat,
179 HgiSamplerAddressModeClampToBorderColor,
180
181 HgiSamplerAddressModeCount
182};
183
195enum HgiSamplerFilter
196{
197 HgiSamplerFilterNearest = 0,
198 HgiSamplerFilterLinear = 1,
199
200 HgiSamplerFilterCount
201};
202
216enum HgiMipFilter
217{
218 HgiMipFilterNotMipmapped = 0,
219 HgiMipFilterNearest = 1,
220 HgiMipFilterLinear = 2,
221
222 HgiMipFilterCount
223};
224
235enum HgiBorderColor
236{
237 HgiBorderColorTransparentBlack = 0,
238 HgiBorderColorOpaqueBlack = 1,
239 HgiBorderColorOpaqueWhite = 2,
240
241 HgiBorderColorCount
242};
243
248enum HgiSampleCount
249{
250 HgiSampleCount1 = 1,
251 HgiSampleCount2 = 2,
252 HgiSampleCount4 = 4,
253 HgiSampleCount8 = 8,
254 HgiSampleCount16 = 16,
255
256 HgiSampleCountEnd
257};
258
272enum HgiAttachmentLoadOp
273{
274 HgiAttachmentLoadOpDontCare = 0,
275 HgiAttachmentLoadOpClear,
276 HgiAttachmentLoadOpLoad,
277
278 HgiAttachmentLoadOpCount
279};
280
292enum HgiAttachmentStoreOp
293{
294 HgiAttachmentStoreOpDontCare = 0,
295 HgiAttachmentStoreOpStore,
296
297 HgiAttachmentStoreOpCount
298};
299
319enum HgiBufferUsageBits : HgiBits
320{
321 HgiBufferUsageUniform = 1 << 0,
322 HgiBufferUsageIndex32 = 1 << 1,
323 HgiBufferUsageVertex = 1 << 2,
324 HgiBufferUsageStorage = 1 << 3,
325 HgiBufferUsageIndirect = 1 << 4,
326
327 HgiBufferUsageCustomBitsBegin = 1 << 5,
328};
329using HgiBufferUsage = HgiBits;
330
359enum HgiShaderStageBits : HgiBits
360{
361 HgiShaderStageVertex = 1 << 0,
362 HgiShaderStageFragment = 1 << 1,
363 HgiShaderStageCompute = 1 << 2,
364 HgiShaderStageTessellationControl = 1 << 3,
365 HgiShaderStageTessellationEval = 1 << 4,
366 HgiShaderStageGeometry = 1 << 5,
367 HgiShaderStagePostTessellationControl = 1 << 6,
368 HgiShaderStagePostTessellationVertex = 1 << 7,
369 HgiShaderStageCustomBitsBegin = 1 << 8,
370};
371using HgiShaderStage = HgiBits;
372
399enum HgiBindResourceType
400{
401 HgiBindResourceTypeSampler = 0,
402 HgiBindResourceTypeSampledImage,
403 HgiBindResourceTypeCombinedSamplerImage,
404 HgiBindResourceTypeStorageImage,
405 HgiBindResourceTypeUniformBuffer,
406 HgiBindResourceTypeStorageBuffer,
407 HgiBindResourceTypeTessFactors,
408
409 HgiBindResourceTypeCount
410};
411
425enum HgiPolygonMode
426{
427 HgiPolygonModeFill = 0,
428 HgiPolygonModeLine,
429 HgiPolygonModePoint,
430
431 HgiPolygonModeCount
432};
433
449enum HgiCullMode
450{
451 HgiCullModeNone = 0,
452 HgiCullModeFront,
453 HgiCullModeBack,
454 HgiCullModeFrontAndBack,
455
456 HgiCullModeCount
457};
458
470enum HgiWinding
471{
472 HgiWindingClockwise = 0,
473 HgiWindingCounterClockwise,
474
475 HgiWindingCount
476};
477
478
483enum HgiBlendOp
484{
485 HgiBlendOpAdd = 0,
486 HgiBlendOpSubtract,
487 HgiBlendOpReverseSubtract,
488 HgiBlendOpMin,
489 HgiBlendOpMax,
490
491 HgiBlendOpCount
492};
493
498enum HgiBlendFactor
499{
500 HgiBlendFactorZero = 0,
501 HgiBlendFactorOne,
502 HgiBlendFactorSrcColor,
503 HgiBlendFactorOneMinusSrcColor,
504 HgiBlendFactorDstColor,
505 HgiBlendFactorOneMinusDstColor,
506 HgiBlendFactorSrcAlpha,
507 HgiBlendFactorOneMinusSrcAlpha,
508 HgiBlendFactorDstAlpha,
509 HgiBlendFactorOneMinusDstAlpha,
510 HgiBlendFactorConstantColor,
511 HgiBlendFactorOneMinusConstantColor,
512 HgiBlendFactorConstantAlpha,
513 HgiBlendFactorOneMinusConstantAlpha,
514 HgiBlendFactorSrcAlphaSaturate,
515 HgiBlendFactorSrc1Color,
516 HgiBlendFactorOneMinusSrc1Color,
517 HgiBlendFactorSrc1Alpha,
518 HgiBlendFactorOneMinusSrc1Alpha,
519
520 HgiBlendFactorCount
521};
522
528enum HgiColorMaskBits : HgiBits
529{
530 HgiColorMaskRed = 1 << 0,
531 HgiColorMaskGreen = 1 << 1,
532 HgiColorMaskBlue = 1 << 2,
533 HgiColorMaskAlpha = 1 << 3,
534};
535using HgiColorMask = HgiBits;
536
541enum HgiCompareFunction
542{
543 HgiCompareFunctionNever = 0,
544 HgiCompareFunctionLess,
545 HgiCompareFunctionEqual,
546 HgiCompareFunctionLEqual,
547 HgiCompareFunctionGreater,
548 HgiCompareFunctionNotEqual,
549 HgiCompareFunctionGEqual,
550 HgiCompareFunctionAlways,
551
552 HgiCompareFunctionCount
553};
554
559enum HgiStencilOp
560{
561 HgiStencilOpKeep = 0,
562 HgiStencilOpZero,
563 HgiStencilOpReplace,
564 HgiStencilOpIncrementClamp,
565 HgiStencilOpDecrementClamp,
566 HgiStencilOpInvert,
567 HgiStencilOpIncrementWrap,
568 HgiStencilOpDecrementWrap,
569
570 HgiStencilOpCount
571};
572
577enum HgiComponentSwizzle
578{
579 HgiComponentSwizzleZero = 0,
580 HgiComponentSwizzleOne,
581 HgiComponentSwizzleR,
582 HgiComponentSwizzleG,
583 HgiComponentSwizzleB,
584 HgiComponentSwizzleA,
585
586 HgiComponentSwizzleCount
587};
588
610enum HgiPrimitiveType
611{
612 HgiPrimitiveTypePointList = 0,
613 HgiPrimitiveTypeLineList,
614 HgiPrimitiveTypeLineStrip,
615 HgiPrimitiveTypeTriangleList,
616 HgiPrimitiveTypePatchList,
617 HgiPrimitiveTypeLineListWithAdjacency,
618
619 HgiPrimitiveTypeCount
620};
621
641enum HgiVertexBufferStepFunction
642{
643 HgiVertexBufferStepFunctionConstant = 0,
644 HgiVertexBufferStepFunctionPerVertex,
645 HgiVertexBufferStepFunctionPerInstance,
646 HgiVertexBufferStepFunctionPerPatch,
647 HgiVertexBufferStepFunctionPerPatchControlPoint,
648 HgiVertexBufferStepFunctionPerDrawCommand,
649
650 HgiVertexBufferStepFunctionCount
651};
652
664enum HgiSubmitWaitType
665{
666 HgiSubmitWaitTypeNoWait = 0,
667 HgiSubmitWaitTypeWaitUntilCompleted,
668};
669
681enum HgiMemoryBarrierBits
682{
683 HgiMemoryBarrierNone = 0,
684 HgiMemoryBarrierAll = 1 << 0
685};
686using HgiMemoryBarrier = HgiBits;
687
715enum HgiBindingType
716{
717 HgiBindingTypeValue = 0,
718 HgiBindingTypeUniformValue,
719 HgiBindingTypeArray,
720 HgiBindingTypeUniformArray,
721 HgiBindingTypePointer,
722};
723
743enum HgiInterpolationType
744{
745 HgiInterpolationDefault = 0,
746 HgiInterpolationFlat,
747 HgiInterpolationNoPerspective,
748};
749
769enum HgiSamplingType
770{
771 HgiSamplingDefault = 0,
772 HgiSamplingCentroid,
773 HgiSamplingSample,
774};
775
789enum HgiStorageType
790{
791 HgiStorageDefault = 0,
792 HgiStoragePatch,
793};
794
808enum HgiShaderTextureType
809{
810 HgiShaderTextureTypeTexture = 0,
811 HgiShaderTextureTypeShadowTexture,
812 HgiShaderTextureTypeArrayTexture
813};
814
826enum HgiComputeDispatch
827{
828 HgiComputeDispatchSerial = 0,
829 HgiComputeDispatchConcurrent
830};
831
832PXR_NAMESPACE_CLOSE_SCOPE
833
834#endif