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

org.lwjgl.vulkan.EXTVertexInputDynamicState 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 org.lwjgl.system.*;

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

/**
 * One of the states that contributes to the combinatorial explosion of pipeline state objects that need to be created, is the vertex input binding and attribute descriptions. By allowing them to be dynamic applications may reduce the number of pipeline objects they need to create.
 * 
 * 

This extension adds dynamic state support for what is normally static state in {@link VkPipelineVertexInputStateCreateInfo}.

* *
VK_EXT_vertex_input_dynamic_state
* *
*
Name String
*
{@code VK_EXT_vertex_input_dynamic_state}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
353
*
Revision
*
2
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRGetPhysicalDeviceProperties2 VK_KHR_get_physical_device_properties2}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2020-08-21
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Jeff Bolz, NVIDIA
  • *
  • Spencer Fricke, Samsung
  • *
  • Stu Smith, AMD
  • *
*
*/ public class EXTVertexInputDynamicState { /** The extension specification version. */ public static final int VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION = 2; /** The extension name. */ public static final String VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT}
  • *
*/ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000, VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001, VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002; /** Extends {@code VkDynamicState}. */ public static final int VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000; protected EXTVertexInputDynamicState() { throw new UnsupportedOperationException(); } // --- [ vkCmdSetVertexInputEXT ] --- /** * Unsafe version of: {@link #vkCmdSetVertexInputEXT CmdSetVertexInputEXT} * * @param vertexBindingDescriptionCount the number of vertex binding descriptions provided in {@code pVertexBindingDescriptions}. * @param vertexAttributeDescriptionCount the number of vertex attribute descriptions provided in {@code pVertexAttributeDescriptions}. */ public static void nvkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, int vertexBindingDescriptionCount, long pVertexBindingDescriptions, int vertexAttributeDescriptionCount, long pVertexAttributeDescriptions) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetVertexInputEXT; if (CHECKS) { check(__functionAddress); } callPPPV(commandBuffer.address(), vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions, __functionAddress); } /** * Set the vertex input state dynamically for a command buffer. * *
C Specification
* *

To dynamically set the vertex input attribute and vertex input binding descriptions, call:

* *

     * void vkCmdSetVertexInputEXT(
     *     VkCommandBuffer                             commandBuffer,
     *     uint32_t                                    vertexBindingDescriptionCount,
     *     const VkVertexInputBindingDescription2EXT*  pVertexBindingDescriptions,
     *     uint32_t                                    vertexAttributeDescriptionCount,
     *     const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);
* *
Description
* *

This command sets the vertex input attribute and vertex input binding descriptions state for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_VERTEX_INPUT_EXT DYNAMIC_STATE_VERTEX_INPUT_EXT} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkGraphicsPipelineCreateInfo}{@code ::pVertexInputState} values used to create the currently active pipeline.

* *

If the bound pipeline state object was also created with the {@link EXTExtendedDynamicState#VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT} dynamic state enabled, then {@link EXTExtendedDynamicState#vkCmdBindVertexBuffers2EXT CmdBindVertexBuffers2EXT} can be used instead of {@code vkCmdSetVertexInputEXT} to dynamically set the stride.

* *
Valid Usage
* *
    *
  • The vertexInputDynamicState feature must be enabled
  • *
  • {@code vertexBindingDescriptionCount} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxVertexInputBindings}
  • *
  • {@code vertexAttributeDescriptionCount} must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxVertexInputAttributes}
  • *
  • For every {@code binding} specified by each element of {@code pVertexAttributeDescriptions}, a {@link VkVertexInputBindingDescription2EXT} must exist in {@code pVertexBindingDescriptions} with the same value of {@code binding}
  • *
  • All elements of {@code pVertexBindingDescriptions} must describe distinct binding numbers
  • *
  • All elements of {@code pVertexAttributeDescriptions} must describe distinct attribute locations
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • If {@code vertexBindingDescriptionCount} is not 0, {@code pVertexBindingDescriptions} must be a valid pointer to an array of {@code vertexBindingDescriptionCount} valid {@link VkVertexInputBindingDescription2EXT} structures
  • *
  • If {@code vertexAttributeDescriptionCount} is not 0, {@code pVertexAttributeDescriptions} must be a valid pointer to an array of {@code vertexAttributeDescriptionCount} valid {@link VkVertexInputAttributeDescription2EXT} structures
  • *
  • {@code commandBuffer} must be in the recording state
  • *
  • The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
  • *
* *
Host Synchronization
* *
    *
  • Host access to {@code commandBuffer} must be externally synchronized
  • *
  • Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
  • *
* *
Command Properties
* * * * *
Command Buffer LevelsRender Pass ScopeSupported Queue Types
Primary SecondaryBothGraphics
* *
See Also
* *

{@link VkVertexInputAttributeDescription2EXT}, {@link VkVertexInputBindingDescription2EXT}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param pVertexBindingDescriptions a pointer to an array of {@link VkVertexInputBindingDescription2EXT} structures. * @param pVertexAttributeDescriptions a pointer to an array of {@link VkVertexInputAttributeDescription2EXT} structures. */ public static void vkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, @Nullable @NativeType("VkVertexInputBindingDescription2EXT const *") VkVertexInputBindingDescription2EXT.Buffer pVertexBindingDescriptions, @Nullable @NativeType("VkVertexInputAttributeDescription2EXT const *") VkVertexInputAttributeDescription2EXT.Buffer pVertexAttributeDescriptions) { nvkCmdSetVertexInputEXT(commandBuffer, remainingSafe(pVertexBindingDescriptions), memAddressSafe(pVertexBindingDescriptions), remainingSafe(pVertexAttributeDescriptions), memAddressSafe(pVertexAttributeDescriptions)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy