ReactOS 0.4.17-dev-934-g091855f
vkd3d_image_resource_create_info Struct Reference

#include <vkd3d.h>

Collaboration diagram for vkd3d_image_resource_create_info:

Public Attributes

enum vkd3d_structure_type type
 
const void * next
 
VkImage vk_image
 
D3D12_RESOURCE_DESC desc
 
unsigned int flags
 
D3D12_RESOURCE_STATES present_state
 

Detailed Description

A chained structure containing the parameters to create a D3D12 resource backed by a Vulkan image.

Definition at line 336 of file vkd3d.h.

Member Data Documentation

◆ desc

D3D12_RESOURCE_DESC vkd3d_image_resource_create_info::desc

The resource description.

Definition at line 346 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().

◆ flags

unsigned int vkd3d_image_resource_create_info::flags

A combination of zero or more flags. The valid flags are VKD3D_RESOURCE_INITIAL_STATE_TRANSITION and VKD3D_RESOURCE_PRESENT_STATE_TRANSITION.

Definition at line 351 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().

◆ next

const void* vkd3d_image_resource_create_info::next

Optional pointer to a structure containing further parameters.

Definition at line 341 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().

◆ present_state

D3D12_RESOURCE_STATES vkd3d_image_resource_create_info::present_state

This field specifies how to handle resource state D3D12_RESOURCE_STATE_PRESENT for the resource. Notice that on D3D12 there is no difference between D3D12_RESOURCE_STATE_COMMON and D3D12_RESOURCE_STATE_PRESENT (they have the same value), while on Vulkan two different layouts are used (VK_IMAGE_LAYOUT_GENERAL and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR).

  • When flag VKD3D_RESOURCE_PRESENT_STATE_TRANSITION is not specified, field present_state is ignored and resource state D3D12_RESOURCE_STATE_COMMON/_PRESENT is mapped to VK_IMAGE_LAYOUT_GENERAL; this is useful for non-swapchain resources.
  • Otherwise, when present_state is D3D12_RESOURCE_STATE_PRESENT/_COMMON, resource state D3D12_RESOURCE_STATE_COMMON/_PRESENT is mapped to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; this is useful for swapchain resources that are directly backed by a Vulkan swapchain image.
  • Otherwise, resource state D3D12_RESOURCE_STATE_COMMON/_PRESENT is treated as resource state present_state; this is useful for swapchain resources that backed by a Vulkan non-swapchain image, which the client will likely consume with a copy or drawing operation at presentation time.

Definition at line 371 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().

◆ type

enum vkd3d_structure_type vkd3d_image_resource_create_info::type

Must be set to VKD3D_STRUCTURE_TYPE_IMAGE_RESOURCE_CREATE_INFO.

Definition at line 339 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().

◆ vk_image

VkImage vkd3d_image_resource_create_info::vk_image

The Vulkan image that backs the resource.

Definition at line 344 of file vkd3d.h.

Referenced by d3d12_swapchain_create_image_resources(), and vkd3d_create_image_resource().


The documentation for this struct was generated from the following file: