Merge pull request #3982 from ReinUsesLisp/membar-cts

shader/other: Implement MEMBAR.CTS
This commit is contained in:
bunnei 2020-05-30 11:51:42 -04:00 committed by GitHub
commit 058ec22787
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 9 deletions

View file

@ -2215,8 +2215,8 @@ private:
return {};
}
Expression MemoryBarrierGL(Operation) {
const auto scope = spv::Scope::Device;
template <spv::Scope scope>
Expression MemoryBarrier(Operation) {
const auto semantics =
spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory |
spv::MemorySemanticsMask::WorkgroupMemory |
@ -2681,7 +2681,8 @@ private:
&SPIRVDecompiler::ShuffleIndexed,
&SPIRVDecompiler::Barrier,
&SPIRVDecompiler::MemoryBarrierGL,
&SPIRVDecompiler::MemoryBarrier<spv::Scope::Workgroup>,
&SPIRVDecompiler::MemoryBarrier<spv::Scope::Device>,
};
static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount));