public Int64 IncrementFence()
        {
            H1GpuFence fenceDX12 = m_Fence;

            m_CommandQueue.Signal(fenceDX12.FenceValue, fenceDX12.NextFrameFenceValue);
            return(fenceDX12.IncreNextFenceValue());
        }
        public Boolean IsFenceComplete(Int64 fenceValue)
        {
            H1GpuFence fenceDX12 = m_Fence;

            if (fenceValue > fenceDX12.LastCompletedFenceValue)
            {
                fenceDX12.UpdateLastCompletedFenceValue();
            }

            return(fenceValue <= fenceDX12.LastCompletedFenceValue);
        }
        void InitializePlatformDependent()
        {
            // get the device reference
            m_DeviceRef = H1Global <H1ManagedRenderer> .Instance.Device;

            // platform-dependent assignments
            m_Fence = new H1GpuFence();
            m_CommandAllocatorPool = new H1CommandAllocatorPoolDX12(m_Type, m_DeviceRef);

            // create command queue (depending on command queue type)
            CommandQueueDescription?commandQueueDesc = null;

            switch (m_Type)
            {
            case H1CommandListType.Bundle:
                commandQueueDesc = new CommandQueueDescription(CommandListType.Bundle);
                break;

            case H1CommandListType.Compute:
                commandQueueDesc = new CommandQueueDescription(CommandListType.Compute);
                break;

            case H1CommandListType.Direct:
                commandQueueDesc = new CommandQueueDescription(CommandListType.Direct);
                break;

            case H1CommandListType.Copy:
                commandQueueDesc = new CommandQueueDescription(CommandListType.Copy);
                break;
            }

            // try to create command queue
            if (commandQueueDesc != null)
            {
                m_CommandQueue = m_DeviceRef.CreateCommandQueue(commandQueueDesc.Value);
            }
        }