Search Results for

    Show / Hide Table of Contents

    Class GPUDeviceDX12

    Implementation of Graphics Device for DirectX 12 rendering system

    Inheritance
    Object
    ScriptingObject
    GPUDevice
    GPUDeviceDX
    GPUDeviceDX12
    Inherited Members
    GPUDeviceDX::_adapter
    GPUDevice::_drawGpuEventIndex
    GPUDevice::_featureLevel
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    GPUDevice::_isRendering
    GPUDevice::_rendererType
    GPUDevice::_res
    GPUDevice::_resources
    GPUDevice::_resourcesLock
    GPUDevice::_shaderProfile
    GPUDevice::_state
    ScriptingObject::_type
    GPUDevice::_wasVSyncUsed
    GPUDevice::AddResource(GPUResource* resource)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    GPUDevice::CanDraw()
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    GPUDevice::CreateTasksContext()
    GPUDevice::CreateTasksExecutor()
    GPUDevice::CreateVertexLayout(const Array<struct VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>>& elements, bool explicitOffsets=false)
    GPUDevice::CurrentTask
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ScriptingObject::DestroyManaged()
    GPUDeviceDX12
    GPUDevice::Draw()
    GPUDevice::DrawEnd()
    GPUDevice::DumpResourcesToLog()
    GPUDevice::FeaturesPerFormat[static_cast<int32>(PixelFormat::MAX)
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    GPUDeviceDX::GetAdapter()
    ScriptingObject::GetClass()
    GPUDevice::GetClearPS()
    GPUDevice::GetCopyLinearPS()
    GPUDevice::GetDecodeNV12PS()
    GPUDevice::GetDecodeYUY2PS()
    GPUDevice::GetDefaultBlackTexture()
    GPUDevice::GetDefaultDeformableMaterial()
    GPUDevice::GetDefaultMaterial()
    GPUDevice::GetDefaultNormalMap()
    GPUDevice::GetDefaultWhiteTexture()
    GPUDevice::GetFeatureLevel()
    GPUDevice::GetFormatFeatures(const PixelFormat format)
    GPUDevice::GetFullscreenTriangleVB()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    GPUDevice::GetMemoryUsage()
    ScriptingObject::GetOrCreateManagedInstance()
    GPUDevice::GetRendererType()
    GPUDeviceDX::getRendererType(GPUAdapterDX* adapter)
    GPUDevice::GetResources()
    GPUDevice::GetShaderProfile()
    GPUDeviceDX::getShaderProfile(GPUAdapterDX* adapter)
    GPUDevice::GetState()
    GPUDevice::GetTasksManager()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    GPUDevice::GPUDevice(RendererType type, ShaderProfile profile)
    GPUDeviceDX::GPUDeviceDX(RendererType type, ShaderProfile profile, GPUAdapterDX* adapter)
    ScriptingObject::HasManagedInstance()
    GPUDevice::Instance
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    GPUDevice::IsDebugToolAttached
    ScriptingObject::IsRegistered()
    GPUDevice::IsRendering()
    GPUDevice::Limits
    GPUDevice::LoadContent()
    GPUDevice::Locker
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    GPUDevice::OnRequestingExit()
    ScriptingObject::OnScriptingDispose()
    GPUDeviceDX::Outputs
    GPUDevice::preDispose()
    GPUDevice::QuadShader
    ScriptingObject::RegisterObject()
    GPUDevice::RemoveResource(GPUResource* resource)
    GPUDevice::RenderBegin()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    GPUDeviceDX12
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    GPUDevice::TotalGraphicsMemory
    ScriptingObject::UnregisterObject()
    GPUDeviceDX::UpdateOutputs(IDXGIAdapter* adapter)
    GPUDeviceDX12
    GPUDevice::VideoOutputModes
    GPUDevice::WasVSyncUsed()
    GPUDevice::~GPUDevice()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/GraphicsDevice/DirectX/DX12/GPUDeviceDX12.h
    Syntax
    public class GPUDeviceDX12 : public GPUDeviceDX

    Constructors

    ~GPUDeviceDX12()

    Declaration
    public ~GPUDeviceDX12()

    GPUDeviceDX12(IDXGIFactory4* dxgiFactory, GPUAdapterDX* adapter)

    Declaration
    public GPUDeviceDX12(IDXGIFactory4* dxgiFactory, GPUAdapterDX* adapter)
    Parameters
    IDXGIFactory4 dxgiFactory

    GPUAdapterDX adapter

    Fields

    AllowTearing

    Declaration
    public bool AllowTearing = false
    Field Value
    bool

    DispatchIndirectCommandSignature

    Declaration
    public CommandSignatureDX12* DispatchIndirectCommandSignature = nullptr
    Field Value
    CommandSignatureDX12

    DrawIndexedIndirectCommandSignature

    Declaration
    public CommandSignatureDX12* DrawIndexedIndirectCommandSignature = nullptr
    Field Value
    CommandSignatureDX12

    DrawIndirectCommandSignature

    Declaration
    public CommandSignatureDX12* DrawIndirectCommandSignature = nullptr
    Field Value
    CommandSignatureDX12

    DummyVB

    Declaration
    public GPUBuffer* DummyVB = nullptr
    Field Value
    GPUBuffer

    Heap_CBV_SRV_UAV

    Declaration
    public DescriptorHeapPoolDX12 Heap_CBV_SRV_UAV
    Field Value
    DescriptorHeapPoolDX12

    Heap_DSV

    Declaration
    public DescriptorHeapPoolDX12 Heap_DSV
    Field Value
    DescriptorHeapPoolDX12

    Heap_RTV

    Declaration
    public DescriptorHeapPoolDX12 Heap_RTV
    Field Value
    DescriptorHeapPoolDX12

    Heap_Sampler

    Declaration
    public DescriptorHeapPoolDX12 Heap_Sampler
    Field Value
    DescriptorHeapPoolDX12

    RingHeap_CBV_SRV_UAV

    Declaration
    public DescriptorHeapRingBufferDX12 RingHeap_CBV_SRV_UAV
    Field Value
    DescriptorHeapRingBufferDX12

    RingHeap_Sampler

    Declaration
    public DescriptorHeapRingBufferDX12 RingHeap_Sampler
    Field Value
    DescriptorHeapRingBufferDX12

    TimestampQueryHeap

    The timestamp queries heap.

    Declaration
    public QueryHeapDX12 TimestampQueryHeap
    Field Value
    QueryHeapDX12

    UploadBuffer

    Upload buffer for general purpose

    Declaration
    public UploadBufferDX12* UploadBuffer
    Field Value
    UploadBufferDX12

    Methods

    AddResourceToLateRelease(IGraphicsUnknown* resource, uint32 safeFrameCount=DX12_RESOURCE_DELETE_SAFE_FRAMES_COUNT)

    Declaration
    public void AddResourceToLateRelease(IGraphicsUnknown* resource, uint32 safeFrameCount=DX12_RESOURCE_DELETE_SAFE_FRAMES_COUNT)
    Parameters
    IGraphicsUnknown resource

    uint32 safeFrameCount

    Create()

    Declaration
    public static GPUDevice* Create()
    Returns
    GPUDevice

    CreateBuffer(const StringView& name)

    Creates the buffer.

    Declaration
    public virtual GPUBuffer* CreateBuffer(const StringView& name) override
    Parameters
    StringView name

    The resource name.

    Returns
    GPUBuffer

    The buffer.

    Overrides
    GPUDevice::CreateBuffer(const StringView& name=StringView::Empty)

    CreateConstantBuffer(uint32 size, const StringView& name)

    Creates the constant buffer.

    Declaration
    public virtual GPUConstantBuffer* CreateConstantBuffer(uint32 size, const StringView& name) override
    Parameters
    uint32 size

    The buffer size (in bytes).

    StringView name

    The resource name.

    Returns
    GPUConstantBuffer

    The constant buffer.

    Overrides
    GPUDevice::CreateConstantBuffer(uint32 size, const StringView& name=StringView::Empty)

    CreatePipelineState()

    Creates the GPU pipeline state object.

    Declaration
    public virtual GPUPipelineState* CreatePipelineState() override
    Returns
    GPUPipelineState

    The pipeline state.

    Overrides
    GPUDevice::CreatePipelineState()

    CreateSampler()

    Creates the texture sampler.

    Declaration
    public virtual GPUSampler* CreateSampler() override
    Returns
    GPUSampler

    The sampler.

    Overrides
    GPUDevice::CreateSampler()

    CreateShader(const StringView& name)

    Creates the shader.

    Declaration
    public virtual GPUShader* CreateShader(const StringView& name) override
    Parameters
    StringView name

    The resource name.

    Returns
    GPUShader

    The shader.

    Overrides
    GPUDevice::CreateShader(const StringView& name=StringView::Empty)

    CreateSwapChain(Window* window)

    Creates the native window swap chain.

    Declaration
    public virtual GPUSwapChain* CreateSwapChain(Window* window) override
    Parameters
    Window window

    The output window.

    Returns
    GPUSwapChain

    The native window swap chain.

    Overrides
    GPUDevice::CreateSwapChain(Window* window)

    CreateTexture(const StringView& name)

    Creates the texture.

    Declaration
    public virtual GPUTexture* CreateTexture(const StringView& name) override
    Parameters
    StringView name

    The resource name.

    Returns
    GPUTexture

    The texture.

    Overrides
    GPUDevice::CreateTexture(const StringView& name=StringView::Empty)

    CreateTimerQuery()

    Creates the timer query object.

    Declaration
    public virtual GPUTimerQuery* CreateTimerQuery() override
    Returns
    GPUTimerQuery

    The timer query.

    Overrides
    GPUDevice::CreateTimerQuery()

    CreateVertexLayout(const VertexElements& elements, bool explicitOffsets)

    Declaration
    public GPUVertexLayout* CreateVertexLayout(const VertexElements& elements, bool explicitOffsets) override
    Parameters
    VertexElements elements

    bool explicitOffsets

    Returns
    GPUVertexLayout

    Dispose()

    Clean all allocated data by device

    Declaration
    public virtual void Dispose() final override
    Overrides
    GPUDevice::Dispose()

    DrawBegin()

    Called during Draw method before any frame rendering initialization. Cannot be used to submit commands to GPU.

    Declaration
    public virtual void DrawBegin() override
    Overrides
    GPUDevice::DrawBegin()

    GetCommandList()

    Gets DirectX 12 command list object

    Declaration
    public ID3D12GraphicsCommandList* GetCommandList() const
    Returns
    ID3D12GraphicsCommandList

    GetCommandQueue()

    Gets command queue.

    Declaration
    public CommandQueueDX12* GetCommandQueue() const
    Returns
    CommandQueueDX12

    GetCommandQueueDX12()

    Gets DirectX 12 command queue object.

    Declaration
    public ID3D12CommandQueue* GetCommandQueueDX12() const
    Returns
    ID3D12CommandQueue

    GetDevice()

    Gets DX12 device.

    Declaration
    public ID3D12Device* GetDevice() const
    Returns
    ID3D12Device

    GetDXGIFactory()

    Gets DXGI factory.

    Declaration
    public IDXGIFactory4* GetDXGIFactory() const
    Returns
    IDXGIFactory4

    GetMainContext()

    Gets the main GPU context.

    Declaration
    public virtual GPUContext* GetMainContext() override
    Returns
    GPUContext

    Overrides
    GPUDevice::GetMainContext()

    GetMainContextDX12()

    Gets main commands context (for DirectX 12)

    Declaration
    public GPUContextDX12* GetMainContextDX12() const
    Returns
    GPUContextDX12

    GetMaxMSAAQuality(uint32 sampleCount)

    Declaration
    public static uint32 GetMaxMSAAQuality(uint32 sampleCount)
    Parameters
    uint32 sampleCount

    Returns
    uint32

    GetNativePtr()

    Gets the native pointer to the underlying graphics device. It's a low-level platform-specific handle.

    Declaration
    public virtual void* GetNativePtr() const override
    Returns
    void

    Overrides
    GPUDevice::GetNativePtr()

    GetRootSignature()

    Gets root signature of the graphics pipeline.

    Declaration
    public ID3D12RootSignature* GetRootSignature() const
    Returns
    ID3D12RootSignature

    Init()

    Init device resources

    Declaration
    public virtual bool Init() override
    Returns
    bool

    True if cannot init, otherwise false.

    Overrides
    GPUDevice::Init()

    NullSRV(D3D12_SRV_DIMENSION dimension)

    Declaration
    public D3D12_CPU_DESCRIPTOR_HANDLE NullSRV(D3D12_SRV_DIMENSION dimension) const
    Parameters
    D3D12_SRV_DIMENSION dimension

    Returns
    D3D12_CPU_DESCRIPTOR_HANDLE

    NullUAV()

    Declaration
    public D3D12_CPU_DESCRIPTOR_HANDLE NullUAV() const
    Returns
    D3D12_CPU_DESCRIPTOR_HANDLE

    RenderEnd()

    Called during Draw method before rendering end. Can be used to submit commands to the GPU before closing GPU command list.

    Declaration
    public virtual void RenderEnd() override
    Overrides
    GPUDevice::RenderEnd()

    WaitForGPU()

    Wait for GPU end doing submitted work

    Declaration
    public virtual void WaitForGPU() override
    Overrides
    GPUDevice::WaitForGPU()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat