Commit ead1a345 by Alexis Hetu Committed by Alexis Hétu

Simple PipelineBarrier implementation

The simplest PipelineBarrier implementation is to call Renderer::synchronize(). This removes the synchronization mechanism from the draw commands, while still allowing the tests to pass successfully. Bug b/118619338 Change-Id: If7d9c14170db6f9a74a54c45a978d3ce78a1cdca Reviewed-on: https://swiftshader-review.googlesource.com/c/25608Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
parent 6c9fb0e6
...@@ -187,9 +187,6 @@ struct Draw : public CommandBuffer::Command ...@@ -187,9 +187,6 @@ struct Draw : public CommandBuffer::Command
executionState.renderer->setInstanceID(instance); executionState.renderer->setInstanceID(instance);
executionState.renderer->draw(context.drawType, 0, primitiveCount); executionState.renderer->draw(context.drawType, 0, primitiveCount);
} }
// Wait for completion. We should be able to get rid of this eventually.
executionState.renderer->synchronize();
} }
uint32_t vertexCount; uint32_t vertexCount;
...@@ -388,10 +385,10 @@ struct PipelineBarrier : public CommandBuffer::Command ...@@ -388,10 +385,10 @@ struct PipelineBarrier : public CommandBuffer::Command
void play(CommandBuffer::ExecutionState& executionState) override void play(CommandBuffer::ExecutionState& executionState) override
{ {
// This can currently be a noop. The sw::Surface locking/unlocking mechanism used by the renderer already takes care of // This is a very simple implementation that simply calls sw::Renderer::synchronize(),
// making sure the read/writes always happen in order. Eventually, if we remove this synchronization mechanism, we can // since the driver is free to move the source stage towards the bottom of the pipe
// have a very simple implementation that simply calls sw::Renderer::sync(), since the driver is free to move the source // and the target stage towards the top, so a full pipeline sync is spec compliant.
// stage towards the bottom of the pipe and the target stage towards the top, so a full pipeline sync is spec compliant. executionState.renderer->synchronize();
// Right now all buffers are read-only in drawcalls but a similar mechanism will be required once we support SSBOs. // Right now all buffers are read-only in drawcalls but a similar mechanism will be required once we support SSBOs.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment