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

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

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

/**
 * This extension allows an application to modify the locations of samples within a pixel used in rasterization. Additionally, it allows applications to specify different sample locations for each pixel in a group of adjacent pixels, which can increase antialiasing quality (particularly if a custom resolve shader is used that takes advantage of these different locations).
 * 
 * 

It is common for implementations to optimize the storage of depth values by storing values that can be used to reconstruct depth at each sample location, rather than storing separate depth values for each sample. For example, the depth values from a single triangle may be represented using plane equations. When the depth value for a sample is needed, it is automatically evaluated at the sample location. Modifying the sample locations causes the reconstruction to no longer evaluate the same depth values as when the samples were originally generated, thus the depth aspect of a depth/stencil attachment must be cleared before rendering to it using different sample locations.

* *

Some implementations may need to evaluate depth image values while performing image layout transitions. To accommodate this, instances of the {@link VkSampleLocationsInfoEXT} structure can be specified for each situation where an explicit or automatic layout transition has to take place. {@link VkSampleLocationsInfoEXT} can be chained from {@link VkImageMemoryBarrier} structures to provide sample locations for layout transitions performed by {@link VK10#vkCmdWaitEvents CmdWaitEvents} and {@link VK10#vkCmdPipelineBarrier CmdPipelineBarrier} calls, and {@link VkRenderPassSampleLocationsBeginInfoEXT} can be chained from {@link VkRenderPassBeginInfo} to provide sample locations for layout transitions performed implicitly by a render pass instance.

* *
VK_EXT_sample_locations
* *
*
Name String
*
{@code VK_EXT_sample_locations}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
144
*
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
*
2017-08-02
*
Contributors
*
    *
  • Mais Alnasser, AMD
  • *
  • Matthaeus G. Chajdas, AMD
  • *
  • Maciej Jesionowski, AMD
  • *
  • Daniel Rakos, AMD
  • *
  • Slawomir Grajewski, Intel
  • *
  • Jeff Bolz, NVIDIA
  • *
  • Bill Licea-Kane, Qualcomm
  • *
*
*/ public class EXTSampleLocations { /** The extension specification version. */ public static final int VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; /** Extends {@code VkImageCreateFlagBits}. */ public static final int VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x1000; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT}
  • *
  • {@link #VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT}
  • *
*/ public static final int VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000, VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004; /** Extends {@code VkDynamicState}. */ public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000; protected EXTSampleLocations() { throw new UnsupportedOperationException(); } // --- [ vkCmdSetSampleLocationsEXT ] --- /** Unsafe version of: {@link #vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT} */ public static void nvkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, long pSampleLocationsInfo) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetSampleLocationsEXT; if (CHECKS) { check(__functionAddress); VkSampleLocationsInfoEXT.validate(pSampleLocationsInfo); } callPPV(commandBuffer.address(), pSampleLocationsInfo, __functionAddress); } /** * Set sample locations dynamically for a command buffer. * *
C Specification
* *

To dynamically set the sample locations used for rasterization, call:

* *

     * void vkCmdSetSampleLocationsEXT(
     *     VkCommandBuffer                             commandBuffer,
     *     const VkSampleLocationsInfoEXT*             pSampleLocationsInfo);
* *
Description
* *

This command sets the custom sample locations for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}, and when the {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsEnable} property of the bound graphics pipeline is {@link VK10#VK_TRUE TRUE}. Otherwise, this state is specified by the {@link VkPipelineSampleLocationsStateCreateInfoEXT}{@code ::sampleLocationsInfo} values used to create the currently active pipeline.

* *
Valid Usage
* *
    *
  • The {@code sampleLocationsPerPixel} member of {@code pSampleLocationsInfo} must equal the {@code rasterizationSamples} member of the {@link VkPipelineMultisampleStateCreateInfo} structure the bound graphics pipeline has been created with
  • *
  • If {@link VkPhysicalDeviceSampleLocationsPropertiesEXT}{@code ::variableSampleLocations} is {@link VK10#VK_FALSE FALSE} then the current render pass must have been begun by specifying a {@link VkRenderPassSampleLocationsBeginInfoEXT} structure whose {@code pPostSubpassSampleLocations} member contains an element with a {@code subpassIndex} matching the current subpass index and the {@code sampleLocationsInfo} member of that element must match the sample locations state pointed to by {@code pSampleLocationsInfo}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code pSampleLocationsInfo} must be a valid pointer to a valid {@link VkSampleLocationsInfoEXT} structure
  • *
  • {@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 VkSampleLocationsInfoEXT}

* * @param commandBuffer the command buffer into which the command will be recorded. * @param pSampleLocationsInfo the sample locations state to set. */ public static void vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, @NativeType("VkSampleLocationsInfoEXT const *") VkSampleLocationsInfoEXT pSampleLocationsInfo) { nvkCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo.address()); } // --- [ vkGetPhysicalDeviceMultisamplePropertiesEXT ] --- /** Unsafe version of: {@link #vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT} */ public static void nvkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties) { long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceMultisamplePropertiesEXT; if (CHECKS) { check(__functionAddress); } callPPV(physicalDevice.address(), samples, pMultisampleProperties, __functionAddress); } /** * Report sample count specific multisampling capabilities of a physical device. * *
C Specification
* *

To query additional multisampling capabilities which may be supported for a specific sample count, beyond the minimum capabilities described for Limits above, call:

* *

     * void vkGetPhysicalDeviceMultisamplePropertiesEXT(
     *     VkPhysicalDevice                            physicalDevice,
     *     VkSampleCountFlagBits                       samples,
     *     VkMultisamplePropertiesEXT*                 pMultisampleProperties);
* *
Valid Usage (Implicit)
* *
    *
  • {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
  • *
  • {@code samples} must be a valid {@code VkSampleCountFlagBits} value
  • *
  • {@code pMultisampleProperties} must be a valid pointer to a {@link VkMultisamplePropertiesEXT} structure
  • *
* *
See Also
* *

{@link VkMultisamplePropertiesEXT}

* * @param physicalDevice the physical device from which to query the additional multisampling capabilities. * @param samples a {@code VkSampleCountFlagBits} value specifying the sample count to query capabilities for. * @param pMultisampleProperties a pointer to a {@link VkMultisamplePropertiesEXT} structure in which information about additional multisampling capabilities specific to the sample count is returned. */ public static void vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, @NativeType("VkSampleCountFlagBits") int samples, @NativeType("VkMultisamplePropertiesEXT *") VkMultisamplePropertiesEXT pMultisampleProperties) { nvkGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties.address()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy