Rename GPUContext::ClearState to ResetState for constentency
This commit is contained in:
@@ -67,7 +67,7 @@ void GPUContext::FrameBegin()
|
||||
|
||||
void GPUContext::FrameEnd()
|
||||
{
|
||||
ClearState();
|
||||
ResetState();
|
||||
FlushState();
|
||||
}
|
||||
|
||||
|
||||
@@ -618,7 +618,16 @@ public:
|
||||
/// <summary>
|
||||
/// Clears the context state.
|
||||
/// </summary>
|
||||
API_FUNCTION() virtual void ClearState() = 0;
|
||||
DEPRECATED("Use ResetState instead")
|
||||
API_FUNCTION() void ClearState()
|
||||
{
|
||||
ResetState();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the context state.
|
||||
/// </summary>
|
||||
API_FUNCTION() virtual void ResetState() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Flushes the internal cached context state with a command buffer.
|
||||
|
||||
@@ -724,7 +724,7 @@ void GPUContextDX11::SetState(GPUPipelineState* state)
|
||||
}
|
||||
}
|
||||
|
||||
void GPUContextDX11::ClearState()
|
||||
void GPUContextDX11::ResetState()
|
||||
{
|
||||
if (!_context)
|
||||
return;
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
void SetScissor(const Rectangle& scissorRect) override;
|
||||
GPUPipelineState* GetState() const override;
|
||||
void SetState(GPUPipelineState* state) override;
|
||||
void ClearState() override;
|
||||
void ResetState() override;
|
||||
void FlushState() override;
|
||||
void Flush() override;
|
||||
void UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset) override;
|
||||
|
||||
@@ -1304,7 +1304,7 @@ void GPUContextDX12::SetState(GPUPipelineState* state)
|
||||
}
|
||||
}
|
||||
|
||||
void GPUContextDX12::ClearState()
|
||||
void GPUContextDX12::ResetState()
|
||||
{
|
||||
if (!_commandList)
|
||||
return;
|
||||
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
void SetScissor(const Rectangle& scissorRect) override;
|
||||
GPUPipelineState* GetState() const override;
|
||||
void SetState(GPUPipelineState* state) override;
|
||||
void ClearState() override;
|
||||
void ResetState() override;
|
||||
void FlushState() override;
|
||||
void Flush() override;
|
||||
void UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset) override;
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void ClearState() override
|
||||
void ResetState() override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1329,7 +1329,7 @@ void GPUContextVulkan::SetState(GPUPipelineState* state)
|
||||
}
|
||||
}
|
||||
|
||||
void GPUContextVulkan::ClearState()
|
||||
void GPUContextVulkan::ResetState()
|
||||
{
|
||||
ResetRenderTarget();
|
||||
ResetSR();
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
void SetScissor(const Rectangle& scissorRect) override;
|
||||
GPUPipelineState* GetState() const override;
|
||||
void SetState(GPUPipelineState* state) override;
|
||||
void ClearState() override;
|
||||
void ResetState() override;
|
||||
void FlushState() override;
|
||||
void Flush() override;
|
||||
void UpdateBuffer(GPUBuffer* buffer, const void* data, uint32 size, uint32 offset) override;
|
||||
|
||||
@@ -509,7 +509,7 @@ void ProbesRendererService::OnRender(RenderTask* task, GPUContext* context)
|
||||
|
||||
// Render frame
|
||||
Renderer::Render(_task);
|
||||
context->ClearState();
|
||||
context->ResetState();
|
||||
|
||||
// Copy frame to cube face
|
||||
{
|
||||
@@ -568,7 +568,7 @@ void ProbesRendererService::OnRender(RenderTask* task, GPUContext* context)
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
context->ClearState();
|
||||
context->ResetState();
|
||||
|
||||
if (_workStep < 7)
|
||||
return; // Continue rendering next frame
|
||||
|
||||
@@ -200,7 +200,7 @@ void Renderer::Render(SceneRenderTask* task)
|
||||
|
||||
// Prepare GPU context
|
||||
auto context = GPUDevice::Instance->GetMainContext();
|
||||
context->ClearState();
|
||||
context->ResetState();
|
||||
context->FlushState();
|
||||
const Viewport viewport = task->GetViewport();
|
||||
context->SetViewportAndScissors(viewport);
|
||||
|
||||
@@ -376,7 +376,7 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context)
|
||||
EnableLightmapsUsage = _giBounceRunningIndex != 0;
|
||||
//
|
||||
Renderer::Render(_task);
|
||||
context->ClearState();
|
||||
context->ResetState();
|
||||
//
|
||||
IsRunningRadiancePass = false;
|
||||
EnableLightmapsUsage = true;
|
||||
@@ -515,7 +515,7 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context)
|
||||
}
|
||||
|
||||
// Cleanup after rendering
|
||||
context->ClearState();
|
||||
context->ResetState();
|
||||
|
||||
// Mark job as done
|
||||
Platform::AtomicStore(&_wasJobDone, 1);
|
||||
|
||||
Reference in New Issue
Block a user