Nebula
Loading...
Searching...
No Matches
gpubuffertypes.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "resources/resource.h"
12
13//------------------------------------------------------------------------------
14namespace CoreGraphics
15{
16namespace GpuBufferTypes
17{
19 enum Usage
20 {
21 UsageImmutable, //> read only on GPU, upload once on CPU, never read back
22 UsageDynamic, //> same as immutable, except supports multiple CPU uploads
23 UsageCpu, //> same as dynamic, but can also be read by CPU
24 };
25
26 // cpu access flags
27 enum Access
28 {
29 AccessNone = 0, // CPU does not require access to the resource (best)
30 AccessWrite = 1, // CPU has write access
31 AccessRead = 2, // CPU has read access
32 AccessReadWrite = AccessWrite + AccessRead, // CPU has read/write access
33 };
34
35 // mapping types
37 {
38 MapRead = 1, // gain read access, must be UsageDynamic and AccessRead
39 MapWrite = 2, // gain write access, must be UsageDynamic and AccessWrite
40 MapReadWrite = MapRead + MapWrite, // gain read/write access, must be UsageDynamic and AccessReadWrite
41 MapWriteDiscard = 4, // gain write access, discard previous content, must be UsageDynamic and AccessWrite
42 MapWriteNoOverwrite = 8, // gain write access, must be UsageDynamic and AccessWrite, see D3D10 docs for details
43 };
44
50};
51
52} // namespace CoreGraphics
53//------------------------------------------------------------------------------
Usage
resource usage flags
Definition gpubuffertypes.h:20
@ UsageCpu
Definition gpubuffertypes.h:23
@ UsageDynamic
Definition gpubuffertypes.h:22
@ UsageImmutable
Definition gpubuffertypes.h:21
Access
Definition gpubuffertypes.h:28
@ AccessWrite
Definition gpubuffertypes.h:30
@ AccessReadWrite
Definition gpubuffertypes.h:32
@ AccessRead
Definition gpubuffertypes.h:31
@ AccessNone
Definition gpubuffertypes.h:29
MapType
Definition gpubuffertypes.h:37
@ MapWriteNoOverwrite
Definition gpubuffertypes.h:42
@ MapRead
Definition gpubuffertypes.h:38
@ MapWriteDiscard
Definition gpubuffertypes.h:41
@ MapWrite
Definition gpubuffertypes.h:39
@ MapReadWrite
Definition gpubuffertypes.h:40
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
Definition gpubuffertypes.h:46
CoreGraphics::GpuBufferTypes::Usage usage
Definition gpubuffertypes.h:47
CoreGraphics::GpuBufferTypes::Access access
Definition gpubuffertypes.h:48