Class VulkanCaps

java.lang.Object
icyllis.arc3d.engine.Caps
icyllis.arc3d.vulkan.VulkanCaps

public class VulkanCaps extends Caps
  • Constructor Details

    • VulkanCaps

      public VulkanCaps(ContextOptions options, org.lwjgl.vulkan.VkPhysicalDevice physDev, int physicalDeviceVersion, org.lwjgl.vulkan.VkPhysicalDeviceFeatures2 deviceFeatures2, org.lwjgl.vulkan.VKCapabilitiesInstance capabilitiesInstance, org.lwjgl.vulkan.VKCapabilitiesDevice capabilitiesDevice)
  • Method Details

    • hasUnifiedMemory

      public boolean hasUnifiedMemory()
    • isFormatTexturable

      public boolean isFormatTexturable(BackendFormat format)
      Description copied from class: Caps
      Can a texture be made with the BackendFormat, and then be bound and sampled in a shader. It must be a color format, you cannot pass a stencil format here.

      For OpenGL: Formats that deprecated in core profile are not supported; Compressed formats from extensions are uncertain; Others are always supported.

      Specified by:
      isFormatTexturable in class Caps
    • getMaxRenderTargetSampleCount

      public int getMaxRenderTargetSampleCount(BackendFormat format)
      Description copied from class: Caps
      Returns the maximum supported sample count for a format. 0 means the format is not renderable 1 means the format is renderable but doesn't support MSAA.
      Specified by:
      getMaxRenderTargetSampleCount in class Caps
    • isFormatRenderable

      public boolean isFormatRenderable(int colorType, BackendFormat format, int sampleCount)
      Specified by:
      isFormatRenderable in class Caps
    • isFormatRenderable

      public boolean isFormatRenderable(BackendFormat format, int sampleCount)
      Specified by:
      isFormatRenderable in class Caps
    • getRenderTargetSampleCount

      public int getRenderTargetSampleCount(int sampleCount, BackendFormat format)
      Description copied from class: Caps
      Find a sample count greater than or equal to the requested count which is supported for a render target of the given format or 0 if no such sample count is supported. If the requested sample count is 1 then 1 will be returned if non-MSAA rendering is supported, otherwise 0.
      Specified by:
      getRenderTargetSampleCount in class Caps
      Parameters:
      sampleCount - requested samples
    • getSupportedWriteColorType

      public long getSupportedWriteColorType(int dstColorType, ImageDesc dstDesc, int srcColorType)
      Description copied from class: Caps
      Given a dst pixel config and a src color type what color type must the caller coax the data into in order to use writePixels().

      Low 32bits - colorType ((int) value). High 32bits - transferOffsetAlignment (value >>> 32). If the write is occurring using transferPixelsTo() then this provides the minimum alignment of the offset into the transfer buffer.

      Specified by:
      getSupportedWriteColorType in class Caps
    • onSupportedReadColorType

      protected long onSupportedReadColorType(int srcColorType, BackendFormat srcFormat, int dstColorType)
      Specified by:
      onSupportedReadColorType in class Caps
    • onFormatCompatible

      protected boolean onFormatCompatible(int colorType, BackendFormat format)
      Specified by:
      onFormatCompatible in class Caps
    • getDefaultColorImageDesc

      public @Nullable ImageDesc getDefaultColorImageDesc(int imageType, int colorType, int width, int height, int depthOrArraySize, int mipLevelCount, int sampleCount, int imageFlags)
      Overrides:
      getDefaultColorImageDesc in class Caps
      Parameters:
      imageType -
      colorType -
      width -
      height -
      depthOrArraySize -
      mipLevelCount -
      sampleCount -
      imageFlags -
      Returns:
      See Also:
    • onGetDefaultBackendFormat

      protected @Nullable BackendFormat onGetDefaultBackendFormat(int colorType)
      Specified by:
      onGetDefaultBackendFormat in class Caps
    • getCompressedBackendFormat

      public @Nullable BackendFormat getCompressedBackendFormat(int compressionType)
      Specified by:
      getCompressedBackendFormat in class Caps
    • makeGraphicsPipelineKey

      public @NonNull PipelineKey makeGraphicsPipelineKey(PipelineKey old, PipelineDesc pipelineDesc, RenderPassDesc renderPassDesc)
      Specified by:
      makeGraphicsPipelineKey in class Caps
    • onGetReadSwizzle

      protected short onGetReadSwizzle(ImageDesc desc, int colorType)
      Specified by:
      onGetReadSwizzle in class Caps
    • getWriteSwizzle

      public short getWriteSwizzle(ImageDesc desc, int colorType)
      Specified by:
      getWriteSwizzle in class Caps
    • computeImageKey

      public IResourceKey computeImageKey(ImageDesc desc, IResourceKey recycle)
      Specified by:
      computeImageKey in class Caps