CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GPUMemory.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
12
14
15namespace CeresEngine {
16
21 DeviceLocal = (1u << 0u),
22
25 HostVisible = (1u << 1u),
26
31 HostCoherent = (1u << 2u),
32
37 HostCached = (1u << 3u),
38
44 LazilyAllocated = (1u << 4u),
45
50 ProtectedMemory = (1u << 5u),
51 };
52
54 using GPUMemoryProperties = Flags<GPUMemoryProperty>;
56
59
61 using GPUMemoryData = void*;
62
63} // namespace CeresEngine
#define CE_FLAGS_OPERATORS(Enum)
Defines global operators for a Flags<Enum, Storage> implementation.
Definition Flags.hpp:216
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Definition Application.hpp:19
std::uint64_t UInt64
Definition DataTypes.hpp:26
GPUMemoryProperty
Flag specifying properties for a memory type.
Definition GPUMemory.hpp:18
@ HostCoherent
Specifies that the host cache management commands such as flush and invalidate are not needed to flus...
@ HostCached
Specifies that memory allocated with this type is cached on the host.
@ HostVisible
Specifies that memory allocated with this type can be mapped for host access.
@ DeviceLocal
Specifies that memory allocated with this type is the most efficient for device access.
@ LazilyAllocated
Specifies that the memory type only allows device access to the memory.
@ ProtectedMemory
Specifies that the memory type only allows device access to the memory, and allows protected queue op...
void * GPUMemoryData
A pointer type that represents the memory raw data.
Definition GPUMemory.hpp:61
UInt64 GPUMemorySize
A type that represents a memory size.
Definition GPUMemory.hpp:58
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Flags< GPUMemoryProperty > GPUMemoryProperties
Flag specifying properties for a memory type.
Definition Forward.hpp:103