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