module external.directx.d3d12;
/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/
// DirectX 12 Main Header translation from d3d12.h
// Latest update: Windows 10, version 1809

import core.stdc.string : memcpy;
import std.bitmanip;
public import external.directx.dxgi;
public import external.directx.dxgicommon;

mixin(uuid!(ID3D12Object, "c4fec28f", "7966", "4e95", ["9f", "94", "f4", "31", "cb", "56", "c3", "b8"]));
extern (C++) interface ID3D12Object : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT GetPrivateData(REFGUID guid, uint* pDataSize, void* pData);
    HRESULT SetPrivateData(REFGUID guid, uint DataSize, const void* pData);
    HRESULT SetPrivateDataInterface(REFGUID guid, const IUnknown* pData);
    HRESULT SetName(LPCWSTR Name);
}

mixin(uuid!(ID3D12DeviceChild, "905db94b", "a00c", "4140", ["9d", "f5", "2b", "64", "ca", "9e", "a3", "57"]));
extern (C++) interface ID3D12DeviceChild : ID3D12Object
{
    HRESULT GetDevice(REFIID riid, void** ppvDevice);
}

mixin(uuid!(ID3D12RootSignature, "c54a6b66", "72df", "4ee8", ["8b", "e5", "a9", "46", "a1", "42", "92", "14"]));
extern (C++) interface ID3D12RootSignature : ID3D12DeviceChild
{
}

mixin(uuid!(ID3D12RootSignatureDeserializer, "34AB647B", "3CC8", "46AC", ["84", "1B", "C0", "96", "56", "45", "C0", "46"]));
extern (C++) interface ID3D12RootSignatureDeserializer : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    D3D12_ROOT_SIGNATURE_DESC* GetRootSignatureDesc() const;
}

mixin(uuid!(ID3D12VersionedRootSignatureDeserializer, "7F91CE67", "090C", "4BB7", ["B7", "8E", "ED", "8F", "F2", "E3", "1D", "A0"]));
extern (C++) interface ID3D12VersionedRootSignatureDeserializer : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION convertToVersion, const D3D12_VERSIONED_ROOT_SIGNATURE_DESC** ppDesc);
    D3D12_VERSIONED_ROOT_SIGNATURE_DESC* GetUnconvertedRootSignatureDesc() const;
}

mixin(uuid!(ID3D12Pageable, "63ee58fb", "1268", "4835", ["86", "da", "f0", "08", "ce", "62", "f0", "d6"]));
extern (C++) interface ID3D12Pageable : ID3D12DeviceChild
{
}

mixin(uuid!(ID3D12Heap, "6b3b2502", "6e51", "45b3", ["90", "ee", "98", "84", "26", "5e", "8d", "f3"]));
extern (C++) interface ID3D12Heap : ID3D12Pageable
{
    D3D12_HEAP_DESC GetDesc();
}

mixin(uuid!(ID3D12Resource, "696442be", "a72e", "4059", ["bc", "79", "5b", "5c", "98", "04", "0f", "ad"]));
extern (C++) interface ID3D12Resource : ID3D12Pageable
{
    HRESULT Map(uint Subresource, const D3D12_RANGE* pReadRange, void** ppData);
    void Unmap(uint Subresource, const D3D12_RANGE* pWrittenRange);
    D3D12_RESOURCE_DESC GetDesc();
    D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
    HRESULT WriteToSubresource(uint DstSubresource, const D3D12_BOX* pDstBox, const void* pSrcData, uint SrcRowPitch, uint SrcDepthPitch);
    HRESULT ReadFromSubresource(void* pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, const D3D12_BOX* pSrcBox);
    HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES* pHeapProperties, D3D12_HEAP_FLAGS* pHeapFlags);
}

mixin(uuid!(ID3D12CommandAllocator, "6102dee4", "af59", "4b09", ["b9", "99", "b4", "4d", "73", "f0", "9b", "24"]));
extern (C++) interface ID3D12CommandAllocator : ID3D12Pageable
{
    HRESULT Reset();
}

mixin(uuid!(ID3D12Fence, "0a753dcf", "c4d8", "4b91", ["ad", "f6", "be", "5a", "60", "d9", "5a", "76"]));
extern (C++) interface ID3D12Fence : ID3D12Pageable
{
    ulong GetCompletedValue();
    HRESULT SetEventOnCompletion(ulong Value, HANDLE hEvent);
    HRESULT Signal(ulong Value);
}

mixin(uuid!(ID3D12Fence1, "433685fe", "e22b", "4ca0", ["a8", "db", "b5", "b4", "f4", "dd", "0e", "4a"]));
extern (C++) interface ID3D12Fence1 : ID3D12Fence
{
    D3D12_FENCE_FLAGS GetCreationFlags();
}

mixin(uuid!(ID3D12PipelineState, "765a30f3", "f624", "4c6f", ["a8", "28", "ac", "e9", "48", "62", "24", "45"]));
extern (C++) interface ID3D12PipelineState : ID3D12Pageable
{
    HRESULT GetCachedBlob(ID3DBlob** ppBlob);
}

mixin(uuid!(ID3D12DescriptorHeap, "8efb471d", "616c", "4f49", ["90", "f7", "12", "7b", "b7", "63", "fa", "51"]));
extern (C++) interface ID3D12DescriptorHeap : ID3D12Pageable
{
    D3D12_DESCRIPTOR_HEAP_DESC GetDesc();
    D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart() inout;
    D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart() inout;
}

mixin(uuid!(ID3D12QueryHeap, "0d9658ae", "ed45", "469e", ["a6", "1d", "97", "0e", "c5", "83", "ca", "b4"]));
extern (C++) interface ID3D12QueryHeap : ID3D12Pageable
{
}

mixin(uuid!(ID3D12CommandSignature, "c36a797c", "ec80", "4f0a", ["89", "85", "a7", "b2", "47", "50", "82", "d1"]));
extern (C++) interface ID3D12CommandSignature : ID3D12Pageable
{
}

mixin(uuid!(ID3D12CommandList, "7116d91c", "e7e4", "47ce", ["b8", "c6", "ec", "81", "68", "f4", "37", "e5"]));
extern (C++) interface ID3D12CommandList : ID3D12DeviceChild
{
    D3D12_COMMAND_LIST_TYPE GetType();
}

mixin(uuid!(ID3D12GraphicsCommandList, "5b160d0f", "ac1b", "4185", ["8b", "a8", "b3", "ae", "42", "a5", "a4", "55"]));
extern (C++) interface ID3D12GraphicsCommandList : ID3D12CommandList
{
    HRESULT Close();
    HRESULT Reset(ID3D12CommandAllocator* pAllocator, ID3D12PipelineState* pInitialState);
    void ClearState(ID3D12PipelineState* pPipelineState);
    void DrawInstanced(uint VertexCountPerInstance, uint InstanceCount, uint StartVertexLocation, uint StartInstanceLocation);
    void DrawIndexedInstanced(uint IndexCountPerInstance, uint InstanceCount, uint StartIndexLocation, int BaseVertexLocation, uint StartInstanceLocation);
    void Dispatch(uint ThreadGroupCountX, uint ThreadGroupCountY, uint ThreadGroupCountZ);
    void CopyBufferRegion(ID3D12Resource* pDstBuffer, ulong DstOffset, ID3D12Resource* pSrcBuffer, ulong SrcOffset, ulong NumBytes);
    void CopyTextureRegion(const D3D12_TEXTURE_COPY_LOCATION* pDst, uint DstX, uint DstY, uint DstZ, const D3D12_TEXTURE_COPY_LOCATION* pSrc, const D3D12_BOX* pSrcBox);
    void CopyResource(ID3D12Resource* pDstResource, ID3D12Resource* pSrcResource);
    void CopyTiles(ID3D12Resource* pTiledResource, const D3D12_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, const D3D12_TILE_REGION_SIZE* pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, D3D12_TILE_COPY_FLAGS Flags);
    void ResolveSubresource(ID3D12Resource* pDstResource, uint DstSubresource, ID3D12Resource* pSrcResource, uint SrcSubresource, DXGI_FORMAT Format);
    void IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology);
    void RSSetViewports(uint NumViewports, const D3D12_VIEWPORT* pViewports);
    void RSSetScissorRects(uint NumRects, const D3D12_RECT* pRects);
    void OMSetBlendFactor(const float[4] BlendFactor);
    void OMSetStencilRef(uint StencilRef);
    void SetPipelineState(ID3D12PipelineState* pPipelineState);
    void ResourceBarrier(uint NumBarriers, const D3D12_RESOURCE_BARRIER* pBarriers);
    void ExecuteBundle(ID3D12GraphicsCommandList* pCommandList);
    void SetDescriptorHeaps(uint NumDescriptorHeaps, const ID3D12DescriptorHeap** ppDescriptorHeaps);
    void SetComputeRootSignature(ID3D12RootSignature* pRootSignature);
    void SetGraphicsRootSignature(ID3D12RootSignature* pRootSignature);
    void SetComputeRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor);
    void SetGraphicsRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor);
    void SetComputeRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues);
    void SetGraphicsRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues);
    void SetComputeRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, const void* pSrcData, uint DestOffsetIn32BitValues);
    void SetGraphicsRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, const void* pSrcData, uint DestOffsetIn32BitValues);
    void SetComputeRootConstantBufferView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void SetGraphicsRootConstantBufferView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void SetComputeRootShaderResourceView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void SetGraphicsRootShaderResourceView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void SetComputeRootUnorderedAccessView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void SetGraphicsRootUnorderedAccessView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation);
    void IASetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW* pView);
    void IASetVertexBuffers(uint StartSlot, uint NumViews, const D3D12_VERTEX_BUFFER_VIEW* pViews);
    void SOSetTargets(uint StartSlot, uint NumViews, const D3D12_STREAM_OUTPUT_BUFFER_VIEW* pViews);
    void OMSetRenderTargets(uint NumRenderTargetDescriptors, const D3D12_CPU_DESCRIPTOR_HANDLE* pRenderTargetDescriptors, bool RTsSingleHandleToDescriptorRange, const D3D12_CPU_DESCRIPTOR_HANDLE* pDepthStencilDescriptor);
    void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, D3D12_CLEAR_FLAGS ClearFlags, float Depth, ubyte Stencil, uint NumRects, const D3D12_RECT* pRects);
    void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, const float[4] ColorRGBA, uint NumRects, const D3D12_RECT* pRects);
    void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, const uint[4] Values, uint NumRects, const D3D12_RECT* pRects);
    void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource* pResource, const float[4] Values, uint NumRects, const D3D12_RECT* pRects);
    void DiscardResource(ID3D12Resource* pResource, const D3D12_DISCARD_REGION* pRegion);
    void BeginQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void EndQuery(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint Index);
    void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, ulong AlignedDestinationBufferOffset);
    void SetPredication(ID3D12Resource* pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation);
    void SetMarker(uint Metadata, const void* pData, uint Size);
    void BeginEvent(uint Metadata, const void* pData, uint Size);
    void EndEvent();
    void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, ulong CountBufferOffset);
}

mixin(uuid!(ID3D12GraphicsCommandList1, "553103fb", "1fe7", "4557", ["bb", "38", "94", "6d", "7d", "0e", "7c", "a7"]));
extern (C++) interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
{
    void AtomicCopyBufferUINT(ID3D12Resource* pDstBuffer, ulong DstOffset, ID3D12Resource* pSrcBuffer, ulong SrcOffset, uint Dependencies, const ID3D12Resource** ppDependentResources, const D3D12_SUBRESOURCE_RANGE_UINT64* pDependentSubresourceRanges);
    void AtomicCopyBufferUINT64(ID3D12Resource* pDstBuffer, ulong DstOffset, ID3D12Resource* pSrcBuffer, ulong SrcOffset, uint Dependencies, const ID3D12Resource** ppDependentResources, const D3D12_SUBRESOURCE_RANGE_UINT64* pDependentSubresourceRanges);
    void OMSetDepthBounds(float Min, float Max);
    void SetSamplePositions(uint NumSamplesPerPixel, uint NumPixels, D3D12_SAMPLE_POSITION* pSamplePositions);
    void ResolveSubresourceRegion(ID3D12Resource* pDstResource, uint DstSubresource, uint DstX, uint DstY, ID3D12Resource* pSrcResource, uint SrcSubresource, D3D12_RECT* pSrcRect, DXGI_FORMAT Format, D3D12_RESOLVE_MODE ResolveMode);
    void SetViewInstanceMask(uint Mask);
}

mixin(uuid!(ID3D12GraphicsCommandList2, "38C3E585", "FF17", "412C", ["91", "50", "4F", "C6", "F9", "D7", "2A", "28"]));
extern (C++) interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
{
    void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER* pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE* pModes);
}

mixin(uuid!(ID3D12CommandQueue, "0ec870a6", "5d7e", "4c22", ["8c", "fc", "5b", "aa", "e0", "76", "16", "ed"]));
extern (C++) interface ID3D12CommandQueue : ID3D12Pageable
{
    void UpdateTileMappings(ID3D12Resource* pResource, uint NumResourceRegions, const D3D12_TILED_RESOURCE_COORDINATE* pResourceRegionStartCoordinates, const D3D12_TILE_REGION_SIZE* pResourceRegionSizes, ID3D12Heap* pHeap, uint NumRanges, const D3D12_TILE_RANGE_FLAGS* pRangeFlags, const uint* pHeapRangeStartOffsets, const uint* pRangeTileCounts, D3D12_TILE_MAPPING_FLAGS Flags);
    void CopyTileMappings(ID3D12Resource* pDstResource, const D3D12_TILED_RESOURCE_COORDINATE* pDstRegionStartCoordinate, ID3D12Resource* pSrcResource, const D3D12_TILED_RESOURCE_COORDINATE* pSrcRegionStartCoordinate, const D3D12_TILE_REGION_SIZE* pRegionSize, D3D12_TILE_MAPPING_FLAGS Flags);
    void ExecuteCommandLists(uint NumCommandLists, const ID3D12CommandList** ppCommandLists);
    void SetMarker(uint Metadata, const void* pData, uint Size);
    void BeginEvent(uint Metadata, const void* pData, uint Size);
    void EndEvent();
    HRESULT Signal(ID3D12Fence* pFence, ulong Value);
    HRESULT Wait(ID3D12Fence* pFence, ulong Value);
    HRESULT GetTimestampFrequency(ulong* pFrequency);
    HRESULT GetClockCalibration(ulong* pGpuTimestamp, ulong* pCpuTimestamp);
    D3D12_COMMAND_QUEUE_DESC GetDesc();
}

mixin(uuid!(ID3D12Device, "189819f1", "1db6", "4b57", ["be", "54", "18", "21", "33", "9b", "85", "f7"]));
extern (C++) interface ID3D12Device : ID3D12Object
{
    uint GetNodeCount();
    HRESULT CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC* pDesc, REFIID riid, void** ppCommandQueue);
    HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type, REFIID riid, void** ppCommandAllocator);
    HRESULT CreateGraphicsPipelineState(const D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc, REFIID riid, void** ppPipelineState);
    HRESULT CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc, REFIID riid, void** ppPipelineState);
    HRESULT CreateCommandList(uint nodeMask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator* pCommandAllocator, ID3D12PipelineState* pInitialState, REFIID riid, void** ppCommandList);
    HRESULT CheckFeatureSupport(D3D12_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize);
    HRESULT CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DESC* pDescriptorHeapDesc, REFIID riid, void** ppvHeap);
    uint GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType);
    HRESULT CreateRootSignature(uint nodeMask, const void* pBlobWithRootSignature, size_t blobLengthInBytes, REFIID riid, void** ppvRootSignature);
    void CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CreateShaderResourceView(ID3D12Resource* pResource, const D3D12_SHADER_RESOURCE_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CreateUnorderedAccessView(ID3D12Resource* pResource, ID3D12Resource* pCounterResource, const D3D12_UNORDERED_ACCESS_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CreateRenderTargetView(ID3D12Resource* pResource, const D3D12_RENDER_TARGET_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CreateDepthStencilView(ID3D12Resource* pResource, const D3D12_DEPTH_STENCIL_VIEW_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CreateSampler(const D3D12_SAMPLER_DESC* pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
    void CopyDescriptors(uint NumDestDescriptorRanges, const D3D12_CPU_DESCRIPTOR_HANDLE* pDestDescriptorRangeStarts, const uint* pDestDescriptorRangeSizes, uint NumSrcDescriptorRanges, const D3D12_CPU_DESCRIPTOR_HANDLE* pSrcDescriptorRangeStarts, const uint* pSrcDescriptorRangeSizes, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType);
    void CopyDescriptorsSimple(uint NumDescriptors, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType);
    D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(uint visibleMask, uint numResourceDescs, const D3D12_RESOURCE_DESC* pResourceDescs);
    D3D12_HEAP_PROPERTIES GetCustomHeapProperties(uint nodeMask, D3D12_HEAP_TYPE heapType);
    HRESULT CreateCommittedResource(const D3D12_HEAP_PROPERTIES* pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, const D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE* pOptimizedClearValue, REFIID riidResource, void** ppvResource);
    HRESULT CreateHeap(const D3D12_HEAP_DESC* pDesc, REFIID riid, void** ppvHeap);
    HRESULT CreatePlacedResource(ID3D12Heap* pHeap, ulong HeapOffset, const D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE* pOptimizedClearValue, REFIID riid, void** ppvResource);
    HRESULT CreateReservedResource(const D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE* pOptimizedClearValue, REFIID riid, void** ppvResource);
    HRESULT CreateSharedHandle(ID3D12DeviceChild* pObject, const SECURITY_ATTRIBUTES* pAttributes, DWORD Access, LPCWSTR Name, HANDLE* pHandle);
    HRESULT OpenSharedHandle(HANDLE NTHandle, REFIID riid, void** ppvObj);
    HRESULT OpenSharedHandleByName(LPCWSTR Name, DWORD Access, HANDLE* pNTHandle);
    HRESULT MakeResident(uint NumObjects, const ID3D12Pageable** ppObjects);
    HRESULT Evict(uint NumObjects, const ID3D12Pageable** ppObjects);
    HRESULT CreateFence(ulong InitialValue, D3D12_FENCE_FLAGS Flags, REFIID riid, void** ppFence);
    HRESULT GetDeviceRemovedReason();
    void GetCopyableFootprints(const D3D12_RESOURCE_DESC* pResourceDesc, uint FirstSubresource, uint NumSubresources, ulong BaseOffset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts, uint* pNumRows, ulong* pRowSizeInBytes, ulong* pTotalBytes);
    HRESULT CreateQueryHeap(const D3D12_QUERY_HEAP_DESC* pDesc, REFIID riid, void** ppvHeap);
    HRESULT SetStablePowerState(bool Enable);
    HRESULT CreateCommandSignature(const D3D12_COMMAND_SIGNATURE_DESC* pDesc, ID3D12RootSignature* pRootSignature, REFIID riid, void** ppvCommandSignature);
    void GetResourceTiling(ID3D12Resource* pTiledResource, uint* pNumTilesForEntireResource, D3D12_PACKED_MIP_INFO* pPackedMipDesc, D3D12_TILE_SHAPE* pStandardTileShapeForNonPackedMips, uint* pNumSubresourceTilings, uint FirstSubresourceTilingToGet, D3D12_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips);
    LUID GetAdapterLuid();
}

mixin(uuid!(ID3D12PipelineLibrary, "c64226a8", "9201", "46af", ["b4", "cc", "53", "fb", "9f", "f7", "41", "4f"]));
extern (C++) interface ID3D12PipelineLibrary : ID3D12DeviceChild
{
    HRESULT StorePipeline(LPCWSTR pName, ID3D12PipelineState* pPipeline);
    HRESULT LoadGraphicsPipeline(LPCWSTR pName, const D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc, REFIID riid, void** ppPipelineState);
    HRESULT LoadComputePipeline(LPCWSTR pName, const D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc, REFIID riid, void** ppPipelineState);
    size_t GetSerializedSize();
    HRESULT Serialize(void* pData, size_t DataSizeInBytes);
}

mixin(uuid!(ID3D12PipelineLibrary1, "80eabf42", "2568", "4e5e", ["bd", "82", "c3", "7f", "86", "96", "1d", "c3"]));
extern (C++) interface ID3D12PipelineLibrary1 : ID3D12PipelineLibrary
{
    HRESULT LoadPipeline(LPCWSTR pName, const D3D12_PIPELINE_STATE_STREAM_DESC* pDesc, REFIID riid, void** ppPipelineState);
}

mixin(uuid!(ID3D12Device1, "77acce80", "638e", "4e65", ["88", "95", "c1", "f2", "33", "86", "86", "3e"]));
extern (C++) interface ID3D12Device1 : ID3D12Device
{
    HRESULT CreatePipelineLibrary(const void* pLibraryBlob, size_t BlobLength, REFIID riid, void** ppPipelineLibrary);
    HRESULT SetEventOnMultipleFenceCompletion(const ID3D12Fence** ppFences, const ulong* pFenceValues, uint NumFences, D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, HANDLE hEvent);
    HRESULT SetResidencyPriority(uint NumObjects, const ID3D12Pageable** ppObjects, const D3D12_RESIDENCY_PRIORITY* pPriorities);
}

mixin(uuid!(ID3D12Device2, "30baa41e", "b15b", "475c", ["a0", "bb", "1a", "f5", "c5", "b6", "43", "28"]));
extern (C++) interface ID3D12Device2 : ID3D12Device1
{
    HRESULT CreatePipelineState(const D3D12_PIPELINE_STATE_STREAM_DESC* pDesc, REFIID riid, void** ppPipelineState);
}

mixin(uuid!(ID3D12Device3, "81dadc15", "2bad", "4392", ["93", "c5", "10", "13", "45", "c4", "aa", "98"]));
extern (C++) interface ID3D12Device3 : ID3D12Device2
{
    HRESULT OpenExistingHeapFromAddress(const void* pAddress, REFIID riid, void** ppvHeap);
    HRESULT OpenExistingHeapFromFileMapping(HANDLE hFileMapping, REFIID riid, void** ppvHeap);
    HRESULT EnqueueMakeResident(D3D12_RESIDENCY_FLAGS Flags, uint NumObjects, const ID3D12Pageable** ppObjects, ID3D12Fence* pFenceToSignal, ulong FenceValueToSignal);
}

mixin(uuid!(ID3D12ProtectedSession, "A1533D18", "0AC1", "4084", ["85", "B9", "89", "A9", "61", "16", "80", "6B"]));
extern (C++) interface ID3D12ProtectedSession : ID3D12DeviceChild
{
    HRESULT GetStatusFence(REFIID riid, void** ppFence);
    D3D12_PROTECTED_SESSION_STATUS GetSessionStatus();
}

mixin(uuid!(ID3D12ProtectedResourceSession, "6CD696F4", "F289", "40CC", ["80", "91", "5A", "6C", "0A", "09", "9C", "3D"]));
extern (C++) interface ID3D12ProtectedResourceSession : ID3D12ProtectedSession
{
    D3D12_PROTECTED_RESOURCE_SESSION_DESC GetDesc();
}

mixin(uuid!(ID3D12Device4, "e865df17", "a9ee", "46f9", ["a4", "63", "30", "98", "31", "5a", "a2", "e5"]));
extern (C++) interface ID3D12Device4 : ID3D12Device3
{
    HRESULT CreateCommandList1(uint nodeMask, D3D12_COMMAND_LIST_TYPE type, D3D12_COMMAND_LIST_FLAGS flags, REFIID riid, void** ppCommandList);
    HRESULT CreateProtectedResourceSession(const D3D12_PROTECTED_RESOURCE_SESSION_DESC* pDesc, REFIID riid, void** ppSession);
    HRESULT CreateCommittedResource1(const D3D12_HEAP_PROPERTIES* pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, const D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE* pOptimizedClearValue, ID3D12ProtectedResourceSession* pProtectedSession, REFIID riidResource, void** ppvResource);
    HRESULT CreateHeap1(const D3D12_HEAP_DESC* pDesc, ID3D12ProtectedResourceSession* pProtectedSession, REFIID riid, void** ppvHeap);
    HRESULT CreateReservedResource1(const D3D12_RESOURCE_DESC* pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE* pOptimizedClearValue, ID3D12ProtectedResourceSession* pProtectedSession, REFIID riid, void** ppvResource);
    D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo1(uint visibleMask, uint numResourceDescs, const D3D12_RESOURCE_DESC* pResourceDescs, D3D12_RESOURCE_ALLOCATION_INFO1* pResourceAllocationInfo1);
}

mixin(uuid!(ID3D12LifetimeOwner, "e667af9f", "cd56", "4f46", ["83", "ce", "03", "2e", "59", "5d", "70", "a8"]));
extern (C++) interface ID3D12LifetimeOwner : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    void LifetimeStateUpdated(D3D12_LIFETIME_STATE NewState);
}

mixin(uuid!(ID3D12SwapChainAssistant, "f1df64b6", "57fd", "49cd", ["88", "07", "c0", "eb", "88", "b4", "5c", "8f"]));
extern (C++) interface ID3D12SwapChainAssistant : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    LUID GetLUID();
    HRESULT GetSwapChainObject(REFIID riid, void** ppv);
    HRESULT GetCurrentResourceAndCommandQueue(REFIID riidResource, void** ppvResource, REFIID riidQueue, void** ppvQueue);
    HRESULT InsertImplicitSync();
}

mixin(uuid!(ID3D12LifetimeTracker, "3fd03d36", "4eb1", "424a", ["a5", "82", "49", "4e", "cb", "8b", "a8", "13"]));
extern (C++) interface ID3D12LifetimeTracker : ID3D12DeviceChild
{
    HRESULT DestroyOwnedObject(ID3D12DeviceChild* pObject);
}

mixin(uuid!(ID3D12StateObject, "47016943", "fca8", "4594", ["93", "ea", "af", "25", "8b", "55", "34", "6d"]));
extern (C++) interface ID3D12StateObject : ID3D12Pageable
{
}

mixin(uuid!(ID3D12StateObjectProperties, "de5fa827", "9bf9", "4f26", ["89", "ff", "d7", "f5", "6f", "de", "38", "60"]));
extern (C++) interface ID3D12StateObjectProperties : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    void* GetShaderIdentifier(LPCWSTR pExportName);
    ulong GetShaderStackSize(LPCWSTR pExportName);
    ulong GetPipelineStackSize();
    void SetPipelineStackSize(ulong PipelineStackSizeInBytes);
}

mixin(uuid!(ID3D12Device5, "8b4f173b", "2fea", "4b80", ["8f", "58", "43", "07", "19", "1a", "b9", "5d"]));
extern (C++) interface ID3D12Device5 : ID3D12Device4
{
    HRESULT CreateLifetimeTracker(ID3D12LifetimeOwner* pOwner, REFIID riid, void** ppvTracker);
    void RemoveDevice();
    HRESULT EnumerateMetaCommands(uint* pNumMetaCommands, D3D12_META_COMMAND_DESC* pDescs);
    HRESULT EnumerateMetaCommandParameters(REFGUID CommandId, D3D12_META_COMMAND_PARAMETER_STAGE Stage, uint* pTotalStructureSizeInBytes, uint* pParameterCount, D3D12_META_COMMAND_PARAMETER_DESC* pParameterDescs);
    HRESULT CreateMetaCommand(REFGUID CommandId, uint NodeMask, const void* pCreationParametersData, size_t CreationParametersDataSizeInBytes, REFIID riid, void** ppMetaCommand);
    HRESULT CreateStateObject(const D3D12_STATE_OBJECT_DESC* pDesc, REFIID riid, void** ppStateObject);
    void GetRaytracingAccelerationStructurePrebuildInfo(const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS* pDesc, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO* pInfo);
    D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS CheckDriverMatchingIdentifier(D3D12_SERIALIZED_DATA_TYPE SerializedDataType, const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER* pIdentifierToCheck);
}

mixin(uuid!(ID3D12Resource1, "9D5E227A", "4430", "4161", ["88", "B3", "3E", "CA", "6B", "B1", "6E", "19"]));
extern (C++) interface ID3D12Resource1 : ID3D12Resource
{
    HRESULT GetProtectedResourceSession(REFIID riid, void** ppProtectedSession);
}

mixin(uuid!(ID3D12Heap1, "572F7389", "2168", "49E3", ["96", "93", "D6", "DF", "58", "71", "BF", "6D"]));
extern (C++) interface ID3D12Heap1 : ID3D12Heap
{
    HRESULT GetProtectedResourceSession(REFIID riid, void** ppProtectedSession);
}

mixin(uuid!(ID3D12GraphicsCommandList3, "6FDA83A7", "B84C", "4E38", ["9A", "C8", "C7", "BD", "22", "01", "6B", "3D"]));
extern (C++) interface ID3D12GraphicsCommandList3 : ID3D12GraphicsCommandList2
{
    void SetProtectedResourceSession(ID3D12ProtectedResourceSession* pProtectedResourceSession);
}

mixin(uuid!(ID3D12MetaCommand, "DBB84C27", "36CE", "4FC9", ["B8", "01", "F0", "48", "C4", "6A", "C5", "70"]));
extern (C++) interface ID3D12MetaCommand : ID3D12Pageable
{
    ulong GetRequiredParameterResourceSize(D3D12_META_COMMAND_PARAMETER_STAGE Stage, uint ParameterIndex);
}

mixin(uuid!(ID3D12GraphicsCommandList4, "8754318e", "d3a9", "4541", ["98", "cf", "64", "5b", "50", "dc", "48", "74"]));
extern (C++) interface ID3D12GraphicsCommandList4 : ID3D12GraphicsCommandList3
{
    void BeginRenderPass(uint NumRenderTargets, const D3D12_RENDER_PASS_RENDER_TARGET_DESC* pRenderTargets, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC* pDepthStencil, D3D12_RENDER_PASS_FLAGS Flags);
    void EndRenderPass();
    void InitializeMetaCommand(ID3D12MetaCommand* pMetaCommand, const void* pInitializationParametersData, size_t InitializationParametersDataSizeInBytes);
    void ExecuteMetaCommand(ID3D12MetaCommand* pMetaCommand, const void* pExecutionParametersData, size_t ExecutionParametersDataSizeInBytes);
    void BuildRaytracingAccelerationStructure(const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC* pDesc, uint NumPostbuildInfoDescs, const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* pPostbuildInfoDescs);
    void EmitRaytracingAccelerationStructurePostbuildInfo(const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* pDesc, uint NumSourceAccelerationStructures, const D3D12_GPU_VIRTUAL_ADDRESS* pSourceAccelerationStructureData);
    void CopyRaytracingAccelerationStructure(D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData, D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode);
    void SetPipelineState1(ID3D12StateObject* pStateObject);
    void DispatchRays(const D3D12_DISPATCH_RAYS_DESC* pDesc);
}

mixin(uuid!(ID3D12Tools, "7071e1f0", "e84b", "4b33", ["97", "4f", "12", "fa", "49", "de", "65", "c5"]));
extern (C++) interface ID3D12Tools : IUnknown
{
    void EnableShaderInstrumentation(bool bEnable);
    bool ShaderInstrumentationEnabled();
}

enum D3D12_16BIT_INDEX_STRIP_CUT_VALUE = (0xffff);
enum D3D12_32BIT_INDEX_STRIP_CUT_VALUE = (0xffffffff);
enum D3D12_8BIT_INDEX_STRIP_CUT_VALUE = (0xff);
enum D3D12_APPEND_ALIGNED_ELEMENT = (0xffffffff);
enum D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = (9);
enum D3D12_CLIP_OR_CULL_DISTANCE_COUNT = (8);
enum D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = (2);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = (14);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = (4);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = (32);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = (15);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = (16);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = (4);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = (15);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = (1);
enum D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = (1);
enum D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = (64);
enum D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = (4);
enum D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = (1);
enum D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = (1);
enum D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = (1);
enum D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = (32);
enum D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = (1);
enum D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = (128);
enum D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = (1);
enum D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = (1);
enum D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = (128);
enum D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = (1);
enum D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT = (16);
enum D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = (1);
enum D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = (1);
enum D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT = (16);
enum D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = (32);
enum D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS = (4);
enum D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_COMMONSHADER_TEMP_REGISTER_COUNT = (4096);
enum D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = (3);
enum D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS = (3);
enum D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = (10);
enum D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = (-10);
enum D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = (-8);
enum D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = (7);
enum D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = (256);
enum D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (256);
enum D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = (64);
enum D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (240);
enum D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = (68);
enum D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (224);
enum D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = (72);
enum D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (208);
enum D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = (76);
enum D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (192);
enum D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = (84);
enum D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (176);
enum D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = (92);
enum D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (160);
enum D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = (100);
enum D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (144);
enum D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = (112);
enum D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (128);
enum D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = (128);
enum D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (112);
enum D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = (144);
enum D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (96);
enum D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = (168);
enum D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (80);
enum D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = (204);
enum D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (64);
enum D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = (256);
enum D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (48);
enum D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = (340);
enum D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (32);
enum D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = (512);
enum D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = (16);
enum D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = (768);
enum D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = (1);
enum D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = (256);
enum D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = (768);
enum D3D12_CS_4_X_THREAD_GROUP_MAX_X = (768);
enum D3D12_CS_4_X_THREAD_GROUP_MAX_Y = (768);
enum D3D12_CS_4_X_UAV_REGISTER_COUNT = (1);
enum D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = (65535);
enum D3D12_CS_TGSM_REGISTER_COUNT = (8192);
enum D3D12_CS_TGSM_REGISTER_READS_PER_INST = (1);
enum D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = (1);
enum D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = (1);
enum D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS = (3);
enum D3D12_CS_THREADGROUPID_REGISTER_COUNT = (1);
enum D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = (1);
enum D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = (1);
enum D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS = (3);
enum D3D12_CS_THREADIDINGROUP_REGISTER_COUNT = (1);
enum D3D12_CS_THREADID_REGISTER_COMPONENTS = (3);
enum D3D12_CS_THREADID_REGISTER_COUNT = (1);
enum D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = (1024);
enum D3D12_CS_THREAD_GROUP_MAX_X = (1024);
enum D3D12_CS_THREAD_GROUP_MAX_Y = (1024);
enum D3D12_CS_THREAD_GROUP_MAX_Z = (64);
enum D3D12_CS_THREAD_GROUP_MIN_X = (1);
enum D3D12_CS_THREAD_GROUP_MIN_Y = (1);
enum D3D12_CS_THREAD_GROUP_MIN_Z = (1);
enum D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = (16384);
enum D3D12_DEFAULT_BLEND_FACTOR_ALPHA = (1.0f);
enum D3D12_DEFAULT_BLEND_FACTOR_BLUE = (1.0f);
enum D3D12_DEFAULT_BLEND_FACTOR_GREEN = (1.0f);
enum D3D12_DEFAULT_BLEND_FACTOR_RED = (1.0f);
enum D3D12_DEFAULT_BORDER_COLOR_COMPONENT = (0.0f);
enum D3D12_DEFAULT_DEPTH_BIAS = (0);
enum D3D12_DEFAULT_DEPTH_BIAS_CLAMP = (0.0f);
enum D3D12_DEFAULT_MAX_ANISOTROPY = (16);
enum D3D12_DEFAULT_MIP_LOD_BIAS = (0.0f);
enum D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = (4194304);
enum D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX = (0);
enum D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = (65536);
enum D3D12_DEFAULT_SAMPLE_MASK = (0xffffffff);
enum D3D12_DEFAULT_SCISSOR_ENDX = (0);
enum D3D12_DEFAULT_SCISSOR_ENDY = (0);
enum D3D12_DEFAULT_SCISSOR_STARTX = (0);
enum D3D12_DEFAULT_SCISSOR_STARTY = (0);
enum D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = (0.0f);
enum D3D12_DEFAULT_STENCIL_READ_MASK = (0xff);
enum D3D12_DEFAULT_STENCIL_REFERENCE = (0);
enum D3D12_DEFAULT_STENCIL_WRITE_MASK = (0xff);
enum D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = (0);
enum D3D12_DEFAULT_VIEWPORT_HEIGHT = (0);
enum D3D12_DEFAULT_VIEWPORT_MAX_DEPTH = (0.0f);
enum D3D12_DEFAULT_VIEWPORT_MIN_DEPTH = (0.0f);
enum D3D12_DEFAULT_VIEWPORT_TOPLEFTX = (0);
enum D3D12_DEFAULT_VIEWPORT_TOPLEFTY = (0);
enum D3D12_DEFAULT_VIEWPORT_WIDTH = (0);
enum D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = (0xffffffff);
enum D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END = (0xfffffff7);
enum D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START = (0xfffffff0);
enum D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = (3968);
enum D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = (4);
enum D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = (32);
enum D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = (2);
enum D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = (1);
enum D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = (3);
enum D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = (1);
enum D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = (2);
enum D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = (1);
enum D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = (4);
enum D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = (32);
enum D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = (2);
enum D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = (1);
enum D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = (1);
enum D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = (1);
enum D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = (2);
enum D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = (1);
enum D3D12_DS_OUTPUT_REGISTER_COMPONENTS = (4);
enum D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_DS_OUTPUT_REGISTER_COUNT = (32);
enum D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP = (0.6);
enum D3D12_FLOAT32_MAX = (3.402823466e+38f);
enum D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = (0.6f);
enum D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = (2.4f);
enum D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = (1.0f);
enum D3D12_FLOAT_TO_SRGB_OFFSET = (0.055f);
enum D3D12_FLOAT_TO_SRGB_SCALE_1 = (12.92f);
enum D3D12_FLOAT_TO_SRGB_SCALE_2 = (1.055f);
enum D3D12_FLOAT_TO_SRGB_THRESHOLD = (0.0031308f);
enum D3D12_FTOI_INSTRUCTION_MAX_INPUT = (2147483647.999f);
enum D3D12_FTOI_INSTRUCTION_MIN_INPUT = (-2147483648.999f);
enum D3D12_FTOU_INSTRUCTION_MAX_INPUT = (4294967295.999f);
enum D3D12_FTOU_INSTRUCTION_MIN_INPUT = (0.0f);
enum D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST = (2);
enum D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS = (1);
enum D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = (1);
enum D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = (1);
enum D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = (1);
enum D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT = (1);
enum D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = (2);
enum D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = (1);
enum D3D12_GS_INPUT_REGISTER_COMPONENTS = (4);
enum D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_GS_INPUT_REGISTER_COUNT = (32);
enum D3D12_GS_INPUT_REGISTER_READS_PER_INST = (2);
enum D3D12_GS_INPUT_REGISTER_READ_PORTS = (1);
enum D3D12_GS_INPUT_REGISTER_VERTICES = (32);
enum D3D12_GS_MAX_INSTANCE_COUNT = (32);
enum D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = (1024);
enum D3D12_GS_OUTPUT_ELEMENTS = (32);
enum D3D12_GS_OUTPUT_REGISTER_COMPONENTS = (4);
enum D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_GS_OUTPUT_REGISTER_COUNT = (32);
enum D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = (32);
enum D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = (32);
enum D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS = (4);
enum D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS = (1);
enum D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = (0xffffffff);
enum D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = (1);
enum D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = (1);
enum D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = (1);
enum D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = (1);
enum D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = (1);
enum D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = (1);
enum D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = (1);
enum D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = (1);
enum D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = (1);
enum D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = (0xffffffff);
enum D3D12_HS_MAXTESSFACTOR_LOWER_BOUND = (1.0f);
enum D3D12_HS_MAXTESSFACTOR_UPPER_BOUND = (64.0f);
enum D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = (3968);
enum D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = (1);
enum D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = (1);
enum D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = (1);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = (4);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = (32);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = (2);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = (1);
enum D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = (128);
enum D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = (0);
enum D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY = (0);
enum D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = (0);
enum D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = (1);
enum D3D12_IA_INSTANCE_ID_BIT_COUNT = (32);
enum D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT = (32);
enum D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT = (32);
enum D3D12_IA_PRIMITIVE_ID_BIT_COUNT = (32);
enum D3D12_IA_VERTEX_ID_BIT_COUNT = (32);
enum D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = (32);
enum D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = (128);
enum D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = (32);
enum D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = (0xffffffff);
enum D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER = (0xffffffff);
enum D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = (0xffffffff);
enum D3D12_KEEP_UNORDERED_ACCESS_VIEWS = (0xffffffff);
enum D3D12_LINEAR_GAMMA = (1.0f);
enum D3D12_MAJOR_VERSION = (12);
enum D3D12_MAX_BORDER_COLOR_COMPONENT = (1.0f);
enum D3D12_MAX_DEPTH = (1.0f);
enum D3D12_MAX_LIVE_STATIC_SAMPLERS = (2032);
enum D3D12_MAX_MAXANISOTROPY = (16);
enum D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT = (32);
enum D3D12_MAX_POSITION_VALUE = (3.402823466e+34f);
enum D3D12_MAX_ROOT_COST = (64);
enum D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = (1000000);
enum D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 = (1000000);
enum D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = (2048);
enum D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP = (17);
enum D3D12_MAX_VIEW_INSTANCE_COUNT = (4);
enum D3D12_MINOR_VERSION = (0);
enum D3D12_MIN_BORDER_COLOR_COMPONENT = (0.0f);
enum D3D12_MIN_DEPTH = (0.0f);
enum D3D12_MIN_MAXANISOTROPY = (0);
enum D3D12_MIP_LOD_BIAS_MAX = (15.99f);
enum D3D12_MIP_LOD_BIAS_MIN = (-16.0f);
enum D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT = (8);
enum D3D12_MIP_LOD_RANGE_BIT_COUNT = (8);
enum D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = (1.4f);
enum D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = (0);
enum D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = (0xffffffff);
enum D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = (0xfffffff8);
enum D3D12_PACKED_TILE = (0xffffffff);
enum D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = (15);
enum D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = (16);
enum D3D12_PS_CS_UAV_REGISTER_COMPONENTS = (1);
enum D3D12_PS_CS_UAV_REGISTER_COUNT = (8);
enum D3D12_PS_CS_UAV_REGISTER_READS_PER_INST = (1);
enum D3D12_PS_CS_UAV_REGISTER_READ_PORTS = (1);
enum D3D12_PS_FRONTFACING_DEFAULT_VALUE = (0xffffffff);
enum D3D12_PS_FRONTFACING_FALSE_VALUE = (0);
enum D3D12_PS_FRONTFACING_TRUE_VALUE = (0xffffffff);
enum D3D12_PS_INPUT_REGISTER_COMPONENTS = (4);
enum D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_PS_INPUT_REGISTER_COUNT = (32);
enum D3D12_PS_INPUT_REGISTER_READS_PER_INST = (2);
enum D3D12_PS_INPUT_REGISTER_READ_PORTS = (1);
enum D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = (0.0f);
enum D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = (1);
enum D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT = (1);
enum D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS = (1);
enum D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_PS_OUTPUT_MASK_REGISTER_COUNT = (1);
enum D3D12_PS_OUTPUT_REGISTER_COMPONENTS = (4);
enum D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_PS_OUTPUT_REGISTER_COUNT = (8);
enum D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = (0.5f);
enum D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = (16);
enum D3D12_RAYTRACING_AABB_BYTE_ALIGNMENT = (8);
enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT = (256);
enum D3D12_RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT = (16);
enum D3D12_RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES = (32);
enum D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH = (31);
enum D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT = (32);
enum D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT = (64);
enum D3D12_RAYTRACING_TRANSFORM3X4_BYTE_ALIGNMENT = (16);
enum D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = (4096);
enum D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = (27);
enum D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = (4096);
enum D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = (4096);
enum D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = (32);
enum D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = (32);
enum D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = (16384);
enum D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = (1024);
enum D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = (4096);
enum D3D12_REQ_MAXANISOTROPY = (16);
enum D3D12_REQ_MIP_LEVELS = (15);
enum D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = (2048);
enum D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = (4096);
enum D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = (16384);
enum D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = (128);
enum D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = (0.25f);
enum D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = (2048);
enum D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = (20);
enum D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = (4096);
enum D3D12_REQ_SUBRESOURCES = (30720);
enum D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = (2048);
enum D3D12_REQ_TEXTURE1D_U_DIMENSION = (16384);
enum D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = (2048);
enum D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = (16384);
enum D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = (2048);
enum D3D12_REQ_TEXTURECUBE_DIMENSION = (16384);
enum D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = (0);
enum D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = (0xffffffff);
enum D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES = (32);
enum D3D12_SHADER_MAJOR_VERSION = (5);
enum D3D12_SHADER_MAX_INSTANCES = (65535);
enum D3D12_SHADER_MAX_INTERFACES = (253);
enum D3D12_SHADER_MAX_INTERFACE_CALL_SITES = (4096);
enum D3D12_SHADER_MAX_TYPES = (65535);
enum D3D12_SHADER_MINOR_VERSION = (1);
enum D3D12_SHIFT_INSTRUCTION_PAD_VALUE = (0);
enum D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = (5);
enum D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = (8);
enum D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = (65536);
enum D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = (4096);
enum D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = (2048);
enum D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = (512);
enum D3D12_SO_BUFFER_SLOT_COUNT = (4);
enum D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = (0xffffffff);
enum D3D12_SO_NO_RASTERIZED_STREAM = (0xffffffff);
enum D3D12_SO_OUTPUT_COMPONENT_COUNT = (128);
enum D3D12_SO_STREAM_COUNT = (4);
enum D3D12_SPEC_DATE_DAY = (14);
enum D3D12_SPEC_DATE_MONTH = (11);
enum D3D12_SPEC_DATE_YEAR = (2014);
enum D3D12_SPEC_VERSION = (1.16);
enum D3D12_SRGB_GAMMA = (2.2f);
enum D3D12_SRGB_TO_FLOAT_DENOMINATOR_1 = (12.92f);
enum D3D12_SRGB_TO_FLOAT_DENOMINATOR_2 = (1.055f);
enum D3D12_SRGB_TO_FLOAT_EXPONENT = (2.4f);
enum D3D12_SRGB_TO_FLOAT_OFFSET = (0.055f);
enum D3D12_SRGB_TO_FLOAT_THRESHOLD = (0.04045f);
enum D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = (0.5f);
enum D3D12_STANDARD_COMPONENT_BIT_COUNT = (32);
enum D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = (64);
enum D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = (4);
enum D3D12_STANDARD_PIXEL_COMPONENT_COUNT = (128);
enum D3D12_STANDARD_PIXEL_ELEMENT_COUNT = (32);
enum D3D12_STANDARD_VECTOR_SIZE = (4);
enum D3D12_STANDARD_VERTEX_ELEMENT_COUNT = (32);
enum D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = (64);
enum D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT = (8);
enum D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT = (8);
enum D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END = (0xffffffff);
enum D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START = (0xfffffff0);
enum D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = (64);
enum D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = (64);
enum D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = (63);
enum D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR = (64);
enum D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = (2);
enum D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = (1);
enum D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = (1);
enum D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT = (16);
enum D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = (256);
enum D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = (512);
enum D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES = (65536);
enum D3D12_TRACKED_WORKLOAD_MAX_INSTANCES = (32);
enum D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = (4096);
enum D3D12_UAV_SLOT_COUNT = (64);
enum D3D12_UNBOUND_MEMORY_ACCESS_RESULT = (0);
enum D3D12_VIDEO_DECODE_MAX_ARGUMENTS = (10);
enum D3D12_VIDEO_DECODE_MAX_HISTOGRAM_COMPONENTS = (4);
enum D3D12_VIDEO_DECODE_MIN_BITSTREAM_OFFSET_ALIGNMENT = (256);
enum D3D12_VIDEO_DECODE_MIN_HISTOGRAM_OFFSET_ALIGNMENT = (256);
enum D3D12_VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN = (0xffffffff);
enum D3D12_VIDEO_PROCESS_MAX_FILTERS = (32);
enum D3D12_VIDEO_PROCESS_STEREO_VIEWS = (2);
enum D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = (15);
enum D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = (16);
enum D3D12_VIEWPORT_BOUNDS_MAX = (32767);
enum D3D12_VIEWPORT_BOUNDS_MIN = (-32768);
enum D3D12_VS_INPUT_REGISTER_COMPONENTS = (4);
enum D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_VS_INPUT_REGISTER_COUNT = (32);
enum D3D12_VS_INPUT_REGISTER_READS_PER_INST = (2);
enum D3D12_VS_INPUT_REGISTER_READ_PORTS = (1);
enum D3D12_VS_OUTPUT_REGISTER_COMPONENTS = (4);
enum D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = (32);
enum D3D12_VS_OUTPUT_REGISTER_COUNT = (32);
enum D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = (10);
enum D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = (25);
enum D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = (25);
alias D3D12_GPU_VIRTUAL_ADDRESS = ulong;

alias D3D12_COMMAND_LIST_TYPE = uint;
enum : D3D12_COMMAND_LIST_TYPE
{
    D3D12_COMMAND_LIST_TYPE_DIRECT = 0,
    D3D12_COMMAND_LIST_TYPE_BUNDLE = 1,
    D3D12_COMMAND_LIST_TYPE_COMPUTE = 2,
    D3D12_COMMAND_LIST_TYPE_COPY = 3,
    D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE = 4,
    D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS = 5
}

alias D3D12_COMMAND_QUEUE_FLAGS = uint;
enum : D3D12_COMMAND_QUEUE_FLAGS
{
    D3D12_COMMAND_QUEUE_FLAG_NONE = 0,
    D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1
}

alias D3D12_COMMAND_QUEUE_PRIORITY = uint;
enum : D3D12_COMMAND_QUEUE_PRIORITY
{
    D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0,
    D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100,
    D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000
}

struct D3D12_COMMAND_QUEUE_DESC
{
    D3D12_COMMAND_LIST_TYPE Type;
    int Priority;
    D3D12_COMMAND_QUEUE_FLAGS Flags;
    uint NodeMask;
}

alias D3D12_PRIMITIVE_TOPOLOGY_TYPE = uint;
enum : D3D12_PRIMITIVE_TOPOLOGY_TYPE
{
    D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
    D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1,
    D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2,
    D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3,
    D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4
}

alias D3D12_INPUT_CLASSIFICATION = uint;
enum : D3D12_INPUT_CLASSIFICATION
{
    D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0,
    D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1
}

struct D3D12_INPUT_ELEMENT_DESC
{
    LPCSTR SemanticName;
    uint SemanticIndex;
    DXGI_FORMAT Format;
    uint InputSlot;
    uint AlignedByteOffset;
    D3D12_INPUT_CLASSIFICATION InputSlotClass;
    uint InstanceDataStepRate;
}

alias D3D12_FILL_MODE = uint;
enum : D3D12_FILL_MODE
{
    D3D12_FILL_MODE_WIREFRAME = 2,
    D3D12_FILL_MODE_SOLID = 3
}

alias D3D12_PRIMITIVE_TOPOLOGY = D3D_PRIMITIVE_TOPOLOGY;
alias D3D12_PRIMITIVE = D3D_PRIMITIVE;

alias D3D12_CULL_MODE = uint;
enum : D3D12_CULL_MODE
{
    D3D12_CULL_MODE_NONE = 1,
    D3D12_CULL_MODE_FRONT = 2,
    D3D12_CULL_MODE_BACK = 3
}
struct D3D12_SO_DECLARATION_ENTRY
{
    uint Stream;
    LPCSTR SemanticName;
    uint SemanticIndex;
    byte StartComponent;
    byte ComponentCount;
    byte OutputSlot;
}

struct D3D12_VIEWPORT
{
    float TopLeftX;
    float TopLeftY;
    float Width;
    float Height;
    float MinDepth;
    float MaxDepth;

    bool opEquals(const ref D3D12_VIEWPORT r) const
    {
        return TopLeftX == r.TopLeftX && TopLeftY == r.TopLeftY && Width == r.Width && Height == r.Height && MinDepth == r.MinDepth && MaxDepth == r.MaxDepth;
    }
}

alias D3D12_RECT = RECT;
struct D3D12_BOX
{
    uint left;
    uint top;
    uint front;
    uint right;
    uint bottom;
    uint back;

    bool opEquals(const ref D3D12_BOX r) const
    {
        return left == r.left && top == r.top && front == r.front && right == r.right && bottom == r.bottom && back == r.back;
    }
}

alias D3D12_COMPARISON_FUNC = uint;
enum : D3D12_COMPARISON_FUNC
{
    D3D12_COMPARISON_FUNC_NEVER = 1,
    D3D12_COMPARISON_FUNC_LESS = 2,
    D3D12_COMPARISON_FUNC_EQUAL = 3,
    D3D12_COMPARISON_FUNC_LESS_EQUAL = 4,
    D3D12_COMPARISON_FUNC_GREATER = 5,
    D3D12_COMPARISON_FUNC_NOT_EQUAL = 6,
    D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7,
    D3D12_COMPARISON_FUNC_ALWAYS = 8
}

alias D3D12_DEPTH_WRITE_MASK = uint;
enum : D3D12_DEPTH_WRITE_MASK
{
    D3D12_DEPTH_WRITE_MASK_ZERO = 0,
    D3D12_DEPTH_WRITE_MASK_ALL = 1
}

alias D3D12_STENCIL_OP = uint;
enum : D3D12_STENCIL_OP
{
    D3D12_STENCIL_OP_KEEP = 1,
    D3D12_STENCIL_OP_ZERO = 2,
    D3D12_STENCIL_OP_REPLACE = 3,
    D3D12_STENCIL_OP_INCR_SAT = 4,
    D3D12_STENCIL_OP_DECR_SAT = 5,
    D3D12_STENCIL_OP_INVERT = 6,
    D3D12_STENCIL_OP_INCR = 7,
    D3D12_STENCIL_OP_DECR = 8
}

struct D3D12_DEPTH_STENCILOP_DESC
{
    D3D12_STENCIL_OP StencilFailOp;
    D3D12_STENCIL_OP StencilDepthFailOp;
    D3D12_STENCIL_OP StencilPassOp;
    D3D12_COMPARISON_FUNC StencilFunc;
}

struct D3D12_DEPTH_STENCIL_DESC
{
    bool DepthEnable;
    D3D12_DEPTH_WRITE_MASK DepthWriteMask;
    D3D12_COMPARISON_FUNC DepthFunc;
    bool StencilEnable;
    ubyte StencilReadMask;
    ubyte StencilWriteMask;
    D3D12_DEPTH_STENCILOP_DESC FrontFace;
    D3D12_DEPTH_STENCILOP_DESC BackFace;
}

struct D3D12_DEPTH_STENCIL_DESC1
{
    bool DepthEnable;
    D3D12_DEPTH_WRITE_MASK DepthWriteMask;
    D3D12_COMPARISON_FUNC DepthFunc;
    bool StencilEnable;
    ubyte StencilReadMask;
    ubyte StencilWriteMask;
    D3D12_DEPTH_STENCILOP_DESC FrontFace;
    D3D12_DEPTH_STENCILOP_DESC BackFace;
    bool DepthBoundsTestEnable;
}

alias D3D12_BLEND = uint;
enum : D3D12_BLEND
{
    D3D12_BLEND_ZERO = 1,
    D3D12_BLEND_ONE = 2,
    D3D12_BLEND_SRC_COLOR = 3,
    D3D12_BLEND_INV_SRC_COLOR = 4,
    D3D12_BLEND_SRC_ALPHA = 5,
    D3D12_BLEND_INV_SRC_ALPHA = 6,
    D3D12_BLEND_DEST_ALPHA = 7,
    D3D12_BLEND_INV_DEST_ALPHA = 8,
    D3D12_BLEND_DEST_COLOR = 9,
    D3D12_BLEND_INV_DEST_COLOR = 10,
    D3D12_BLEND_SRC_ALPHA_SAT = 11,
    D3D12_BLEND_BLEND_FACTOR = 14,
    D3D12_BLEND_INV_BLEND_FACTOR = 15,
    D3D12_BLEND_SRC1_COLOR = 16,
    D3D12_BLEND_INV_SRC1_COLOR = 17,
    D3D12_BLEND_SRC1_ALPHA = 18,
    D3D12_BLEND_INV_SRC1_ALPHA = 19
}

alias D3D12_BLEND_OP = uint;
enum : D3D12_BLEND_OP
{
    D3D12_BLEND_OP_ADD = 1,
    D3D12_BLEND_OP_SUBTRACT = 2,
    D3D12_BLEND_OP_REV_SUBTRACT = 3,
    D3D12_BLEND_OP_MIN = 4,
    D3D12_BLEND_OP_MAX = 5
}

alias D3D12_COLOR_WRITE_ENABLE = uint;
enum : D3D12_COLOR_WRITE_ENABLE
{
    D3D12_COLOR_WRITE_ENABLE_RED = 1,
    D3D12_COLOR_WRITE_ENABLE_GREEN = 2,
    D3D12_COLOR_WRITE_ENABLE_BLUE = 4,
    D3D12_COLOR_WRITE_ENABLE_ALPHA = 8,
    D3D12_COLOR_WRITE_ENABLE_ALL = (((D3D12_COLOR_WRITE_ENABLE_RED | D3D12_COLOR_WRITE_ENABLE_GREEN) | D3D12_COLOR_WRITE_ENABLE_BLUE) | D3D12_COLOR_WRITE_ENABLE_ALPHA)
}

alias D3D12_LOGIC_OP = uint;
enum : D3D12_LOGIC_OP
{
    D3D12_LOGIC_OP_CLEAR = 0,
    D3D12_LOGIC_OP_SET = (D3D12_LOGIC_OP_CLEAR + 1),
    D3D12_LOGIC_OP_COPY = (D3D12_LOGIC_OP_SET + 1),
    D3D12_LOGIC_OP_COPY_INVERTED = (D3D12_LOGIC_OP_COPY + 1),
    D3D12_LOGIC_OP_NOOP = (D3D12_LOGIC_OP_COPY_INVERTED + 1),
    D3D12_LOGIC_OP_INVERT = (D3D12_LOGIC_OP_NOOP + 1),
    D3D12_LOGIC_OP_AND = (D3D12_LOGIC_OP_INVERT + 1),
    D3D12_LOGIC_OP_NAND = (D3D12_LOGIC_OP_AND + 1),
    D3D12_LOGIC_OP_OR = (D3D12_LOGIC_OP_NAND + 1),
    D3D12_LOGIC_OP_NOR = (D3D12_LOGIC_OP_OR + 1),
    D3D12_LOGIC_OP_XOR = (D3D12_LOGIC_OP_NOR + 1),
    D3D12_LOGIC_OP_EQUIV = (D3D12_LOGIC_OP_XOR + 1),
    D3D12_LOGIC_OP_AND_REVERSE = (D3D12_LOGIC_OP_EQUIV + 1),
    D3D12_LOGIC_OP_AND_INVERTED = (D3D12_LOGIC_OP_AND_REVERSE + 1),
    D3D12_LOGIC_OP_OR_REVERSE = (D3D12_LOGIC_OP_AND_INVERTED + 1),
    D3D12_LOGIC_OP_OR_INVERTED = (D3D12_LOGIC_OP_OR_REVERSE + 1)
}
struct D3D12_RENDER_TARGET_BLEND_DESC
{
    bool BlendEnable;
    bool LogicOpEnable;
    D3D12_BLEND SrcBlend;
    D3D12_BLEND DestBlend;
    D3D12_BLEND_OP BlendOp;
    D3D12_BLEND SrcBlendAlpha;
    D3D12_BLEND DestBlendAlpha;
    D3D12_BLEND_OP BlendOpAlpha;
    D3D12_LOGIC_OP LogicOp;
    ubyte RenderTargetWriteMask;
}

struct D3D12_BLEND_DESC
{
    bool AlphaToCoverageEnable;
    bool IndependentBlendEnable;
    D3D12_RENDER_TARGET_BLEND_DESC[8] RenderTarget;
}

alias D3D12_CONSERVATIVE_RASTERIZATION_MODE = uint;
enum : D3D12_CONSERVATIVE_RASTERIZATION_MODE
{
    D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0,
    D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1
}
struct D3D12_RASTERIZER_DESC
{
    D3D12_FILL_MODE FillMode;
    D3D12_CULL_MODE CullMode;
    bool FrontCounterClockwise;
    int DepthBias;
    float DepthBiasClamp;
    float SlopeScaledDepthBias;
    bool DepthClipEnable;
    bool MultisampleEnable;
    bool AntialiasedLineEnable;
    uint ForcedSampleCount;
    D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster;
}

struct D3D12_SHADER_BYTECODE
{
    void* pShaderBytecode;
    size_t BytecodeLength;
}

struct D3D12_STREAM_OUTPUT_DESC
{
    D3D12_SO_DECLARATION_ENTRY* pSODeclaration;
    uint NumEntries;
    uint* pBufferStrides;
    uint NumStrides;
    uint RasterizedStream;
}

struct D3D12_INPUT_LAYOUT_DESC
{
    D3D12_INPUT_ELEMENT_DESC* pInputElementDescs;
    uint NumElements;
}

alias D3D12_INDEX_BUFFER_STRIP_CUT_VALUE = uint;
enum : D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
{
    D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0,
    D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1,
    D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2
}
struct D3D12_CACHED_PIPELINE_STATE
{
    void* pCachedBlob;
    size_t CachedBlobSizeInBytes;
}

alias D3D12_PIPELINE_STATE_FLAGS = uint;
enum : D3D12_PIPELINE_STATE_FLAGS
{
    D3D12_PIPELINE_STATE_FLAG_NONE = 0,
    D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1
}

struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
{
    ID3D12RootSignature* pRootSignature;
    D3D12_SHADER_BYTECODE VS;
    D3D12_SHADER_BYTECODE PS;
    D3D12_SHADER_BYTECODE DS;
    D3D12_SHADER_BYTECODE HS;
    D3D12_SHADER_BYTECODE GS;
    D3D12_STREAM_OUTPUT_DESC StreamOutput;
    D3D12_BLEND_DESC BlendState;
    uint SampleMask;
    D3D12_RASTERIZER_DESC RasterizerState;
    D3D12_DEPTH_STENCIL_DESC DepthStencilState;
    D3D12_INPUT_LAYOUT_DESC InputLayout;
    D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
    D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
    uint NumRenderTargets;
    DXGI_FORMAT[8] RTVFormats;
    DXGI_FORMAT DSVFormat;
    DXGI_SAMPLE_DESC SampleDesc;
    uint NodeMask;
    D3D12_CACHED_PIPELINE_STATE CachedPSO;
    D3D12_PIPELINE_STATE_FLAGS Flags;
}

struct D3D12_COMPUTE_PIPELINE_STATE_DESC
{
    ID3D12RootSignature* pRootSignature;
    D3D12_SHADER_BYTECODE CS;
    uint NodeMask;
    D3D12_CACHED_PIPELINE_STATE CachedPSO;
    D3D12_PIPELINE_STATE_FLAGS Flags;
}

struct D3D12_RT_FORMAT_ARRAY
{
    DXGI_FORMAT[8] RTFormats;
    uint NumRenderTargets;
}

struct D3D12_PIPELINE_STATE_STREAM_DESC
{
    size_t SizeInBytes;
    void* pPipelineStateSubobjectStream;
}

alias D3D12_PIPELINE_STATE_SUBOBJECT_TYPE = uint;
enum : D3D12_PIPELINE_STATE_SUBOBJECT_TYPE
{
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE = 0,
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1 = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1 + 1),
    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID = (D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING + 1)
}

alias D3D12_FEATURE = uint;
enum : D3D12_FEATURE
{
    D3D12_FEATURE_D3D12_OPTIONS = 0,
    D3D12_FEATURE_ARCHITECTURE = 1,
    D3D12_FEATURE_FEATURE_LEVELS = 2,
    D3D12_FEATURE_FORMAT_SUPPORT = 3,
    D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4,
    D3D12_FEATURE_FORMAT_INFO = 5,
    D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
    D3D12_FEATURE_SHADER_MODEL = 7,
    D3D12_FEATURE_D3D12_OPTIONS1 = 8,
    D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
    D3D12_FEATURE_ROOT_SIGNATURE = 12,
    D3D12_FEATURE_ARCHITECTURE1 = 16,
    D3D12_FEATURE_D3D12_OPTIONS2 = 18,
    D3D12_FEATURE_SHADER_CACHE = 19,
    D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20,
    D3D12_FEATURE_D3D12_OPTIONS3 = 21,
    D3D12_FEATURE_EXISTING_HEAPS = 22,
    D3D12_FEATURE_D3D12_OPTIONS4 = 23,
    D3D12_FEATURE_SERIALIZATION = 24,
    D3D12_FEATURE_CROSS_NODE = 25,
    D3D12_FEATURE_D3D12_OPTIONS5 = 27
}

alias D3D12_SHADER_MIN_PRECISION_SUPPORT = uint;
enum : D3D12_SHADER_MIN_PRECISION_SUPPORT
{
    D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0,
    D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1,
    D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2
}

alias D3D12_TILED_RESOURCES_TIER = uint;
enum : D3D12_TILED_RESOURCES_TIER
{
    D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0,
    D3D12_TILED_RESOURCES_TIER_1 = 1,
    D3D12_TILED_RESOURCES_TIER_2 = 2,
    D3D12_TILED_RESOURCES_TIER_3 = 3,
    D3D12_TILED_RESOURCES_TIER_4 = 4
}

alias D3D12_RESOURCE_BINDING_TIER = uint;
enum : D3D12_RESOURCE_BINDING_TIER
{
    D3D12_RESOURCE_BINDING_TIER_1 = 1,
    D3D12_RESOURCE_BINDING_TIER_2 = 2,
    D3D12_RESOURCE_BINDING_TIER_3 = 3
}

alias D3D12_CONSERVATIVE_RASTERIZATION_TIER = uint;
enum : D3D12_CONSERVATIVE_RASTERIZATION_TIER
{
    D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0,
    D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1,
    D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2,
    D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3
}

alias D3D12_FORMAT_SUPPORT1 = uint;
enum : D3D12_FORMAT_SUPPORT1
{
    D3D12_FORMAT_SUPPORT1_NONE = 0,
    D3D12_FORMAT_SUPPORT1_BUFFER = 0x1,
    D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x2,
    D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x4,
    D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x8,
    D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x10,
    D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x20,
    D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x40,
    D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x80,
    D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x100,
    D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x200,
    D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x400,
    D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x800,
    D3D12_FORMAT_SUPPORT1_MIP = 0x1000,
    D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x4000,
    D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x8000,
    D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x10000,
    D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x40000,
    D3D12_FORMAT_SUPPORT1_DISPLAY = 0x80000,
    D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x100000,
    D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x200000,
    D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x400000,
    D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x800000,
    D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x1000000,
    D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000,
    D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x4000000,
    D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x8000000,
    D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000,
    D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000,
    D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000
}

alias D3D12_FORMAT_SUPPORT2 = uint;
enum : D3D12_FORMAT_SUPPORT2
{
    D3D12_FORMAT_SUPPORT2_NONE = 0,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10,
    D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20,
    D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40,
    D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80,
    D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100,
    D3D12_FORMAT_SUPPORT2_TILED = 0x200,
    D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000
}

alias D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS = uint;
enum : D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS
{
    D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0,
    D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x1
}

alias D3D12_CROSS_NODE_SHARING_TIER = uint;
enum : D3D12_CROSS_NODE_SHARING_TIER
{
    D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0,
    D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1,
    D3D12_CROSS_NODE_SHARING_TIER_1 = 2,
    D3D12_CROSS_NODE_SHARING_TIER_2 = 3,
    D3D12_CROSS_NODE_SHARING_TIER_3 = 4
}

alias D3D12_RESOURCE_HEAP_TIER = uint;
enum : D3D12_RESOURCE_HEAP_TIER
{
    D3D12_RESOURCE_HEAP_TIER_1 = 1,
    D3D12_RESOURCE_HEAP_TIER_2 = 2
}

alias D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER = uint;
enum : D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER
{
    D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED = 0,
    D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_1 = 1,
    D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_2 = 2
}

alias D3D12_VIEW_INSTANCING_TIER = uint;
enum : D3D12_VIEW_INSTANCING_TIER
{
    D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED = 0,
    D3D12_VIEW_INSTANCING_TIER_1 = 1,
    D3D12_VIEW_INSTANCING_TIER_2 = 2,
    D3D12_VIEW_INSTANCING_TIER_3 = 3
}

struct D3D12_FEATURE_DATA_D3D12_OPTIONS
{
    bool DoublePrecisionFloatShaderOps;
    bool OutputMergerLogicOp;
    D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport;
    D3D12_TILED_RESOURCES_TIER TiledResourcesTier;
    D3D12_RESOURCE_BINDING_TIER ResourceBindingTier;
    bool PSSpecifiedStencilRefSupported;
    bool TypedUAVLoadAdditionalFormats;
    bool ROVsSupported;
    D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
    uint MaxGPUVirtualAddressBitsPerResource;
    bool StandardSwizzle64KBSupported;
    D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier;
    bool CrossAdapterRowMajorTextureSupported;
    bool VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
    D3D12_RESOURCE_HEAP_TIER ResourceHeapTier;
}

struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
{
    bool WaveOps;
    uint WaveLaneCountMin;
    uint WaveLaneCountMax;
    uint TotalLaneCount;
    bool ExpandedComputeResourceStates;
    bool Int64ShaderOps;
}

struct D3D12_FEATURE_DATA_D3D12_OPTIONS2
{
    bool DepthBoundsTestSupported;
    D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier;
}

alias D3D_ROOT_SIGNATURE_VERSION = uint;
enum : D3D_ROOT_SIGNATURE_VERSION
{
    D3D_ROOT_SIGNATURE_VERSION_1 = 0x1,
    D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
    D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2
}
struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
{
    D3D_ROOT_SIGNATURE_VERSION HighestVersion;
}

struct D3D12_FEATURE_DATA_ARCHITECTURE
{
    uint NodeIndex;
    bool TileBasedRenderer;
    bool UMA;
    bool CacheCoherentUMA;
}

struct D3D12_FEATURE_DATA_ARCHITECTURE1
{
    uint NodeIndex;
    bool TileBasedRenderer;
    bool UMA;
    bool CacheCoherentUMA;
    bool IsolatedMMU;
}

struct D3D12_FEATURE_DATA_FEATURE_LEVELS
{
    uint NumFeatureLevels;
    D3D_FEATURE_LEVEL* pFeatureLevelsRequested;
    D3D_FEATURE_LEVEL MaxSupportedFeatureLevel;
}

alias D3D_SHADER_MODEL = uint;
enum : D3D_SHADER_MODEL
{
    D3D_SHADER_MODEL_5_1 = 0x51,
    D3D_SHADER_MODEL_6_0 = 0x60,
    D3D_SHADER_MODEL_6_1 = 0x61,
    D3D_SHADER_MODEL_6_2 = 0x62,
    D3D_SHADER_MODEL_6_3 = 0x63,
    D3D_SHADER_MODEL_6_4 = 0x64
}
struct D3D12_FEATURE_DATA_SHADER_MODEL
{
    D3D_SHADER_MODEL HighestShaderModel;
}

struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
{
    DXGI_FORMAT Format;
    D3D12_FORMAT_SUPPORT1 Support1;
    D3D12_FORMAT_SUPPORT2 Support2;
}

struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS
{
    DXGI_FORMAT Format;
    uint SampleCount;
    D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags;
    uint NumQualityLevels;
}

struct D3D12_FEATURE_DATA_FORMAT_INFO
{
    DXGI_FORMAT Format;
    ubyte PlaneCount;
}

struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
{
    uint MaxGPUVirtualAddressBitsPerResource;
    uint MaxGPUVirtualAddressBitsPerProcess;
}

alias D3D12_SHADER_CACHE_SUPPORT_FLAGS = uint;
enum : D3D12_SHADER_CACHE_SUPPORT_FLAGS
{
    D3D12_SHADER_CACHE_SUPPORT_NONE = 0,
    D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO = 0x1,
    D3D12_SHADER_CACHE_SUPPORT_LIBRARY = 0x2,
    D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x4,
    D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x8
}
struct D3D12_FEATURE_DATA_SHADER_CACHE
{
    D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags;
}

struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
{
    D3D12_COMMAND_LIST_TYPE CommandListType;
    uint Priority;
    bool PriorityForTypeIsSupported;
}

alias D3D12_COMMAND_LIST_SUPPORT_FLAGS = uint;
enum : D3D12_COMMAND_LIST_SUPPORT_FLAGS
{
    D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE = 0,
    D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT = (1 << D3D12_COMMAND_LIST_TYPE_DIRECT),
    D3D12_COMMAND_LIST_SUPPORT_FLAG_BUNDLE = (1 << D3D12_COMMAND_LIST_TYPE_BUNDLE),
    D3D12_COMMAND_LIST_SUPPORT_FLAG_COMPUTE = (1 << D3D12_COMMAND_LIST_TYPE_COMPUTE),
    D3D12_COMMAND_LIST_SUPPORT_FLAG_COPY = (1 << D3D12_COMMAND_LIST_TYPE_COPY),
    D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_DECODE = (1 << D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE),
    D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_PROCESS = (1 << D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS)
}
struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
{
    bool CopyQueueTimestampQueriesSupported;
    bool CastingFullyTypedFormatSupported;
    D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
    D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
    bool BarycentricsSupported;
}

struct D3D12_FEATURE_DATA_EXISTING_HEAPS
{
    bool Supported;
}

alias D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER = uint;
enum : D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER
{
    D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 = 0,
    D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_1 = (D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 + 1)
}
struct D3D12_FEATURE_DATA_D3D12_OPTIONS4
{
    bool MSAA64KBAlignedTextureSupported;
    D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
    bool Native16BitShaderOpsSupported;
}

alias D3D12_HEAP_SERIALIZATION_TIER = uint;
enum : D3D12_HEAP_SERIALIZATION_TIER
{
    D3D12_HEAP_SERIALIZATION_TIER_0 = 0,
    D3D12_HEAP_SERIALIZATION_TIER_10 = 10
}
struct D3D12_FEATURE_DATA_SERIALIZATION
{
    uint NodeIndex;
    D3D12_HEAP_SERIALIZATION_TIER HeapSerializationTier;
}

struct D3D12_FEATURE_DATA_CROSS_NODE
{
    D3D12_CROSS_NODE_SHARING_TIER SharingTier;
    bool AtomicShaderInstructions;
}

alias D3D12_RENDER_PASS_TIER = uint;
enum : D3D12_RENDER_PASS_TIER
{
    D3D12_RENDER_PASS_TIER_0 = 0,
    D3D12_RENDER_PASS_TIER_1 = 1,
    D3D12_RENDER_PASS_TIER_2 = 2
}
alias D3D12_RAYTRACING_TIER = uint;
enum : D3D12_RAYTRACING_TIER
{
    D3D12_RAYTRACING_TIER_NOT_SUPPORTED = 0,
    D3D12_RAYTRACING_TIER_1_0 = 10
}
struct D3D12_FEATURE_DATA_D3D12_OPTIONS5
{
    bool SRVOnlyTiledResourceTier3;
    D3D12_RENDER_PASS_TIER RenderPassesTier;
    D3D12_RAYTRACING_TIER RaytracingTier;
}

struct D3D12_RESOURCE_ALLOCATION_INFO
{
    ulong SizeInBytes;
    ulong Alignment;
}

struct D3D12_RESOURCE_ALLOCATION_INFO1
{
    ulong Offset;
    ulong Alignment;
    ulong SizeInBytes;
}

alias D3D12_HEAP_TYPE = uint;
enum : D3D12_HEAP_TYPE
{
    D3D12_HEAP_TYPE_DEFAULT = 1,
    D3D12_HEAP_TYPE_UPLOAD = 2,
    D3D12_HEAP_TYPE_READBACK = 3,
    D3D12_HEAP_TYPE_CUSTOM = 4
}
alias D3D12_CPU_PAGE_PROPERTY = uint;
enum : D3D12_CPU_PAGE_PROPERTY
{
    D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0,
    D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1,
    D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2,
    D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3
}
alias D3D12_MEMORY_POOL = uint;
enum : D3D12_MEMORY_POOL
{
    D3D12_MEMORY_POOL_UNKNOWN = 0,
    D3D12_MEMORY_POOL_L0 = 1,
    D3D12_MEMORY_POOL_L1 = 2
}
struct D3D12_HEAP_PROPERTIES
{
    D3D12_HEAP_TYPE Type;
    D3D12_CPU_PAGE_PROPERTY CPUPageProperty;
    D3D12_MEMORY_POOL MemoryPoolPreference;
    uint CreationNodeMask;
    uint VisibleNodeMask;

    this(D3D12_HEAP_TYPE type, uint creationNodeMask = 1, uint nodeMask = 1)
    {
        this.Type = type;
        this.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
        this.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
        this.CreationNodeMask = creationNodeMask;
        this.VisibleNodeMask = nodeMask;
    }

    bool opEquals(const ref D3D12_HEAP_PROPERTIES r) const
    {
        return Type == r.Type && CPUPageProperty == r.CPUPageProperty && MemoryPoolPreference == r.MemoryPoolPreference && CreationNodeMask == r.CreationNodeMask && VisibleNodeMask == r.VisibleNodeMask;
    }

    bool IsCPUAccessible() const
    {
        return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK || (Type == D3D12_HEAP_TYPE_CUSTOM && (CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE || CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK));
    }
}

alias D3D12_HEAP_FLAGS = uint;
enum : D3D12_HEAP_FLAGS
{
    D3D12_HEAP_FLAG_NONE = 0,
    D3D12_HEAP_FLAG_SHARED = 0x1,
    D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4,
    D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8,
    D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20,
    D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40,
    D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80,
    D3D12_HEAP_FLAG_HARDWARE_PROTECTED = 0x100,
    D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH = 0x200,
    D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS = 0x400,
    D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0,
    D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xc0,
    D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44,
    D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84
}

struct D3D12_HEAP_DESC
{
    ulong SizeInBytes;
    D3D12_HEAP_PROPERTIES Properties;
    ulong Alignment;
    D3D12_HEAP_FLAGS Flags;

    bool opEquals(const ref D3D12_HEAP_DESC r) const
    {
        return SizeInBytes == r.SizeInBytes && Properties == r.Properties && Alignment == r.Alignment && Flags == r.Flags;
    }
}

alias D3D12_RESOURCE_DIMENSION = uint;
enum : D3D12_RESOURCE_DIMENSION
{
    D3D12_RESOURCE_DIMENSION_UNKNOWN = 0,
    D3D12_RESOURCE_DIMENSION_BUFFER = 1,
    D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2,
    D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3,
    D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4
}
alias D3D12_TEXTURE_LAYOUT = uint;
enum : D3D12_TEXTURE_LAYOUT
{
    D3D12_TEXTURE_LAYOUT_UNKNOWN = 0,
    D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1,
    D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2,
    D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3
}
alias D3D12_RESOURCE_FLAGS = uint;
enum : D3D12_RESOURCE_FLAGS
{
    D3D12_RESOURCE_FLAG_NONE = 0,
    D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1,
    D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2,
    D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4,
    D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8,
    D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10,
    D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20,
    D3D12_RESOURCE_FLAG_VIDEO_DECODE_REFERENCE_ONLY = 0x40
}
struct D3D12_RESOURCE_DESC
{
    D3D12_RESOURCE_DIMENSION Dimension;
    ulong Alignment;
    ulong Width;
    uint Height;
    ushort DepthOrArraySize;
    ushort MipLevels;
    DXGI_FORMAT Format;
    DXGI_SAMPLE_DESC SampleDesc;
    D3D12_TEXTURE_LAYOUT Layout;
    D3D12_RESOURCE_FLAGS Flags;
    
    bool opEquals(const ref D3D12_RESOURCE_DESC r) const
    {
        return Dimension == r.Dimension && Alignment == r.Alignment && Width == r.Width && Height == r.Height && DepthOrArraySize == r.DepthOrArraySize && MipLevels == r.MipLevels && Format == r.Format && SampleDesc.Count == r.SampleDesc.Count && SampleDesc.Quality == r.SampleDesc.Quality && Layout == r.Layout && Flags == r.Flags;
    }
}

struct D3D12_DEPTH_STENCIL_VALUE
{
    float Depth;
    ubyte Stencil;
}

struct D3D12_CLEAR_VALUE
{
    DXGI_FORMAT Format;
    union
    {
        float[4] Color;
        D3D12_DEPTH_STENCIL_VALUE DepthStencil;
    }

    bool opEquals(const ref D3D12_CLEAR_VALUE b) const
    {
        if (Format != b.Format)
        {
            return false;
        }
        if (Format == DXGI_FORMAT_D24_UNORM_S8_UINT || Format == DXGI_FORMAT_D16_UNORM || Format == DXGI_FORMAT_D32_FLOAT || Format == DXGI_FORMAT_D32_FLOAT_S8X24_UINT)
        {
            return (DepthStencil.Depth == b.DepthStencil.Depth) && (DepthStencil.Stencil == b.DepthStencil.Stencil);
        }
        else
        {
            return (Color[0] == b.Color[0]) && (Color[1] == b.Color[1]) && (Color[2] == b.Color[2]) && (Color[3] == b.Color[3]);
        }
    }
}

struct D3D12_RANGE
{
    size_t Begin;
    size_t End;
}

struct D3D12_RANGE_UINT64
{
    ulong Begin;
    ulong End;
}

struct D3D12_SUBRESOURCE_RANGE_UINT64
{
    uint Subresource;
    D3D12_RANGE_UINT64 Range;
}

struct D3D12_SUBRESOURCE_INFO
{
    ulong Offset;
    uint RowPitch;
    uint DepthPitch;
}

struct D3D12_TILED_RESOURCE_COORDINATE
{
    uint X;
    uint Y;
    uint Z;
    uint Subresource;
}

struct D3D12_TILE_REGION_SIZE
{
    uint NumTiles;
    bool UseBox;
    uint Width;
    ushort Height;
    ushort Depth;
}

alias D3D12_TILE_RANGE_FLAGS = uint;
enum : D3D12_TILE_RANGE_FLAGS
{
    D3D12_TILE_RANGE_FLAG_NONE = 0,
    D3D12_TILE_RANGE_FLAG_NULL = 1,
    D3D12_TILE_RANGE_FLAG_SKIP = 2,
    D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 4
}
struct D3D12_SUBRESOURCE_TILING
{
    uint WidthInTiles;
    ushort HeightInTiles;
    ushort DepthInTiles;
    uint StartTileIndexInOverallResource;
}

struct D3D12_TILE_SHAPE
{
    uint WidthInTexels;
    uint HeightInTexels;
    uint DepthInTexels;
}

struct D3D12_PACKED_MIP_INFO
{
    ubyte NumStandardMips;
    ubyte NumPackedMips;
    uint NumTilesForPackedMips;
    uint StartTileIndexInOverallResource;
}

alias D3D12_TILE_MAPPING_FLAGS = uint;
enum : D3D12_TILE_MAPPING_FLAGS
{
    D3D12_TILE_MAPPING_FLAG_NONE = 0,
    D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1
}

alias D3D12_TILE_COPY_FLAGS = uint;
enum : D3D12_TILE_COPY_FLAGS
{
    D3D12_TILE_COPY_FLAG_NONE = 0,
    D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1,
    D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
    D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4
}

alias D3D12_RESOURCE_STATES = uint;
enum : D3D12_RESOURCE_STATES
{
    D3D12_RESOURCE_STATE_COMMON = 0,
    D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1,
    D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2,
    D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4,
    D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8,
    D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10,
    D3D12_RESOURCE_STATE_DEPTH_READ = 0x20,
    D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40,
    D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80,
    D3D12_RESOURCE_STATE_STREAM_OUT = 0x100,
    D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200,
    D3D12_RESOURCE_STATE_COPY_DEST = 0x400,
    D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800,
    D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000,
    D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000,
    D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE = 0x400000,
    D3D12_RESOURCE_STATE_GENERIC_READ = (((((0x1 | 0x2) | 0x40) | 0x80) | 0x200) | 0x800),
    D3D12_RESOURCE_STATE_PRESENT = 0,
    D3D12_RESOURCE_STATE_PREDICATION = 0x200,
    D3D12_RESOURCE_STATE_VIDEO_DECODE_READ = 0x10000,
    D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE = 0x20000,
    D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ = 0x40000,
    D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x80000,
    D3D12_RESOURCE_STATE_VIDEO_ENCODE_READ = 0x200000,
    D3D12_RESOURCE_STATE_VIDEO_ENCODE_WRITE = 0x800000
}

alias D3D12_RESOURCE_BARRIER_TYPE = uint;
enum : D3D12_RESOURCE_BARRIER_TYPE
{
    D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0,
    D3D12_RESOURCE_BARRIER_TYPE_ALIASING = (D3D12_RESOURCE_BARRIER_TYPE_TRANSITION + 1),
    D3D12_RESOURCE_BARRIER_TYPE_UAV = (D3D12_RESOURCE_BARRIER_TYPE_ALIASING + 1)
}
struct D3D12_RESOURCE_TRANSITION_BARRIER
{
    ID3D12Resource* pResource;
    uint Subresource;
    D3D12_RESOURCE_STATES StateBefore;
    D3D12_RESOURCE_STATES StateAfter;
}

struct D3D12_RESOURCE_ALIASING_BARRIER
{
    ID3D12Resource* pResourceBefore;
    ID3D12Resource* pResourceAfter;
}

struct D3D12_RESOURCE_UAV_BARRIER
{
    ID3D12Resource* pResource;
}

alias D3D12_RESOURCE_BARRIER_FLAGS = uint;
enum : D3D12_RESOURCE_BARRIER_FLAGS
{
    D3D12_RESOURCE_BARRIER_FLAG_NONE = 0,
    D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1,
    D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2
}

struct D3D12_RESOURCE_BARRIER
{
    D3D12_RESOURCE_BARRIER_TYPE Type;
    D3D12_RESOURCE_BARRIER_FLAGS Flags;
    union
    {
        D3D12_RESOURCE_TRANSITION_BARRIER Transition;
        D3D12_RESOURCE_ALIASING_BARRIER Aliasing;
        D3D12_RESOURCE_UAV_BARRIER UAV;
    }

    this(D3D12_RESOURCE_BARRIER o)
    {
        this.Type = o.Type;
        this.Flags = o.Flags;
        this.Transition = o.Transition;
        this.Aliasing = o.Aliasing;
        this.UAV = o.UAV;
    }

    this(inout D3D12_RESOURCE_BARRIER_TYPE type, inout D3D12_RESOURCE_BARRIER_FLAGS flags, inout D3D12_RESOURCE_TRANSITION_BARRIER transition, inout D3D12_RESOURCE_ALIASING_BARRIER aliasing, inout D3D12_RESOURCE_UAV_BARRIER uav)
    {
        this.Type = type;
        this.Flags = flags;
        this.Transition = cast(D3D12_RESOURCE_TRANSITION_BARRIER) transition;
        this.Aliasing = cast(D3D12_RESOURCE_ALIASING_BARRIER) aliasing;
        this.UAV = cast(D3D12_RESOURCE_UAV_BARRIER) uav;
    }

    static D3D12_RESOURCE_BARRIER transition(ID3D12Resource* pResource, D3D12_RESOURCE_STATES stateBefore, D3D12_RESOURCE_STATES stateAfter, uint subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE)
    {
        D3D12_RESOURCE_BARRIER result;
        D3D12_RESOURCE_BARRIER* barrier = &result;
        result.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
        result.Flags = flags;
        barrier.Transition.pResource = pResource;
        barrier.Transition.StateBefore = stateBefore;
        barrier.Transition.StateAfter = stateAfter;
        barrier.Transition.Subresource = subresource;
        return result;
    }

    static D3D12_RESOURCE_BARRIER aliasing(ID3D12Resource* pResourceBefore, ID3D12Resource* pResourceAfter)
    {
        D3D12_RESOURCE_BARRIER result;
        D3D12_RESOURCE_BARRIER* barrier = &result;
        result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
        barrier.Aliasing.pResourceBefore = pResourceBefore;
        barrier.Aliasing.pResourceAfter = pResourceAfter;
        return result;
    }

    static D3D12_RESOURCE_BARRIER uav(ID3D12Resource* pResource)
    {
        D3D12_RESOURCE_BARRIER result;
        D3D12_RESOURCE_BARRIER* barrier = &result;
        result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
        barrier.UAV.pResource = pResource;
        return result;
    }
}

struct D3D12_SUBRESOURCE_FOOTPRINT
{
    DXGI_FORMAT Format;
    uint Width;
    uint Height;
    uint Depth;
    uint RowPitch;
}

struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
{
    ulong Offset;
    D3D12_SUBRESOURCE_FOOTPRINT Footprint;
}

alias D3D12_TEXTURE_COPY_TYPE = uint;
enum : D3D12_TEXTURE_COPY_TYPE
{
    D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0,
    D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1
}

struct D3D12_TEXTURE_COPY_LOCATION
{
    ID3D12Resource* pResource;
    D3D12_TEXTURE_COPY_TYPE Type;
    union
    {
        D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint;
        uint SubresourceIndex;
    }
}

alias D3D12_RESOLVE_MODE = uint;
enum : D3D12_RESOLVE_MODE
{
    D3D12_RESOLVE_MODE_DECOMPRESS = 0,
    D3D12_RESOLVE_MODE_MIN = 1,
    D3D12_RESOLVE_MODE_MAX = 2,
    D3D12_RESOLVE_MODE_AVERAGE = 3
}

struct D3D12_SAMPLE_POSITION
{
    byte X;
    byte Y;
}

struct D3D12_VIEW_INSTANCE_LOCATION
{
    uint ViewportArrayIndex;
    uint RenderTargetArrayIndex;
}

alias D3D12_VIEW_INSTANCING_FLAGS = uint;
enum : D3D12_VIEW_INSTANCING_FLAGS
{
    D3D12_VIEW_INSTANCING_FLAG_NONE = 0,
    D3D12_VIEW_INSTANCING_FLAG_ENABLE_VIEW_INSTANCE_MASKING = 0x1
}

struct D3D12_VIEW_INSTANCING_DESC
{
    uint ViewInstanceCount;
    D3D12_VIEW_INSTANCE_LOCATION* pViewInstanceLocations;
    D3D12_VIEW_INSTANCING_FLAGS Flags;
}

alias D3D12_SHADER_COMPONENT_MAPPING = uint;
enum : D3D12_SHADER_COMPONENT_MAPPING
{
    D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0,
    D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1,
    D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2,
    D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3,
    D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4,
    D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5
}

enum D3D12_SHADER_COMPONENT_MAPPING_MASK = 0x7;
enum D3D12_SHADER_COMPONENT_MAPPING_SHIFT = 3;
enum D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES = (1 << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 4));

pure nothrow @nogc @safe
{
    uint D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(uint Src0, uint Src1, uint Src2, uint Src3)
    {
        return ((Src0 & D3D12_SHADER_COMPONENT_MAPPING_MASK) | ((Src1 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << D3D12_SHADER_COMPONENT_MAPPING_SHIFT) | ((Src2 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 2)) | ((Src3 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 3)) | D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES);
    }

    uint D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(uint ComponentToExtract, uint Mapping)
    {
        return (cast(D3D12_SHADER_COMPONENT_MAPPING)(Mapping >> (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * ComponentToExtract) & D3D12_SHADER_COMPONENT_MAPPING_MASK));
    }
}

enum D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING = D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 1, 2, 3);

alias D3D12_BUFFER_SRV_FLAGS = uint;
enum : D3D12_BUFFER_SRV_FLAGS
{
    D3D12_BUFFER_SRV_FLAG_NONE = 0,
    D3D12_BUFFER_SRV_FLAG_RAW = 0x1
}
struct D3D12_BUFFER_SRV
{
    ulong FirstElement;
    uint NumElements;
    uint StructureByteStride;
    D3D12_BUFFER_SRV_FLAGS Flags;
}

struct D3D12_TEX1D_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    float ResourceMinLODClamp;
}

struct D3D12_TEX1D_ARRAY_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    uint FirstArraySlice;
    uint ArraySize;
    float ResourceMinLODClamp;
}

struct D3D12_TEX2D_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    uint PlaneSlice;
    float ResourceMinLODClamp;
}

struct D3D12_TEX2D_ARRAY_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    uint FirstArraySlice;
    uint ArraySize;
    uint PlaneSlice;
    float ResourceMinLODClamp;
}

struct D3D12_TEX3D_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    float ResourceMinLODClamp;
}

struct D3D12_TEXCUBE_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    float ResourceMinLODClamp;
}

struct D3D12_TEXCUBE_ARRAY_SRV
{
    uint MostDetailedMip;
    uint MipLevels;
    uint First2DArrayFace;
    uint NumCubes;
    float ResourceMinLODClamp;
}

struct D3D12_TEX2DMS_SRV
{
    uint UnusedField_NothingToDefine;
}

struct D3D12_TEX2DMS_ARRAY_SRV
{
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV
{
    D3D12_GPU_VIRTUAL_ADDRESS Location;
}

alias D3D12_SRV_DIMENSION = uint;
enum : D3D12_SRV_DIMENSION
{
    D3D12_SRV_DIMENSION_UNKNOWN = 0,
    D3D12_SRV_DIMENSION_BUFFER = 1,
    D3D12_SRV_DIMENSION_TEXTURE1D = 2,
    D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3,
    D3D12_SRV_DIMENSION_TEXTURE2D = 4,
    D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5,
    D3D12_SRV_DIMENSION_TEXTURE2DMS = 6,
    D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
    D3D12_SRV_DIMENSION_TEXTURE3D = 8,
    D3D12_SRV_DIMENSION_TEXTURECUBE = 9,
    D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
    D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE = 11
}

struct D3D12_SHADER_RESOURCE_VIEW_DESC
{
    DXGI_FORMAT Format;
    D3D12_SRV_DIMENSION ViewDimension;
    uint Shader4ComponentMapping;
    union
    {
        D3D12_BUFFER_SRV Buffer;
        D3D12_TEX1D_SRV Texture1D;
        D3D12_TEX1D_ARRAY_SRV Texture1DArray;
        D3D12_TEX2D_SRV Texture2D;
        D3D12_TEX2D_ARRAY_SRV Texture2DArray;
        D3D12_TEX2DMS_SRV Texture2DMS;
        D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray;
        D3D12_TEX3D_SRV Texture3D;
        D3D12_TEXCUBE_SRV TextureCube;
        D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray;
        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV RaytracingAccelerationStructure;
    }
}

struct D3D12_CONSTANT_BUFFER_VIEW_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
    uint SizeInBytes;
}

alias D3D12_FILTER = uint;
enum : D3D12_FILTER
{
    D3D12_FILTER_MIN_MAG_MIP_POINT = 0,
    D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1,
    D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4,
    D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5,
    D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
    D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
    D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
    D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
    D3D12_FILTER_ANISOTROPIC = 0x55,
    D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
    D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
    D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
    D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
    D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
    D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
    D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
    D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
    D3D12_FILTER_COMPARISON_ANISOTROPIC = 0xd5,
    D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100,
    D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101,
    D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104,
    D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105,
    D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110,
    D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111,
    D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114,
    D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115,
    D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x155,
    D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180,
    D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181,
    D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184,
    D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185,
    D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190,
    D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191,
    D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194,
    D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195,
    D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5
}

alias D3D12_FILTER_TYPE = uint;
enum : D3D12_FILTER_TYPE
{
    D3D12_FILTER_TYPE_POINT = 0,
    D3D12_FILTER_TYPE_LINEAR = 1
}

alias D3D12_FILTER_REDUCTION_TYPE = uint;
enum : D3D12_FILTER_REDUCTION_TYPE
{
    D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0,
    D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1,
    D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2,
    D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3
}

enum D3D12_FILTER_REDUCTION_TYPE_MASK = (0x3);
enum D3D12_FILTER_REDUCTION_TYPE_SHIFT = (7);
enum D3D12_FILTER_TYPE_MASK = (0x3);
enum D3D12_MIN_FILTER_SHIFT = (4);
enum D3D12_MAG_FILTER_SHIFT = (2);
enum D3D12_MIP_FILTER_SHIFT = (0);
enum D3D12_ANISOTROPIC_FILTERING_BIT = (0x40);

pure nothrow @safe @nogc
{
    D3D12_FILTER D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE min, D3D12_FILTER_TYPE mag, D3D12_FILTER_TYPE mip, D3D12_FILTER_REDUCTION_TYPE reduction)
    {
        return (cast(D3D12_FILTER)(((min & D3D12_FILTER_TYPE_MASK) << D3D12_MIN_FILTER_SHIFT) | ((mag & D3D12_FILTER_TYPE_MASK) << D3D12_MAG_FILTER_SHIFT) | ((mip & D3D12_FILTER_TYPE_MASK) << D3D12_MIP_FILTER_SHIFT) | ((reduction & D3D12_FILTER_REDUCTION_TYPE_MASK) << D3D12_FILTER_REDUCTION_TYPE_SHIFT)));
    }

    D3D12_FILTER D3D12_ENCODE_ANISOTROPIC_FILTER(D3D12_FILTER_REDUCTION_TYPE reduction)
    {
        return (cast(D3D12_FILTER)(D3D12_ANISOTROPIC_FILTERING_BIT | D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE_LINEAR, D3D12_FILTER_TYPE_LINEAR, D3D12_FILTER_TYPE_LINEAR, reduction)));
    }

    D3D12_FILTER_TYPE D3D12_DECODE_MIN_FILTER(D3D12_FILTER D3D12Filter)
    {
        return (cast(D3D12_FILTER_TYPE)((D3D12Filter >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK));
    }

    D3D12_FILTER_TYPE D3D12_DECODE_MAG_FILTER(D3D12_FILTER D3D12Filter)
    {
        return (cast(D3D12_FILTER_TYPE)((D3D12Filter >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK));
    }

    D3D12_FILTER_TYPE D3D12_DECODE_MIP_FILTER(D3D12_FILTER D3D12Filter)
    {
        return (cast(D3D12_FILTER_TYPE)((D3D12Filter >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK));
    }

    D3D12_FILTER_REDUCTION_TYPE D3D12_DECODE_FILTER_REDUCTION(D3D12_FILTER D3D12Filter)
    {
        return (cast(D3D12_FILTER_REDUCTION_TYPE)((D3D12Filter >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) & D3D12_FILTER_REDUCTION_TYPE_MASK));
    }

    bool D3D12_DECODE_IS_COMPARISON_FILTER(D3D12_FILTER D3D12Filter)
    {
        return (D3D12_DECODE_FILTER_REDUCTION(D3D12Filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON);
    }

    bool D3D12_DECODE_IS_ANISOTROPIC_FILTER(D3D12_FILTER D3D12Filter)
    {
        return ((D3D12Filter & D3D12_ANISOTROPIC_FILTERING_BIT) && (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER(D3D12Filter)) && (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER(D3D12Filter)) && (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER(D3D12Filter)));
    }
}

alias D3D12_TEXTURE_ADDRESS_MODE = uint;
enum : D3D12_TEXTURE_ADDRESS_MODE
{
    D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,
    D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2,
    D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3,
    D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4,
    D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5
}
struct D3D12_SAMPLER_DESC
{
    D3D12_FILTER Filter;
    D3D12_TEXTURE_ADDRESS_MODE AddressU;
    D3D12_TEXTURE_ADDRESS_MODE AddressV;
    D3D12_TEXTURE_ADDRESS_MODE AddressW;
    float MipLODBias;
    uint MaxAnisotropy;
    D3D12_COMPARISON_FUNC ComparisonFunc;
    float[4] BorderColor;
    float MinLOD;
    float MaxLOD;
}

alias D3D12_BUFFER_UAV_FLAGS = uint;
enum : D3D12_BUFFER_UAV_FLAGS
{
    D3D12_BUFFER_UAV_FLAG_NONE = 0,
    D3D12_BUFFER_UAV_FLAG_RAW = 0x1
}
struct D3D12_BUFFER_UAV
{
    ulong FirstElement;
    uint NumElements;
    uint StructureByteStride;
    ulong CounterOffsetInBytes;
    D3D12_BUFFER_UAV_FLAGS Flags;
}

struct D3D12_TEX1D_UAV
{
    uint MipSlice;
}

struct D3D12_TEX1D_ARRAY_UAV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_TEX2D_UAV
{
    uint MipSlice;
    uint PlaneSlice;
}

struct D3D12_TEX2D_ARRAY_UAV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
    uint PlaneSlice;
}

struct D3D12_TEX3D_UAV
{
    uint MipSlice;
    uint FirstWSlice;
    uint WSize;
}

alias D3D12_UAV_DIMENSION = uint;
enum : D3D12_UAV_DIMENSION
{
    D3D12_UAV_DIMENSION_UNKNOWN = 0,
    D3D12_UAV_DIMENSION_BUFFER = 1,
    D3D12_UAV_DIMENSION_TEXTURE1D = 2,
    D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3,
    D3D12_UAV_DIMENSION_TEXTURE2D = 4,
    D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5,
    D3D12_UAV_DIMENSION_TEXTURE3D = 8
}

struct D3D12_UNORDERED_ACCESS_VIEW_DESC
{
    DXGI_FORMAT Format;
    D3D12_UAV_DIMENSION ViewDimension;
    union
    {
        D3D12_BUFFER_UAV Buffer;
        D3D12_TEX1D_UAV Texture1D;
        D3D12_TEX1D_ARRAY_UAV Texture1DArray;
        D3D12_TEX2D_UAV Texture2D;
        D3D12_TEX2D_ARRAY_UAV Texture2DArray;
        D3D12_TEX3D_UAV Texture3D;
    }
}

struct D3D12_BUFFER_RTV
{
    ulong FirstElement;
    uint NumElements;
}

struct D3D12_TEX1D_RTV
{
    uint MipSlice;
}

struct D3D12_TEX1D_ARRAY_RTV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_TEX2D_RTV
{
    uint MipSlice;
    uint PlaneSlice;
}

struct D3D12_TEX2DMS_RTV
{
    uint UnusedField_NothingToDefine;
}

struct D3D12_TEX2D_ARRAY_RTV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
    uint PlaneSlice;
}

struct D3D12_TEX2DMS_ARRAY_RTV
{
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_TEX3D_RTV
{
    uint MipSlice;
    uint FirstWSlice;
    uint WSize;
}

alias D3D12_RTV_DIMENSION = uint;
enum : D3D12_RTV_DIMENSION
{
    D3D12_RTV_DIMENSION_UNKNOWN = 0,
    D3D12_RTV_DIMENSION_BUFFER = 1,
    D3D12_RTV_DIMENSION_TEXTURE1D = 2,
    D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3,
    D3D12_RTV_DIMENSION_TEXTURE2D = 4,
    D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5,
    D3D12_RTV_DIMENSION_TEXTURE2DMS = 6,
    D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7,
    D3D12_RTV_DIMENSION_TEXTURE3D = 8
}

struct D3D12_RENDER_TARGET_VIEW_DESC
{
    DXGI_FORMAT Format;
    D3D12_RTV_DIMENSION ViewDimension;
    union
    {
        D3D12_BUFFER_RTV Buffer;
        D3D12_TEX1D_RTV Texture1D;
        D3D12_TEX1D_ARRAY_RTV Texture1DArray;
        D3D12_TEX2D_RTV Texture2D;
        D3D12_TEX2D_ARRAY_RTV Texture2DArray;
        D3D12_TEX2DMS_RTV Texture2DMS;
        D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray;
        D3D12_TEX3D_RTV Texture3D;
    }
}

struct D3D12_TEX1D_DSV
{
    uint MipSlice;
}

struct D3D12_TEX1D_ARRAY_DSV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_TEX2D_DSV
{
    uint MipSlice;
}

struct D3D12_TEX2D_ARRAY_DSV
{
    uint MipSlice;
    uint FirstArraySlice;
    uint ArraySize;
}

struct D3D12_TEX2DMS_DSV
{
    uint UnusedField_NothingToDefine;
}

struct D3D12_TEX2DMS_ARRAY_DSV
{
    uint FirstArraySlice;
    uint ArraySize;
}

alias D3D12_DSV_FLAGS = uint;
enum : D3D12_DSV_FLAGS
{
    D3D12_DSV_FLAG_NONE = 0,
    D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1,
    D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2
}

alias D3D12_DSV_DIMENSION = uint;
enum : D3D12_DSV_DIMENSION
{
    D3D12_DSV_DIMENSION_UNKNOWN = 0,
    D3D12_DSV_DIMENSION_TEXTURE1D = 1,
    D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2,
    D3D12_DSV_DIMENSION_TEXTURE2D = 3,
    D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4,
    D3D12_DSV_DIMENSION_TEXTURE2DMS = 5,
    D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6
}

struct D3D12_DEPTH_STENCIL_VIEW_DESC
{
    DXGI_FORMAT Format;
    D3D12_DSV_DIMENSION ViewDimension;
    D3D12_DSV_FLAGS Flags;
    union
    {
        D3D12_TEX1D_DSV Texture1D;
        D3D12_TEX1D_ARRAY_DSV Texture1DArray;
        D3D12_TEX2D_DSV Texture2D;
        D3D12_TEX2D_ARRAY_DSV Texture2DArray;
        D3D12_TEX2DMS_DSV Texture2DMS;
        D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray;
    }
}

alias D3D12_CLEAR_FLAGS = uint;
enum : D3D12_CLEAR_FLAGS
{
    D3D12_CLEAR_FLAG_DEPTH = 0x1,
    D3D12_CLEAR_FLAG_STENCIL = 0x2
}

alias D3D12_FENCE_FLAGS = uint;
enum : D3D12_FENCE_FLAGS
{
    D3D12_FENCE_FLAG_NONE = 0,
    D3D12_FENCE_FLAG_SHARED = 0x1,
    D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2,
    D3D12_FENCE_FLAG_NON_MONITORED = 0x4
}

alias D3D12_DESCRIPTOR_HEAP_TYPE = uint;
enum : D3D12_DESCRIPTOR_HEAP_TYPE
{
    D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV = 0,
    D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER = (D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV + 1),
    D3D12_DESCRIPTOR_HEAP_TYPE_RTV = (D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER + 1),
    D3D12_DESCRIPTOR_HEAP_TYPE_DSV = (D3D12_DESCRIPTOR_HEAP_TYPE_RTV + 1),
    D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES = (D3D12_DESCRIPTOR_HEAP_TYPE_DSV + 1)
}

alias D3D12_DESCRIPTOR_HEAP_FLAGS = uint;
enum : D3D12_DESCRIPTOR_HEAP_FLAGS
{
    D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0,
    D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1
}

struct D3D12_DESCRIPTOR_HEAP_DESC
{
    D3D12_DESCRIPTOR_HEAP_TYPE Type;
    uint NumDescriptors;
    D3D12_DESCRIPTOR_HEAP_FLAGS Flags;
    uint NodeMask;
}

alias D3D12_DESCRIPTOR_RANGE_TYPE = uint;
enum : D3D12_DESCRIPTOR_RANGE_TYPE
{
    D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0,
    D3D12_DESCRIPTOR_RANGE_TYPE_UAV = (D3D12_DESCRIPTOR_RANGE_TYPE_SRV + 1),
    D3D12_DESCRIPTOR_RANGE_TYPE_CBV = (D3D12_DESCRIPTOR_RANGE_TYPE_UAV + 1),
    D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = (D3D12_DESCRIPTOR_RANGE_TYPE_CBV + 1)
}
struct D3D12_DESCRIPTOR_RANGE
{
    D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
    uint NumDescriptors;
    uint BaseShaderRegister;
    uint RegisterSpace;
    uint OffsetInDescriptorsFromTableStart;
}

struct D3D12_ROOT_DESCRIPTOR_TABLE
{
    uint NumDescriptorRanges;
    D3D12_DESCRIPTOR_RANGE* pDescriptorRanges;
}

struct D3D12_ROOT_CONSTANTS
{
    uint ShaderRegister;
    uint RegisterSpace;
    uint Num32BitValues;
}

struct D3D12_ROOT_DESCRIPTOR
{
    uint ShaderRegister;
    uint RegisterSpace;
}

alias D3D12_SHADER_VISIBILITY = uint;
enum : D3D12_SHADER_VISIBILITY
{
    D3D12_SHADER_VISIBILITY_ALL = 0,
    D3D12_SHADER_VISIBILITY_VERTEX = 1,
    D3D12_SHADER_VISIBILITY_HULL = 2,
    D3D12_SHADER_VISIBILITY_DOMAIN = 3,
    D3D12_SHADER_VISIBILITY_GEOMETRY = 4,
    D3D12_SHADER_VISIBILITY_PIXEL = 5
}

alias D3D12_ROOT_PARAMETER_TYPE = uint;
enum : D3D12_ROOT_PARAMETER_TYPE
{
    D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0,
    D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = (D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE + 1),
    D3D12_ROOT_PARAMETER_TYPE_CBV = (D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS + 1),
    D3D12_ROOT_PARAMETER_TYPE_SRV = (D3D12_ROOT_PARAMETER_TYPE_CBV + 1),
    D3D12_ROOT_PARAMETER_TYPE_UAV = (D3D12_ROOT_PARAMETER_TYPE_SRV + 1)
}

struct D3D12_ROOT_PARAMETER
{
    D3D12_ROOT_PARAMETER_TYPE ParameterType;
    union
    {
        D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable;
        D3D12_ROOT_CONSTANTS Constants;
        D3D12_ROOT_DESCRIPTOR Descriptor;
    }

    D3D12_SHADER_VISIBILITY ShaderVisibility;
}

alias D3D12_ROOT_SIGNATURE_FLAGS = uint;
enum : D3D12_ROOT_SIGNATURE_FLAGS
{
    D3D12_ROOT_SIGNATURE_FLAG_NONE = 0,
    D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1,
    D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2,
    D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4,
    D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8,
    D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
    D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
    D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
    D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE = 0x80
}

alias D3D12_STATIC_BORDER_COLOR = uint;
enum : D3D12_STATIC_BORDER_COLOR
{
    D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0,
    D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = (D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK + 1),
    D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = (D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK + 1)
}

struct D3D12_STATIC_SAMPLER_DESC
{
    D3D12_FILTER Filter;
    D3D12_TEXTURE_ADDRESS_MODE AddressU;
    D3D12_TEXTURE_ADDRESS_MODE AddressV;
    D3D12_TEXTURE_ADDRESS_MODE AddressW;
    float MipLODBias;
    uint MaxAnisotropy;
    D3D12_COMPARISON_FUNC ComparisonFunc;
    D3D12_STATIC_BORDER_COLOR BorderColor;
    float MinLOD;
    float MaxLOD;
    uint ShaderRegister;
    uint RegisterSpace;
    D3D12_SHADER_VISIBILITY ShaderVisibility;
}

struct D3D12_ROOT_SIGNATURE_DESC
{
    uint NumParameters;
    D3D12_ROOT_PARAMETER* pParameters;
    uint NumStaticSamplers;
    D3D12_STATIC_SAMPLER_DESC* pStaticSamplers;
    D3D12_ROOT_SIGNATURE_FLAGS Flags;
}

alias D3D12_DESCRIPTOR_RANGE_FLAGS = uint;
enum : D3D12_DESCRIPTOR_RANGE_FLAGS
{
    D3D12_DESCRIPTOR_RANGE_FLAG_NONE = 0,
    D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
    D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
    D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
    D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
    D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000
}
struct D3D12_DESCRIPTOR_RANGE1
{
    D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
    uint NumDescriptors;
    uint BaseShaderRegister;
    uint RegisterSpace;
    D3D12_DESCRIPTOR_RANGE_FLAGS Flags;
    uint OffsetInDescriptorsFromTableStart;
}

struct D3D12_ROOT_DESCRIPTOR_TABLE1
{
    uint NumDescriptorRanges;
    D3D12_DESCRIPTOR_RANGE1* pDescriptorRanges;
}

alias D3D12_ROOT_DESCRIPTOR_FLAGS = uint;
enum : D3D12_ROOT_DESCRIPTOR_FLAGS
{
    D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0,
    D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
    D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
    D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8
}
struct D3D12_ROOT_DESCRIPTOR1
{
    uint ShaderRegister;
    uint RegisterSpace;
    D3D12_ROOT_DESCRIPTOR_FLAGS Flags;
}

struct D3D12_ROOT_PARAMETER1
{
    D3D12_ROOT_PARAMETER_TYPE ParameterType;
    union
    {
        D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable;
        D3D12_ROOT_CONSTANTS Constants;
        D3D12_ROOT_DESCRIPTOR1 Descriptor;
    }

    D3D12_SHADER_VISIBILITY ShaderVisibility;
}

struct D3D12_ROOT_SIGNATURE_DESC1
{
    uint NumParameters;
    D3D12_ROOT_PARAMETER1* pParameters;
    uint NumStaticSamplers;
    D3D12_STATIC_SAMPLER_DESC* pStaticSamplers;
    D3D12_ROOT_SIGNATURE_FLAGS Flags;
}

struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
{
    D3D_ROOT_SIGNATURE_VERSION Version;
    union
    {
        D3D12_ROOT_SIGNATURE_DESC Desc_1_0;
        D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1;
    }
}

extern (Windows) nothrow HRESULT D3D12SerializeRootSignature(const(D3D12_ROOT_SIGNATURE_DESC)* pRootSignature, D3D_ROOT_SIGNATURE_VERSION Version, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob);
alias PFN_D3D12_SERIALIZE_ROOT_SIGNATURE = extern (Windows) nothrow HRESULT function(const(D3D12_ROOT_SIGNATURE_DESC)* pRootSignature, D3D_ROOT_SIGNATURE_VERSION Version, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob);
extern (Windows) nothrow HRESULT D3D12CreateRootSignatureDeserializer(const(void)* pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer);
alias PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER = extern (Windows) nothrow HRESULT function(const(void)* pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer);
extern (Windows) nothrow HRESULT D3D12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob);
alias PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE = extern (Windows) nothrow HRESULT function(const(D3D12_VERSIONED_ROOT_SIGNATURE_DESC)* pRootSignature, ID3DBlob** ppBlob, ID3DBlob** ppErrorBlob);
extern (Windows) nothrow HRESULT D3D12CreateVersionedRootSignatureDeserializer(const(void)* pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer);
alias PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER = extern (Windows) nothrow HRESULT function(const(void)* pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer);

struct D3D12_CPU_DESCRIPTOR_HANDLE
{
    size_t ptr;

    this(D3D12_CPU_DESCRIPTOR_HANDLE other, int offsetScaledByIncrementSize)
    {
        InitOffsetted(other, offsetScaledByIncrementSize);
    }

    this(D3D12_CPU_DESCRIPTOR_HANDLE other, int offsetInDescriptors, uint descriptorIncrementSize)
    {
        InitOffsetted(other, offsetInDescriptors, descriptorIncrementSize);
    }

    bool opEquals(const ref D3D12_CPU_DESCRIPTOR_HANDLE other) const
    {
        return (ptr == other.ptr);
    }

    void Offset(int offsetInDescriptors, uint descriptorIncrementSize)
    {
        this.ptr += offsetInDescriptors * descriptorIncrementSize;
    }

    void Offset(int offsetScaledByIncrementSize)
    {
        this.ptr += offsetScaledByIncrementSize;
    }

    void InitOffsetted(ref D3D12_CPU_DESCRIPTOR_HANDLE base, int offsetScaledByIncrementSize)
    {
        InitOffsetted(this, base, offsetScaledByIncrementSize);
    }

    void InitOffsetted(ref D3D12_CPU_DESCRIPTOR_HANDLE base, int offsetInDescriptors, uint descriptorIncrementSize)
    {
        InitOffsetted(this, base, offsetInDescriptors, descriptorIncrementSize);
    }

    static void InitOffsetted(ref D3D12_CPU_DESCRIPTOR_HANDLE handle, const D3D12_CPU_DESCRIPTOR_HANDLE base, int offsetScaledByIncrementSize)
    {
        handle.ptr = base.ptr + offsetScaledByIncrementSize;
    }

    static void InitOffsetted(ref D3D12_CPU_DESCRIPTOR_HANDLE handle, const D3D12_CPU_DESCRIPTOR_HANDLE base, int offsetInDescriptors, uint descriptorIncrementSize)
    {
        handle.ptr = base.ptr + offsetInDescriptors * descriptorIncrementSize;
    }
}

struct D3D12_GPU_DESCRIPTOR_HANDLE
{
    ulong ptr;

    bool opEquals(const ref D3D12_GPU_DESCRIPTOR_HANDLE other) const
    {
        return (ptr == other.ptr);
    }
}

struct D3D12_DISCARD_REGION
{
    uint NumRects;
    D3D12_RECT* pRects;
    uint FirstSubresource;
    uint NumSubresources;
}

alias D3D12_QUERY_HEAP_TYPE = uint;
enum : D3D12_QUERY_HEAP_TYPE
{
    D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0,
    D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1,
    D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2,
    D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3,
    D3D12_QUERY_HEAP_TYPE_VIDEO_DECODE_STATISTICS = 4,
    D3D12_QUERY_HEAP_TYPE_COPY_QUEUE_TIMESTAMP = 5
}

struct D3D12_QUERY_HEAP_DESC
{
    D3D12_QUERY_HEAP_TYPE Type;
    uint Count;
    uint NodeMask;
}

alias D3D12_QUERY_TYPE = uint;
enum : D3D12_QUERY_TYPE
{
    D3D12_QUERY_TYPE_OCCLUSION = 0,
    D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1,
    D3D12_QUERY_TYPE_TIMESTAMP = 2,
    D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3,
    D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4,
    D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5,
    D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6,
    D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7,
    D3D12_QUERY_TYPE_VIDEO_DECODE_STATISTICS = 8
}

alias D3D12_PREDICATION_OP = uint;
enum : D3D12_PREDICATION_OP
{
    D3D12_PREDICATION_OP_EQUAL_ZERO = 0,
    D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1
}

struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
{
    ulong IAVertices;
    ulong IAPrimitives;
    ulong VSInvocations;
    ulong GSInvocations;
    ulong GSPrimitives;
    ulong CInvocations;
    ulong CPrimitives;
    ulong PSInvocations;
    ulong HSInvocations;
    ulong DSInvocations;
    ulong CSInvocations;
}

struct D3D12_QUERY_DATA_SO_STATISTICS
{
    ulong NumPrimitivesWritten;
    ulong PrimitivesStorageNeeded;
}

struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
{
    D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
    ulong SizeInBytes;
    D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation;
}

struct D3D12_DRAW_ARGUMENTS
{
    uint VertexCountPerInstance;
    uint InstanceCount;
    uint StartVertexLocation;
    uint StartInstanceLocation;
}

struct D3D12_DRAW_INDEXED_ARGUMENTS
{
    uint IndexCountPerInstance;
    uint InstanceCount;
    uint StartIndexLocation;
    int BaseVertexLocation;
    uint StartInstanceLocation;
}

struct D3D12_DISPATCH_ARGUMENTS
{
    uint ThreadGroupCountX;
    uint ThreadGroupCountY;
    uint ThreadGroupCountZ;
}

struct D3D12_VERTEX_BUFFER_VIEW
{
    D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
    uint SizeInBytes;
    uint StrideInBytes;
}

struct D3D12_INDEX_BUFFER_VIEW
{
    D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
    uint SizeInBytes;
    DXGI_FORMAT Format;
}

alias D3D12_INDIRECT_ARGUMENT_TYPE = uint;
enum : D3D12_INDIRECT_ARGUMENT_TYPE
{
    D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0,
    D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = (D3D12_INDIRECT_ARGUMENT_TYPE_DRAW + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = (D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = (D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW + 1),
    D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = (D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW + 1)
}

struct D3D12_INDIRECT_ARGUMENT_DESC
{
    D3D12_INDIRECT_ARGUMENT_TYPE Type;
    union
    {
        struct VertexBuffer
        {
            uint Slot;
        }

        struct Constant
        {
            uint RootParameterIndex;
            uint DestOffsetIn32BitValues;
            uint Num32BitValuesToSet;
        }

        struct ConstantBufferView
        {
            uint RootParameterIndex;
        }

        struct ShaderResourceView
        {
            uint RootParameterIndex;
        }

        struct UnorderedAccessView
        {
            uint RootParameterIndex;
        }
    }
}

struct D3D12_COMMAND_SIGNATURE_DESC
{
    uint ByteStride;
    uint NumArgumentDescs;
    D3D12_INDIRECT_ARGUMENT_DESC* pArgumentDescs;
    uint NodeMask;
}

struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
{
    D3D12_GPU_VIRTUAL_ADDRESS Dest;
    uint Value;
}

alias D3D12_WRITEBUFFERIMMEDIATE_MODE = uint;
enum : D3D12_WRITEBUFFERIMMEDIATE_MODE
{
    D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0,
    D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
    D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2
}

alias D3D12_MULTIPLE_FENCE_WAIT_FLAGS = uint;
enum : D3D12_MULTIPLE_FENCE_WAIT_FLAGS
{
    D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0,
    D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1,
    D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0
}

alias D3D12_RESIDENCY_PRIORITY = uint;
enum : D3D12_RESIDENCY_PRIORITY
{
    D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
    D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
    D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
    D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
    D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000
}

alias D3D12_RESIDENCY_FLAGS = uint;
enum : D3D12_RESIDENCY_FLAGS
{
    D3D12_RESIDENCY_FLAG_NONE = 0,
    D3D12_RESIDENCY_FLAG_DENY_OVERBUDGET = 0x1
}

alias D3D12_COMMAND_LIST_FLAGS = uint;
enum : D3D12_COMMAND_LIST_FLAGS
{
    D3D12_COMMAND_LIST_FLAG_NONE = 0
}

alias D3D12_COMMAND_POOL_FLAGS = uint;
enum : D3D12_COMMAND_POOL_FLAGS
{
    D3D12_COMMAND_POOL_FLAG_NONE = 0
}

alias D3D12_COMMAND_RECORDER_FLAGS = uint;
enum : D3D12_COMMAND_RECORDER_FLAGS
{
    D3D12_COMMAND_RECORDER_FLAG_NONE = 0
}

alias D3D12_PROTECTED_SESSION_STATUS = uint;
enum : D3D12_PROTECTED_SESSION_STATUS
{
    D3D12_PROTECTED_SESSION_STATUS_OK = 0,
    D3D12_PROTECTED_SESSION_STATUS_INVALID = 1
}

alias D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS = uint;
enum : D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS
{
    D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_NONE = 0,
    D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_SUPPORTED = 0x1
}

struct D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_SUPPORT
{
    uint NodeIndex;
    D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS Support;
}

alias D3D12_PROTECTED_RESOURCE_SESSION_FLAGS = uint;
enum : D3D12_PROTECTED_RESOURCE_SESSION_FLAGS
{
    D3D12_PROTECTED_RESOURCE_SESSION_FLAG_NONE = 0
}

struct D3D12_PROTECTED_RESOURCE_SESSION_DESC
{
    uint NodeMask;
    D3D12_PROTECTED_RESOURCE_SESSION_FLAGS Flags;
}

alias D3D12_LIFETIME_STATE = uint;
enum : D3D12_LIFETIME_STATE
{
    D3D12_LIFETIME_STATE_IN_USE = 0,
    D3D12_LIFETIME_STATE_NOT_IN_USE = (D3D12_LIFETIME_STATE_IN_USE + 1)
}

alias D3D12_META_COMMAND_PARAMETER_TYPE = uint;
enum : D3D12_META_COMMAND_PARAMETER_TYPE
{
    D3D12_META_COMMAND_PARAMETER_TYPE_FLOAT = 0,
    D3D12_META_COMMAND_PARAMETER_TYPE_UINT64 = 1,
    D3D12_META_COMMAND_PARAMETER_TYPE_GPU_VIRTUAL_ADDRESS = 2,
    D3D12_META_COMMAND_PARAMETER_TYPE_CPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 3,
    D3D12_META_COMMAND_PARAMETER_TYPE_GPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 4
}

alias D3D12_META_COMMAND_PARAMETER_FLAGS = uint;
enum : D3D12_META_COMMAND_PARAMETER_FLAGS
{
    D3D12_META_COMMAND_PARAMETER_FLAG_INPUT = 0x1,
    D3D12_META_COMMAND_PARAMETER_FLAG_OUTPUT = 0x2
}

alias D3D12_META_COMMAND_PARAMETER_STAGE = uint;
enum : D3D12_META_COMMAND_PARAMETER_STAGE
{
    D3D12_META_COMMAND_PARAMETER_STAGE_CREATION = 0,
    D3D12_META_COMMAND_PARAMETER_STAGE_INITIALIZATION = 1,
    D3D12_META_COMMAND_PARAMETER_STAGE_EXECUTION = 2
}

struct D3D12_META_COMMAND_PARAMETER_DESC
{
    LPCWSTR Name;
    D3D12_META_COMMAND_PARAMETER_TYPE Type;
    D3D12_META_COMMAND_PARAMETER_FLAGS Flags;
    D3D12_RESOURCE_STATES RequiredResourceState;
    uint StructureOffset;
}

alias D3D12_GRAPHICS_STATES = uint;
enum : D3D12_GRAPHICS_STATES
{
    D3D12_GRAPHICS_STATE_NONE = 0,
    D3D12_GRAPHICS_STATE_IA_VERTEX_BUFFERS = (1 << 0),
    D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = (1 << 1),
    D3D12_GRAPHICS_STATE_IA_PRIMITIVE_TOPOLOGY = (1 << 2),
    D3D12_GRAPHICS_STATE_DESCRIPTOR_HEAP = (1 << 3),
    D3D12_GRAPHICS_STATE_GRAPHICS_ROOT_SIGNATURE = (1 << 4),
    D3D12_GRAPHICS_STATE_COMPUTE_ROOT_SIGNATURE = (1 << 5),
    D3D12_GRAPHICS_STATE_RS_VIEWPORTS = (1 << 6),
    D3D12_GRAPHICS_STATE_RS_SCISSOR_RECTS = (1 << 7),
    D3D12_GRAPHICS_STATE_PREDICATION = (1 << 8),
    D3D12_GRAPHICS_STATE_OM_RENDER_TARGETS = (1 << 9),
    D3D12_GRAPHICS_STATE_OM_STENCIL_REF = (1 << 10),
    D3D12_GRAPHICS_STATE_OM_BLEND_FACTOR = (1 << 11),
    D3D12_GRAPHICS_STATE_PIPELINE_STATE = (1 << 12),
    D3D12_GRAPHICS_STATE_SO_TARGETS = (1 << 13),
    D3D12_GRAPHICS_STATE_OM_DEPTH_BOUNDS = (1 << 14),
    D3D12_GRAPHICS_STATE_SAMPLE_POSITIONS = (1 << 15),
    D3D12_GRAPHICS_STATE_VIEW_INSTANCE_MASK = (1 << 16)
}

struct D3D12_META_COMMAND_DESC
{
    GUID Id;
    LPCWSTR Name;
    D3D12_GRAPHICS_STATES InitializationDirtyState;
    D3D12_GRAPHICS_STATES ExecutionDirtyState;
}

alias D3D12_STATE_SUBOBJECT_TYPE = uint;
enum : D3D12_STATE_SUBOBJECT_TYPE
{
    D3D12_STATE_SUBOBJECT_TYPE_STATE_OBJECT_CONFIG = 0,
    D3D12_STATE_SUBOBJECT_TYPE_GLOBAL_ROOT_SIGNATURE = 1,
    D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE = 2,
    D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK = 3,
    D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY = 5,
    D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION = 6,
    D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 7,
    D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 8,
    D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG = 9,
    D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG = 10,
    D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP = 11,
    D3D12_STATE_SUBOBJECT_TYPE_MAX_VALID = (D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP + 1)
}

struct D3D12_STATE_SUBOBJECT
{
    D3D12_STATE_SUBOBJECT_TYPE Type;
    void* pDesc;
}

alias D3D12_STATE_OBJECT_FLAGS = uint;
enum : D3D12_STATE_OBJECT_FLAGS
{
    D3D12_STATE_OBJECT_FLAG_NONE = 0,
    D3D12_STATE_OBJECT_FLAG_ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS = 0x1,
    D3D12_STATE_OBJECT_FLAG_ALLOW_EXTERNAL_DEPENDENCIES_ON_LOCAL_DEFINITIONS = 0x2
}

struct D3D12_STATE_OBJECT_CONFIG
{
    D3D12_STATE_OBJECT_FLAGS Flags;
}

struct D3D12_GLOBAL_ROOT_SIGNATURE
{
    ID3D12RootSignature* pGlobalRootSignature;
}

struct D3D12_LOCAL_ROOT_SIGNATURE
{
    ID3D12RootSignature* pLocalRootSignature;
}

struct D3D12_NODE_MASK
{
    uint NodeMask;
}

alias D3D12_EXPORT_FLAGS = uint;
enum : D3D12_EXPORT_FLAGS
{
    D3D12_EXPORT_FLAG_NONE = 0
}

struct D3D12_EXPORT_DESC
{
    LPCWSTR Name;
    LPCWSTR ExportToRename;
    D3D12_EXPORT_FLAGS Flags;
}

struct D3D12_DXIL_LIBRARY_DESC
{
    D3D12_SHADER_BYTECODE DXILLibrary;
    uint NumExports;
    D3D12_EXPORT_DESC* pExports;
}

struct D3D12_EXISTING_COLLECTION_DESC
{
    ID3D12StateObject* pExistingCollection;
    uint NumExports;
    D3D12_EXPORT_DESC* pExports;
}

struct D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION
{
    D3D12_STATE_SUBOBJECT* pSubobjectToAssociate;
    uint NumExports;
    LPCWSTR* pExports;
}

struct D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
{
    LPCWSTR SubobjectToAssociate;
    uint NumExports;
    LPCWSTR* pExports;
}

alias D3D12_HIT_GROUP_TYPE = uint;
enum : D3D12_HIT_GROUP_TYPE
{
    D3D12_HIT_GROUP_TYPE_TRIANGLES = 0,
    D3D12_HIT_GROUP_TYPE_PROCEDURAL_PRIMITIVE = 0x1
}
struct D3D12_HIT_GROUP_DESC
{
    LPCWSTR HitGroupExport;
    D3D12_HIT_GROUP_TYPE Type;
    LPCWSTR AnyHitShaderImport;
    LPCWSTR ClosestHitShaderImport;
    LPCWSTR IntersectionShaderImport;
}

struct D3D12_RAYTRACING_SHADER_CONFIG
{
    uint MaxPayloadSizeInBytes;
    uint MaxAttributeSizeInBytes;
}

struct D3D12_RAYTRACING_PIPELINE_CONFIG
{
    uint MaxTraceRecursionDepth;
}

alias D3D12_STATE_OBJECT_TYPE = uint;
enum : D3D12_STATE_OBJECT_TYPE
{
    D3D12_STATE_OBJECT_TYPE_COLLECTION = 0,
    D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE = 3
}
struct D3D12_STATE_OBJECT_DESC
{
    D3D12_STATE_OBJECT_TYPE Type;
    uint NumSubobjects;
    D3D12_STATE_SUBOBJECT* pSubobjects;
}

alias D3D12_RAYTRACING_GEOMETRY_FLAGS = uint;
enum : D3D12_RAYTRACING_GEOMETRY_FLAGS
{
    D3D12_RAYTRACING_GEOMETRY_FLAG_NONE = 0,
    D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x1,
    D3D12_RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = 0x2
}

alias D3D12_RAYTRACING_GEOMETRY_TYPE = uint;
enum : D3D12_RAYTRACING_GEOMETRY_TYPE
{
    D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES = 0,
    D3D12_RAYTRACING_GEOMETRY_TYPE_PROCEDURAL_PRIMITIVE_AABBS = (D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES + 1)
}

alias D3D12_RAYTRACING_INSTANCE_FLAGS = uint;
enum : D3D12_RAYTRACING_INSTANCE_FLAGS
{
    D3D12_RAYTRACING_INSTANCE_FLAG_NONE = 0,
    D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE = 0x1,
    D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x2,
    D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE = 0x4,
    D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE = 0x8
}

struct D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE
{
    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
    ulong StrideInBytes;
}

struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE
{
    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
    ulong SizeInBytes;
}

struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE
{
    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
    ulong SizeInBytes;
    ulong StrideInBytes;
}

struct D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS Transform3x4;
    DXGI_FORMAT IndexFormat;
    DXGI_FORMAT VertexFormat;
    uint IndexCount;
    uint VertexCount;
    D3D12_GPU_VIRTUAL_ADDRESS IndexBuffer;
    D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE VertexBuffer;
}

struct D3D12_RAYTRACING_AABB
{
    float MinX;
    float MinY;
    float MinZ;
    float MaxX;
    float MaxY;
    float MaxZ;
}

struct D3D12_RAYTRACING_GEOMETRY_AABBS_DESC
{
    ulong AABBCount;
    D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE AABBs;
}

alias D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS = uint;
enum : D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_NONE = 0,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE = 0x1,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION = 0x2,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE = 0x4,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_BUILD = 0x8,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_MINIMIZE_MEMORY = 0x10,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE = 0x20
}

alias D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE = uint;
enum : D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE = 0,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT = 0x1,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_VISUALIZATION_DECODE_FOR_TOOLS = 0x2,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_SERIALIZE = 0x3,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE = 0x4
}

