HDK
 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 
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 /// </ul>
44 ///
46 {
48 };
49 
51 
52 /// \enum HgiTextureType
53 ///
54 /// Describes the kind of texture.
55 ///
56 /// <ul>
57 /// <li>HgiTextureType1D:
58 /// A one-dimensional texture.</li>
59 /// <li>HgiTextureType2D:
60 /// A two-dimensional texture.</li>
61 /// <li>HgiTextureType3D:
62 /// A three-dimensional texture.</li>
63 /// </ul>
64 ///
66 {
70 
72 };
73 
74 /// \enum HgiTextureUsageBits
75 ///
76 /// Describes how the texture will be used. If a texture has multiple uses you
77 /// can combine multiple bits.
78 ///
79 /// <ul>
80 /// <li>HgiTextureUsageBitsColorTarget:
81 /// The texture is a color attachment rendered into via a render pass.</li>
82 /// <li>HgiTextureUsageBitsDepthTarget:
83 /// The texture is a depth attachment rendered into via a render pass.</li>
84 /// <li>HgiTextureUsageBitsStencilTarget:
85 /// The texture is a stencil attachment rendered into via a render pass.</li>
86 /// <li>HgiTextureUsageBitsShaderRead:
87 /// The texture is sampled from in a shader (image load / sampling)</li>
88 /// <li>HgiTextureUsageBitsShaderWrite:
89 /// The texture is written into from in a shader (image store)</li>
90 ///
91 /// <li>HgiTextureUsageCustomBitsBegin:
92 /// This bit (and any bit after) can be used to attached custom, backend
93 /// specific bits to the usage bit. </li>
94 /// </ul>
95 ///
97 {
103 
105 };
106 
108 
109 /// \enum HgiSamplerAddressMode
110 ///
111 /// Various modes used during sampling of a texture.
112 ///
114 {
120 
122 };
123 
124 /// \enum HgiSamplerFilter
125 ///
126 /// Sampler filtering modes that determine the pixel value that is returned.
127 ///
128 /// <ul>
129 /// <li>HgiSamplerFilterNearest:
130 /// Returns the value of a single mipmap level.</li>
131 /// <li>HgiSamplerFilterLinear:
132 /// Combines the values of multiple mipmap levels.</li>
133 /// </ul>
134 ///
136 {
139 
141 };
142 
143 /// \enum HgiMipFilter
144 ///
145 /// Sampler filtering modes that determine the pixel value that is returned.
146 ///
147 /// <ul>
148 /// <li>HgiMipFilterNotMipmapped:
149 /// Texture is always sampled at mipmap level 0. (ie. max lod=0)</li>
150 /// <li>HgiMipFilterNearest:
151 /// Returns the value of a single mipmap level.</li>
152 /// <li>HgiMipFilterLinear:
153 /// Linear interpolates the values of up to two mipmap levels.</li>
154 /// </ul>
155 ///
157 {
161 
163 };
164 
165 /// \enum HgiSampleCount
166 ///
167 /// Sample count for multi-sampling
168 ///
170 {
174 };
175 
176 /// \enum HgiAttachmentLoadOp
177 ///
178 /// Describes what will happen to the attachment pixel data prior to rendering.
179 ///
180 /// <ul>
181 /// <li>HgiAttachmentLoadOpDontCare:
182 /// All pixels are rendered to. Pixel data in render target starts undefined.</li>
183 /// <li>HgiAttachmentLoadOpClear:
184 /// The attachment pixel data is cleared to a specified color value.</li>
185 /// <li>HgiAttachmentLoadOpLoad:
186 /// Previous pixel data is loaded into attachment prior to rendering.</li>
187 /// </ul>
188 ///
190 {
194 
196 };
197 
198 /// \enum HgiAttachmentStoreOp
199 ///
200 /// Describes what will happen to the attachment pixel data after rendering.
201 ///
202 /// <ul>
203 /// <li>HgiAttachmentStoreOpDontCare:
204 /// Pixel data is undefined after rendering has completed (no store cost)</li>
205 /// <li>HgiAttachmentStoreOpStore:
206 /// The attachment pixel data is stored in memory.</li>
207 /// </ul>
208 ///
210 {
213 
215 };
216 
217 /// \enum HgiBufferUsageBits
218 ///
219 /// Describes the properties and usage of the buffer.
220 ///
221 /// <ul>
222 /// <li>HgiBufferUsageUniform:
223 /// Shader uniform buffer </li>
224 /// <li>HgiBufferUsageIndex32:
225 /// Topology 32 bit indices.</li>
226 /// <li>HgiBufferUsageVertex:
227 /// Vertex attributes.</li>
228 /// <li>HgiBufferUsageStorage:
229 /// Shader storage buffer / Argument buffer.</li>
230 ///
231 /// <li>HgiBufferUsageCustomBitsBegin:
232 /// This bit (and any bit after) can be used to attached custom, backend
233 /// specific bits to the usage bit. </li>
234 /// </ul>
235 ///
237 {
242 
244 };
246 
247 /// \enum HgiShaderStage
248 ///
249 /// Describes the stage a shader function operates in.
250 ///
251 /// <ul>
252 /// <li>HgiShaderStageVertex:
253 /// Vertex Shader.</li>
254 /// <li>HgiShaderStageFragment:
255 /// Fragment Shader.</li>
256 /// <li>HgiShaderStageCompute:
257 /// Compute Shader.</li>
258 /// <li>HgiShaderStageTessellationControl:
259 /// Transforms the control points of the low order surface (patch).
260 /// This runs before the tessellator fixed function stage.</li>
261 /// <li>HgiShaderStageTessellationEval:
262 /// Generates the surface geometry (the points) from the transformed control
263 /// points for every coordinate coming out of the tessellator fixed function
264 /// stage. </li>
265 /// <li>HgiShaderStageGeometry:
266 /// Governs the processing of Primitives.</li>
267 /// </ul>
268 ///
270 {
277 };
279 
280 /// \enum HgiPipelineType
281 ///
282 /// Describes the intended bind point for this pipeline.
283 ///
284 /// <ul>
285 /// <li>HgiPipelineTypeGraphics:
286 /// The pipeline is meant to be bound to the graphics pipeline.</li>
287 /// <li>HgiPipelineTypeCompute:
288 /// The pipeline is meant to be bound to the compute pipeline.</li>
289 /// </ul>
290 ///
292 {
295 
297 };
298 
299 /// \enum HgiBindResourceType
300 ///
301 /// Describes the type of the resource to be bound.
302 ///
303 /// <ul>
304 /// <li>HgiBindResourceTypeSampler:
305 /// Sampler.
306 /// Glsl example: uniform sampler samplerOnly</li>
307 /// <li>HgiBindResourceTypeCombinedImageSampler:
308 /// Image and sampler combined in one.
309 /// Glsl example: uniform sampler2D combined</li>
310 /// <li>HgiBindResourceTypeSamplerImage:
311 /// Image for use with sampling ops.
312 /// Glsl example: uniform texture2D textureOnly
313 /// texture(sampler2D(textureOnly, samplerOnly))</li>
314 /// <li>HgiBindResourceTypeStorageImage:
315 /// Storage image used for image store/load ops (Unordered Access View).</li>
316 /// <li>HgiBindResourceTypeUniformBuffer:
317 /// Uniform buffer (UBO).</li>
318 /// <li>HgiBindResourceTypeStorageBuffer:
319 /// Shader storage buffer (SSBO).</li>
320 /// </ul>
321 ///
323 {
330 
332 };
333 
334 /// \enum HgiPolygonMode
335 ///
336 /// Controls polygon mode during rasterization
337 ///
338 /// <ul>
339 /// <li>HgiPolygonModeFill:
340 /// Polygons are filled.</li>
341 /// <li>HgiPolygonModeLine:
342 /// Polygon edges are drawn as line segments.</li>
343 /// <li>HgiPolygonModePoint:
344 /// Polygon vertices are drawn as points.</li>
345 /// </ul>
346 ///
348 {
352 
354 };
355 
356 /// \enum HgiCullMode
357 ///
358 /// Controls primitive (faces) culling.
359 ///
360 /// <ul>
361 /// <li>HgiPolygonModeNone:
362 /// No primitive are discarded.</li>
363 /// <li>HgiPolygonModeFront:
364 /// Front-facing primitive are discarded.</li>
365 /// <li>HgiPolygonModeBack:
366 /// Back-facing primitive are discarded.</li>
367 /// <li>HgiPolygonModeFrontAndBack:
368 /// All primitive are discarded.</li>
369 /// </ul>
370 ///
372 {
377 
379 };
380 
381 /// \enum HgiWinding
382 ///
383 /// Determines the front-facing orientation of a primitive (face).
384 ///
385 /// <ul>
386 /// <li>HgiWindingClockwise:
387 /// Primitives with clockwise vertex-order are front facing.</li>
388 /// <li>HgiWindingCounterClockwise:
389 /// Primitives with counter-clockwise vertex-order are front facing.</li>
390 /// </ul>
391 ///
393 {
396 
398 };
399 
400 
401 /// \enum HgiBlendOp
402 ///
403 /// Blend operations
404 ///
406 {
412 
414 };
415 
416 /// \enum HgiBlendFactor
417 ///
418 /// Blend factors
419 ///
421 {
441 
443 };
444 
445 
446 /// \enum HgiCompareFunction
447 ///
448 /// Compare functions.
449 ///
451 {
460 
462 };
463 
465 
466 #endif
HgiSamplerAddressMode
Definition: enums.h:113
HgiPolygonMode
Definition: enums.h:347
HgiCompareFunction
Definition: enums.h:450
HgiAttachmentLoadOp
Definition: enums.h:189
HgiDeviceCapabilitiesBits
Definition: enums.h:45
HgiMipFilter
Definition: enums.h:156
HgiWinding
Definition: enums.h:392
HgiBits HgiDeviceCapabilities
Definition: enums.h:50
HgiBits HgiTextureUsage
Definition: enums.h:107
HgiCullMode
Definition: enums.h:371
HgiAttachmentStoreOp
Definition: enums.h:209
HgiBlendFactor
Definition: enums.h:420
HgiBindResourceType
Definition: enums.h:322
HgiBlendOp
Definition: enums.h:405
HgiPipelineType
Definition: enums.h:291
HgiBufferUsageBits
Definition: enums.h:236
HgiTextureUsageBits
Definition: enums.h:96
HgiTextureType
Definition: enums.h:65
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
HgiBits HgiBufferUsage
Definition: enums.h:245
HgiShaderStageBits
Definition: enums.h:269
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HgiBits HgiShaderStage
Definition: enums.h:278
uint32_t HgiBits
Definition: enums.h:33
HgiSampleCount
Definition: enums.h:169
HgiSamplerFilter
Definition: enums.h:135