All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
31 PXR_NAMESPACE_OPEN_SCOPE
32 
33 using HgiBits = uint32_t;
34 
35 
45 enum HgiDeviceCapabilitiesBits : HgiBits
46 {
47  HgiDeviceCapabilitiesBitsPresentation = 1 << 0,
48 };
49 
50 using HgiDeviceCapabilities = HgiBits;
51 
69 enum HgiTextureType
70 {
71  HgiTextureType1D = 0,
72  HgiTextureType2D,
73  HgiTextureType3D,
74  HgiTextureType1DArray,
75  HgiTextureType2DArray,
76 
77  HgiTextureTypeCount
78 };
79 
104 enum HgiTextureUsageBits : HgiBits
105 {
106  HgiTextureUsageBitsColorTarget = 1 << 0,
107  HgiTextureUsageBitsDepthTarget = 1 << 1,
108  HgiTextureUsageBitsStencilTarget = 1 << 2,
109  HgiTextureUsageBitsShaderRead = 1 << 3,
110  HgiTextureUsageBitsShaderWrite = 1 << 4,
111 
112  HgiTextureUsageCustomBitsBegin = 1 << 5,
113 };
114 
115 using HgiTextureUsage = HgiBits;
116 
121 enum HgiSamplerAddressMode
122 {
123  HgiSamplerAddressModeClampToEdge = 0,
124  HgiSamplerAddressModeMirrorClampToEdge,
125  HgiSamplerAddressModeRepeat,
126  HgiSamplerAddressModeMirrorRepeat,
127  HgiSamplerAddressModeClampToBorderColor,
128 
129  HgiSamplerAddressModeCount
130 };
131 
143 enum HgiSamplerFilter
144 {
145  HgiSamplerFilterNearest = 0,
146  HgiSamplerFilterLinear = 1,
147 
148  HgiSamplerFilterCount
149 };
150 
164 enum HgiMipFilter
165 {
166  HgiMipFilterNotMipmapped = 0,
167  HgiMipFilterNearest = 1,
168  HgiMipFilterLinear = 2,
169 
170  HgiMipFilterCount
171 };
172 
177 enum HgiSampleCount
178 {
179  HgiSampleCount1 = 1,
180  HgiSampleCount2 = 2,
181  HgiSampleCount4 = 4,
182  HgiSampleCount8 = 8,
183  HgiSampleCount16 = 16,
184 
185  HgiSampleCountEnd
186 };
187 
201 enum HgiAttachmentLoadOp
202 {
203  HgiAttachmentLoadOpDontCare = 0,
204  HgiAttachmentLoadOpClear,
205  HgiAttachmentLoadOpLoad,
206 
207  HgiAttachmentLoadOpCount
208 };
209 
221 enum HgiAttachmentStoreOp
222 {
223  HgiAttachmentStoreOpDontCare = 0,
224  HgiAttachmentStoreOpStore,
225 
226  HgiAttachmentStoreOpCount
227 };
228 
248 enum HgiBufferUsageBits : HgiBits
249 {
250  HgiBufferUsageUniform = 1 << 0,
251  HgiBufferUsageIndex32 = 1 << 1,
252  HgiBufferUsageVertex = 1 << 2,
253  HgiBufferUsageStorage = 1 << 3,
254 
255  HgiBufferUsageCustomBitsBegin = 1 << 4,
256 };
257 using HgiBufferUsage = HgiBits;
258 
281 enum HgiShaderStageBits : HgiBits
282 {
283  HgiShaderStageVertex = 1 << 0,
284  HgiShaderStageFragment = 1 << 1,
285  HgiShaderStageCompute = 1 << 2,
286  HgiShaderStageTessellationControl = 1 << 3,
287  HgiShaderStageTessellationEval = 1 << 4,
288  HgiShaderStageGeometry = 1 << 5,
289 
290  HgiShaderStageCustomBitsBegin = 1 << 6,
291 };
292 using HgiShaderStage = HgiBits;
293 
318 enum HgiBindResourceType
319 {
320  HgiBindResourceTypeSampler = 0,
321  HgiBindResourceTypeSampledImage,
322  HgiBindResourceTypeCombinedSamplerImage,
323  HgiBindResourceTypeStorageImage,
324  HgiBindResourceTypeUniformBuffer,
325  HgiBindResourceTypeStorageBuffer,
326 
327  HgiBindResourceTypeCount
328 };
329 
343 enum HgiPolygonMode
344 {
345  HgiPolygonModeFill = 0,
346  HgiPolygonModeLine,
347  HgiPolygonModePoint,
348 
349  HgiPolygonModeCount
350 };
351 
367 enum HgiCullMode
368 {
369  HgiCullModeNone = 0,
370  HgiCullModeFront,
371  HgiCullModeBack,
372  HgiCullModeFrontAndBack,
373 
374  HgiCullModeCount
375 };
376 
388 enum HgiWinding
389 {
390  HgiWindingClockwise = 0,
391  HgiWindingCounterClockwise,
392 
393  HgiWindingCount
394 };
395 
396 
401 enum HgiBlendOp
402 {
403  HgiBlendOpAdd = 0,
404  HgiBlendOpSubtract,
405  HgiBlendOpReverseSubtract,
406  HgiBlendOpMin,
407  HgiBlendOpMax,
408 
409  HgiBlendOpCount
410 };
411 
416 enum HgiBlendFactor
417 {
418  HgiBlendFactorZero = 0,
419  HgiBlendFactorOne,
420  HgiBlendFactorSrcColor,
421  HgiBlendFactorOneMinusSrcColor,
422  HgiBlendFactorDstColor,
423  HgiBlendFactorOneMinusDstColor,
424  HgiBlendFactorSrcAlpha,
425  HgiBlendFactorOneMinusSrcAlpha,
426  HgiBlendFactorDstAlpha,
427  HgiBlendFactorOneMinusDstAlpha,
428  HgiBlendFactorConstantColor,
429  HgiBlendFactorOneMinusConstantColor,
430  HgiBlendFactorConstantAlpha,
431  HgiBlendFactorOneMinusConstantAlpha,
432  HgiBlendFactorSrcAlphaSaturate,
433  HgiBlendFactorSrc1Color,
434  HgiBlendFactorOneMinusSrc1Color,
435  HgiBlendFactorSrc1Alpha,
436  HgiBlendFactorOneMinusSrc1Alpha,
437 
438  HgiBlendFactorCount
439 };
440 
441 
446 enum HgiCompareFunction
447 {
448  HgiCompareFunctionNever = 0,
449  HgiCompareFunctionLess,
450  HgiCompareFunctionEqual,
451  HgiCompareFunctionLEqual,
452  HgiCompareFunctionGreater,
453  HgiCompareFunctionNotEqual,
454  HgiCompareFunctionGEqual,
455  HgiCompareFunctionAlways,
456 
457  HgiCompareFunctionCount
458 };
459 
464 enum HgiComponentSwizzle
465 {
466  HgiComponentSwizzleZero = 0,
467  HgiComponentSwizzleOne,
468  HgiComponentSwizzleR,
469  HgiComponentSwizzleG,
470  HgiComponentSwizzleB,
471  HgiComponentSwizzleA,
472 
473  HgiComponentSwizzleCount
474 };
475 
494 enum HgiPrimitiveType
495 {
496  HgiPrimitiveTypePointList = 0,
497  HgiPrimitiveTypeLineList,
498  HgiPrimitiveTypeLineStrip,
499  HgiPrimitiveTypeTriangleList,
500  HgiPrimitiveTypePatchList,
501 
502  HgiPrimitiveTypeCount
503 };
504 
516 enum HgiSubmitWaitType
517 {
518  HgiSubmitWaitTypeNoWait = 0,
519  HgiSubmitWaitTypeWaitUntilCompleted,
520 };
521 
533 enum HgiMemoryBarrierBits
534 {
535  HgiMemoryBarrierNone = 0,
536  HgiMemoryBarrierAll = 1 << 0
537 };
538 using HgiMemoryBarrier = HgiBits;
539 
540 PXR_NAMESPACE_CLOSE_SCOPE
541 
542 #endif