HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_VKImageCreateInfo Class Reference

#include <RV_VKImage.h>

+ Inheritance diagram for RV_VKImageCreateInfo:

Public Member Functions

void setImageType (RV_ImageDim img_type)
 Define if the image is 1D, 2D, or 3D. More...
 
VkImageType getImageType () const
 The Vulkan image type. More...
 
RV_ImageDim getRVImageType () const
 The RV image type. More...
 
void setFormat (VkFormat format)
 Set the vulkan image format. RV. More...
 
VkFormat getFormat () const
 
VkImageSubresourceRange getFullSubRes () const
 Returns a vulkan subresource object for the full image. More...
 
void setSize (int w, int h, int d)
 
int getWidth () const
 
int getHeight () const
 
int getDepth () const
 
void setSamples (int samples)
 Define the number of samples in a multisampled 2D image. More...
 
int getSamples () const
 
void setLayerCount (int count)
 Define the number of layers in a 1D or 2D array. More...
 
int getLayerCount () const
 
void setMaxLevelCount (int count)
 Set the maximum number of mipmap levels. More...
 
int getMaxLevelCount () const
 
int getLevelCount () const
 
void setTextureMagFilter (RV_TextureFilter filter)
 Set the texture filter for texture scales above 1. More...
 
void setTextureMinFilter (RV_TextureFilter filter)
 Set the texture filter for texture scales below 1. More...
 
void setTextureMipMode (RV_TextureMipMode mode)
 Set the mipmapping mode - DISABLED, NEAREST mipmap, or LINEAR blend. More...
 
void setTextureWrap (RV_TextureWrap u, RV_TextureWrap v, RV_TextureWrap w)
 Set the wrapping mode when uv is outside [0,1]:REPEAT,CLAMP,BORDER,MIRROR. More...
 
RV_TextureWrap getTextureWrapU () const
 
RV_TextureWrap getTextureWrapV () const
 
RV_TextureWrap getTextureWrapW () const
 
void setTextureSwizzle (RV_TextureSwizzle r, RV_TextureSwizzle g, RV_TextureSwizzle b, RV_TextureSwizzle a)
 
RV_TextureSwizzle getTextureSwizzleR () const
 
RV_TextureSwizzle getTextureSwizzleG () const
 
RV_TextureSwizzle getTextureSwizzleB () const
 
RV_TextureSwizzle getTextureSwizzleA () const
 
void setUsageAttachmentBit (bool b)
 
bool getUsageAttachmentBit () const
 
void setUsageSampledBit (bool b)
 
bool getUsageSampledBit () const
 
void setUsageStorageBit (bool b)
 
bool getUsageStorageBit () const
 
void setUseLinearTiling (bool use)
 Use linear tiling (true) or optimal tiling. Not all types support linear. More...
 
bool getUseLinearTiling () const
 
void setMemoryType (RV_MemType type)
 
RV_MemType getMemoryType () const
 
void setCompareEnable (bool compare_enable)
 
bool getCompareEnable () const
 
void setCompareOp (RE_ZFunction compare_op)
 
RE_ZFunction getCompareOp () const
 
const VkImageCreateInfogetVkInfo () const
 Access the vulkan creation structure for this image. More...
 
virtual bool fillCreateInfo ()
 
 RV_VKImageCreateInfo ()=default
 
virtual UT_UniquePtr
< RV_VKImageCreateInfo
clone () const
 
virtual ~RV_VKImageCreateInfo ()
 

Protected Member Functions

 RV_VKImageCreateInfo (const RV_VKImageCreateInfo &)=default
 
RV_VKImageCreateInfooperator= (const RV_VKImageCreateInfo &)=delete
 
bool isValidForLinearTiling () const
 
void addNext (VkBaseOutStructure *p)
 
virtual RV_MemType getAllocType (RV_Instance *inst)
 Setup allocation info for memory. More...
 

Protected Attributes

uint32_t mySamples = 0
 
int myMaxLevels = 1
 
bool myUseLinearTiling = false
 
RV_MemType myMemType = RV_MEM_AUTO
 
RV_ImageDim myRVImageType = RV_IMAGE_2D
 
RV_TextureSwizzle myTextureSwizzle [4]
 
fpreal32 myMinLOD = 0.0
 
fpreal32 myMaxLOD = VK_LOD_CLAMP_NONE
 
bool myIsNormalized = false
 
bool myIsTexelSampled = false
 
bool myUsageAttachmentBit = true
 
bool myUsageSampledBit = true
 
bool myUsageStorageBit = false
 
bool myCompareEnable = false
 
RE_ZFunction myCompareOp = RE_ZALWAYS
 
RV_TextureFilter myMagFilterMode = RV_FILTER_LINEAR
 
RV_TextureFilter myMinFilterMode = RV_FILTER_LINEAR
 
RV_TextureMipMode myMipMode = RV_MIPMAP_LINEAR
 
RV_TextureWrap myWrapU = RV_TEX_WRAP_REPEAT
 
RV_TextureWrap myWrapV = RV_TEX_WRAP_REPEAT
 
RV_TextureWrap myWrapW = RV_TEX_WRAP_REPEAT
 
UT_Vector4F myBorderColor = {0.f, 0.f, 0.f, 0.f}
 
VkImageCreateInfo myVkCreateInfo
 

Friends

class RV_VKImage
 

Detailed Description

Class for Setting up Image Info Should be trivially copiable, so it can be duplicated or passed around Once a VkImage is created, it is immutable so changing a parameter means creating a new image

Definition at line 49 of file RV_VKImage.h.

Constructor & Destructor Documentation

RV_VKImageCreateInfo::RV_VKImageCreateInfo ( )
default
virtual RV_VKImageCreateInfo::~RV_VKImageCreateInfo ( )
virtual
RV_VKImageCreateInfo::RV_VKImageCreateInfo ( const RV_VKImageCreateInfo )
protecteddefault

Member Function Documentation

void RV_VKImageCreateInfo::addNext ( VkBaseOutStructure p)
inlineprotected

Extend Image Create Info struct. Used by subclasses to create different types of images

Definition at line 233 of file RV_VKImage.h.

virtual UT_UniquePtr<RV_VKImageCreateInfo> RV_VKImageCreateInfo::clone ( ) const
inlinevirtual

Reimplemented in RV_VKInteropImageCreateInfo.

Definition at line 216 of file RV_VKImage.h.

virtual bool RV_VKImageCreateInfo::fillCreateInfo ( )
virtual

Finalize Create Info struct before being passed to Vulkan API, and perform any final checks. To Be called by Vulkan Image allocate function. Returns false if any checks fail

Reimplemented in RV_VKInteropImageCreateInfo.

virtual RV_MemType RV_VKImageCreateInfo::getAllocType ( RV_Instance inst)
protectedvirtual

Setup allocation info for memory.

Reimplemented in RV_VKInteropImageCreateInfo.

bool RV_VKImageCreateInfo::getCompareEnable ( ) const
inline

Definition at line 196 of file RV_VKImage.h.

RE_ZFunction RV_VKImageCreateInfo::getCompareOp ( ) const
inline

Definition at line 201 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getDepth ( ) const
inline

Definition at line 88 of file RV_VKImage.h.

VkFormat RV_VKImageCreateInfo::getFormat ( ) const
inline

Definition at line 67 of file RV_VKImage.h.

VkImageSubresourceRange RV_VKImageCreateInfo::getFullSubRes ( ) const

Returns a vulkan subresource object for the full image.

int RV_VKImageCreateInfo::getHeight ( ) const
inline

Definition at line 86 of file RV_VKImage.h.

VkImageType RV_VKImageCreateInfo::getImageType ( ) const
inline

The Vulkan image type.

Definition at line 57 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getLayerCount ( ) const
inline

Definition at line 106 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getLevelCount ( ) const
inline

Definition at line 118 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getMaxLevelCount ( ) const
inline

Definition at line 115 of file RV_VKImage.h.

