All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.NVCooperativeMatrix Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;

/**
 * This extension adds support for using cooperative matrix types in SPIR-V. Cooperative matrix types are medium-sized matrices that are primarily supported in compute shaders, where the storage for the matrix is spread across all invocations in some scope (usually a subgroup) and those invocations cooperate to efficiently perform matrix multiplies.
 * 
 * 

Cooperative matrix types are defined by the {@code SPV_NV_cooperative_matrix} SPIR-V extension and can be used with the {@code GL_NV_cooperative_matrix} GLSL extension.

* *

This extension includes support for enumerating the matrix types and dimensions that are supported by the implementation.

* *
VK_NV_cooperative_matrix
* *
*
Name String
*
{@code VK_NV_cooperative_matrix}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
250
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRGetPhysicalDeviceProperties2 VK_KHR_get_physical_device_properties2}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2019-02-05
*
Interactions and External Dependencies
*
*
Contributors
*
    *
  • Jeff Bolz, NVIDIA
  • *
  • Markus Tavenrath, NVIDIA
  • *
  • Daniel Koch, NVIDIA
  • *
*
*/ public class NVCooperativeMatrix { /** The extension specification version. */ public static final int VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV}
  • *
  • {@link #VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV}
  • *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV}
  • *
*/ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002; /** * VkComponentTypeNV - Specify SPIR-V cooperative matrix component type * *
Description
* *
    *
  • {@link #VK_COMPONENT_TYPE_FLOAT16_NV COMPONENT_TYPE_FLOAT16_NV} corresponds to SPIR-V {@code OpTypeFloat} 16.
  • *
  • {@link #VK_COMPONENT_TYPE_FLOAT32_NV COMPONENT_TYPE_FLOAT32_NV} corresponds to SPIR-V {@code OpTypeFloat} 32.
  • *
  • {@link #VK_COMPONENT_TYPE_FLOAT64_NV COMPONENT_TYPE_FLOAT64_NV} corresponds to SPIR-V {@code OpTypeFloat} 64.
  • *
  • {@link #VK_COMPONENT_TYPE_SINT8_NV COMPONENT_TYPE_SINT8_NV} corresponds to SPIR-V {@code OpTypeInt} 8 1.
  • *
  • {@link #VK_COMPONENT_TYPE_SINT16_NV COMPONENT_TYPE_SINT16_NV} corresponds to SPIR-V {@code OpTypeInt} 16 1.
  • *
  • {@link #VK_COMPONENT_TYPE_SINT32_NV COMPONENT_TYPE_SINT32_NV} corresponds to SPIR-V {@code OpTypeInt} 32 1.
  • *
  • {@link #VK_COMPONENT_TYPE_SINT64_NV COMPONENT_TYPE_SINT64_NV} corresponds to SPIR-V {@code OpTypeInt} 64 1.
  • *
  • {@link #VK_COMPONENT_TYPE_UINT8_NV COMPONENT_TYPE_UINT8_NV} corresponds to SPIR-V {@code OpTypeInt} 8 0.
  • *
  • {@link #VK_COMPONENT_TYPE_UINT16_NV COMPONENT_TYPE_UINT16_NV} corresponds to SPIR-V {@code OpTypeInt} 16 0.
  • *
  • {@link #VK_COMPONENT_TYPE_UINT32_NV COMPONENT_TYPE_UINT32_NV} corresponds to SPIR-V {@code OpTypeInt} 32 0.
  • *
  • {@link #VK_COMPONENT_TYPE_UINT64_NV COMPONENT_TYPE_UINT64_NV} corresponds to SPIR-V {@code OpTypeInt} 64 0.
  • *
* *
See Also
* *

{@link VkCooperativeMatrixPropertiesNV}

*/ public static final int VK_COMPONENT_TYPE_FLOAT16_NV = 0, VK_COMPONENT_TYPE_FLOAT32_NV = 1, VK_COMPONENT_TYPE_FLOAT64_NV = 2, VK_COMPONENT_TYPE_SINT8_NV = 3, VK_COMPONENT_TYPE_SINT16_NV = 4, VK_COMPONENT_TYPE_SINT32_NV = 5, VK_COMPONENT_TYPE_SINT64_NV = 6, VK_COMPONENT_TYPE_UINT8_NV = 7, VK_COMPONENT_TYPE_UINT16_NV = 8, VK_COMPONENT_TYPE_UINT32_NV = 9, VK_COMPONENT_TYPE_UINT64_NV = 10; /** * VkScopeNV - Specify SPIR-V scope * *
Description
* *
    *
  • {@link #VK_SCOPE_DEVICE_NV SCOPE_DEVICE_NV} corresponds to SPIR-V {@code Device} scope.
  • *
  • {@link #VK_SCOPE_WORKGROUP_NV SCOPE_WORKGROUP_NV} corresponds to SPIR-V {@code Workgroup} scope.
  • *
  • {@link #VK_SCOPE_SUBGROUP_NV SCOPE_SUBGROUP_NV} corresponds to SPIR-V {@code Subgroup} scope.
  • *
  • {@link #VK_SCOPE_QUEUE_FAMILY_NV SCOPE_QUEUE_FAMILY_NV} corresponds to SPIR-V {@code QueueFamily} scope.
  • *
* *

All enum values match the corresponding SPIR-V value.

* *
See Also
* *

{@link VkCooperativeMatrixPropertiesNV}

*/ public static final int VK_SCOPE_DEVICE_NV = 1, VK_SCOPE_WORKGROUP_NV = 2, VK_SCOPE_SUBGROUP_NV = 3, VK_SCOPE_QUEUE_FAMILY_NV = 5; protected NVCooperativeMatrix() { throw new UnsupportedOperationException(); } // --- [ vkGetPhysicalDeviceCooperativeMatrixPropertiesNV ] --- /** * Unsafe version of: {@link #vkGetPhysicalDeviceCooperativeMatrixPropertiesNV GetPhysicalDeviceCooperativeMatrixPropertiesNV} * * @param pPropertyCount a pointer to an integer related to the number of cooperative matrix properties available or queried. */ public static int nvkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, long pPropertyCount, long pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; if (CHECKS) { check(__functionAddress); } return callPPPI(physicalDevice.address(), pPropertyCount, pProperties, __functionAddress); } /** * Returns properties describing what cooperative matrix types are supported. * *
C Specification
* *

To enumerate the supported cooperative matrix types and operations, call:

* *

     * VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
     *     VkPhysicalDevice                            physicalDevice,
     *     uint32_t*                                   pPropertyCount,
     *     VkCooperativeMatrixPropertiesNV*            pProperties);
* *
Description
* *

If {@code pProperties} is {@code NULL}, then the number of cooperative matrix properties available is returned in {@code pPropertyCount}. Otherwise, {@code pPropertyCount} must point to a variable set by the user to the number of elements in the {@code pProperties} array, and on return the variable is overwritten with the number of structures actually written to {@code pProperties}. If {@code pPropertyCount} is less than the number of cooperative matrix properties available, at most {@code pPropertyCount} structures will be written, and {@link VK10#VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link VK10#VK_SUCCESS SUCCESS}, to indicate that not all the available cooperative matrix properties were returned.

* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code pPropertyCount} must be a valid pointer to a {@code uint32_t} value
  • *
  • If the value referenced by {@code pPropertyCount} is not 0, and {@code pProperties} is not {@code NULL}, {@code pProperties} must be a valid pointer to an array of {@code pPropertyCount} {@link VkCooperativeMatrixPropertiesNV} structures
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
  • {@link VK10#VK_INCOMPLETE INCOMPLETE}
  • *
*
On failure, this command returns
*
    *
  • {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
*
* *
See Also
* *

{@link VkCooperativeMatrixPropertiesNV}

* * @param physicalDevice the physical device. * @param pPropertyCount a pointer to an integer related to the number of cooperative matrix properties available or queried. * @param pProperties either {@code NULL} or a pointer to an array of {@link VkCooperativeMatrixPropertiesNV} structures. */ @NativeType("VkResult") public static int vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") IntBuffer pPropertyCount, @Nullable @NativeType("VkCooperativeMatrixPropertiesNV *") VkCooperativeMatrixPropertiesNV.Buffer pProperties) { if (CHECKS) { check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount.get(pPropertyCount.position())); } return nvkGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, memAddress(pPropertyCount), memAddressSafe(pProperties)); } /** Array version of: {@link #vkGetPhysicalDeviceCooperativeMatrixPropertiesNV GetPhysicalDeviceCooperativeMatrixPropertiesNV} */ @NativeType("VkResult") public static int vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, @NativeType("uint32_t *") int[] pPropertyCount, @Nullable @NativeType("VkCooperativeMatrixPropertiesNV *") VkCooperativeMatrixPropertiesNV.Buffer pProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; if (CHECKS) { check(__functionAddress); check(pPropertyCount, 1); checkSafe(pProperties, pPropertyCount[0]); } return callPPPI(physicalDevice.address(), pPropertyCount, memAddressSafe(pProperties), __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy