Package icyllis.arc3d.vulkan

# Class VulkanImageDesc

java.lang.Object
icyllis.arc3d.engine.ImageDesc
icyllis.arc3d.vulkan.VulkanImageDesc

public final class VulkanImageDesc extends ImageDesc
Descriptor to create Vulkan images.

When wrapping a `BackendImage` or `BackendRenderTarget`, the

invalid reference

    #mCurrentQueueFamily

should either be
invalid reference

    VKUtil#VK_QUEUE_FAMILY_IGNORED

,
invalid reference

    VKUtil#VK_QUEUE_FAMILY_EXTERNAL

, or `EXTQueueFamilyForeign.VK_QUEUE_FAMILY_FOREIGN_EXT`. If `mSharingMode` is
invalid reference

    VKUtil#VK_SHARING_MODE_EXCLUSIVE

, then
invalid reference

    #mCurrentQueueFamily

can also be the graphics queue index passed into pipeline.

When importing external memory,

invalid reference

    #mMemoryHandle

is POSIX file descriptor or Win32 NT handle (though `HANDLE` is defined as `void*`, we can safely truncate it because Win32 handles are 32-bit significant). If it is an NT handle, it must be released manually by the memory exporter (e.g. Vulkan).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `mFormat`
  `final int`
  `mImageTiling`
  `final int`
  `mImageUsageFlags`
  `final int`
  `mSharingMode`
  `final int`
  `mVkFlags`
  `final int`
  `mVkImageType`

  ### Fields inherited from class icyllis.arc3d.engine.ImageDesc

  `mArraySize, mDepth, mFlags, mHeight, mImageType, mMipLevelCount, mSampleCount, mWidth`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VulkanImageDesc(int vkFlags, int vkImageType, int format, int imageTiling, int imageUsageFlags, int sharingMode, int imageType, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `getBackend()`
  `int`
  `getBytesPerBlock()`
  `int`
  `getChannelFlags()`
  Gets the channels present in the format as a bitfield of ColorChannelFlag values.
  `int`
  `getCompressionType()`
  `int`
  `getDepthBits()`
  `int`
  `getStencilBits()`
  `int`
  `getVkFormat()`
  If the backend API is Vulkan this gets the format as a VkFormat.
  `int`
  `hashCode()`
  `boolean`
  `isSRGB()`
  `String`
  `toString()`

  ### Methods inherited from class icyllis.arc3d.engine.ImageDesc

  `getArraySize, getDepth, getGLFormat, getHeight, getImageType, getMipLevelCount, getSampleCount, getWidth, isCompressed, isMipmapped, isMultisampled, isProtected, isRenderable, isSampledImage, isStorageImage`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### mVkFlags

    public final int mVkFlags

  - ### mVkImageType

    public final int mVkImageType

  - ### mFormat

    public final int mFormat

  - ### mImageTiling

    public final int mImageTiling

  - ### mImageUsageFlags

    public final int mImageUsageFlags

  - ### mSharingMode

    public final int mSharingMode

- ## Constructor Details

  - ### VulkanImageDesc

    public VulkanImageDesc(int vkFlags, int vkImageType, int format, int imageTiling, int imageUsageFlags, int sharingMode, int imageType, int width, int height, int depth, int arraySize, int mipLevelCount, int sampleCount, int flags)

- ## Method Details

  - ### getBackend

    public int getBackend()
    Specified by:
      `getBackend` in class `ImageDesc`
    Returns:
      see `Engine.BackendApi`

  - ### getVkFormat

    public int getVkFormat()
    Description copied from class: `ImageDesc`
    If the backend API is Vulkan this gets the format as a VkFormat.
    Overrides:
      `getVkFormat` in class `ImageDesc`

  - ### getChannelFlags

    public int getChannelFlags()
    Description copied from class: `ImageDesc`
    Gets the channels present in the format as a bitfield of ColorChannelFlag values.
    Overrides:
      `getChannelFlags` in class `ImageDesc`
    See Also:
      - `Color.COLOR_CHANNEL_FLAGS_RGBA`

  - ### isSRGB

    public boolean isSRGB()
    Overrides:
      `isSRGB` in class `ImageDesc`

  - ### getCompressionType

    public int getCompressionType()
    Overrides:
      `getCompressionType` in class `ImageDesc`
    See Also:
      - `ColorInfo.COMPRESSION_NONE`

  - ### getBytesPerBlock

    public int getBytesPerBlock()
    Overrides:
      `getBytesPerBlock` in class `ImageDesc`
    Returns:
      if compressed, bytes per block, otherwise bytes per pixel

  - ### getDepthBits

    public int getDepthBits()
    Overrides:
      `getDepthBits` in class `ImageDesc`

  - ### getStencilBits

    public int getStencilBits()
    Overrides:
      `getStencilBits` in class `ImageDesc`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`