// // Copyright 2019 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trademarks. This License does not grant permission to use the trade // names, trademarks, service marks, or product names of the Licensor // and its affiliates, except as required to comply with Section 4(c) of // the License and to reproduce the content of the NOTICE file. // // You may obtain a copy of the Apache License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the Apache License with the above modification is // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the Apache License for the specific // language governing permissions and limitations under the Apache License. // #ifndef PXR_IMAGING_HGI_ENUMS_H #define PXR_IMAGING_HGI_ENUMS_H #include "pxr/pxr.h" #include "pxr/imaging/hgi/api.h" #include PXR_NAMESPACE_OPEN_SCOPE using HgiBits = uint32_t; /// \enum HgiDeviceCapabilitiesBits /// /// Describes what capabilities the requested device must have. /// /// /// enum HgiDeviceCapabilitiesBits : HgiBits { HgiDeviceCapabilitiesBitsPresentation = 1 << 0, }; using HgiDeviceCapabilities = HgiBits; /// \enum HgiTextureType /// /// Describes the kind of texture. /// /// /// enum HgiTextureType { HgiTextureType1D = 0, HgiTextureType2D, HgiTextureType3D, HgiTextureTypeCount }; /// \enum HgiTextureUsageBits /// /// Describes how the texture will be used. If a texture has multiple uses you /// can combine multiple bits. /// /// /// enum HgiTextureUsageBits : HgiBits { HgiTextureUsageBitsColorTarget = 1 << 0, HgiTextureUsageBitsDepthTarget = 1 << 1, HgiTextureUsageBitsStencilTarget = 1 << 2, HgiTextureUsageBitsShaderRead = 1 << 3, HgiTextureUsageBitsShaderWrite = 1 << 4, HgiTextureUsageCustomBitsBegin = 1 << 5, }; using HgiTextureUsage = HgiBits; /// \enum HgiSamplerAddressMode /// /// Various modes used during sampling of a texture. /// enum HgiSamplerAddressMode { HgiSamplerAddressModeClampToEdge = 0, HgiSamplerAddressModeMirrorClampToEdge, HgiSamplerAddressModeRepeat, HgiSamplerAddressModeMirrorRepeat, HgiSamplerAddressModeClampToBorderColor, HgiSamplerAddressModeCount }; /// \enum HgiSamplerFilter /// /// Sampler filtering modes that determine the pixel value that is returned. /// /// /// enum HgiSamplerFilter { HgiSamplerFilterNearest = 0, HgiSamplerFilterLinear = 1, HgiSamplerFilterCount }; /// \enum HgiMipFilter /// /// Sampler filtering modes that determine the pixel value that is returned. /// /// /// enum HgiMipFilter { HgiMipFilterNotMipmapped = 0, HgiMipFilterNearest = 1, HgiMipFilterLinear = 2, HgiMipFilterCount }; /// \enum HgiSampleCount /// /// Sample count for multi-sampling /// enum HgiSampleCount { HgiSampleCount1 = 1, HgiSampleCount4 = 4, HgiSampleCount16 = 16, }; /// \enum HgiAttachmentLoadOp /// /// Describes what will happen to the attachment pixel data prior to rendering. /// /// /// enum HgiAttachmentLoadOp { HgiAttachmentLoadOpDontCare = 0, HgiAttachmentLoadOpClear, HgiAttachmentLoadOpLoad, HgiAttachmentLoadOpCount }; /// \enum HgiAttachmentStoreOp /// /// Describes what will happen to the attachment pixel data after rendering. /// /// /// enum HgiAttachmentStoreOp { HgiAttachmentStoreOpDontCare = 0, HgiAttachmentStoreOpStore, HgiAttachmentStoreOpCount }; /// \enum HgiBufferUsageBits /// /// Describes the properties and usage of the buffer. /// /// /// enum HgiBufferUsageBits : HgiBits { HgiBufferUsageUniform = 1 << 0, HgiBufferUsageIndex32 = 1 << 1, HgiBufferUsageVertex = 1 << 2, HgiBufferUsageStorage = 1 << 3, HgiBufferUsageCustomBitsBegin = 1 << 4, }; using HgiBufferUsage = HgiBits; /// \enum HgiShaderStage /// /// Describes the stage a shader function operates in. /// /// /// enum HgiShaderStageBits : HgiBits { HgiShaderStageVertex = 1 << 0, HgiShaderStageFragment = 1 << 1, HgiShaderStageCompute = 1 << 2, HgiShaderStageTessellationControl = 1 << 3, HgiShaderStageTessellationEval = 1 << 4, HgiShaderStageGeometry = 1 << 5, }; using HgiShaderStage = HgiBits; /// \enum HgiPipelineType /// /// Describes the intended bind point for this pipeline. /// /// /// enum HgiPipelineType { HgiPipelineTypeGraphics = 0, HgiPipelineTypeCompute, HgiPipelineTypeCount }; /// \enum HgiBindResourceType /// /// Describes the type of the resource to be bound. /// /// /// enum HgiBindResourceType { HgiBindResourceTypeSampler = 0, HgiBindResourceTypeCombinedImageSampler, HgiBindResourceTypeSamplerImage, HgiBindResourceTypeStorageImage, HgiBindResourceTypeUniformBuffer, HgiBindResourceTypeStorageBuffer, HgiBindResourceTypeCount }; /// \enum HgiPolygonMode /// /// Controls polygon mode during rasterization /// /// /// enum HgiPolygonMode { HgiPolygonModeFill = 0, HgiPolygonModeLine, HgiPolygonModePoint, HgiPolygonModeCount }; /// \enum HgiCullMode /// /// Controls primitive (faces) culling. /// /// /// enum HgiCullMode { HgiCullModeNone = 0, HgiCullModeFront, HgiCullModeBack, HgiCullModeFrontAndBack, HgiCullModeCount }; /// \enum HgiWinding /// /// Determines the front-facing orientation of a primitive (face). /// /// /// enum HgiWinding { HgiWindingClockwise = 0, HgiWindingCounterClockwise, HgiWindingCount }; /// \enum HgiBlendOp /// /// Blend operations /// enum HgiBlendOp { HgiBlendOpAdd = 0, HgiBlendOpSubtract, HgiBlendOpReverseSubtract, HgiBlendOpMin, HgiBlendOpMax, HgiBlendOpCount }; /// \enum HgiBlendFactor /// /// Blend factors /// enum HgiBlendFactor { HgiBlendFactorZero = 0, HgiBlendFactorOne, HgiBlendFactorSrcColor, HgiBlendFactorOneMinusSrcColor, HgiBlendFactorDstColor, HgiBlendFactorOneMinusDstColor, HgiBlendFactorSrcAlpha, HgiBlendFactorOneMinusSrcAlpha, HgiBlendFactorDstAlpha, HgiBlendFactorOneMinusDstAlpha, HgiBlendFactorConstantColor, HgiBlendFactorOneMinusConstantColor, HgiBlendFactorConstantAlpha, HgiBlendFactorOneMinusConstantAlpha, HgiBlendFactorSrcAlphaSaturate, HgiBlendFactorSrc1Color, HgiBlendFactorOneMinusSrc1Color, HgiBlendFactorSrc1Alpha, HgiBlendFactorOneMinusSrc1Alpha, HgiBlendFactorCount }; /// \enum HgiCompareFunction /// /// Compare functions. /// enum HgiCompareFunction { HgiCompareFunctionNever = 0, HgiCompareFunctionLess, HgiCompareFunctionEqual, HgiCompareFunctionLEqual, HgiCompareFunctionGreater, HgiCompareFunctionNotEqual, HgiCompareFunctionGEqual, HgiCompareFunctionAlways, HgiCompareFunctionCount }; PXR_NAMESPACE_CLOSE_SCOPE #endif