alias D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE = uint;
enum : D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL = 0,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL = 0x1
}

alias D3D12_ELEMENTS_LAYOUT = uint;
enum : D3D12_ELEMENTS_LAYOUT
{
    D3D12_ELEMENTS_LAYOUT_ARRAY = 0,
    D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS = 0x1
}

alias D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE = uint;
enum : D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE = 0,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION = 0x1,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION = 0x2,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE = 0x3
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS DestBuffer;
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC
{
    ulong CompactedSizeInBytes;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC
{
    ulong DecodedSizeInBytes;
}

struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
    uint NumDescs;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC
{
    ulong SerializedSizeInBytes;
    ulong NumBottomLevelAccelerationStructurePointers;
}

struct D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER
{
    GUID DriverOpaqueGUID;
    byte[16] DriverOpaqueVersioningData;
}

alias D3D12_SERIALIZED_DATA_TYPE = uint;
enum : D3D12_SERIALIZED_DATA_TYPE
{
    D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE = 0
}

alias D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS = uint;
enum : D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS
{
    D3D12_DRIVER_MATCHING_IDENTIFIER_COMPATIBLE_WITH_DEVICE = 0,
    D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE = 0x1,
    D3D12_DRIVER_MATCHING_IDENTIFIER_UNRECOGNIZED = 0x2,
    D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_VERSION = 0x3,
    D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_TYPE = 0x4
}

struct D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER
{
    D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER DriverMatchingIdentifier;
    ulong SerializedSizeInBytesIncludingHeader;
    ulong DeserializedSizeInBytes;
    ulong NumBottomLevelAccelerationStructurePointersAfterHeader;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC
{
    ulong CurrentSizeInBytes;
}

struct D3D12_RAYTRACING_INSTANCE_DESC
{
    float[3][4] Transform;
    mixin(bitfields!(uint, "InstanceID", 24, uint, "InstanceMask", 8, uint, "InstanceContributionToHitGroupIndex", 24, uint, "Flags", 8));
    D3D12_GPU_VIRTUAL_ADDRESS AccelerationStructure;
}

struct D3D12_RAYTRACING_GEOMETRY_DESC
{
    D3D12_RAYTRACING_GEOMETRY_TYPE Type;
    D3D12_RAYTRACING_GEOMETRY_FLAGS Flags;
    union
    {
        D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC Triangles;
        D3D12_RAYTRACING_GEOMETRY_AABBS_DESC AABBs;
    }
}

struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS
{
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags;
    uint NumDescs;
    D3D12_ELEMENTS_LAYOUT DescsLayout;
    union
    {
        D3D12_GPU_VIRTUAL_ADDRESS InstanceDescs;
        D3D12_RAYTRACING_GEOMETRY_DESC* pGeometryDescs;
        D3D12_RAYTRACING_GEOMETRY_DESC*** ppGeometryDescs;
    }
}

struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData;
    D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS Inputs;
    D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData;
    D3D12_GPU_VIRTUAL_ADDRESS ScratchAccelerationStructureData;
}

struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO
{
    ulong ResultDataMaxSizeInBytes;
    ulong ScratchDataSizeInBytes;
    ulong UpdateScratchDataSizeInBytes;
}

alias D3D12_RAY_FLAGS = uint;
enum : D3D12_RAY_FLAGS
{
    D3D12_RAY_FLAG_NONE = 0,
    D3D12_RAY_FLAG_FORCE_OPAQUE = 0x1,
    D3D12_RAY_FLAG_FORCE_NON_OPAQUE = 0x2,
    D3D12_RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH = 0x4,
    D3D12_RAY_FLAG_SKIP_CLOSEST_HIT_SHADER = 0x8,
    D3D12_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 0x10,
    D3D12_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 0x20,
    D3D12_RAY_FLAG_CULL_OPAQUE = 0x40,
    D3D12_RAY_FLAG_CULL_NON_OPAQUE = 0x80
}

alias D3D12_HIT_KIND = uint;
enum : D3D12_HIT_KIND
{
    D3D12_HIT_KIND_TRIANGLE_FRONT_FACE = 0xfe,
    D3D12_HIT_KIND_TRIANGLE_BACK_FACE = 0xff
}

alias D3D12_AUTO_BREADCRUMB_OP = uint;
enum : D3D12_AUTO_BREADCRUMB_OP
{
    D3D12_AUTO_BREADCRUMB_OP_SETMARKER = 0,
    D3D12_AUTO_BREADCRUMB_OP_BEGINEVENT = 1,
    D3D12_AUTO_BREADCRUMB_OP_ENDEVENT = 2,
    D3D12_AUTO_BREADCRUMB_OP_DRAWINSTANCED = 3,
    D3D12_AUTO_BREADCRUMB_OP_DRAWINDEXEDINSTANCED = 4,
    D3D12_AUTO_BREADCRUMB_OP_EXECUTEINDIRECT = 5,
    D3D12_AUTO_BREADCRUMB_OP_DISPATCH = 6,
    D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGION = 7,
    D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGION = 8,
    D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCE = 9,
    D3D12_AUTO_BREADCRUMB_OP_COPYTILES = 10,
    D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCE = 11,
    D3D12_AUTO_BREADCRUMB_OP_CLEARRENDERTARGETVIEW = 12,
    D3D12_AUTO_BREADCRUMB_OP_CLEARUNORDEREDACCESSVIEW = 13,
    D3D12_AUTO_BREADCRUMB_OP_CLEARDEPTHSTENCILVIEW = 14,
    D3D12_AUTO_BREADCRUMB_OP_RESOURCEBARRIER = 15,
    D3D12_AUTO_BREADCRUMB_OP_EXECUTEBUNDLE = 16,
    D3D12_AUTO_BREADCRUMB_OP_PRESENT = 17,
    D3D12_AUTO_BREADCRUMB_OP_RESOLVEQUERYDATA = 18,
    D3D12_AUTO_BREADCRUMB_OP_BEGINSUBMISSION = 19,
    D3D12_AUTO_BREADCRUMB_OP_ENDSUBMISSION = 20,
    D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME = 21,
    D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES = 22,
    D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT = 23,
    D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT64 = 24,
    D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCEREGION = 25,
    D3D12_AUTO_BREADCRUMB_OP_WRITEBUFFERIMMEDIATE = 26,
    D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME1 = 27,
    D3D12_AUTO_BREADCRUMB_OP_SETPROTECTEDRESOURCESESSION = 28,
    D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME2 = 29,
    D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES1 = 30,
    D3D12_AUTO_BREADCRUMB_OP_BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31,
    D3D12_AUTO_BREADCRUMB_OP_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32,
    D3D12_AUTO_BREADCRUMB_OP_COPYRAYTRACINGACCELERATIONSTRUCTURE = 33,
    D3D12_AUTO_BREADCRUMB_OP_DISPATCHRAYS = 34,
    D3D12_AUTO_BREADCRUMB_OP_INITIALIZEMETACOMMAND = 35,
    D3D12_AUTO_BREADCRUMB_OP_EXECUTEMETACOMMAND = 36,
    D3D12_AUTO_BREADCRUMB_OP_ESTIMATEMOTION = 37,
    D3D12_AUTO_BREADCRUMB_OP_RESOLVEMOTIONVECTORHEAP = 38,
    D3D12_AUTO_BREADCRUMB_OP_SETPIPELINESTATE1 = 39
}

struct D3D12_AUTO_BREADCRUMB_NODE
{
    const char* pCommandListDebugNameA;
    const wchar* pCommandListDebugNameW;
    const char* pCommandQueueDebugNameA;
    const wchar* pCommandQueueDebugNameW;
    ID3D12GraphicsCommandList* pCommandList;
    ID3D12CommandQueue* pCommandQueue;
    uint BreadcrumbCount;
    uint* pLastBreadcrumbValue;
    D3D12_AUTO_BREADCRUMB_OP* pCommandHistory;
    D3D12_AUTO_BREADCRUMB_NODE* pNext;
}

alias D3D12_DRED_VERSION = uint;
enum : D3D12_DRED_VERSION
{
    D3D12_DRED_VERSION_1_0 = 0x1
}

alias D3D12_DRED_FLAGS = uint;
enum : D3D12_DRED_FLAGS
{
    D3D12_DRED_FLAG_NONE = 0,
    D3D12_DRED_FLAG_FORCE_ENABLE = 1,
    D3D12_DRED_FLAG_DISABLE_AUTOBREADCRUMBS = 2
}

struct D3D12_DEVICE_REMOVED_EXTENDED_DATA
{
    D3D12_DRED_FLAGS Flags;
    D3D12_AUTO_BREADCRUMB_NODE* pHeadAutoBreadcrumbNode;
}

struct D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA
{
    D3D12_DRED_VERSION Version;
    union
    {
        D3D12_DEVICE_REMOVED_EXTENDED_DATA Dred_1_0;
    }
}

alias D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE = uint;
enum : D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE
{
    D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD = 0,
    D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE = (D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD + 1),
    D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR = (D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE + 1),
    D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS = (D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR + 1)
}

struct D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS
{
    D3D12_CLEAR_VALUE ClearValue;

    bool opEquals(const ref D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS b) const
    {
        return ClearValue == b.ClearValue;
    }
}

struct D3D12_RENDER_PASS_BEGINNING_ACCESS
{
    D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE Type;
    union
    {
        D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS Clear;
    }

    bool opEquals(const ref D3D12_RENDER_PASS_BEGINNING_ACCESS b) const
    {
        if (Type != b.Type)
        {
            return false;
        }
        if (Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR && !(Clear == b.Clear))
        {
            return false;
        }
        return true;
    }
}

alias D3D12_RENDER_PASS_ENDING_ACCESS_TYPE = uint;
enum : D3D12_RENDER_PASS_ENDING_ACCESS_TYPE
{
    D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD = 0,
    D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE = (D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD + 1),
    D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE = (D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE + 1),
    D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS = (D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE + 1)
}

struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS
{
    uint SrcSubresource;
    uint DstSubresource;
    uint DstX;
    uint DstY;
    D3D12_RECT SrcRect;
}

struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS
{
    ID3D12Resource* pSrcResource;
    ID3D12Resource* pDstResource;
    uint SubresourceCount;
    D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS* pSubresourceParameters;
    DXGI_FORMAT Format;
    D3D12_RESOLVE_MODE ResolveMode;
    bool PreserveResolveSource;

    bool opEquals(const ref D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS b) const
    {
        if (pSrcResource != b.pSrcResource)
        {
            return false;
        }
        if (pDstResource != b.pDstResource)
        {
            return false;
        }
        if (SubresourceCount != b.SubresourceCount)
        {
            return false;
        }
        if (Format != b.Format)
        {
            return false;
        }
        if (ResolveMode != b.ResolveMode)
        {
            return false;
        }
        if (PreserveResolveSource != b.PreserveResolveSource)
        {
            return false;
        }
        return true;
    }
}

struct D3D12_RENDER_PASS_ENDING_ACCESS
{
    D3D12_RENDER_PASS_ENDING_ACCESS_TYPE Type;
    union
    {
        D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS Resolve;
    }

    bool opEquals(const ref D3D12_RENDER_PASS_ENDING_ACCESS b) const
    {
        if (Type != b.Type)
        {
            return false;
        }
        if (Type == D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE && !(Resolve == b.Resolve))
        {
            return false;
        }
        return true;
    }
}

struct D3D12_RENDER_PASS_RENDER_TARGET_DESC
{
    D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor;
    D3D12_RENDER_PASS_BEGINNING_ACCESS BeginningAccess;
    D3D12_RENDER_PASS_ENDING_ACCESS EndingAccess;

    bool opEquals(const ref D3D12_RENDER_PASS_RENDER_TARGET_DESC b) const
    {
        if (cpuDescriptor.ptr != b.cpuDescriptor.ptr)
        {
            return false;
        }
        if (!(BeginningAccess == b.BeginningAccess))
        {
            return false;
        }
        if (!(EndingAccess == b.EndingAccess))
        {
            return false;
        }
        return true;
    }
}

struct D3D12_RENDER_PASS_DEPTH_STENCIL_DESC
{
    D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor;
    D3D12_RENDER_PASS_BEGINNING_ACCESS DepthBeginningAccess;
    D3D12_RENDER_PASS_BEGINNING_ACCESS StencilBeginningAccess;
    D3D12_RENDER_PASS_ENDING_ACCESS DepthEndingAccess;
    D3D12_RENDER_PASS_ENDING_ACCESS StencilEndingAccess;

    bool opEquals(const ref D3D12_RENDER_PASS_DEPTH_STENCIL_DESC b) const
    {
        if (cpuDescriptor.ptr != b.cpuDescriptor.ptr)
        {
            return false;
        }
        if (!(DepthBeginningAccess == b.DepthBeginningAccess))
        {
            return false;
        }
        if (!(StencilBeginningAccess == b.StencilBeginningAccess))
        {
            return false;
        }
        if (!(DepthEndingAccess == b.DepthEndingAccess))
        {
            return false;
        }
        if (!(StencilEndingAccess == b.StencilEndingAccess))
        {
            return false;
        }
        return true;
    }
}

alias D3D12_RENDER_PASS_FLAGS = uint;
enum : D3D12_RENDER_PASS_FLAGS
{
    D3D12_RENDER_PASS_FLAG_NONE = 0,
    D3D12_RENDER_PASS_FLAG_ALLOW_UAV_WRITES = 0x1,
    D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS = 0x2,
    D3D12_RENDER_PASS_FLAG_RESUMING_PASS = 0x4
}
struct D3D12_DISPATCH_RAYS_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS_RANGE RayGenerationShaderRecord;
    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable;
    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable;
    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable;
    uint Width;
    uint Height;
    uint Depth;
}

struct D3D12_SUBRESOURCE_DATA
{
    void* pData;
    LONG_PTR RowPitch;
    LONG_PTR SlicePitch;
}

struct D3D12_MEMCPY_DEST
{
    void* pData;
    size_t RowPitch;
    size_t SlicePitch;
}

extern (Windows) nothrow HRESULT D3D12CreateDevice(IUnknown* pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, REFIID riid, void** ppDevice);
alias PFN_D3D12_CREATE_DEVICE = extern (Windows) nothrow HRESULT function(IUnknown* pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, REFIID riid, void** ppDevice);
extern (Windows) nothrow HRESULT D3D12GetDebugInterface(REFIID riid, void** ppvDebug);
alias PFN_D3D12_GET_DEBUG_INTERFACE = extern (Windows) nothrow HRESULT function(REFIID riid, void** ppvDebug);
extern (Windows) nothrow HRESULT D3D12EnableExperimentalFeatures(uint NumFeatures, const IID* pIIDs, void* pConfigurationStructs, uint* pConfigurationStructSizes);
static const UUID D3D12ExperimentalShaderModels = {0x76f5573e, 0xf13a, 0x40f5, [0xb2, 0x97, 0x81, 0xce, 0x9e, 0x18, 0x93, 0x3f]};
static const UUID D3D12TiledResourceTier4 = {0xc9c4725f, 0xa81a, 0x4f56, [0x8c, 0x5b, 0xc5, 0x10, 0x39, 0xd6, 0x94, 0xfb]};
static const UUID D3D12MetaCommand = {0xc734c97e, 0x8077, 0x48c8, [0x9f, 0xdc, 0xd9, 0xd1, 0xdd, 0x31, 0xdd, 0x77]};
