mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 05:45:46 +00:00
renderer_vulkan/wrapper: Add device memory handle
This commit is contained in:
parent
e84b3a9f71
commit
00c88c7d6d
1 changed files with 15 additions and 0 deletions
|
@ -600,6 +600,21 @@ public:
|
||||||
void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const;
|
void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DeviceMemory : public Handle<VkDeviceMemory, VkDevice, DeviceDispatch> {
|
||||||
|
using Handle<VkDeviceMemory, VkDevice, DeviceDispatch>::Handle;
|
||||||
|
|
||||||
|
public:
|
||||||
|
u8* Map(VkDeviceSize offset, VkDeviceSize size) const {
|
||||||
|
void* data;
|
||||||
|
Check(dld->vkMapMemory(owner, handle, offset, size, 0, &data));
|
||||||
|
return static_cast<u8*>(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Unmap() const noexcept {
|
||||||
|
dld->vkUnmapMemory(owner, handle);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> {
|
class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> {
|
||||||
using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle;
|
using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue