We should really only have been setting memory barriers in cases where a data race was actually possible, so this patch addresses that. Memory barriers are only created on data copies, and when a render pass ends.
To help facilitate this change, SetRenderTargets now configures the state for the next render pass. That state is then set when the new render pass is triggered, instead of immediately.
The validation layer might complain now if you bind a resource that hasn't had any data written to it, but that seems acceptable to me.
Addresses https://github.com/FNA-XNA/FNA3D/issues/165
We should really only have been setting memory barriers in cases where a data race was actually possible, so this patch addresses that. Memory barriers are only created on data copies, and when a render pass ends.
To help facilitate this change, SetRenderTargets now configures the state for the next render pass. That state is then set when the new render pass is triggered, instead of immediately.
The validation layer might complain now if you bind a resource that hasn't had any data written to it, but that seems acceptable to me.