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

org.lwjgl.vulkan.QCOMRenderPassTransform 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;

/**
 * This extension provides a mechanism for applications to enable driver support for render pass transform.
 * 
 * 

Mobile devices can be rotated and mobile applications need to render properly when a device is held in a landscape or portrait orientation. When the current orientation differs from the device’s native orientation, a rotation is required so that the “{@code up}” direction of the rendered scene matches the current orientation.

* *

If the Display Processing Unit (DPU) doesnt natively support rotation, the Vulkan presentation engine can handle this rotation in a separate composition pass. Alternatively, the application can render frames “{@code pre-rotated}” to avoid this extra pass. The latter is preferred to reduce power consumption and achieve the best performance because it avoids tasking the GPU with extra work to perform the copy/rotate operation.

* *

Unlike OpenGL ES, the burden of pre-rotation in Vulkan falls on the application. To implement pre-rotation, applications render into swapchain images matching the device native aspect ratio of the display and “{@code pre-rotate}” the rendering content to match the device’s current orientation. The burden is more than adjusting the Model View Projection (MVP) matrix in the vertex shader to account for rotation and aspect ratio. The coordinate systems of scissors, viewports, derivatives and several shader built-ins may need to be adapted to produce the correct result.

* *

It is difficult for some game engines to manage this burden; many chose to simply accept the performance/power overhead of performing rotation in the presentation engine.

* *

This extension allows applications to achieve the performance benefits of pre-rotated rendering by moving much of the above-mentioned burden to the graphics driver. The following is unchanged with this extension:

* *
    *
  • Applications create a swapchain matching the native orientation of the display. Applications must also set the {@link VkSwapchainCreateInfoKHR}{@code ::preTransform} equal to the {@code currentTransform} as returned by {@link KHRSurface#vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR}.
  • *
* *

The following is changed with this extension:

* *
    *
  • At {@link VK10#vkCmdBeginRenderPass CmdBeginRenderPass}, the application provides extension struct {@link VkRenderPassTransformBeginInfoQCOM} specifying the render pass transform parameters.
  • *
  • At {@link VK10#vkBeginCommandBuffer BeginCommandBuffer} for secondary command buffers, the application provides extension struct {@link VkCommandBufferInheritanceRenderPassTransformInfoQCOM} specifying the render pass transform parameters.
  • *
  • The {@code renderArea}, viewports, scissors, and {@code fragmentSize} are all provided in the current (non-rotated) coordinate system. The implementation will transform those into the native (rotated) coordinate system.
  • *
  • The implementation is responsible for transforming shader built-ins ({@code FragCoord}, {@code PointCoord}, {@code SamplePosition}, {@code PrimitiveShadingRateKHR}, interpolateAt(), dFdx, dFdy, fWidth) into the rotated coordinate system.
  • *
  • The implementation is responsible for transforming {@code position} to the rotated coordinate system.
  • *
* *
VK_QCOM_render_pass_transform
* *
*
Name String
*
{@code VK_QCOM_render_pass_transform}
*
Extension Type
*
Device extension
*
Registered Extension Number
*
283
*
Revision
*
2
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRSwapchain VK_KHR_swapchain}
  • *
  • Requires {@link KHRSurface VK_KHR_surface}
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2021-03-09
*
Interactions and External Dependencies
*
    *
  • This extension requires {@link KHRSwapchain VK_KHR_swapchain}
  • *
  • This extension interacts with {@link EXTFragmentDensityMap VK_EXT_fragment_density_map}
  • *
  • This extension interacts with {@link KHRFragmentShadingRate VK_KHR_fragment_shading_rate}
  • *
*
Contributors
*
    *
  • Jeff Leger, Qualcomm Technologies, Inc.
  • *
  • Brandon Light, Qualcomm Technologies, Inc.
  • *
  • Matthew Netsch, Qualcomm Technologies, Inc.
  • *
*
*/ public final class QCOMRenderPassTransform { /** The extension specification version. */ public static final int VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION = 2; /** The extension name. */ public static final String VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; /** * Extends {@code VkStructureType}. * *
Enum values:
* *
    *
  • {@link #VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM}
  • *
  • {@link #VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM}
  • *
*/ public static final int VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000, VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001; /** Extends {@code VkRenderPassCreateFlagBits}. */ public static final int VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM = 0x2; private QCOMRenderPassTransform() {} }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy