Nebula
Loading...
Searching...
No Matches
vktexture.cc File Reference
#include "vktexture.h"
#include "vktextureview.h"
#include "vkloader.h"
#include "io/stream.h"
#include "vkgraphicsdevice.h"
#include "vktypes.h"
#include "graphics/bindlessregistry.h"
#include "vkcommandbuffer.h"
#include "coregraphics/glfw/glfwwindow.h"

Namespaces

namespace  Vulkan
 Vulkan implementation of GPU acceleration structure.
 
namespace  CoreGraphics
 Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
 

Functions

 N_DECLARE_COUNTER (N_SPARSE_PAGE_MEMORY_COUNTER, Sparse Texture Allocated Memory)
 
const VkImage Vulkan::TextureGetVkImage (const CoreGraphics::TextureId id)
 get Vk image
 
const VkImageView Vulkan::TextureGetVkImageView (const CoreGraphics::TextureId id)
 get vk image view
 
const VkImageView Vulkan::TextureGetVkStencilImageView (const CoreGraphics::TextureId id)
 get vk image view for stencil
 
const VkDevice Vulkan::TextureGetVkDevice (const CoreGraphics::TextureId id)
 get the device created the image
 
void Vulkan::SetupSparse (VkDevice dev, VkImage img, Ids::Id32 sparseExtension, const VkTextureLoadInfo &info)
 
 CoreGraphics::_IMPL_ACQUIRE_RELEASE (TextureId, textureAllocator)
 
void CoreGraphics::SetupTexture (const TextureId id)
 
const TextureId CoreGraphics::CreateTexture (const TextureCreateInfo &info)
 create new vertex buffer with intended usage, access and CPU syncing parameters, together with size of buffer
 
void CoreGraphics::DeleteTexture (const TextureId id)
 
void CoreGraphics::DestroyTexture (const TextureId id)
 destroy vertex buffer
 
Util::StringAtom CoreGraphics::TextureGetName (const TextureId id)
 Get name of texture.
 
TextureDimensions CoreGraphics::TextureGetDimensions (const TextureId id)
 get texture dimensions
 
TextureRelativeDimensions CoreGraphics::TextureGetRelativeDimensions (const TextureId id)
 get texture relative dimensions
 
CoreGraphics::PixelFormat::Code CoreGraphics::TextureGetPixelFormat (const TextureId id)
 get texture pixel format
 
TextureType CoreGraphics::TextureGetType (const TextureId id)
 get texture type
 
SizeT CoreGraphics::TextureGetNumMips (const TextureId id)
 get number of mips
 
SizeT CoreGraphics::TextureGetNumLayers (const TextureId id)
 get number of layers
 
SizeT CoreGraphics::TextureGetNumSamples (const TextureId id)
 get sample count
 
const CoreGraphics::TextureId CoreGraphics::TextureGetAlias (const TextureId id)
 get texture alias, returns invalid id if not aliased
 
const CoreGraphics::TextureUsage CoreGraphics::TextureGetUsage (const TextureId id)
 get texture usage
 
const CoreGraphics::ImageLayout CoreGraphics::TextureGetDefaultLayout (const TextureId id)
 get default texture layout
 
uint CoreGraphics::TextureGetBindlessHandle (const TextureId id)
 get bindless texture handle
 
uint CoreGraphics::TextureGetStencilBindlessHandle (const TextureId id)
 get bindless texture handle
 
void CoreGraphics::TextureWindowResized (const TextureId id)
 If texture is bound to the window resolution, reset the internal texture without mucking with the texture id.
 
TextureSparsePageSize CoreGraphics::TextureSparseGetPageSize (const CoreGraphics::TextureId id)
 get the texture page size, which is constant for the whole texture
 
IndexT CoreGraphics::TextureSparseGetPageIndex (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT x, IndexT y, IndexT z)
 get the page index at a given coordinate
 
const TextureSparsePageCoreGraphics::TextureSparseGetPage (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 get texture page
 
SizeT CoreGraphics::TextureSparseGetNumPages (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 get the number of pages for a given layer and mip
 
IndexT CoreGraphics::TextureSparseGetMaxMip (const CoreGraphics::TextureId id)
 get highest sparse mip
 
void CoreGraphics::TextureSparseEvict (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 evict a page
 
void CoreGraphics::TextureSparseMakeResident (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 make a page resident
 
void CoreGraphics::TextureSparseEvictMip (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 evict a whole mip
 
void CoreGraphics::TextureSparseMakeMipResident (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 make a whole mip resident
 
void CoreGraphics::TextureSparseCommitChanges (const CoreGraphics::TextureId id)
 commit texture sparse page updates
 
void CoreGraphics::TextureSparseUpdate (const CoreGraphics::CmdBufferId cmdBuf, const CoreGraphics::TextureId id, const Math::rectangle< uint > &region, IndexT mip, IndexT layer, const CoreGraphics::TextureId source)
 
void CoreGraphics::TextureSparseUpdate (const CoreGraphics::CmdBufferId cmdBuf, const CoreGraphics::TextureId id, const Math::rectangle< uint > &region, IndexT mip, IndexT layer, char *buf)
 
void CoreGraphics::TextureSparseUpdate (const CoreGraphics::CmdBufferId cmdBuf, const CoreGraphics::TextureId id, IndexT mip, IndexT layer, char *buf)
 
void CoreGraphics::TextureClearColor (const CoreGraphics::CmdBufferId cmd, const CoreGraphics::TextureId id, Math::vec4 color, const CoreGraphics::ImageLayout layout, const CoreGraphics::TextureSubresourceInfo &subres)
 clear texture with color
 
void CoreGraphics::TextureClearDepthStencil (const CoreGraphics::CmdBufferId cmd, const CoreGraphics::TextureId id, float depth, uint stencil, const CoreGraphics::ImageLayout layout, const CoreGraphics::TextureSubresourceInfo &subres)
 clear texture with depth-stencil
 
void CoreGraphics::TextureSetHighestLod (const CoreGraphics::TextureId id, uint lod)
 Set highest LOD on texture.
 

Variables

VkTextureAllocator Vulkan::textureAllocator
 
VkTextureStencilExtensionAllocator Vulkan::textureStencilExtensionAllocator
 
VkTextureSwapExtensionAllocator Vulkan::textureSwapExtensionAllocator
 
VkTextureSparseExtensionAllocator Vulkan::textureSparseExtensionAllocator
 

Function Documentation

◆ N_DECLARE_COUNTER()

N_DECLARE_COUNTER ( N_SPARSE_PAGE_MEMORY_COUNTER ,
Sparse Texture Allocated Memory )