Search Results for

    Show / Hide Table of Contents

    Class GPUContextDX12

    GPU Commands Context implementation for DirectX 12

    Inheritance
    Object
    ScriptingObject
    GPUContext
    GPUContextDX12
    Inherited Members
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    GPUContext::_lastRenderTime
    ScriptingObject::_type
    GPUContext::BindSR(int32 slot, GPUTexture* t)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    GPUContextDX12
    ScriptingObject::DestroyManaged()
    GPUContext::Draw(GPUTexture* dst, GPUTexture* src)
    GPUContext::Draw(GPUTexture* rt)
    GPUContext::Draw(GPUTextureView* rt)
    GPUContext::Draw(int32 startVertex, uint32 verticesCount)
    GPUContext::DrawFullscreenTriangle(int32 instanceCount=1)
    GPUContext::DrawIndexed(uint32 indicesCount, int32 startVertex = 0, int32 startIndex = 0)
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    GPUContext::GetDevice()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    ScriptingObject::GetOrCreateManagedInstance()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    GPUContext::GPUContext(GPUDevice* device)
    ScriptingObject::HasManagedInstance()
    GPUContextDX12
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    ScriptingObject::IsRegistered()
    GPUContext::LogInvalidResourceUsage(int32 slot, const GPUResourceView* view, InvalidBindPoint bindPoint)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    GPUContext::SetViewport(float width, float height)
    GPUContext::SetViewportAndScissors(float width, float height)
    GPUContext::SetViewportAndScissors(const Viewport& viewport)
    GPUContextDX12
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    GPUContext::UnBindCB(int32 slot)
    GPUContext::UnBindSR(int32 slot)
    GPUContext::UnBindUA(int32 slot)
    ScriptingObject::UnregisterObject()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/GraphicsDevice/DirectX/DX12/GPUContextDX12.h
    Syntax
    public class GPUContextDX12 : public GPUContext

    Constructors

    ~GPUContextDX12()

    Declaration
    public ~GPUContextDX12()

    GPUContextDX12(GPUDeviceDX12* device, D3D12_COMMAND_LIST_TYPE type)

    Declaration
    public GPUContextDX12(GPUDeviceDX12* device, D3D12_COMMAND_LIST_TYPE type)
    Parameters
    GPUDeviceDX12 device

    D3D12_COMMAND_LIST_TYPE type

    Fields

    FrameFenceValues

    Declaration
    public uint64 FrameFenceValues[2]
    Field Value
    uint64

    Methods

    AddTransitionBarrier(ResourceOwnerDX12* resource, const D3D12_RESOURCE_STATES before, const D3D12_RESOURCE_STATES after, const int32 subresourceIndex)

    Adds the transition barrier for the given resource (or subresource). Supports batching barriers.

    Declaration
    public void AddTransitionBarrier(ResourceOwnerDX12* resource, const D3D12_RESOURCE_STATES before, const D3D12_RESOURCE_STATES after, const int32 subresourceIndex)
    Parameters
    ResourceOwnerDX12 resource

    The resource.

    D3D12_RESOURCE_STATES before

    The 'before' state.

    D3D12_RESOURCE_STATES after

    The 'after' state.

    int32 subresourceIndex

    The index of the subresource.

    AddUAVBarrier()

    Adds the UAV barrier. Supports batching barriers.

    Declaration
    public void AddUAVBarrier()

    BindCB(int32 slot, GPUConstantBuffer* cb)

    Binds the constant buffer to the slot.

    Declaration
    public virtual void BindCB(int32 slot, GPUConstantBuffer* cb) override
    Parameters
    int32 slot

    The slot index.

    GPUConstantBuffer cb

    The constant buffer.

    Overrides
    GPUContext::BindCB(int32 slot, GPUConstantBuffer* cb)

    BindIB(GPUBuffer* indexBuffer)

    Binds the index buffer to the pipeline.

    Declaration
    public virtual void BindIB(GPUBuffer* indexBuffer) override
    Parameters
    GPUBuffer indexBuffer

    The index buffer.

    Overrides
    GPUContext::BindIB(GPUBuffer* indexBuffer)

    BindSampler(int32 slot, GPUSampler* sampler)

    Binds the texture sampler to the pipeline.

    Declaration
    public virtual void BindSampler(int32 slot, GPUSampler* sampler) override
    Parameters
    int32 slot

    The slot index.

    GPUSampler sampler

    The sampler.

    Overrides
    GPUContext::BindSampler(int32 slot, GPUSampler* sampler)

    BindSR(int32 slot, GPUResourceView* view)

    Binds the resource view to the shader resource slot (texture view or buffer view).

    Declaration
    public virtual void BindSR(int32 slot, GPUResourceView* view) override
    Parameters
    int32 slot

    The slot index.

    GPUResourceView view

    The resource view.

    Overrides
    GPUContext::BindSR(int32 slot, GPUResourceView* view)

    BindUA(int32 slot, GPUResourceView* view)

    Binds the resource view to the unordered access slot (texture view or buffer view).

    Declaration
    public virtual void BindUA(int32 slot, GPUResourceView* view) override
    Parameters
    int32 slot

    The slot index.

    GPUResourceView view

    The resource view.

    Overrides
    GPUContext::BindUA(int32 slot, GPUResourceView* view)

    BindVB(const Span<GPUBuffer* >& vertexBuffers, const uint32* vertexBuffersOffsets=nullptr, GPUVertexLayout* vertexLayout=nullptr)

    Binds the vertex buffers to the pipeline.

    Declaration
    public virtual void BindVB(const Span<GPUBuffer* >& vertexBuffers, const uint32* vertexBuffersOffsets=nullptr, GPUVertexLayout* vertexLayout=nullptr) override
    Parameters
    Span<GPUBuffer > vertexBuffers

    The array of vertex buffers to use.

    uint32 vertexBuffersOffsets

    The optional array of byte offsets from the vertex buffers begins. Can be used to offset the vertex data when reusing the same buffer allocation for multiple geometry objects.

    GPUVertexLayout vertexLayout

    The optional vertex layout to use when passing data from vertex buffers to the vertex shader. If null, layout will be automatically extracted from vertex buffers combined.

    Overrides
    GPUContext::BindVB(const Span<GPUBuffer* >& vertexBuffers, const uint32* vertexBuffersOffsets=nullptr, GPUVertexLayout* vertexLayout=nullptr)

    Clear(GPUTextureView* rt, const Color& color)

    Clears texture surface with a color. Supports volumetric textures and texture arrays (including cube textures).

    Declaration
    public virtual void Clear(GPUTextureView* rt, const Color& color) override
    Parameters
    GPUTextureView rt

    The target surface.

    Color color

    The clear color.

    Overrides
    GPUContext::Clear(GPUTextureView* rt, const Color& color)

    ClearDepth(GPUTextureView* depthBuffer, float depthValue, uint8 stencilValue)

    Clears depth buffer.

    Declaration
    public virtual void ClearDepth(GPUTextureView* depthBuffer, float depthValue, uint8 stencilValue) override
    Parameters
    GPUTextureView depthBuffer

    The depth buffer to clear.

    float depthValue

    The clear depth value.

    uint8 stencilValue

    The clear stencil value.

    Overrides
    GPUContext::ClearDepth(GPUTextureView* depthBuffer, float depthValue=1.0f, uint8 stencilValue = 0)

    ClearState()

    Clears the context state.

    Declaration
    public virtual void ClearState() override
    Overrides
    GPUContext::ClearState()

    ClearUA(GPUBuffer* buf, const Float4& value)

    Clears an unordered access buffer with a float value.

    Declaration
    public virtual void ClearUA(GPUBuffer* buf, const Float4& value) override
    Parameters
    GPUBuffer buf

    The buffer to clear.

    Float4 value

    The clear value.

    Overrides
    GPUContext::ClearUA(GPUBuffer* buf, const Float4& value)

    ClearUA(GPUBuffer* buf, const uint32 value[4])

    Clears an unordered access buffer with an unsigned value.

    Declaration
    public virtual void ClearUA(GPUBuffer* buf, const uint32 value[4]) override
    Parameters
    GPUBuffer buf

    The buffer to clear.

    uint32 value

    The clear value.

    Overrides
    GPUContext::ClearUA(GPUBuffer* buf, const uint32 value[4])

    ClearUA(GPUTexture* texture, const Float4& value)

    Clears an unordered access texture with a float value.

    Declaration
    public virtual void ClearUA(GPUTexture* texture, const Float4& value) override
    Parameters
    GPUTexture texture

    The texture to clear.

    Float4 value

    The clear value.

    Overrides
    GPUContext::ClearUA(GPUTexture* texture, const Float4& value)

    ClearUA(GPUTexture* texture, const uint32 value[4])

    Clears an unordered access texture with an unsigned value.

    Declaration
    public virtual void ClearUA(GPUTexture* texture, const uint32 value[4]) override
    Parameters
    GPUTexture texture

    The texture to clear.

    uint32 value

    The clear value.

    Overrides
    GPUContext::ClearUA(GPUTexture* texture, const uint32 value[4])

    CopyBuffer(GPUBuffer* dstBuffer, GPUBuffer* srcBuffer, uint32 size, uint32 dstOffset, uint32 srcOffset)

    Copies the buffer data.

    Declaration
    public virtual void CopyBuffer(GPUBuffer* dstBuffer, GPUBuffer* srcBuffer, uint32 size, uint32 dstOffset, uint32 srcOffset) override
    Parameters
    GPUBuffer dstBuffer

    The destination buffer to write to.

    GPUBuffer srcBuffer

    The source buffer to read from.

    uint32 size

    The size of data to copy (in bytes).

    uint32 dstOffset

    The offset (in bytes) from the destination buffer start to copy data to.

    uint32 srcOffset

    The offset (in bytes) from the source buffer start to copy data from.

    Overrides
    GPUContext::CopyBuffer(GPUBuffer* dstBuffer, GPUBuffer* srcBuffer, uint32 size, uint32 dstOffset = 0, uint32 srcOffset = 0)

    CopyCounter(GPUBuffer* dstBuffer, uint32 dstOffset, GPUBuffer* srcBuffer)

    Copies the counter buffer value.

    Declaration
    public virtual void CopyCounter(GPUBuffer* dstBuffer, uint32 dstOffset, GPUBuffer* srcBuffer) override
    Parameters
    GPUBuffer dstBuffer

    The destination buffer.

    uint32 dstOffset

    The destination aligned byte offset.

    GPUBuffer srcBuffer

    The source buffer.

    Overrides
    GPUContext::CopyCounter(GPUBuffer* dstBuffer, uint32 dstOffset, GPUBuffer* srcBuffer)

    CopyResource(GPUResource* dstResource, GPUResource* srcResource)

    Copies the resource data (whole resource).

    Declaration
    public virtual void CopyResource(GPUResource* dstResource, GPUResource* srcResource) override
    Parameters
    GPUResource dstResource

    The destination resource.

    GPUResource srcResource

    The source resource.

    Overrides
    GPUContext::CopyResource(GPUResource* dstResource, GPUResource* srcResource)

    CopySubresource(GPUResource* dstResource, uint32 dstSubresource, GPUResource* srcResource, uint32 srcSubresource)

    Copies the subresource data.

    Declaration
    public virtual void CopySubresource(GPUResource* dstResource, uint32 dstSubresource, GPUResource* srcResource, uint32 srcSubresource) override
    Parameters
    GPUResource dstResource

    The destination resource.

    uint32 dstSubresource

    The destination subresource index.

    GPUResource srcResource

    The source resource.

    uint32 srcSubresource

    The source subresource index.

    Overrides
    GPUContext::CopySubresource(GPUResource* dstResource, uint32 dstSubresource, GPUResource* srcResource, uint32 srcSubresource)

    CopyTexture(GPUTexture* dstResource, uint32 dstSubresource, uint32 dstX, uint32 dstY, uint32 dstZ, GPUTexture* srcResource, uint32 srcSubresource)

    Copies region of the texture.

    Declaration
    public virtual void CopyTexture(GPUTexture* dstResource, uint32 dstSubresource, uint32 dstX, uint32 dstY, uint32 dstZ, GPUTexture* srcResource, uint32 srcSubresource) override
    Parameters
    GPUTexture dstResource

    The destination resource.

    uint32 dstSubresource

    The destination subresource index.

    uint32 dstX

    The x-coordinate of the upper left corner of the destination region.

    uint32 dstY

    The y-coordinate of the upper left corner of the destination region.

    uint32 dstZ

    The z-coordinate of the upper left corner of the destination region.

    GPUTexture srcResource

    The source resource.

    uint32 srcSubresource

    The source subresource index.

    Overrides
    GPUContext::CopyTexture(GPUTexture* dstResource, uint32 dstSubresource, uint32 dstX, uint32 dstY, uint32 dstZ, GPUTexture* srcResource, uint32 srcSubresource)

    Dispatch(GPUShaderProgramCS* shader, uint32 threadGroupCountX, uint32 threadGroupCountY, uint32 threadGroupCountZ)

    Executes a command list from a thread group.

    Declaration
    public virtual void Dispatch(GPUShaderProgramCS* shader, uint32 threadGroupCountX, uint32 threadGroupCountY, uint32 threadGroupCountZ) override
    Parameters
    GPUShaderProgramCS shader

    The compute shader program to execute.

    uint32 threadGroupCountX

    The number of groups dispatched in the x direction.

    uint32 threadGroupCountY

    The number of groups dispatched in the y direction.

    uint32 threadGroupCountZ

    The number of groups dispatched in the z direction.

    Overrides
    GPUContext::Dispatch(GPUShaderProgramCS* shader, uint32 threadGroupCountX, uint32 threadGroupCountY, uint32 threadGroupCountZ)

    DispatchIndirect(GPUShaderProgramCS* shader, GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    Executes a command list from a thread group. Buffer must contain GPUDispatchIndirectArgs.

    Declaration
    public virtual void DispatchIndirect(GPUShaderProgramCS* shader, GPUBuffer* bufferForArgs, uint32 offsetForArgs) override
    Parameters
    GPUShaderProgramCS shader

    The compute shader program to execute.

    GPUBuffer bufferForArgs

    The buffer with drawing arguments.

    uint32 offsetForArgs

    The aligned byte offset for arguments.

    Overrides
    GPUContext::DispatchIndirect(GPUShaderProgramCS* shader, GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    DrawIndexedInstanced(uint32 indicesCount, uint32 instanceCount, int32 startInstance, int32 startVertex, int32 startIndex)

    Draws the indexed, instanced primitives.

    Declaration
    public virtual void DrawIndexedInstanced(uint32 indicesCount, uint32 instanceCount, int32 startInstance, int32 startVertex, int32 startIndex) override
    Parameters
    uint32 indicesCount

    The indices count.

    uint32 instanceCount

    Number of instances to draw.

    int32 startInstance

    A value added to each index before reading per-instance data from a vertex buffer.

    int32 startVertex

    A value added to each index before reading a vertex from the vertex buffer.

    int32 startIndex

    The location of the first index read by the GPU from the index buffer.

    Overrides
    GPUContext::DrawIndexedInstanced(uint32 indicesCount, uint32 instanceCount, int32 startInstance = 0, int32 startVertex = 0, int32 startIndex = 0)

    DrawIndexedInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    Draws the instanced GPU-generated indexed primitives. Buffer must contain GPUDrawIndexedIndirectArgs.

    Declaration
    public virtual void DrawIndexedInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs) override
    Parameters
    GPUBuffer bufferForArgs

    The buffer with drawing arguments.

    uint32 offsetForArgs

    The aligned byte offset for arguments.

    Overrides
    GPUContext::DrawIndexedInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    DrawInstanced(uint32 verticesCount, uint32 instanceCount, int32 startInstance, int32 startVertex)

    Draws the instanced primitives.

    Declaration
    public virtual void DrawInstanced(uint32 verticesCount, uint32 instanceCount, int32 startInstance, int32 startVertex) override
    Parameters
    uint32 verticesCount

    The vertices count.

    uint32 instanceCount

    Number of instances to draw.

    int32 startInstance

    A value added to each index before reading per-instance data from a vertex buffer.

    int32 startVertex

    A value added to each index before reading a vertex from the vertex buffer.

    Overrides
    GPUContext::DrawInstanced(uint32 verticesCount, uint32 instanceCount, int32 startInstance = 0, int32 startVertex = 0)

    DrawInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    Draws the instanced GPU-generated primitives. Buffer must contain GPUDrawIndirectArgs.

    Declaration
    public virtual void DrawInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs) override
    Parameters
    GPUBuffer bufferForArgs

    The buffer with drawing arguments.

    uint32 offsetForArgs

    The aligned byte offset for arguments.

    Overrides
    GPUContext::DrawInstancedIndirect(GPUBuffer* bufferForArgs, uint32 offsetForArgs)

    EventBegin(const Char* name)

    Begins the profile event.

    Declaration
    public virtual void EventBegin(const Char* name) override
    Parameters
    Char name

    The name.

    Overrides
    GPUContext::EventBegin(const Char* name)

    EventEnd()

    Ends the last profile event.

    Declaration
    public virtual void EventEnd() override
    Overrides
    GPUContext::EventEnd()

    Execute(bool waitForCompletion=false)

    Flush existing commands to the GPU

    Declaration
    public uint64 Execute(bool waitForCompletion=false)
    Parameters
    bool waitForCompletion

    True if CPU should wait for GPU to wait job

    Returns
    uint64

    Next fence value used for CPU/GPU work synchronization

    Flush()

    Flushes the command buffer (calls GPU execution).

    Declaration
    public virtual void Flush() override
    Overrides
    GPUContext::Flush()

    FlushResourceBarriers()

    Flush pending resource barriers

    Declaration
    public void FlushResourceBarriers()
    Returns
    void

    FlushState()

    Flushes the internal cached context state with a command buffer.

    Declaration
    public virtual void FlushState() override
    Overrides
    GPUContext::FlushState()

    ForceRebindDescriptors()

    Forces graphics backend to rebind descriptors after command list was used by external graphics library.

    Declaration
    public virtual void ForceRebindDescriptors() override
    Overrides
    GPUContext::ForceRebindDescriptors()

    FrameBegin()

    Begins new frame and enters commands collecting mode.

    Declaration
    public virtual void FrameBegin() override
    Overrides
    GPUContext::FrameBegin()

    FrameEnd()

    Ends the current frame rendering.

    Declaration
    public virtual void FrameEnd() override
    Overrides
    GPUContext::FrameEnd()

    GetActiveHeapDescriptor(const D3D12_CPU_DESCRIPTOR_HANDLE& cpuHandle, Descriptor& descriptor)

    Declaration
    protected void GetActiveHeapDescriptor(const D3D12_CPU_DESCRIPTOR_HANDLE& cpuHandle, Descriptor& descriptor)
    Parameters
    D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle

    Descriptor descriptor

    GetCommandList()

    Declaration
    public ID3D12GraphicsCommandList* GetCommandList() const
    Returns
    ID3D12GraphicsCommandList

    GetNativePtr()

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

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

    Overrides
    GPUContext::GetNativePtr()

    GetState()

    Gets the current pipeline state binded to the graphics pipeline.

    Declaration
    public virtual GPUPipelineState* GetState() const override
    Returns
    GPUPipelineState

    The current state.

    Overrides
    GPUContext::GetState()

    IsDepthBufferBinded()

    Determines whether depth buffer is binded to the pipeline. [Deprecated in v1.10]

    Declaration
    public virtual bool IsDepthBufferBinded() override
    Returns
    bool

    true if depth buffer is binded; otherwise, false.

    Overrides
    GPUContext::IsDepthBufferBinded()

    OnSwapChainFlush()

    External event called by swap chain after using context end

    Declaration
    public void OnSwapChainFlush()

    Reset()

    Reset commands list and request new allocator for commands

    Declaration
    public void Reset()

    ResetCB()

    Unbinds all constant buffer slots and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).

    Declaration
    public virtual void ResetCB() override
    Overrides
    GPUContext::ResetCB()

    ResetCounter(GPUBuffer* buffer)

    Resets the counter buffer to zero (hidden by the driver).

    Declaration
    public virtual void ResetCounter(GPUBuffer* buffer) override
    Parameters
    GPUBuffer buffer

    The buffer.

    Overrides
    GPUContext::ResetCounter(GPUBuffer* buffer)

    ResetRenderTarget()

    Unbinds all the render targets and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).

    Declaration
    public virtual void ResetRenderTarget() override
    Overrides
    GPUContext::ResetRenderTarget()

    ResetSR()

    Unbinds all shader resource slots and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).

    Declaration
    public virtual void ResetSR() override
    Overrides
    GPUContext::ResetSR()

    ResetUA()

    Unbinds all unordered access resource slots and flushes the change with the driver (used to prevent driver detection of resource hazards, eg. when down-scaling the texture).

    Declaration
    public virtual void ResetUA() override
    Overrides
    GPUContext::ResetUA()

    ResolveMultisample(GPUTexture* sourceMultisampleTexture, GPUTexture* destTexture, int32 sourceSubResource, int32 destSubResource, PixelFormat format)

    Resolves the multisampled texture by performing a copy of the resource into a non-multisampled resource.

    Declaration
    public virtual void ResolveMultisample(GPUTexture* sourceMultisampleTexture, GPUTexture* destTexture, int32 sourceSubResource, int32 destSubResource, PixelFormat format) override
    Parameters
    GPUTexture sourceMultisampleTexture

    The source multisampled texture. Must be multisampled.

    GPUTexture destTexture

    The destination texture. Must be single-sampled.

    int32 sourceSubResource

    The source sub-resource index.

    int32 destSubResource

    The destination sub-resource index.

    PixelFormat format

    The format. Indicates how the multisampled resource will be resolved to a single-sampled resource.

    Overrides
    GPUContext::ResolveMultisample(GPUTexture* sourceMultisampleTexture, GPUTexture* destTexture, int32 sourceSubResource = 0, int32 destSubResource = 0, PixelFormat format=PixelFormat::Unknown)

    SetBlendFactor(const Float4& value)

    Sets the blend factor that modulate values for a pixel shader, render target, or both.

    Declaration
    public virtual void SetBlendFactor(const Float4& value) override
    Parameters
    Float4 value

    Blend factors, one for each RGBA component.

    Overrides
    GPUContext::SetBlendFactor(const Float4& value)

    SetRenderTarget(GPUTextureView* depthBuffer, const Span<GPUTextureView* >& rts)

    Sets the render targets and the depth buffer to the output.

    Declaration
    public virtual void SetRenderTarget(GPUTextureView* depthBuffer, const Span<GPUTextureView* >& rts) override
    Parameters
    GPUTextureView depthBuffer

    The depth buffer (can be null).

    Span<GPUTextureView > rts

    The array with render targets to bind.

    Overrides
    GPUContext::SetRenderTarget(GPUTextureView* depthBuffer, const Span<GPUTextureView* >& rts)

    SetRenderTarget(GPUTextureView* depthBuffer, GPUTextureView* rt)

    Sets the render target and the depth buffer to the output.

    Declaration
    public virtual void SetRenderTarget(GPUTextureView* depthBuffer, GPUTextureView* rt) override
    Parameters
    GPUTextureView depthBuffer

    The depth buffer.

    GPUTextureView rt

    The render target.

    Overrides
    GPUContext::SetRenderTarget(GPUTextureView* depthBuffer, GPUTextureView* rt)

    SetRenderTarget(GPUTextureView* rt)

    Sets the render target to the output.

    Declaration
    public virtual void SetRenderTarget(GPUTextureView* rt) override
    Parameters
    GPUTextureView rt

    The render target.

    Overrides
    GPUContext::SetRenderTarget(GPUTextureView* rt)

    SetResourceState(GPUResource* resource, uint64 state, int32 subresource)

    Sets the state of the resource (or subresource).

    Declaration
    public virtual void SetResourceState(GPUResource* resource, uint64 state, int32 subresource) override
    Parameters
    GPUResource resource

    uint64 state

    int32 subresource

    Overrides
    GPUContext::SetResourceState(GPUResource* resource, uint64 state, int32 subresource=-1)

    SetResourceState(ResourceOwnerDX12* resource, D3D12_RESOURCE_STATES after, int32 subresourceIndex=-1)

    Set DirectX 12 resource state using resource barrier

    Declaration
    public void SetResourceState(ResourceOwnerDX12* resource, D3D12_RESOURCE_STATES after, int32 subresourceIndex=-1)
    Parameters
    ResourceOwnerDX12 resource

    Resource to use

    D3D12_RESOURCE_STATES after

    The target state to resource have.

    int32 subresourceIndex

    The subresource index. Use -1 to apply for the whole resource.

    SetScissor(const Rectangle& scissorRect)

    Sets the scissor rectangle.

    Declaration
    public virtual void SetScissor(const Rectangle& scissorRect) override
    Parameters
    Rectangle scissorRect

    The scissor rectangle (in pixels).

    Overrides
    GPUContext::SetScissor(const Rectangle& scissorRect)

    SetState(GPUPipelineState* state)

    Sets the graphics pipeline state.

    Declaration
    public virtual void SetState(GPUPipelineState* state) override
    Parameters
    GPUPipelineState state

    The state to bind.

    Overrides
    GPUContext::SetState(GPUPipelineState* state)

    SetStencilRef(uint32 value)

    Sets the reference value for depth stencil tests.

    Declaration
    public virtual void SetStencilRef(uint32 value) override
    Parameters
    uint32 value

    Reference value to perform against when doing a depth-stencil test.

    Overrides
    GPUContext::SetStencilRef(uint32 value)

    SetViewport(const Viewport& viewport)

    Sets the rendering viewport.

    Declaration
    public virtual void SetViewport(const Viewport& viewport) override
    Parameters
    Viewport viewport

    The viewport (in pixels).

    Overrides
    GPUContext::SetViewport(const Viewport& viewport)

    UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset)

    Updates the buffer data.

    Declaration
    public virtual void UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset) override
    Parameters
    GPUBuffer buffer

    The destination buffer to write to.

    void data

    The pointer to the data.

    uint32 size

    The data size (in bytes) to write.

    uint32 offset

    The offset (in bytes) from the buffer start to copy data to.

    Overrides
    GPUContext::UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset = 0)

    UpdateCB(GPUConstantBuffer* cb, const void* data)

    Updates the constant buffer data.

    Declaration
    public virtual void UpdateCB(GPUConstantBuffer* cb, const void* data) override
    Parameters
    GPUConstantBuffer cb

    The constant buffer.

    void data

    The pointer to the data.

    Overrides
    GPUContext::UpdateCB(GPUConstantBuffer* cb, const void* data)

    UpdateTexture(GPUTexture* texture, int32 arrayIndex, int32 mipIndex, const void* data, uint32 rowPitch, uint32 slicePitch)

    Updates the texture data.

    Declaration
    public virtual void UpdateTexture(GPUTexture* texture, int32 arrayIndex, int32 mipIndex, const void* data, uint32 rowPitch, uint32 slicePitch) override
    Parameters
    GPUTexture texture

    The destination texture.

    int32 arrayIndex

    The destination surface index in the texture array.

    int32 mipIndex

    The absolute index of the mip map to update.

    void data

    The pointer to the data.

    uint32 rowPitch

    The row pitch (in bytes) of the input data.

    uint32 slicePitch

    The slice pitch (in bytes) of the input data.

    Overrides
    GPUContext::UpdateTexture(GPUTexture* texture, int32 arrayIndex, int32 mipIndex, const void* data, uint32 rowPitch, uint32 slicePitch)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat