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

org.lwjgl.vulkan.KHRGetMemoryRequirements2 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 provides new entry points to query memory requirements of images and buffers in a way that can be easily extended by other extensions, without introducing any further entry points. The Vulkan 1.0 {@link VkMemoryRequirements} and {@link VkSparseImageMemoryRequirements} structures do not include a {@code sType}/{@code pNext}, this extension wraps them in new structures with {@code sType}/{@code pNext} so an application can query a chain of memory requirements structures by constructing the chain and letting the implementation fill them in. A new command is added for each ftext:vkGet*MemoryRequrements command in core Vulkan 1.0.
 * 
 * 
*
Name String
*
{@code VK_KHR_get_memory_requirements2}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
147
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
*
Contact
*
    *
  • Jason Ekstrand @jekstrand
  • *
*
Last Modified Date
*
2017-03-23
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Jason Ekstrand, Intel
  • *
  • Jeff Bolz, NVIDIA
  • *
  • Jesse Hall, Google
  • *
*
*/ public class KHRGetMemoryRequirements2 { /** The extension specification version. */ public static final int VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR}
  • *
  • {@link #VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR}
  • *
*/ public static final int VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004; protected KHRGetMemoryRequirements2() { throw new UnsupportedOperationException(); } static boolean isAvailable(VKCapabilitiesDevice caps) { return checkFunctions( caps.vkGetImageMemoryRequirements2KHR, caps.vkGetBufferMemoryRequirements2KHR, caps.vkGetImageSparseMemoryRequirements2KHR ); } // --- [ vkGetImageMemoryRequirements2KHR ] --- /** Unsafe version of: {@link #vkGetImageMemoryRequirements2KHR GetImageMemoryRequirements2KHR} */ public static void nvkGetImageMemoryRequirements2KHR(VkDevice device, long pInfo, long pMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageMemoryRequirements2KHR; if (CHECKS) { check(__functionAddress); } callPPPV(__functionAddress, device.address(), pInfo, pMemoryRequirements); } /** * Returns the memory requirements for specified Vulkan object. * *
C Specification
* *

To determine the memory requirements for an image resource, call:

* *
     * void vkGetImageMemoryRequirements2KHR(
     *     VkDevice                                    device,
     *     const VkImageMemoryRequirementsInfo2KHR*    pInfo,
     *     VkMemoryRequirements2KHR*                   pMemoryRequirements);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pInfo} must be a valid pointer to a valid {@link VkImageMemoryRequirementsInfo2KHR} structure
  • *
  • {@code pMemoryRequirements} must be a valid pointer to a {@link VkMemoryRequirements2KHR} structure
  • *
* *
See Also
* *

{@link VkImageMemoryRequirementsInfo2KHR}, {@link VkMemoryRequirements2KHR}

* * @param device the logical device that owns the image. * @param pInfo a pointer to an instance of the {@link VkImageMemoryRequirementsInfo2KHR} structure containing parameters required for the memory requirements query. * @param pMemoryRequirements points to an instance of the {@link VkMemoryRequirements2KHR} structure in which the memory requirements of the image object are returned. */ public static void vkGetImageMemoryRequirements2KHR(VkDevice device, @NativeType("const VkImageMemoryRequirementsInfo2KHR *") VkImageMemoryRequirementsInfo2KHR pInfo, @NativeType("VkMemoryRequirements2KHR *") VkMemoryRequirements2KHR pMemoryRequirements) { nvkGetImageMemoryRequirements2KHR(device, pInfo.address(), pMemoryRequirements.address()); } // --- [ vkGetBufferMemoryRequirements2KHR ] --- /** Unsafe version of: {@link #vkGetBufferMemoryRequirements2KHR GetBufferMemoryRequirements2KHR} */ public static void nvkGetBufferMemoryRequirements2KHR(VkDevice device, long pInfo, long pMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetBufferMemoryRequirements2KHR; if (CHECKS) { check(__functionAddress); } callPPPV(__functionAddress, device.address(), pInfo, pMemoryRequirements); } /** * Returns the memory requirements for specified Vulkan object. * *
C Specification
* *

To determine the memory requirements for a buffer resource, call:

* *
     * void vkGetBufferMemoryRequirements2KHR(
     *     VkDevice                                    device,
     *     const VkBufferMemoryRequirementsInfo2KHR*   pInfo,
     *     VkMemoryRequirements2KHR*                   pMemoryRequirements);
* *
Valid Usage (Implicit)
* *
    *
  • {@code device} must be a valid {@code VkDevice} handle
  • *
  • {@code pInfo} must be a valid pointer to a valid {@link VkBufferMemoryRequirementsInfo2KHR} structure
  • *
  • {@code pMemoryRequirements} must be a valid pointer to a {@link VkMemoryRequirements2KHR} structure
  • *
* *
See Also
* *

{@link VkBufferMemoryRequirementsInfo2KHR}, {@link VkMemoryRequirements2KHR}

* * @param device the logical device that owns the buffer. * @param pInfo a pointer to an instance of the {@link VkBufferMemoryRequirementsInfo2KHR} structure containing parameters required for the memory requirements query. * @param pMemoryRequirements points to an instance of the {@link VkMemoryRequirements2KHR} structure in which the memory requirements of the buffer object are returned. */ public static void vkGetBufferMemoryRequirements2KHR(VkDevice device, @NativeType("const VkBufferMemoryRequirementsInfo2KHR *") VkBufferMemoryRequirementsInfo2KHR pInfo, @NativeType("VkMemoryRequirements2KHR *") VkMemoryRequirements2KHR pMemoryRequirements) { nvkGetBufferMemoryRequirements2KHR(device, pInfo.address(), pMemoryRequirements.address()); } // --- [ vkGetImageSparseMemoryRequirements2KHR ] --- public static void nvkGetImageSparseMemoryRequirements2KHR(VkDevice device, long pInfo, long pSparseMemoryRequirementCount, long pSparseMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageSparseMemoryRequirements2KHR; if (CHECKS) { check(__functionAddress); } callPPPPV(__functionAddress, device.address(), pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } public static void vkGetImageSparseMemoryRequirements2KHR(VkDevice device, @NativeType("const VkImageSparseMemoryRequirementsInfo2KHR *") VkImageSparseMemoryRequirementsInfo2KHR pInfo, @NativeType("uint32_t *") IntBuffer pSparseMemoryRequirementCount, @Nullable @NativeType("VkSparseImageMemoryRequirements2KHR *") VkSparseImageMemoryRequirements2KHR.Buffer pSparseMemoryRequirements) { if (CHECKS) { check(pSparseMemoryRequirementCount, 1); checkSafe(pSparseMemoryRequirements, pSparseMemoryRequirementCount.get(pSparseMemoryRequirementCount.position())); } nvkGetImageSparseMemoryRequirements2KHR(device, pInfo.address(), memAddress(pSparseMemoryRequirementCount), memAddressSafe(pSparseMemoryRequirements)); } /** Array version of: {@link #vkGetImageSparseMemoryRequirements2KHR GetImageSparseMemoryRequirements2KHR} */ public static void vkGetImageSparseMemoryRequirements2KHR(VkDevice device, @NativeType("const VkImageSparseMemoryRequirementsInfo2KHR *") VkImageSparseMemoryRequirementsInfo2KHR pInfo, @NativeType("uint32_t *") int[] pSparseMemoryRequirementCount, @Nullable @NativeType("VkSparseImageMemoryRequirements2KHR *") VkSparseImageMemoryRequirements2KHR.Buffer pSparseMemoryRequirements) { long __functionAddress = device.getCapabilities().vkGetImageSparseMemoryRequirements2KHR; if (CHECKS) { check(__functionAddress); check(pSparseMemoryRequirementCount, 1); checkSafe(pSparseMemoryRequirements, pSparseMemoryRequirementCount[0]); } callPPPPV(__functionAddress, device.address(), pInfo.address(), pSparseMemoryRequirementCount, memAddressSafe(pSparseMemoryRequirements)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy