diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl index 96fff92e..16ca38bb 100644 --- a/include/vkd3d_d3d12.idl +++ b/include/vkd3d_d3d12.idl @@ -4478,6 +4478,133 @@ typedef enum D3D12_BARRIER_LAYOUT D3D12_BARRIER_LAYOUT_VIDEO_QUEUE_COMMON = 0x1e, } D3D12_BARRIER_LAYOUT; +typedef enum D3D12_BARRIER_SYNC +{ + D3D12_BARRIER_SYNC_NONE = 0x0, + D3D12_BARRIER_SYNC_ALL = 0x1, + D3D12_BARRIER_SYNC_DRAW = 0x2, + D3D12_BARRIER_SYNC_INPUT_ASSEMBLER = 0x4, + D3D12_BARRIER_SYNC_VERTEX_SHADING = 0x8, + D3D12_BARRIER_SYNC_PIXEL_SHADING = 0x10, + D3D12_BARRIER_SYNC_DEPTH_STENCIL = 0x20, + D3D12_BARRIER_SYNC_RENDER_TARGET = 0x40, + D3D12_BARRIER_SYNC_COMPUTE_SHADING = 0x80, + D3D12_BARRIER_SYNC_RAYTRACING = 0x100, + D3D12_BARRIER_SYNC_COPY = 0x200, + D3D12_BARRIER_SYNC_RESOLVE = 0x400, + D3D12_BARRIER_SYNC_EXECUTE_INDIRECT = 0x800, + D3D12_BARRIER_SYNC_PREDICATION = 0x800, + D3D12_BARRIER_SYNC_ALL_SHADING = 0x1000, + D3D12_BARRIER_SYNC_NON_PIXEL_SHADING = 0x2000, + D3D12_BARRIER_SYNC_EMIT_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO = 0x4000, + D3D12_BARRIER_SYNC_VIDEO_DECODE = 0x100000, + D3D12_BARRIER_SYNC_VIDEO_PROCESS = 0x200000, + D3D12_BARRIER_SYNC_VIDEO_ENCODE = 0x400000, + D3D12_BARRIER_SYNC_BUILD_RAYTRACING_ACCELERATION_STRUCTURE = 0x800000, + D3D12_BARRIER_SYNC_COPY_RAYTRACING_ACCELERATION_STRUCTURE = 0x1000000, + D3D12_BARRIER_SYNC_SPLIT = 0x80000000, +} D3D12_BARRIER_SYNC; +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_BARRIER_SYNC);") + +typedef enum D3D12_BARRIER_ACCESS +{ + D3D12_BARRIER_ACCESS_COMMON = 0, + D3D12_BARRIER_ACCESS_VERTEX_BUFFER = 0x1, + D3D12_BARRIER_ACCESS_CONSTANT_BUFFER = 0x2, + D3D12_BARRIER_ACCESS_INDEX_BUFFER = 0x4, + D3D12_BARRIER_ACCESS_RENDER_TARGET = 0x8, + D3D12_BARRIER_ACCESS_UNORDERED_ACCESS = 0x10, + D3D12_BARRIER_ACCESS_DEPTH_STENCIL_WRITE = 0x20, + D3D12_BARRIER_ACCESS_DEPTH_STENCIL_READ = 0x40, + D3D12_BARRIER_ACCESS_SHADER_RESOURCE = 0x80, + D3D12_BARRIER_ACCESS_STREAM_OUTPUT = 0x100, + D3D12_BARRIER_ACCESS_INDIRECT_ARGUMENT = 0x200, + D3D12_BARRIER_ACCESS_PREDICATION = 0x200, + D3D12_BARRIER_ACCESS_COPY_DEST = 0x400, + D3D12_BARRIER_ACCESS_COPY_SOURCE = 0x800, + D3D12_BARRIER_ACCESS_RESOLVE_DEST = 0x1000, + D3D12_BARRIER_ACCESS_RESOLVE_SOURCE = 0x2000, + D3D12_BARRIER_ACCESS_RAYTRACING_ACCELERATION_STRUCTURE_READ = 0x4000, + D3D12_BARRIER_ACCESS_RAYTRACING_ACCELERATION_STRUCTURE_WRITE = 0x8000, + D3D12_BARRIER_ACCESS_SHADING_RATE_SOURCE = 0x10000, + D3D12_BARRIER_ACCESS_VIDEO_DECODE_READ = 0x20000, + D3D12_BARRIER_ACCESS_VIDEO_DECODE_WRITE = 0x40000, + D3D12_BARRIER_ACCESS_VIDEO_PROCESS_READ = 0x80000, + D3D12_BARRIER_ACCESS_VIDEO_PROCESS_WRITE = 0x100000, + D3D12_BARRIER_ACCESS_VIDEO_ENCODE_READ = 0x200000, + D3D12_BARRIER_ACCESS_VIDEO_ENCODE_WRITE = 0x400000, + D3D12_BARRIER_ACCESS_NO_ACCESS = 0x80000000, +} D3D12_BARRIER_ACCESS; +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_BARRIER_ACCESS);") + +typedef enum D3D12_BARRIER_TYPE +{ + D3D12_BARRIER_TYPE_GLOBAL = 0x0, + D3D12_BARRIER_TYPE_TEXTURE = 0x1, + D3D12_BARRIER_TYPE_BUFFER = 0x2, +} D3D12_BARRIER_TYPE; + +typedef enum D3D12_TEXTURE_BARRIER_FLAGS +{ + D3D12_TEXTURE_BARRIER_FLAG_NONE = 0x0, + D3D12_TEXTURE_BARRIER_FLAG_DISCARD = 0x1, +} D3D12_TEXTURE_BARRIER_FLAGS; +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_TEXTURE_BARRIER_FLAGS);") + +typedef struct D3D12_BARRIER_SUBRESOURCE_RANGE +{ + UINT IndexOrFirstMipLevel; + UINT NumMipLevels; + UINT FirstArraySlice; + UINT NumArraySlices; + UINT FirstPlane; + UINT NumPlanes; +} D3D12_BARRIER_SUBRESOURCE_RANGE; + +typedef struct D3D12_GLOBAL_BARRIER +{ + D3D12_BARRIER_SYNC SyncBefore; + D3D12_BARRIER_SYNC SyncAfter; + D3D12_BARRIER_ACCESS AccessBefore; + D3D12_BARRIER_ACCESS AccessAfter; +} D3D12_GLOBAL_BARRIER; + +typedef struct D3D12_TEXTURE_BARRIER +{ + D3D12_BARRIER_SYNC SyncBefore; + D3D12_BARRIER_SYNC SyncAfter; + D3D12_BARRIER_ACCESS AccessBefore; + D3D12_BARRIER_ACCESS AccessAfter; + D3D12_BARRIER_LAYOUT LayoutBefore; + D3D12_BARRIER_LAYOUT LayoutAfter; + ID3D12Resource *pResource; + D3D12_BARRIER_SUBRESOURCE_RANGE Subresources; + D3D12_TEXTURE_BARRIER_FLAGS Flags; +} D3D12_TEXTURE_BARRIER; + +typedef struct D3D12_BUFFER_BARRIER +{ + D3D12_BARRIER_SYNC SyncBefore; + D3D12_BARRIER_SYNC SyncAfter; + D3D12_BARRIER_ACCESS AccessBefore; + D3D12_BARRIER_ACCESS AccessAfter; + ID3D12Resource *pResource; + UINT64 Offset; + UINT64 Size; +} D3D12_BUFFER_BARRIER; + +typedef struct D3D12_BARRIER_GROUP +{ + D3D12_BARRIER_TYPE Type; + UINT32 NumBarriers; + union + { + const D3D12_GLOBAL_BARRIER *pGlobalBarriers; + const D3D12_TEXTURE_BARRIER *pTextureBarriers; + const D3D12_BUFFER_BARRIER *pBufferBarriers; + }; +} D3D12_BARRIER_GROUP; + [ uuid(28e2495d-0f64-4ae4-a6ec-129255dc49a8), object,