Nebula
Loading...
Searching...
No Matches
vktexture.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
15#include "ids/idallocator.h"
16#include "vkmemory.h"
18
19namespace IO
20{
21class Stream;
22};
23
24namespace Vulkan
25{
37
44
46{
47 VkBuffer buf;
48 VkDeviceMemory mem;
49 VkImageCopy region;
50 uint32_t mapCount;
51};
52
58
59enum
60{
64};
65
68 0xFFFF
69 , VkTextureRuntimeInfo // runtime info (for binding)
70 , VkTextureLoadInfo // loading info (mostly used during the load/unload phase)
71 , VkTextureMappingInfo // used when image is mapped to memory
74
75enum
76{
79};
81 0xFFFF
83 , IndexT
86
87enum
88{
90};
92 0xFF
93 , VkTextureSwapInfo
96
104
105enum
106{
114 0xFF
115 , TextureSparsePageTable
116 , VkSparseImageMemoryRequirements
122
124const VkImage TextureGetVkImage(const CoreGraphics::TextureId id);
126const VkImageView TextureGetVkImageView(const CoreGraphics::TextureId id);
128const VkImageView TextureGetVkStencilImageView(const CoreGraphics::TextureId id);
130const VkDevice TextureGetVkDevice(const CoreGraphics::TextureId id);
131
132} // namespace Vulkan
Definition idallocator.h:106
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
TextureType
texture types
Definition texture.h:30
Instances of wrapped stream classes.
Definition orientation.cc:10
uint32_t Id32
Definition id.h:138
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
VkTextureStencilExtensionAllocator textureStencilExtensionAllocator
Definition vktexture.cc:22
const VkDevice TextureGetVkDevice(const CoreGraphics::TextureId id)
get the device created the image
Definition vktexture.cc:59
VkTextureAllocator textureAllocator
Definition vktexture.cc:21
@ TextureExtension_StencilBind
Definition vktexture.h:78
@ TextureExtension_StencilInfo
Definition vktexture.h:77
Ids::IdAllocatorSafe< 0xFF, VkTextureSwapInfo > VkTextureSwapExtensionAllocator
Definition vktexture.h:94
const VkImageView TextureGetVkStencilImageView(const CoreGraphics::TextureId id)
get vk image view for stencil
Definition vktexture.cc:48
@ TextureExtension_SwapInfo
Definition vktexture.h:89
Ids::IdAllocatorSafe< 0xFFFF, CoreGraphics::TextureViewId, IndexT > VkTextureStencilExtensionAllocator
Definition vktexture.h:84
@ TextureExtension_SparseOpaqueBinds
Definition vktexture.h:109
@ TextureExtension_SparsePendingBinds
Definition vktexture.h:110
@ TextureExtension_SparsePageTable
Definition vktexture.h:107
@ TextureExtension_SparseMemoryRequirements
Definition vktexture.h:108
@ TextureExtension_SparseOpaqueAllocs
Definition vktexture.h:111
const VkImageView TextureGetVkImageView(const CoreGraphics::TextureId id)
get vk image view
Definition vktexture.cc:39
VkTextureSwapExtensionAllocator textureSwapExtensionAllocator
Definition vktexture.cc:23
Ids::IdAllocatorSafe< 0xFFFF, VkTextureRuntimeInfo, VkTextureLoadInfo, VkTextureMappingInfo > VkTextureAllocator
we need a thread-safe allocator since it will be used by both the memory and stream pool
Definition vktexture.h:72
const VkImage TextureGetVkImage(const CoreGraphics::TextureId id)
get Vk image
Definition vktexture.cc:30
VkTextureSparseExtensionAllocator textureSparseExtensionAllocator
Definition vktexture.cc:24
Ids::IdAllocatorSafe< 0xFF, TextureSparsePageTable, VkSparseImageMemoryRequirements, Util::Array< VkSparseMemoryBind >, Util::Array< VkSparseImageMemoryBind >, Util::Array< CoreGraphics::Alloc > > VkTextureSparseExtensionAllocator
Definition vktexture.h:120
@ Texture_LoadInfo
Definition vktexture.h:62
@ Texture_MappingInfo
Definition vktexture.h:63
@ Texture_RuntimeInfo
Definition vktexture.h:61
Definition memory.h:41
texture type
Definition texture.h:25
Definition textureview.h:16
Definition window.h:25
Definition vktexture.h:98
Util::FixedArray< Util::FixedArray< Util::Array< CoreGraphics::TextureSparsePage > > > pages
Definition vktexture.h:99
Util::FixedArray< Util::FixedArray< Util::FixedArray< uint32_t > > > bindCounts
Definition vktexture.h:101
Util::FixedArray< Util::FixedArray< Util::Array< VkSparseImageMemoryBind > > > pageBindings
Definition vktexture.h:100
VkMemoryRequirements memoryReqs
Definition vktexture.h:102
Definition vktexture.h:27
Ids::Id32 sparseExtension
Definition vktexture.h:34
CoreGraphics::Alloc mem
Definition vktexture.h:30
Ids::Id32 stencilExtension
Definition vktexture.h:33
VkImage img
Definition vktexture.h:29
CoreGraphics::WindowId window
Definition vktexture.h:35
CoreGraphics::TextureRelativeDimensions relativeDims
Definition vktexture.h:31
Ids::Id32 swapExtension
Definition vktexture.h:32
VkDevice dev
Definition vktexture.h:28
Definition vktexture.h:46
VkImageCopy region
Definition vktexture.h:49
VkDeviceMemory mem
Definition vktexture.h:48
uint32_t mapCount
Definition vktexture.h:50
VkBuffer buf
Definition vktexture.h:47
Definition vktexture.h:39
CoreGraphics::TextureType type
Definition vktexture.h:41
VkImageView view
Definition vktexture.h:40
uint32_t bind
Definition vktexture.h:42
Definition vktexture.h:54
Util::FixedArray< VkImage > swapimages
Definition vktexture.h:55
Util::FixedArray< VkImageView > swapviews
Definition vktexture.h:56
int IndexT
Definition types.h:48