public static D3D12_RESOURCE_BARRIER InitUAV([NativeTypeName("ID3D12Resource *")] ID3D12Resource *pResource)
        {
            D3D12_RESOURCE_BARRIER result = default;

            result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
            result.Anonymous.UAV.pResource = pResource;
            return(result);
        }
        public static D3D12_RESOURCE_BARRIER InitAliasing([NativeTypeName("ID3D12Resource *")] ID3D12Resource *pResourceBefore, [NativeTypeName("ID3D12Resource *")] ID3D12Resource *pResourceAfter)
        {
            D3D12_RESOURCE_BARRIER result = default;

            result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
            result.Anonymous.Aliasing.pResourceBefore = pResourceBefore;
            result.Anonymous.Aliasing.pResourceAfter  = pResourceAfter;
            return(result);
        }
        public static D3D12_RESOURCE_BARRIER InitTransition([NativeTypeName("ID3D12Resource *")] ID3D12Resource *pResource, D3D12_RESOURCE_STATES stateBefore, D3D12_RESOURCE_STATES stateAfter, [NativeTypeName("UINT")] uint subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE)
        {
            D3D12_RESOURCE_BARRIER result = default;

            result.Type  = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
            result.Flags = flags;
            result.Anonymous.Transition.pResource   = pResource;
            result.Anonymous.Transition.StateBefore = stateBefore;
            result.Anonymous.Transition.StateAfter  = stateAfter;
            result.Anonymous.Transition.Subresource = subresource;
            return(result);
        }