Add SetResourceState and ForceRebindDescriptors to GPUContext for integration with external rendering libraries

This commit is contained in:
Wojciech Figat
2022-12-14 16:16:02 +01:00
parent c38eda5799
commit 713aa3e0f9
4 changed files with 40 additions and 9 deletions

View File

@@ -63,3 +63,11 @@ void GPUContext::Draw(GPUTextureView* rt)
SetState(_device->GetCopyLinearPS());
DrawFullscreenTriangle();
}
void GPUContext::SetResourceState(GPUResource* resource, uint64 state, int32 subresource)
{
}
void GPUContext::ForceRebindDescriptors()
{
}

View File

@@ -596,4 +596,14 @@ public:
/// Flushes the command buffer (calls GPU execution).
/// </summary>
API_FUNCTION() virtual void Flush() = 0;
/// <summary>
/// Sets the state of the resource (or subresource).
/// </summary>
virtual void SetResourceState(GPUResource* resource, uint64 state, int32 subresource = -1);
/// <summary>
/// Forces graphics backend to rebind descriptors after command list was used by external graphics library.
/// </summary>
virtual void ForceRebindDescriptors();
};