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

org.lwjgl.vulkan.NVFragmentShadingRateEnums 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 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 builds on the fragment shading rate functionality provided by the VK_KHR_fragment_shading_rate extension, adding support for “{@code supersample}” fragment shading rates that trigger multiple fragment shader invocations per pixel as well as a “{@code no invocations}” shading rate that discards any portions of a primitive that would use that shading rate.
 * 
 * 
VK_NV_fragment_shading_rate_enums
* *
*
Name String
*
{@code VK_NV_fragment_shading_rate_enums}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
327
*
Revision
*
1
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRFragmentShadingRate VK_KHR_fragment_shading_rate}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2020-09-02
*
Contributors
*
    *
  • Pat Brown, NVIDIA
  • *
  • Jeff Bolz, NVIDIA
  • *
*
*/ public class NVFragmentShadingRateEnums { /** The extension specification version. */ public static final int VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV}
  • *
  • {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV}
  • *
  • {@link #VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV}
  • *
*/ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001, VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002; /** * VkFragmentShadingRateTypeNV - Enumeration with fragment shading rate types * *
Description
* *
    *
  • {@link #VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV} specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the {@link VkPipelineFragmentShadingRateStateCreateInfoKHR} structure and that any state specified by the {@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV} structure should be ignored.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV} specifies that a graphics pipeline should obtain its pipeline fragment shading rate and shading rate combiner state from the {@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV} structure and that any state specified by the {@link VkPipelineFragmentShadingRateStateCreateInfoKHR} structure should be ignored.
  • *
* *
See Also
* *

{@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV}

*/ public static final int VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0, VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1; /** * VkFragmentShadingRateNV - Enumeration with fragment shading rates * *
Description
* *
    *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV} specifies a fragment size of 1x1 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV} specifies a fragment size of 1x2 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV} specifies a fragment size of 2x1 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV} specifies a fragment size of 2x2 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV} specifies a fragment size of 2x4 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV} specifies a fragment size of 4x2 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV} specifies a fragment size of 4x4 pixels.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV} specifies a fragment size of 1x1 pixels, with two fragment shader invocations per fragment.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV} specifies a fragment size of 1x1 pixels, with four fragment shader invocations per fragment.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV} specifies a fragment size of 1x1 pixels, with eight fragment shader invocations per fragment.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV} specifies a fragment size of 1x1 pixels, with sixteen fragment shader invocations per fragment.
  • *
  • {@link #VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV} specifies that any portions of a primitive that use that shading rate should be discarded without invoking any fragment shader.
  • *
* *

To use the shading rates {@link #VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV}, {@link #VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV}, {@link #VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV}, and {@link #VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV} as a pipeline, primitive, or attachment shading rate, the {@code supersampleFragmentShadingRates} feature must be enabled. To use the shading rate {@link #VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV} as a pipeline, primitive, or attachment shading rate, the {@code noInvocationFragmentShadingRates} feature must be enabled.

* *
See Also
* *

{@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV}, {@link #vkCmdSetFragmentShadingRateEnumNV CmdSetFragmentShadingRateEnumNV}

*/ public static final int VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10, VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13, VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14, VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15; protected NVFragmentShadingRateEnums() { throw new UnsupportedOperationException(); } // --- [ vkCmdSetFragmentShadingRateEnumNV ] --- /** Unsafe version of: {@link #vkCmdSetFragmentShadingRateEnumNV CmdSetFragmentShadingRateEnumNV} */ public static void nvkCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, int shadingRate, long combinerOps) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetFragmentShadingRateEnumNV; if (CHECKS) { check(__functionAddress); } callPPV(commandBuffer.address(), shadingRate, combinerOps, __functionAddress); } /** * Set pipeline fragment shading rate dynamically for a command buffer using enums. * *
C Specification
* *

To dynamically set the pipeline fragment shading rate and combiner operation, call:

* *

     * void vkCmdSetFragmentShadingRateEnumNV(
     *     VkCommandBuffer                             commandBuffer,
     *     VkFragmentShadingRateNV                     shadingRate,
     *     const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]);
* *
Description
* *

This command sets the pipeline fragment shading rate and combiner operation for subsequent drawing commands when the graphics pipeline is created with {@link KHRFragmentShadingRate#VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineFragmentShadingRateEnumStateCreateInfoNV} values used to create the currently active pipeline.

* *
Note
* *

This command allows specifying additional shading rates beyond those supported by {@link KHRFragmentShadingRate#vkCmdSetFragmentShadingRateKHR CmdSetFragmentShadingRateKHR}. For more information, refer to the {@link NVFragmentShadingRateEnums VK_NV_fragment_shading_rate_enums} appendix.

*
* *
Valid Usage
* *
    *
  • If {@code pipelineFragmentShadingRate} is not enabled, {@code shadingRate} must be {@link #VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV}
  • *
  • If {@code supersampleFragmentShadingRates} is not enabled, {@code shadingRate} must not be {@link #VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV}, {@link #VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV}, {@link #VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV}, or {@link #VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV}
  • *
  • If {@code noInvocationFragmentShadingRates} is not enabled, {@code shadingRate} must not be {@link #VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV}
  • *
  • {@code fragmentShadingRateEnums} must be enabled
  • *
  • One of {@code pipelineFragmentShadingRate}, {@code primitiveFragmentShadingRate}, or {@code attachmentFragmentShadingRate} must be enabled
  • *
  • If the {@code primitiveFragmentShadingRate} feature is not enabled, {@code combinerOps}[0] must be {@link KHRFragmentShadingRate#VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR}
  • *
  • If the {@code attachmentFragmentShadingRate} feature is not enabled, {@code combinerOps}[1] must be {@link KHRFragmentShadingRate#VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR}
  • *
  • If the {@code fragmentSizeNonTrivialCombinerOps} limit is not supported, elements of {@code combinerOps} must be either {@link KHRFragmentShadingRate#VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR} or {@link KHRFragmentShadingRate#VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
  • *
  • {@code shadingRate} must be a valid {@code VkFragmentShadingRateNV} value
  • *
  • Any given element of {@code combinerOps} must be a valid {@code VkFragmentShadingRateCombinerOpKHR} value
  • *
  • {@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
* * @param commandBuffer the command buffer into which the command will be recorded. * @param shadingRate specifies a {@code VkFragmentShadingRateNV} enum indicating the pipeline fragment shading rate for subsequent drawing commands. * @param combinerOps specifies a {@code VkFragmentShadingRateCombinerOpKHR} determining how the pipeline, primitive, and attachment shading rates are combined for fragments generated by subsequent drawing commands. */ public static void vkCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, @NativeType("VkFragmentShadingRateNV") int shadingRate, @NativeType("VkFragmentShadingRateCombinerOpKHR const *") IntBuffer combinerOps) { if (CHECKS) { check(combinerOps, 2); } nvkCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, memAddress(combinerOps)); } /** Array version of: {@link #vkCmdSetFragmentShadingRateEnumNV CmdSetFragmentShadingRateEnumNV} */ public static void vkCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, @NativeType("VkFragmentShadingRateNV") int shadingRate, @NativeType("VkFragmentShadingRateCombinerOpKHR const *") int[] combinerOps) { long __functionAddress = commandBuffer.getCapabilities().vkCmdSetFragmentShadingRateEnumNV; if (CHECKS) { check(__functionAddress); check(combinerOps, 2); } callPPV(commandBuffer.address(), shadingRate, combinerOps, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy