From 602d2f90d74111b2a9dc715d1928f51122a3c79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 6 Sep 2023 18:34:45 +0300 Subject: [PATCH] include: Add the ID3D12Device10 interface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- include/vkd3d_d3d12.idl | 79 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl index 9355429e..ddb9e6c7 100644 --- a/include/vkd3d_d3d12.idl +++ b/include/vkd3d_d3d12.idl @@ -4441,6 +4441,43 @@ typedef struct D3D12_SHADER_CACHE_SESSION_DESC UINT64 Version; } D3D12_SHADER_CACHE_SESSION_DESC; +typedef enum D3D12_BARRIER_LAYOUT +{ + D3D12_BARRIER_LAYOUT_UNDEFINED = 0xffffffff, + D3D12_BARRIER_LAYOUT_COMMON = 0x0, + D3D12_BARRIER_LAYOUT_PRESENT = 0x0, + D3D12_BARRIER_LAYOUT_GENERIC_READ = 0x1, + D3D12_BARRIER_LAYOUT_RENDER_TARGET = 0x2, + D3D12_BARRIER_LAYOUT_UNORDERED_ACCESS = 0x3, + D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_WRITE = 0x4, + D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_READ = 0x5, + D3D12_BARRIER_LAYOUT_SHADER_RESOURCE = 0x6, + D3D12_BARRIER_LAYOUT_COPY_SOURCE = 0x7, + D3D12_BARRIER_LAYOUT_COPY_DEST = 0x8, + D3D12_BARRIER_LAYOUT_RESOLVE_SOURCE = 0x9, + D3D12_BARRIER_LAYOUT_RESOLVE_DEST = 0xa, + D3D12_BARRIER_LAYOUT_SHADING_RATE_SOURCE = 0xb, + D3D12_BARRIER_LAYOUT_VIDEO_DECODE_READ = 0xc, + D3D12_BARRIER_LAYOUT_VIDEO_DECODE_WRITE = 0xd, + D3D12_BARRIER_LAYOUT_VIDEO_PROCESS_READ = 0xe, + D3D12_BARRIER_LAYOUT_VIDEO_PROCESS_WRITE = 0xf, + D3D12_BARRIER_LAYOUT_VIDEO_ENCODE_READ = 0x10, + D3D12_BARRIER_LAYOUT_VIDEO_ENCODE_WRITE = 0x11, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_COMMON = 0x12, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_GENERIC_READ = 0x13, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_UNORDERED_ACCESS = 0x14, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_SHADER_RESOURCE = 0x15, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_COPY_SOURCE = 0x16, + D3D12_BARRIER_LAYOUT_DIRECT_QUEUE_COPY_DEST = 0x17, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_COMMON = 0x18, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_GENERIC_READ = 0x19, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_UNORDERED_ACCESS = 0x1a, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_SHADER_RESOURCE = 0x1b, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_COPY_SOURCE = 0x1c, + D3D12_BARRIER_LAYOUT_COMPUTE_QUEUE_COPY_DEST = 0x1d, + D3D12_BARRIER_LAYOUT_VIDEO_QUEUE_COMMON = 0x1e, +} D3D12_BARRIER_LAYOUT; + [ uuid(28e2495d-0f64-4ae4-a6ec-129255dc49a8), object, @@ -4504,6 +4541,48 @@ interface ID3D12Device9 : ID3D12Device8 void **command_queue); } +[ + uuid(517f8718-aa66-49f9-b02b-a7ab89c06031), + object, + local, + pointer_default(unique) +] +interface ID3D12Device10 : ID3D12Device9 +{ + HRESULT CreateCommittedResource3( + const D3D12_HEAP_PROPERTIES *heap_properties, + D3D12_HEAP_FLAGS heap_flags, + const D3D12_RESOURCE_DESC1 *desc, + D3D12_BARRIER_LAYOUT initial_layout, + const D3D12_CLEAR_VALUE *optimized_clear_value, + ID3D12ProtectedResourceSession *protected_session, + UINT32 castable_formats_count, + DXGI_FORMAT *castable_formats, + REFIID riid_resource, + void **resource); + + HRESULT CreatePlacedResource2( + ID3D12Heap *heap, + UINT64 heap_offset, + const D3D12_RESOURCE_DESC1 *desc, + D3D12_BARRIER_LAYOUT initial_layout, + const D3D12_CLEAR_VALUE *optimized_clear_value, + UINT32 castable_formats_count, + DXGI_FORMAT *castable_formats, + REFIID riid, + void **resource); + + HRESULT CreateReservedResource2( + const D3D12_RESOURCE_DESC *desc, + D3D12_BARRIER_LAYOUT initial_layout, + const D3D12_CLEAR_VALUE *optimized_clear_value, + ID3D12ProtectedResourceSession *protected_session, + UINT32 castable_formats_count, + DXGI_FORMAT *castable_formats, + REFIID riid, + void **resource); +} + typedef HRESULT (__stdcall *PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER)( const void *data, SIZE_T data_size, REFIID iid, void **deserializer);