Package icyllis.arc3d.vulkan

# Class VulkanCaps

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

public class VulkanCaps extends Caps

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.engine.Caps

  `Caps.BlendEquationSupport`

- ## Field Summary

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

  `mAnisotropySupport, MAX_COLOR_TARGETS, MAX_VERTEX_ATTRIBUTES, MAX_VERTEX_BINDINGS, mBlendEquationSupport, mClampToBorderSupport, mConservativeRasterSupport, mDepthClipNegativeOneToOne, mDriverBugWorkarounds, mDynamicStateArrayGeometryProcessorTextureSupport, mGpuTracingSupport, mInternalMultisampleCount, mMapBufferFlags, mMaxColorAttachments, mMaxPreferredRenderTargetSize, mMaxPushConstantsSize, mMaxRenderTargetSize, mMaxTextureSize, mMaxVertexAttributes, mMaxVertexBindings, mMinStorageBufferOffsetAlignment, mMinUniformBufferOffsetAlignment, mMustSyncGpuDuringDiscard, mShaderCaps, mTextureBarrierSupport, mTransferPixelsToRowBytesSupport, mUseCpuStagingBuffers`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `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 Summary

  Modifier and Type
  Method
  Description
  `IResourceKey`
  `computeImageKey(ImageDesc desc, IResourceKey recycle)`
  `BackendFormat`
  `getCompressedBackendFormat(int compressionType)`
  `ImageDesc`
  `getDefaultColorImageDesc(int imageType, int colorType, int width, int height, int depthOrArraySize, int mipLevelCount, int sampleCount, int imageFlags)`
  `int`
  `getMaxRenderTargetSampleCount(BackendFormat format)`
  Returns the maximum supported sample count for a format.
  `int`
  `getRenderTargetSampleCount(int sampleCount, BackendFormat format)`
  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.
  `long`
  `getSupportedWriteColorType(int dstColorType, ImageDesc dstDesc, int srcColorType)`
  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().
  `short`
  `getWriteSwizzle(ImageDesc desc, int colorType)`
  `boolean`
  `hasUnifiedMemory()`
  `boolean`
  `isFormatRenderable(int colorType, BackendFormat format, int sampleCount)`
  `boolean`
  `isFormatRenderable(BackendFormat format, int sampleCount)`
  `boolean`
  `isFormatTexturable(BackendFormat format)`
  Can a texture be made with the BackendFormat, and then be bound and sampled in a shader.
  `PipelineKey_old`
  `makeDesc(PipelineKey_old desc, GpuRenderTarget renderTarget, GraphicsPipelineDesc_Old graphicsPipelineDesc)`
  `PipelineKey`
  `makeGraphicsPipelineKey(PipelineKey old, PipelineDesc pipelineDesc, RenderPassDesc renderPassDesc)`
  `protected boolean`
  `onFormatCompatible(int colorType, BackendFormat format)`
  `protected BackendFormat`
  `onGetDefaultBackendFormat(int colorType)`
  `protected short`
  `onGetReadSwizzle(ImageDesc desc, int colorType)`
  `protected long`
  `onSupportedReadColorType(int srcColorType, BackendFormat srcFormat, int dstColorType)`

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

  `advancedBlendEquationSupport, advancedCoherentBlendEquationSupport, avoidLargeIndexBufferDraws, avoidStencilBuffers, avoidWritePixelsFastPath, blendEquationSupport, clampToBorderSupport, conservativeRasterSupport, crossContextTextureSupport, depthClipNegativeOneToOne, discardStencilValuesAfterRenderPass, drawInstancedSupport, dynamicStateArrayGeometryProcessorTextureSupport, fenceSyncSupport, finishInitialization, getDefaultBackendFormat, getDefaultColorImageDesc, getDefaultDepthStencilImageDesc, getImageDescForSampledCopy, getInternalMultisampleCount, getReadSwizzle, getSupportedReadColorType, gpuTracingSupport, halfFloatVertexAttributeSupport, hasAnisotropySupport, isFormatCompatible, maxColorAttachments, maxPreferredRenderTargetSize, maxPushConstantsSize, maxRenderTargetSize, maxTextureSize, maxVertexAttributes, maxVertexBindings, minStorageBufferOffsetAlignment, minUniformBufferOffsetAlignment, mipmapSupport, msaaResolvesAutomatically, mustClearUploadedBufferData, mustSyncGpuDuringDiscard, nativeDrawIndexedIndirectIsBroken, npotTextureTileSupport, onApplyOptionsOverrides, oversizedStencilSupport, performColorClearsAsDraws, performPartialClearsAsDraws, performStencilClearsAsDraws, preferClientSideDynamicBuffers, preferDiscardableMSAAAttachment, preferFullscreenClears, preferVRAMUseOverFlushes, readPixelsRowBytesSupport, reducedShaderMode, requiresManualFBBarrierAfterTessellatedStencilDraw, reuseScratchBuffers, reuseScratchTextures, sampleLocationsSupport, semaphoreSupport, shaderCaps, shouldCollapseSrcOverToSrcWhenAble, shouldInitializeTextures, supportsTextureBarrier, textureBarrierSupport, transferBufferAlignment, transferFromBufferToTextureSupport, transferFromSurfaceToBufferSupport, transferPixelsToRowBytesSupport, twoSidedStencilRefsAndMasksMustMatch, useCpuStagingBuffers, usePrimitiveRestart, validateAttachmentParams, validateSurfaceParams, wireframeSupport, workarounds, writePixelsRowBytesSupport`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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

    @Nullable public 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:
      - `ISurface.FLAG_MIPMAPPED`
      - `ISurface.FLAG_SAMPLED_IMAGE`
      - `ISurface.FLAG_STORAGE_IMAGE`
      - `ISurface.FLAG_RENDERABLE`
      - `ISurface.FLAG_MEMORYLESS`
      - `ISurface.FLAG_PROTECTED`

  - ### onGetDefaultBackendFormat

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

  - ### getCompressedBackendFormat

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

  - ### makeDesc

    @Nonnull public PipelineKey_old makeDesc(PipelineKey_old desc, GpuRenderTarget renderTarget, GraphicsPipelineDesc_Old graphicsPipelineDesc)
    Specified by:
      `makeDesc` in class `Caps`

  - ### makeGraphicsPipelineKey

    @Nonnull public 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`