Int32 CreateResourcePlatformDependent(H1HeapType heapType, H1GpuResourceDesc resourceDesc, H1ResourceStates defaultUsage)
        {
            HeapProperties heapProps = new HeapProperties();

            heapProps.CPUPageProperty      = CpuPageProperty.Unknown;
            heapProps.MemoryPoolPreference = MemoryPool.Unknown;
            heapProps.CreationNodeMask     = 1;
            heapProps.VisibleNodeMask      = 1;

            // convert to H1HeapType to HeapType for dx12
            switch (heapType)
            {
            case H1HeapType.Default:
                heapProps.Type = HeapType.Default;
                break;

            case H1HeapType.Readback:
                heapProps.Type = HeapType.Readback;
                break;

            case H1HeapType.Upload:
                heapProps.Type = HeapType.Upload;
                break;
            }

            // convert H1ResourceDesc to ResourceDesc for dx12
            ResourceDescription resourceDescDX12 = ConvertToResourceDescDx12(resourceDesc);
            ResourceStates      defaultStates    = (ResourceStates)ResourceStateMapper[Convert.ToInt32(defaultUsage)];

            Device deviceDX11 = H1Global <H1ManagedRenderer> .Instance.Device;

            m_GpuResource = deviceDX11.CreateCommittedResource(heapProps, HeapFlags.None, resourceDescDX12, defaultStates);

            Int32 elementSize = Convert.ToInt32(H1RHIDefinitionHelper.ElementTypeToSize(resourceDesc.Format));

            if (elementSize == 0)
            {
                throw new InvalidOperationException("there is no appropriate format is implemented in ElementTypeToSize()!");
            }

            Int32 totalSizeInBytes = elementSize * Convert.ToInt32(resourceDesc.Width * resourceDesc.Height * resourceDesc.DepthOrArraySize);

            return(totalSizeInBytes);
        }