HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
enums.h
Go to the documentation of this file.
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
14
PXR_NAMESPACE_OPEN_SCOPE
15
16
using
HgiBits
= uint32_t;
17
18
19
/// \enum HgiDeviceCapabilitiesBits
20
///
21
/// Describes what capabilities the requested device must have.
22
///
23
/// <ul>
24
/// <li>HgiDeviceCapabilitiesBitsPresentation:
25
/// The device must be capable of presenting graphics to screen</li>
26
/// <li>HgiDeviceCapabilitiesBitsBindlessBuffers:
27
/// THe device can access GPU buffers using bindless handles</li>
28
/// <li>HgiDeviceCapabilitiesBitsConcurrentDispatch:
29
/// The device can execute commands concurrently</li>
30
/// <li>HgiDeviceCapabilitiesBitsUnifiedMemory:
31
/// The device shares all GPU and CPU memory</li>
32
/// <li>HgiDeviceCapabilitiesBitsBuiltinBarycentrics:
33
/// The device can provide built-in barycentric coordinates</li>
34
/// <li>HgiDeviceCapabilitiesBitsShaderDrawParameters:
35
/// The device can provide additional built-in shader variables corresponding
36
/// to draw command parameters</li>
37
/// <li>HgiDeviceCapabilitiesBitsMultiDrawIndirect:
38
/// The device supports multiple primitive, indirect drawing</li>
39
/// <li>HgiDeviceCapabilitiesBitsBindlessTextures:
40
/// The device can access GPU textures using bindless handles</li>
41
/// <li>HgiDeviceCapabilitiesBitsShaderDoublePrecision:
42
/// The device supports double precision types in shaders</li>
43
/// <li>HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne:
44
/// The device's clip space depth ranges from [-1,1]</li>
45
/// <li>HgiDeviceCapabilitiesBitsCppShaderPadding:
46
/// Use CPP padding for shader language structures</li>
47
/// <li>HgiDeviceCapabilitiesBitsConservativeRaster:
48
/// The device supports conservative rasterization</li>
49
/// <li>HgiDeviceCapabilitiesBitsStencilReadback:
50
/// Supports reading back the stencil buffer from GPU to CPU.</li>
51
/// <li>HgiDeviceCapabilitiesBitsCustomDepthRange:
52
/// The device supports setting a custom depth range.</li>
53
/// <li>HgiDeviceCapabilitiesBitsMetalTessellation:
54
/// Supports Metal tessellation shaders</li>
55
/// <li>HgiDeviceCapabilitiesBitsBasePrimitiveOffset:
56
/// The device requires workaround for base primitive offset</li>
57
/// <li>HgiDeviceCapabilitiesBitsPrimitiveIdEmulation:
58
/// The device requires workaround for primitive id</li>
59
/// <li>HgiDeviceCapabilitiesBitsIndirectCommandBuffers:
60
/// Indirect command buffers are supported</li>
61
/// <li>HgiDeviceCapabilitiesBitsRoundPoints:
62
/// Points can be natively rasterized as disks</li>
63
/// </ul>
64
///
65
enum
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
};
87
88
using
HgiDeviceCapabilities
=
HgiBits
;
89
90
/// \enum HgiTextureType
91
///
92
/// Describes the kind of texture.
93
///
94
/// <ul>
95
/// <li>HgiTextureType1D:
96
/// A one-dimensional texture.</li>
97
/// <li>HgiTextureType2D:
98
/// A two-dimensional texture.</li>
99
/// <li>HgiTextureType3D:
100
/// A three-dimensional texture.</li>
101
/// <li>HgiTextureType1DArray:
102
/// An array of one-dimensional textures.</li>
103
/// <li>HgiTextureType2DArray:
104
/// An array of two-dimensional textures.</li>
105
/// </ul>
106
///
107
enum
HgiTextureType
108
{
109
HgiTextureType1D
= 0,
110
HgiTextureType2D
,
111
HgiTextureType3D
,
112
HgiTextureType1DArray
,
113
HgiTextureType2DArray
,
114
115
HgiTextureTypeCount
116
};
117
118
/// \enum HgiTextureUsageBits
119
///
120
/// Describes how the texture will be used. If a texture has multiple uses you
121
/// can combine multiple bits.
122
///
123
/// <ul>
124
/// <li>HgiTextureUsageBitsColorTarget:
125
/// The texture is a color attachment rendered into via a render pass.</li>
126
/// <li>HgiTextureUsageBitsDepthTarget:
127
/// The texture is a depth attachment rendered into via a render pass.</li>
128
/// <li>HgiTextureUsageBitsStencilTarget:
129
/// The texture is a stencil attachment rendered into via a render pass.</li>
130
/// <li>HgiTextureUsageBitsShaderRead:
131
/// The texture is sampled from in a shader (sampling)</li>
132
/// <li>HgiTextureUsageBitsShaderWrite:
133
/// The texture is written into from in a shader (image store)
134
/// When a texture is used as HgiBindResourceTypeStorageImage you must
135
/// add this flag (even if you only read from the image).</li>
136
///
137
/// <li>HgiTextureUsageCustomBitsBegin:
138
/// This bit (and any bit after) can be used to attached custom, backend
139
/// specific bits to the usage bit. </li>
140
/// </ul>
141
///
142
enum
HgiTextureUsageBits
:
HgiBits
143
{
144
HgiTextureUsageBitsColorTarget
= 1 << 0,
145
HgiTextureUsageBitsDepthTarget
= 1 << 1,
146
HgiTextureUsageBitsStencilTarget
= 1 << 2,
147
HgiTextureUsageBitsShaderRead
= 1 << 3,
148
HgiTextureUsageBitsShaderWrite
= 1 << 4,
149
150
HgiTextureUsageCustomBitsBegin
= 1 << 5,
151
};
152
153
using
HgiTextureUsage
=
HgiBits
;
154
155
/// \enum HgiSamplerAddressMode
156
///
157
/// Various modes used during sampling of a texture.
158
///
159
enum
HgiSamplerAddressMode
160
{
161
HgiSamplerAddressModeClampToEdge
= 0,
162
HgiSamplerAddressModeMirrorClampToEdge
,
163
HgiSamplerAddressModeRepeat
,
164
HgiSamplerAddressModeMirrorRepeat
,
165
HgiSamplerAddressModeClampToBorderColor
,
166
167
HgiSamplerAddressModeCount
168
};
169
170
/// \enum HgiSamplerFilter
171
///
172
/// Sampler filtering modes that determine the pixel value that is returned.
173
///
174
/// <ul>
175
/// <li>HgiSamplerFilterNearest:
176
/// Returns the value of a single mipmap level.</li>
177
/// <li>HgiSamplerFilterLinear:
178
/// Combines the values of multiple mipmap levels.</li>
179
/// </ul>
180
///
181
enum
HgiSamplerFilter
182
{
183
HgiSamplerFilterNearest
= 0,
184
HgiSamplerFilterLinear
= 1,
185
186
HgiSamplerFilterCount
187
};
188
189
/// \enum HgiMipFilter
190
///
191
/// Sampler filtering modes that determine the pixel value that is returned.
192
///
193
/// <ul>
194
/// <li>HgiMipFilterNotMipmapped:
195
/// Texture is always sampled at mipmap level 0. (ie. max lod=0)</li>
196
/// <li>HgiMipFilterNearest:
197
/// Returns the value of a single mipmap level.</li>
198
/// <li>HgiMipFilterLinear:
199
/// Linear interpolates the values of up to two mipmap levels.</li>
200
/// </ul>
201
///
202
enum
HgiMipFilter
203
{
204
HgiMipFilterNotMipmapped
= 0,
205
HgiMipFilterNearest
= 1,
206
HgiMipFilterLinear
= 2,
207
208
HgiMipFilterCount
209
};
210
211
/// \enum HgiBorderColor
212
///
213
/// Border color to use for clamped texture values.
214
///
215
/// <ul>
216
/// <li>HgiBorderColorTransparentBlack</li>
217
/// <li>HgiBorderColorOpaqueBlack</li>
218
/// <li>HgiBorderColorOpaqueWhite</li>
219
/// </ul>
220
///
221
enum
HgiBorderColor
222
{
223
HgiBorderColorTransparentBlack
= 0,
224
HgiBorderColorOpaqueBlack
= 1,
225
HgiBorderColorOpaqueWhite
= 2,
226
227
HgiBorderColorCount
228
};
229
230
/// \enum HgiSampleCount
231
///
232
/// Sample count for multi-sampling
233
///
234
enum
HgiSampleCount
235
{
236
HgiSampleCount1
= 1,
237
HgiSampleCount2
= 2,
238
HgiSampleCount4
= 4,
239
HgiSampleCount8
= 8,
240
HgiSampleCount16
= 16,
241
242
HgiSampleCountEnd
243
};
244
245
/// \enum HgiAttachmentLoadOp
246
///
247
/// Describes what will happen to the attachment pixel data prior to rendering.
248
///
249
/// <ul>
250
/// <li>HgiAttachmentLoadOpDontCare:
251
/// All pixels are rendered to. Pixel data in render target starts undefined.</li>
252
/// <li>HgiAttachmentLoadOpClear:
253
/// The attachment pixel data is cleared to a specified color value.</li>
254
/// <li>HgiAttachmentLoadOpLoad:
255
/// Previous pixel data is loaded into attachment prior to rendering.</li>
256
/// </ul>
257
///
258
enum
HgiAttachmentLoadOp
259
{
260
HgiAttachmentLoadOpDontCare
= 0,
261
HgiAttachmentLoadOpClear
,
262
HgiAttachmentLoadOpLoad
,
263
264
HgiAttachmentLoadOpCount
265
};
266
267
/// \enum HgiAttachmentStoreOp
268
///
269
/// Describes what will happen to the attachment pixel data after rendering.
270
///
271
/// <ul>
272
/// <li>HgiAttachmentStoreOpDontCare:
273
/// Pixel data is undefined after rendering has completed (no store cost)</li>
274
/// <li>HgiAttachmentStoreOpStore:
275
/// The attachment pixel data is stored in memory.</li>
276
/// </ul>
277
///
278
enum
HgiAttachmentStoreOp
279
{
280
HgiAttachmentStoreOpDontCare
= 0,
281
HgiAttachmentStoreOpStore
,
282
283
HgiAttachmentStoreOpCount
284
};
285
286
/// \enum HgiBufferUsageBits
287
///
288
/// Describes the properties and usage of the buffer.
289
///
290
/// <ul>
291
/// <li>HgiBufferUsageUniform:
292
/// Shader uniform buffer </li>
293
/// <li>HgiBufferUsageIndex32:
294
/// Topology 32 bit indices.</li>
295
/// <li>HgiBufferUsageVertex:
296
/// Vertex attributes.</li>
297
/// <li>HgiBufferUsageStorage:
298
/// Shader storage buffer / Argument buffer.</li>
299
///
300
/// <li>HgiBufferUsageCustomBitsBegin:
301
/// This bit (and any bit after) can be used to attached custom, backend
302
/// specific bits to the usage bit. </li>
303
/// </ul>
304
///
305
enum
HgiBufferUsageBits
:
HgiBits
306
{
307
HgiBufferUsageUniform
= 1 << 0,
308
HgiBufferUsageIndex32
= 1 << 1,
309
HgiBufferUsageVertex
= 1 << 2,
310
HgiBufferUsageStorage
= 1 << 3,
311
HgiBufferUsageIndirect
= 1 << 4,
312
313
HgiBufferUsageCustomBitsBegin
= 1 << 5,
314
};
315
using
HgiBufferUsage
=
HgiBits
;
316
317
/// \enum HgiShaderStage
318
///
319
/// Describes the stage a shader function operates in.
320
///
321
/// <ul>
322
/// <li>HgiShaderStageVertex:
323
/// Vertex Shader.</li>
324
/// <li>HgiShaderStageFragment:
325
/// Fragment Shader.</li>
326
/// <li>HgiShaderStageCompute:
327
/// Compute Shader.</li>
328
/// <li>HgiShaderStageTessellationControl:
329
/// Transforms the control points of the low order surface (patch).
330
/// This runs before the tessellator fixed function stage.</li>
331
/// <li>HgiShaderStageTessellationEval:
332
/// Generates the surface geometry (the points) from the transformed control
333
/// points for every coordinate coming out of the tessellator fixed function
334
/// stage.</li>
335
/// <li>HgiShaderStageGeometry:
336
/// Governs the processing of Primitives.</li>
337
/// <li>HgiShaderStagePostTessellationControl:
338
/// Metal specific stage which computes tess factors
339
/// and modifies user post tess vertex data.</li>
340
/// <li>HgiShaderStagePostTessellationVertex:
341
/// Metal specific stage which performs tessellation and
342
/// vertex processing.</li>
343
/// </ul>
344
///
345
enum
HgiShaderStageBits
:
HgiBits
346
{
347
HgiShaderStageVertex
= 1 << 0,
348
HgiShaderStageFragment
= 1 << 1,
349
HgiShaderStageCompute
= 1 << 2,
350
HgiShaderStageTessellationControl
= 1 << 3,
351
HgiShaderStageTessellationEval
= 1 << 4,
352
HgiShaderStageGeometry
= 1 << 5,
353
HgiShaderStagePostTessellationControl
= 1 << 6,
354
HgiShaderStagePostTessellationVertex
= 1 << 7,
355
HgiShaderStageCustomBitsBegin
= 1 << 8,
356
};
357
using
HgiShaderStage
=
HgiBits
;
358
359
/// \enum HgiBindResourceType
360
///
361
/// Describes the type of the resource to be bound.
362
///
363
/// <ul>
364
/// <li>HgiBindResourceTypeSampler:
365
/// Sampler.
366
/// Glsl example: uniform sampler samplerOnly</li>
367
/// <li>HgiBindResourceTypeSampledImage:
368
/// Image for use with sampling ops.
369
/// Glsl example: uniform texture2D textureOnly
370
/// texture(sampler2D(textureOnly, samplerOnly), ...)</li>
371
/// <li>HgiBindResourceTypeCombinedSamplerImage:
372
/// Image and sampler combined into one.
373
/// Glsl example: uniform sampler2D texSmp;
374
/// texture(texSmp, ...)</li>
375
/// <li>HgiBindResourceTypeStorageImage:
376
/// Storage image used for image store/load ops (Unordered Access View).</li>
377
/// <li>HgiBindResourceTypeUniformBuffer:
378
/// Uniform buffer (UBO).</li>
379
/// <li>HgiBindResourceTypeStorageBuffer:
380
/// Shader storage buffer (SSBO).</li>
381
/// <li>HgiBindResourceTypeTessFactors:
382
/// Tessellation factors for Metal tessellation.</li>
383
/// </ul>
384
///
385
enum
HgiBindResourceType
386
{
387
HgiBindResourceTypeSampler
= 0,
388
HgiBindResourceTypeSampledImage
,
389
HgiBindResourceTypeCombinedSamplerImage
,
390
HgiBindResourceTypeStorageImage
,
391
HgiBindResourceTypeUniformBuffer
,
392
HgiBindResourceTypeStorageBuffer
,
393
HgiBindResourceTypeTessFactors
,
394
395
HgiBindResourceTypeCount
396
};
397
398
/// \enum HgiPolygonMode
399
///
400
/// Controls polygon mode during rasterization
401
///
402
/// <ul>
403
/// <li>HgiPolygonModeFill:
404
/// Polygons are filled.</li>
405
/// <li>HgiPolygonModeLine:
406
/// Polygon edges are drawn as line segments.</li>
407
/// <li>HgiPolygonModePoint:
408
/// Polygon vertices are drawn as points.</li>
409
/// </ul>
410
///
411
enum
HgiPolygonMode
412
{
413
HgiPolygonModeFill
= 0,
414
HgiPolygonModeLine
,
415
HgiPolygonModePoint
,
416
417
HgiPolygonModeCount
418
};
419
420
/// \enum HgiCullMode
421
///
422
/// Controls primitive (faces) culling.
423
///
424
/// <ul>
425
/// <li>HgiPolygonModeNone:
426
/// No primitive are discarded.</li>
427
/// <li>HgiPolygonModeFront:
428
/// Front-facing primitive are discarded.</li>
429
/// <li>HgiPolygonModeBack:
430
/// Back-facing primitive are discarded.</li>
431
/// <li>HgiPolygonModeFrontAndBack:
432
/// All primitive are discarded.</li>
433
/// </ul>
434
///
435
enum
HgiCullMode
436
{
437
HgiCullModeNone
= 0,
438
HgiCullModeFront
,
439
HgiCullModeBack
,
440
HgiCullModeFrontAndBack
,
441
442
HgiCullModeCount
443
};
444
445
/// \enum HgiWinding
446
///
447
/// Determines the front-facing orientation of a primitive (face).
448
///
449
/// <ul>
450
/// <li>HgiWindingClockwise:
451
/// Primitives with clockwise vertex-order are front facing.</li>
452
/// <li>HgiWindingCounterClockwise:
453
/// Primitives with counter-clockwise vertex-order are front facing.</li>
454
/// </ul>
455
///
456
enum
HgiWinding
457
{
458
HgiWindingClockwise
= 0,
459
HgiWindingCounterClockwise
,
460
461
HgiWindingCount
462
};
463
464
465
/// \enum HgiBlendOp
466
///
467
/// Blend operations
468
///
469
enum
HgiBlendOp
470
{
471
HgiBlendOpAdd
= 0,
472
HgiBlendOpSubtract
,
473
HgiBlendOpReverseSubtract
,
474
HgiBlendOpMin
,
475
HgiBlendOpMax
,
476
477
HgiBlendOpCount
478
};
479
480
/// \enum HgiBlendFactor
481
///
482
/// Blend factors
483
///
484
enum
HgiBlendFactor
485
{
486
HgiBlendFactorZero
= 0,
487
HgiBlendFactorOne
,
488
HgiBlendFactorSrcColor
,
489
HgiBlendFactorOneMinusSrcColor
,
490
HgiBlendFactorDstColor
,
491
HgiBlendFactorOneMinusDstColor
,
492
HgiBlendFactorSrcAlpha
,
493
HgiBlendFactorOneMinusSrcAlpha
,
494
HgiBlendFactorDstAlpha
,
495
HgiBlendFactorOneMinusDstAlpha
,
496
HgiBlendFactorConstantColor
,
497
HgiBlendFactorOneMinusConstantColor
,
498
HgiBlendFactorConstantAlpha
,
499
HgiBlendFactorOneMinusConstantAlpha
,
500
HgiBlendFactorSrcAlphaSaturate
,
501
HgiBlendFactorSrc1Color
,
502
HgiBlendFactorOneMinusSrc1Color
,
503
HgiBlendFactorSrc1Alpha
,
504
HgiBlendFactorOneMinusSrc1Alpha
,
505
506
HgiBlendFactorCount
507
};
508
509
/// \enum HgiColorMaskBits
510
///
511
/// Describes whether to permit or restrict writing to color components
512
/// of a color attachment.
513
///
514
enum
HgiColorMaskBits
:
HgiBits
515
{
516
HgiColorMaskRed
= 1 << 0,
517
HgiColorMaskGreen
= 1 << 1,
518
HgiColorMaskBlue
= 1 << 2,
519
HgiColorMaskAlpha
= 1 << 3,
520
};
521
using
HgiColorMask
=
HgiBits
;
522
523
/// \enum HgiCompareFunction
524
///
525
/// Compare functions.
526
///
527
enum
HgiCompareFunction
528
{
529
HgiCompareFunctionNever
= 0,
530
HgiCompareFunctionLess
,
531
HgiCompareFunctionEqual
,
532
HgiCompareFunctionLEqual
,
533
HgiCompareFunctionGreater
,
534
HgiCompareFunctionNotEqual
,
535
HgiCompareFunctionGEqual
,
536
HgiCompareFunctionAlways
,
537
538
HgiCompareFunctionCount
539
};
540
541
/// \enum HgiStencilOp
542
///
543
/// Stencil operations.
544
///
545
enum
HgiStencilOp
546
{
547
HgiStencilOpKeep
= 0,
548
HgiStencilOpZero
,
549
HgiStencilOpReplace
,
550
HgiStencilOpIncrementClamp
,
551
HgiStencilOpDecrementClamp
,
552
HgiStencilOpInvert
,
553
HgiStencilOpIncrementWrap
,
554
HgiStencilOpDecrementWrap
,
555
556
HgiStencilOpCount
557
};
558
559
/// \enum HgiComponentSwizzle
560
///
561
/// Swizzle for a component.
562
///
563
enum
HgiComponentSwizzle
564
{
565
HgiComponentSwizzleZero
= 0,
566
HgiComponentSwizzleOne
,
567
HgiComponentSwizzleR
,
568
HgiComponentSwizzleG
,
569
HgiComponentSwizzleB
,
570
HgiComponentSwizzleA
,
571
572
HgiComponentSwizzleCount
573
};
574
575
/// \enum HgiPrimitiveType
576
///
577
/// What the stream of vertices being rendered represents
578
///
579
/// <ul>
580
/// <li>HgiPrimitiveTypePointList:
581
/// Rasterize a point at each vertex.</li>
582
/// <li>HgiPrimitiveTypeLineList:
583
/// Rasterize a line between each separate pair of vertices.</li>
584
/// <li>HgiPrimitiveTypeLineStrip:
585
/// Rasterize a line between each pair of adjacent vertices.</li>
586
/// <li>HgiPrimitiveTypeTriangleList:
587
/// Rasterize a triangle for every separate set of three vertices.</li>
588
/// <li>HgiPrimitiveTypePatchList:
589
/// A user-defined number of vertices, which is tessellated into
590
/// points, lines, or triangles.</li>
591
/// <li>HgiPrimitiveTypeLineListWithAdjacency:
592
/// A four-vertex encoding used to draw untriangulated quads.
593
/// Rasterize two triangles for every separate set of four vertices.</li>
594
/// </ul>
595
///
596
enum
HgiPrimitiveType
597
{
598
HgiPrimitiveTypePointList
= 0,
599
HgiPrimitiveTypeLineList
,
600
HgiPrimitiveTypeLineStrip
,
601
HgiPrimitiveTypeTriangleList
,
602
HgiPrimitiveTypePatchList
,
603
HgiPrimitiveTypeLineListWithAdjacency
,
604
605
HgiPrimitiveTypeCount
606
};
607
608
/// \enum HgiVertexBufferStepFunction
609
///
610
/// Describes the rate at which vertex attributes are pulled from buffers.
611
///
612
/// <ul>
613
/// <li>HgiVertexBufferStepFunctionConstant:
614
/// The same attribute data is used for every vertex.</li>
615
/// <li>HgiVertexBufferStepFunctionPerVertex:
616
/// New attribute data is fetched for each vertex.</li>
617
/// <li>HgiVertexBufferStepFunctionPerInstance:
618
/// New attribute data is fetched for each instance.</li>
619
/// <li>HgiVertexBufferStepFunctionPerPatch:
620
/// New attribute data is fetched for each patch.</li>
621
/// <li>HgiVertexBufferStepFunctionPerPatchControlPoint:
622
/// New attribute data is fetched for each patch control point.</li>
623
/// <li>HgiVertexBufferStepFunctionPerDrawCommand:
624
/// New attribute data is fetched for each draw in a multi-draw command.</li>
625
/// </ul>
626
///
627
enum
HgiVertexBufferStepFunction
628
{
629
HgiVertexBufferStepFunctionConstant
= 0,
630
HgiVertexBufferStepFunctionPerVertex
,
631
HgiVertexBufferStepFunctionPerInstance
,
632
HgiVertexBufferStepFunctionPerPatch
,
633
HgiVertexBufferStepFunctionPerPatchControlPoint
,
634
HgiVertexBufferStepFunctionPerDrawCommand
,
635
636
HgiVertexBufferStepFunctionCount
637
};
638
639
/// \enum HgiSubmitWaitType
640
///
641
/// Describes command submission wait behavior.
642
///
643
/// <ul>
644
/// <li>HgiSubmitWaitTypeNoWait:
645
/// CPU should not wait for the GPU to finish processing the cmds.</li>
646
/// <li>HgiSubmitWaitTypeWaitUntilCompleted:
647
/// The CPU waits ("blocked") until the GPU has consumed the cmds.</li>
648
/// </ul>
649
///
650
enum
HgiSubmitWaitType
651
{
652
HgiSubmitWaitTypeNoWait
= 0,
653
HgiSubmitWaitTypeWaitUntilCompleted
,
654
};
655
656
/// \enum HgiMemoryBarrier
657
///
658
/// Describes what objects the memory barrier affects.
659
///
660
/// <ul>
661
/// <li>HgiMemoryBarrierNone:
662
/// No barrier (no-op).</li>
663
/// <li>HgiMemoryBarrierAll:
664
/// The barrier affects all memory writes and reads.</li>
665
/// </ul>
666
///
667
enum
HgiMemoryBarrierBits
668
{
669
HgiMemoryBarrierNone
= 0,
670
HgiMemoryBarrierAll
= 1 << 0
671
};
672
using
HgiMemoryBarrier
=
HgiBits
;
673
674
/// \enum HgiBindingType
675
///
676
/// Describes the type of shader resource binding model to use.
677
///
678
/// <ul>
679
/// <li>HgiBindingTypeValue:
680
/// Shader declares binding as a value.
681
/// Glsl example: buffer { int parameter; };
682
/// Msl example: int parameter;</li>
683
/// <li>HgiBindingTypeUniformValue:
684
/// Shader declares binding as a uniform block value.
685
/// Glsl example: uniform { int parameter; };
686
/// Msl example: int parameter;</li>
687
/// <li>HgiBindingTypeArray:
688
/// Shader declares binding as array value.
689
/// Glsl example: buffer { int parameter[n]; };
690
/// Msl example: int parameter[n];</li>
691
/// <li>HgiBindingTypeUniformArray:
692
/// Shader declares binding as uniform block array value.
693
/// Glsl example: uniform { int parameter[n]; };
694
/// Msl example: int parameter[n];</li>
695
/// <li>HgiBindingTypePointer:
696
/// Shader declares binding as pointer value.
697
/// Glsl example: buffer { int parameter[] };
698
/// Msl example: int *parameter;</li>
699
/// </ul>
700
///
701
enum
HgiBindingType
702
{
703
HgiBindingTypeValue
= 0,
704
HgiBindingTypeUniformValue
,
705
HgiBindingTypeArray
,
706
HgiBindingTypeUniformArray
,
707
HgiBindingTypePointer
,
708
};
709
710
/// \enum HgiInterpolationType
711
///
712
/// Describes the type of parameter interpolation.
713
///
714
/// <ul>
715
/// <li>HgiInterpolationDefault:
716
/// The shader input will have default interpolation.
717
/// Glsl example: vec2 parameter;
718
/// Msl example: vec2 parameter;</li>
719
/// <li>HgiInterpolationFlat:
720
/// The shader input will have no interpolation.
721
/// Glsl example: flat vec2 parameter;
722
/// Msl example: vec2 parameter[[flat]];</li>
723
/// <li>HgiBindingTypeNoPerspective:
724
/// The shader input will be linearly interpolated in screen-space
725
/// Glsl example: noperspective vec2 parameter;
726
/// Msl example: vec2 parameter[[center_no_perspective]];</li>
727
/// </ul>
728
///
729
enum
HgiInterpolationType
730
{
731
HgiInterpolationDefault
= 0,
732
HgiInterpolationFlat
,
733
HgiInterpolationNoPerspective
,
734
};
735
736
/// \enum HgiSamplingType
737
///
738
/// Describes the type of parameter sampling.
739
///
740
/// <ul>
741
/// <li>HgiSamplingDefault:
742
/// The shader input will have default sampling.
743
/// Glsl example: vec2 parameter;
744
/// Msl example: vec2 parameter;</li>
745
/// <li>HgiSamplingCentroid:
746
/// The shader input will have centroid sampling.
747
/// Glsl example: centroid vec2 parameter;
748
/// Msl example: vec2 parameter[[centroid_perspective]];</li>
749
/// <li>HgiSamplingSample:
750
/// The shader input will have per-sample sampling.
751
/// Glsl example: sample vec2 parameter;
752
/// Msl example: vec2 parameter[[sample_perspective]];</li>
753
/// </ul>
754
///
755
enum
HgiSamplingType
756
{
757
HgiSamplingDefault
= 0,
758
HgiSamplingCentroid
,
759
HgiSamplingSample
,
760
};
761
762
/// \enum HgiStorageType
763
///
764
/// Describes the type of parameter storage.
765
///
766
/// <ul>
767
/// <li>HgiStorageDefault:
768
/// The shader input will have default storage.
769
/// Glsl example: vec2 parameter;</li>
770
/// <li>HgiStoragePatch:
771
/// The shader input will have per-patch storage.
772
/// Glsl example: patch vec2 parameter;</li>
773
/// </ul>
774
///
775
enum
HgiStorageType
776
{
777
HgiStorageDefault
= 0,
778
HgiStoragePatch
,
779
};
780
781
/// \enum HgiShaderTextureType
782
///
783
/// Describes the type of texture to be used in shader gen.
784
///
785
/// <ul>
786
/// <li>HgiShaderTextureTypeTexture:
787
/// Indicates a regular texture.</li>
788
/// <li>HgiShaderTextureTypeShadowTexture:
789
/// Indicates a shadow texture.</li>
790
/// <li>HgiShaderTextureTypeArrayTexture:
791
/// Indicates an array texture.</li>
792
/// </ul>
793
///
794
enum
HgiShaderTextureType
795
{
796
HgiShaderTextureTypeTexture
= 0,
797
HgiShaderTextureTypeShadowTexture
,
798
HgiShaderTextureTypeArrayTexture
799
};
800
801
/// \enum HgiComputeDispatch
802
///
803
/// Specifies the dispatch method for compute encoders.
804
///
805
/// <ul>
806
/// <li>HgiComputeDispatchSerial:
807
/// Kernels are dispatched serially.</li>
808
/// <li>HgiComputeDispatchConcurrent:
809
/// Kernels are dispatched concurrently, if supported by the API</li>
810
/// </ul>
811
///
812
enum
HgiComputeDispatch
813
{
814
HgiComputeDispatchSerial
= 0,
815
HgiComputeDispatchConcurrent
816
};
817
818
PXR_NAMESPACE_CLOSE_SCOPE
819
820
#endif
HgiVertexBufferStepFunctionPerPatchControlPoint
Definition:
enums.h:633
HgiAttachmentStoreOpStore
Definition:
enums.h:281
HgiShaderStageVertex
Definition:
enums.h:347
HgiStorageDefault
Definition:
enums.h:777
HgiSamplerFilterCount
Definition:
enums.h:186
HgiSamplerAddressMode
HgiSamplerAddressMode
Definition:
enums.h:159
HgiBufferUsageUniform
Definition:
enums.h:307
HgiStorageType
HgiStorageType
Definition:
enums.h:775
HgiBlendFactorCount
Definition:
enums.h:506
HgiColorMaskBits
HgiColorMaskBits
Definition:
enums.h:514
HgiDeviceCapabilitiesBitsIndirectCommandBuffers
Definition:
enums.h:84
HgiBindResourceTypeUniformBuffer
Definition:
enums.h:391
HgiPolygonMode
HgiPolygonMode
Definition:
enums.h:411
HgiStencilOp
HgiStencilOp
Definition:
enums.h:545
HgiVertexBufferStepFunction
HgiVertexBufferStepFunction
Definition:
enums.h:627
HgiShaderStageCustomBitsBegin
Definition:
enums.h:355
HgiSamplerAddressModeRepeat
Definition:
enums.h:163
HgiDeviceCapabilitiesBitsCppShaderPadding
Definition:
enums.h:77
HgiCompareFunction
HgiCompareFunction
Definition:
enums.h:527
HgiBlendFactorDstColor
Definition:
enums.h:490
HgiStencilOpDecrementClamp
Definition:
enums.h:551
HgiShaderTextureTypeArrayTexture
Definition:
enums.h:798
HgiBindResourceTypeStorageBuffer
Definition:
enums.h:392
HgiComputeDispatchConcurrent
Definition:
enums.h:815
HgiBufferUsageVertex
Definition:
enums.h:309
HgiStencilOpDecrementWrap
Definition:
enums.h:554
HgiShaderStageCompute
Definition:
enums.h:349
HgiAttachmentStoreOpCount
Definition:
enums.h:283
HgiShaderStagePostTessellationVertex
Definition:
enums.h:354
HgiMipFilterCount
Definition:
enums.h:208
HgiBindResourceTypeCombinedSamplerImage
Definition:
enums.h:389
HgiAttachmentLoadOp
HgiAttachmentLoadOp
Definition:
enums.h:258
HgiComputeDispatchSerial
Definition:
enums.h:814
HgiCullModeFront
Definition:
enums.h:438
HgiBorderColorOpaqueBlack
Definition:
enums.h:224
HgiBlendFactorSrc1Color
Definition:
enums.h:501
HgiStencilOpKeep
Definition:
enums.h:547
HgiCompareFunctionLEqual
Definition:
enums.h:532
HgiSamplingSample
Definition:
enums.h:759
HgiVertexBufferStepFunctionConstant
Definition:
enums.h:629
HgiDeviceCapabilitiesBits
HgiDeviceCapabilitiesBits
Definition:
enums.h:65
HgiBindingTypeArray
Definition:
enums.h:705
HgiMipFilter
HgiMipFilter
Definition:
enums.h:202
HgiVertexBufferStepFunctionPerDrawCommand
Definition:
enums.h:634
HgiTextureTypeCount
Definition:
enums.h:115
HgiShaderStageTessellationEval
Definition:
enums.h:351
HgiSamplerAddressModeClampToEdge
Definition:
enums.h:161
HgiDeviceCapabilitiesBitsBindlessTextures
Definition:
enums.h:74
HgiWinding
HgiWinding
Definition:
enums.h:456
HgiBlendOpCount
Definition:
enums.h:477
HgiBorderColorOpaqueWhite
Definition:
enums.h:225
HgiDeviceCapabilitiesBitsUnifiedMemory
Definition:
enums.h:70
HgiSamplingCentroid
Definition:
enums.h:758
HgiPolygonModePoint
Definition:
enums.h:415
HgiBlendFactorOneMinusDstColor
Definition:
enums.h:491
HgiDeviceCapabilitiesBitsPrimitiveIdEmulation
Definition:
enums.h:83
HgiDeviceCapabilities
HgiBits HgiDeviceCapabilities
Definition:
enums.h:88
HgiComponentSwizzleOne
Definition:
enums.h:566
HgiTextureUsageBitsColorTarget
Definition:
enums.h:144
HgiSubmitWaitTypeNoWait
Definition:
enums.h:652
HgiInterpolationNoPerspective
Definition:
enums.h:733
HgiDeviceCapabilitiesBitsConservativeRaster
Definition:
enums.h:78
HgiVertexBufferStepFunctionPerInstance
Definition:
enums.h:631
HgiShaderTextureTypeTexture
Definition:
enums.h:796
HgiCullModeFrontAndBack
Definition:
enums.h:440
HgiVertexBufferStepFunctionPerPatch
Definition:
enums.h:632
HgiSampleCount4
Definition:
enums.h:238
HgiPolygonModeLine
Definition:
enums.h:414
HgiPrimitiveTypeTriangleList
Definition:
enums.h:601
HgiPrimitiveTypeLineStrip
Definition:
enums.h:600
HgiColorMaskGreen
Definition:
enums.h:517
HgiSampleCount16
Definition:
enums.h:240
HgiCullModeCount
Definition:
enums.h:442
HgiSampleCount2
Definition:
enums.h:237
HgiBlendFactorSrcAlphaSaturate
Definition:
enums.h:500
HgiComponentSwizzleZero
Definition:
enums.h:565
HgiBorderColor
HgiBorderColor
Definition:
enums.h:221
HgiSamplingDefault
Definition:
enums.h:757
HgiBufferUsageCustomBitsBegin
Definition:
enums.h:313
HgiTextureUsage
HgiBits HgiTextureUsage
Definition:
enums.h:153
HgiCullMode
HgiCullMode
Definition:
enums.h:435
HgiStoragePatch
Definition:
enums.h:778
HgiTextureType2DArray
Definition:
enums.h:113
HgiComponentSwizzle
HgiComponentSwizzle
Definition:
enums.h:563
HgiMemoryBarrierNone
Definition:
enums.h:669
HgiPrimitiveTypeLineList
Definition:
enums.h:599
HgiWindingClockwise
Definition:
enums.h:458
HgiMipFilterLinear
Definition:
enums.h:206
HgiSubmitWaitType
HgiSubmitWaitType
Definition:
enums.h:650
HgiSampleCount8
Definition:
enums.h:239
HgiBindResourceTypeSampler
Definition:
enums.h:387
HgiWindingCounterClockwise
Definition:
enums.h:459
HgiBlendOpSubtract
Definition:
enums.h:472
HgiWindingCount
Definition:
enums.h:461
HgiAttachmentStoreOp
HgiAttachmentStoreOp
Definition:
enums.h:278
HgiVertexBufferStepFunctionCount
Definition:
enums.h:636
HgiInterpolationType
HgiInterpolationType
Definition:
enums.h:729
HgiTextureUsageBitsShaderRead
Definition:
enums.h:147
HgiComputeDispatch
HgiComputeDispatch
Definition:
enums.h:812
HgiSamplerFilterNearest
Definition:
enums.h:183
HgiTextureType2D
Definition:
enums.h:110
HgiMemoryBarrierAll
Definition:
enums.h:670
HgiDeviceCapabilitiesBitsBindlessBuffers
Definition:
enums.h:68
HgiBindingType
HgiBindingType
Definition:
enums.h:701
HgiBlendFactor
HgiBlendFactor
Definition:
enums.h:484
HgiShaderStageTessellationControl
Definition:
enums.h:350
HgiMemoryBarrierBits
HgiMemoryBarrierBits
Definition:
enums.h:667
HgiStencilOpZero
Definition:
enums.h:548
HgiBlendOpMin
Definition:
enums.h:474
HgiCompareFunctionCount
Definition:
enums.h:538
HgiBlendFactorZero
Definition:
enums.h:486
HgiComponentSwizzleR
Definition:
enums.h:567
HgiBlendFactorOneMinusConstantColor
Definition:
enums.h:497
HgiBindResourceType
HgiBindResourceType
Definition:
enums.h:385
pxr.h
HgiBlendFactorConstantColor
Definition:
enums.h:496
HgiCompareFunctionEqual
Definition:
enums.h:531
HgiTextureUsageCustomBitsBegin
Definition:
enums.h:150
HgiPrimitiveTypeCount
Definition:
enums.h:605
HgiMemoryBarrier
HgiBits HgiMemoryBarrier
Definition:
enums.h:672
HgiTextureType3D
Definition:
enums.h:111
HgiDeviceCapabilitiesBitsRoundPoints
Definition:
enums.h:85
HgiBlendOp
HgiBlendOp
Definition:
enums.h:469
HgiAttachmentLoadOpCount
Definition:
enums.h:264
HgiPrimitiveType
HgiPrimitiveType
Definition:
enums.h:596
HgiColorMaskAlpha
Definition:
enums.h:519
HgiCullModeBack
Definition:
enums.h:439
HgiSampleCount1
Definition:
enums.h:236
HgiBlendFactorSrcColor
Definition:
enums.h:488
HgiDeviceCapabilitiesBitsCustomDepthRange
Definition:
enums.h:80
HgiBufferUsageBits
HgiBufferUsageBits
Definition:
enums.h:305
HgiPrimitiveTypeLineListWithAdjacency
Definition:
enums.h:603
HgiAttachmentLoadOpLoad
Definition:
enums.h:262
HgiSamplerFilterLinear
Definition:
enums.h:184
HgiBlendFactorOneMinusSrc1Alpha
Definition:
enums.h:504
HgiSamplerAddressModeMirrorClampToEdge
Definition:
enums.h:162
HgiSamplingType
HgiSamplingType
Definition:
enums.h:755
HgiDeviceCapabilitiesBitsShaderDoublePrecision
Definition:
enums.h:75
HgiDeviceCapabilitiesBitsMetalTessellation
Definition:
enums.h:81
HgiComponentSwizzleCount
Definition:
enums.h:572
HgiComponentSwizzleG
Definition:
enums.h:568
HgiBindResourceTypeSampledImage
Definition:
enums.h:388
HgiPrimitiveTypePointList
Definition:
enums.h:598
HgiBindingTypeUniformValue
Definition:
enums.h:704
HgiSamplerAddressModeClampToBorderColor
Definition:
enums.h:165
HgiShaderStagePostTessellationControl
Definition:
enums.h:353
HgiTextureUsageBits
HgiTextureUsageBits
Definition:
enums.h:142
HgiCompareFunctionNotEqual
Definition:
enums.h:534
HgiTextureType
HgiTextureType
Definition:
enums.h:107
HgiShaderTextureTypeShadowTexture
Definition:
enums.h:797
HgiBlendFactorOneMinusSrcColor
Definition:
enums.h:489
HgiBorderColorCount
Definition:
enums.h:227
HgiDeviceCapabilitiesBitsBuiltinBarycentrics
Definition:
enums.h:71
HgiColorMaskRed
Definition:
enums.h:516
HgiShaderStageGeometry
Definition:
enums.h:352
HgiAttachmentLoadOpClear
Definition:
enums.h:261
HgiTextureType1DArray
Definition:
enums.h:112
HgiDeviceCapabilitiesBitsPresentation
Definition:
enums.h:67
HgiPolygonModeCount
Definition:
enums.h:417
HgiDeviceCapabilitiesBitsStencilReadback
Definition:
enums.h:79
HgiBindResourceTypeTessFactors
Definition:
enums.h:393
HgiSamplerAddressModeMirrorRepeat
Definition:
enums.h:164
HgiBufferUsageIndex32
Definition:
enums.h:308
api.h
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
HgiMipFilterNearest
Definition:
enums.h:205
HgiBlendOpReverseSubtract
Definition:
enums.h:473
HgiBufferUsage
HgiBits HgiBufferUsage
Definition:
enums.h:315
HgiBindingTypePointer
Definition:
enums.h:707
HgiBorderColorTransparentBlack
Definition:
enums.h:223
HgiDeviceCapabilitiesBitsBasePrimitiveOffset
Definition:
enums.h:82
HgiBlendOpMax
Definition:
enums.h:475
HgiBlendFactorDstAlpha
Definition:
enums.h:494
HgiShaderStageFragment
Definition:
enums.h:348
HgiSampleCountEnd
Definition:
enums.h:242
HgiShaderStageBits
HgiShaderStageBits
Definition:
enums.h:345
HgiPrimitiveTypePatchList
Definition:
enums.h:602
HgiDeviceCapabilitiesBitsDepthRangeMinusOnetoOne
Definition:
enums.h:76
HgiBlendFactorConstantAlpha
Definition:
enums.h:498
HgiStencilOpIncrementWrap
Definition:
enums.h:553
HgiBlendFactorSrcAlpha
Definition:
enums.h:492
HgiInterpolationDefault
Definition:
enums.h:731
HgiStencilOpReplace
Definition:
enums.h:549
HgiBindingTypeValue
Definition:
enums.h:703
HgiCompareFunctionAlways
Definition:
enums.h:536
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
HgiComponentSwizzleB
Definition:
enums.h:569
HgiSubmitWaitTypeWaitUntilCompleted
Definition:
enums.h:653
HgiBlendFactorOneMinusConstantAlpha
Definition:
enums.h:499
HgiComponentSwizzleA
Definition:
enums.h:570
HgiColorMaskBlue
Definition:
enums.h:518
HgiVertexBufferStepFunctionPerVertex
Definition:
enums.h:630
HgiSamplerAddressModeCount
Definition:
enums.h:167
HgiStencilOpInvert
Definition:
enums.h:552
HgiShaderStage
HgiBits HgiShaderStage
Definition:
enums.h:357
HgiCullModeNone
Definition:
enums.h:437
HgiBindingTypeUniformArray
Definition:
enums.h:706
HgiBlendFactorSrc1Alpha
Definition:
enums.h:503
HgiBlendFactorOneMinusSrcAlpha
Definition:
enums.h:493
HgiTextureUsageBitsShaderWrite
Definition:
enums.h:148
HgiPolygonModeFill
Definition:
enums.h:413
HgiBindResourceTypeCount
Definition:
enums.h:395
HgiBufferUsageIndirect
Definition:
enums.h:311
HgiShaderTextureType
HgiShaderTextureType
Definition:
enums.h:794
HgiAttachmentLoadOpDontCare
Definition:
enums.h:260
HgiBits
uint32_t HgiBits
Definition:
enums.h:16
HgiDeviceCapabilitiesBitsMultiDrawIndirect
Definition:
enums.h:73
HgiMipFilterNotMipmapped
Definition:
enums.h:204
HgiDeviceCapabilitiesBitsShaderDrawParameters
Definition:
enums.h:72
HgiStencilOpIncrementClamp
Definition:
enums.h:550
HgiBlendFactorOne
Definition:
enums.h:487
HgiBlendFactorOneMinusSrc1Color
Definition:
enums.h:502
HgiBlendOpAdd
Definition:
enums.h:471
HgiSampleCount
HgiSampleCount
Definition:
enums.h:234
HgiTextureType1D
Definition:
enums.h:109
HgiDeviceCapabilitiesBitsConcurrentDispatch
Definition:
enums.h:69
HgiBufferUsageStorage
Definition:
enums.h:310
HgiSamplerFilter
HgiSamplerFilter
Definition:
enums.h:181
HgiCompareFunctionLess
Definition:
enums.h:530
HgiInterpolationFlat
Definition:
enums.h:732
HgiCompareFunctionNever
Definition:
enums.h:529
HgiStencilOpCount
Definition:
enums.h:556
HgiBlendFactorOneMinusDstAlpha
Definition:
enums.h:495
HgiBindResourceTypeStorageImage
Definition:
enums.h:390
HgiCompareFunctionGEqual
Definition:
enums.h:535
HgiTextureUsageBitsDepthTarget
Definition:
enums.h:145
HgiCompareFunctionGreater
Definition:
enums.h:533
HgiAttachmentStoreOpDontCare
Definition:
enums.h:280
HgiTextureUsageBitsStencilTarget
Definition:
enums.h:146
HgiColorMask
HgiBits HgiColorMask
Definition:
enums.h:521
pxr
imaging
hgi
enums.h
Generated on Wed Aug 27 2025 03:07:54 for HDK by
1.8.6