Merge remote-tracking branch 'origin/master' into 1.7

# Conflicts:
#	Flax.flaxproj
This commit is contained in:
Wojtek Figat
2023-10-09 12:40:47 +02:00
86 changed files with 1406 additions and 686 deletions

View File

@@ -649,22 +649,6 @@ void GPUContextVulkan::UpdateDescriptorSets(ComputePipelineStateVulkan* pipeline
}
}
void GPUContextVulkan::BindPipeline()
{
if (_psDirtyFlag && _currentState && (_rtDepth || _rtCount))
{
// Clear flag
_psDirtyFlag = false;
// Change state
const auto cmdBuffer = _cmdBufferManager->GetCmdBuffer();
const auto pipeline = _currentState->GetState(_renderPass);
vkCmdBindPipeline(cmdBuffer->GetHandle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
RENDER_STAT_PS_STATE_CHANGE();
}
}
void GPUContextVulkan::OnDrawCall()
{
GPUPipelineStateVulkan* pipelineState = _currentState;
@@ -704,7 +688,15 @@ void GPUContextVulkan::OnDrawCall()
BeginRenderPass();
}
BindPipeline();
// Bind pipeline
if (_psDirtyFlag && _currentState && (_rtDepth || _rtCount))
{
_psDirtyFlag = false;
const auto cmdBuffer = _cmdBufferManager->GetCmdBuffer();
const auto pipeline = _currentState->GetState(_renderPass);
vkCmdBindPipeline(cmdBuffer->GetHandle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
RENDER_STAT_PS_STATE_CHANGE();
}
//UpdateDynamicStates();
@@ -1115,9 +1107,7 @@ void GPUContextVulkan::Dispatch(GPUShaderProgramCS* shader, uint32 threadGroupCo
EndRenderPass();
auto pipelineState = shaderVulkan->GetOrCreateState();
UpdateDescriptorSets(pipelineState);
FlushBarriers();
// Bind pipeline
@@ -1152,10 +1142,8 @@ void GPUContextVulkan::DispatchIndirect(GPUShaderProgramCS* shader, GPUBuffer* b
EndRenderPass();
auto pipelineState = shaderVulkan->GetOrCreateState();
UpdateDescriptorSets(pipelineState);
AddBufferBarrier(bufferForArgsVulkan, VK_ACCESS_INDIRECT_COMMAND_READ_BIT);
FlushBarriers();
// Bind pipeline