RV_MemType RV_VKImageCreateInfo::getMemoryType ( ) const
inline

Definition at line 191 of file RV_VKImage.h.

RV_ImageDim RV_VKImageCreateInfo::getRVImageType ( ) const
inline

The RV image type.

Definition at line 59 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getSamples ( ) const
inline

Definition at line 97 of file RV_VKImage.h.

RV_TextureSwizzle RV_VKImageCreateInfo::getTextureSwizzleA ( ) const
inline

Definition at line 165 of file RV_VKImage.h.

RV_TextureSwizzle RV_VKImageCreateInfo::getTextureSwizzleB ( ) const
inline

Definition at line 163 of file RV_VKImage.h.

RV_TextureSwizzle RV_VKImageCreateInfo::getTextureSwizzleG ( ) const
inline

Definition at line 161 of file RV_VKImage.h.

RV_TextureSwizzle RV_VKImageCreateInfo::getTextureSwizzleR ( ) const
inline

Definition at line 159 of file RV_VKImage.h.

RV_TextureWrap RV_VKImageCreateInfo::getTextureWrapU ( ) const
inline

Definition at line 139 of file RV_VKImage.h.

RV_TextureWrap RV_VKImageCreateInfo::getTextureWrapV ( ) const
inline

Definition at line 141 of file RV_VKImage.h.

RV_TextureWrap RV_VKImageCreateInfo::getTextureWrapW ( ) const
inline

Definition at line 143 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::getUsageAttachmentBit ( ) const
inline

Definition at line 170 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::getUsageSampledBit ( ) const
inline

Definition at line 175 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::getUsageStorageBit ( ) const
inline

Definition at line 180 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::getUseLinearTiling ( ) const
inline

Definition at line 186 of file RV_VKImage.h.

const VkImageCreateInfo* RV_VKImageCreateInfo::getVkInfo ( ) const
inline

Access the vulkan creation structure for this image.

Definition at line 205 of file RV_VKImage.h.

int RV_VKImageCreateInfo::getWidth ( ) const
inline

Definition at line 84 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::isValidForLinearTiling ( ) const
protected
RV_VKImageCreateInfo& RV_VKImageCreateInfo::operator= ( const RV_VKImageCreateInfo )
protecteddelete
void RV_VKImageCreateInfo::setCompareEnable ( bool  compare_enable)
inline

Definition at line 194 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setCompareOp ( RE_ZFunction  compare_op)
inline

Definition at line 199 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setFormat ( VkFormat  format)
inline

Set the vulkan image format. RV.

Definition at line 66 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setImageType ( RV_ImageDim  img_type)

Define if the image is 1D, 2D, or 3D.

void RV_VKImageCreateInfo::setLayerCount ( int  count)
inline

Define the number of layers in a 1D or 2D array.

Definition at line 101 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setMaxLevelCount ( int  count)
inline

Set the maximum number of mipmap levels.

Definition at line 110 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setMemoryType ( RV_MemType  type)
inline

Definition at line 189 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setSamples ( int  samples)
inline

Define the number of samples in a multisampled 2D image.

Definition at line 92 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setSize ( int  w,
int  h,
int  d 
)
inline

Defines the size of the image (width, height, depth). 1D and 2D images ignore some of the sizes.

Definition at line 74 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setTextureMagFilter ( RV_TextureFilter  filter)
inline

Set the texture filter for texture scales above 1.

Definition at line 126 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setTextureMinFilter ( RV_TextureFilter  filter)
inline

Set the texture filter for texture scales below 1.

Definition at line 129 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setTextureMipMode ( RV_TextureMipMode  mode)
inline

Set the mipmapping mode - DISABLED, NEAREST mipmap, or LINEAR blend.

Definition at line 132 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setTextureSwizzle ( RV_TextureSwizzle  r,
RV_TextureSwizzle  g,
RV_TextureSwizzle  b,
RV_TextureSwizzle  a 
)
inline

Set the texture swizzle for each component, when sampled in a shader Cannot be combined with storage images or framebuffer attachment images

Definition at line 148 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setTextureWrap ( RV_TextureWrap  u,
RV_TextureWrap  v,
RV_TextureWrap  w 
)
inline

Set the wrapping mode when uv is outside [0,1]:REPEAT,CLAMP,BORDER,MIRROR.

Definition at line 136 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setUsageAttachmentBit ( bool  b)
inline

Definition at line 168 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setUsageSampledBit ( bool  b)
inline

Definition at line 173 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setUsageStorageBit ( bool  b)
inline

Definition at line 178 of file RV_VKImage.h.

void RV_VKImageCreateInfo::setUseLinearTiling ( bool  use)
inline

Use linear tiling (true) or optimal tiling. Not all types support linear.

Definition at line 184 of file RV_VKImage.h.

Friends And Related Function Documentation

friend class RV_VKImage
friend

Definition at line 296 of file RV_VKImage.h.

Member Data Documentation

UT_Vector4F RV_VKImageCreateInfo::myBorderColor = {0.f, 0.f, 0.f, 0.f}
protected

Definition at line 275 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myCompareEnable = false
protected

Definition at line 267 of file RV_VKImage.h.

RE_ZFunction RV_VKImageCreateInfo::myCompareOp = RE_ZALWAYS
protected

Definition at line 268 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myIsNormalized = false
protected

Definition at line 262 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myIsTexelSampled = false
protected

Definition at line 263 of file RV_VKImage.h.

RV_TextureFilter RV_VKImageCreateInfo::myMagFilterMode = RV_FILTER_LINEAR
protected

Definition at line 269 of file RV_VKImage.h.

int RV_VKImageCreateInfo::myMaxLevels = 1
protected

Definition at line 246 of file RV_VKImage.h.

fpreal32 RV_VKImageCreateInfo::myMaxLOD = VK_LOD_CLAMP_NONE
protected

Definition at line 261 of file RV_VKImage.h.

RV_MemType RV_VKImageCreateInfo::myMemType = RV_MEM_AUTO
protected

Definition at line 249 of file RV_VKImage.h.

RV_TextureFilter RV_VKImageCreateInfo::myMinFilterMode = RV_FILTER_LINEAR
protected

Definition at line 270 of file RV_VKImage.h.

fpreal32 RV_VKImageCreateInfo::myMinLOD = 0.0
protected

Definition at line 260 of file RV_VKImage.h.

RV_TextureMipMode RV_VKImageCreateInfo::myMipMode = RV_MIPMAP_LINEAR
protected

Definition at line 271 of file RV_VKImage.h.

RV_ImageDim RV_VKImageCreateInfo::myRVImageType = RV_IMAGE_2D
protected

Definition at line 250 of file RV_VKImage.h.

uint32_t RV_VKImageCreateInfo::mySamples = 0
protected

Definition at line 245 of file RV_VKImage.h.

RV_TextureSwizzle RV_VKImageCreateInfo::myTextureSwizzle[4]
protected
Initial value:

Definition at line 251 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myUsageAttachmentBit = true
protected

Definition at line 264 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myUsageSampledBit = true
protected

Definition at line 265 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myUsageStorageBit = false
protected

Definition at line 266 of file RV_VKImage.h.

bool RV_VKImageCreateInfo::myUseLinearTiling = false
protected

Definition at line 248 of file RV_VKImage.h.

VkImageCreateInfo RV_VKImageCreateInfo::myVkCreateInfo
protected
RV_TextureWrap RV_VKImageCreateInfo::myWrapU = RV_TEX_WRAP_REPEAT
protected

Definition at line 272 of file RV_VKImage.h.

RV_TextureWrap RV_VKImageCreateInfo::myWrapV = RV_TEX_WRAP_REPEAT
protected

Definition at line 273 of file RV_VKImage.h.

RV_TextureWrap RV_VKImageCreateInfo::myWrapW = RV_TEX_WRAP_REPEAT
protected

Definition at line 274 of file RV_VKImage.h.


The documentation for this class was generated from the following file: