Add OpMemoryBarrier

This commit is contained in:
ReinUsesLisp 2019-12-09 21:44:36 -03:00
parent e1a6729df7
commit 12f40a8032
3 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,20 @@
/* This file is part of the sirit project.
* Copyright (c) 2019 sirit
* This software may be used and distributed according to the terms of the
* 3-Clause BSD License
*/
#include <memory>
#include "op.h"
#include "sirit/sirit.h"
namespace Sirit {
Id Module::OpMemoryBarrier(Id scope, Id semantics) {
auto op = std::make_unique<Op>(spv::Op::OpMemoryBarrier);
op->Add(scope);
op->Add(semantics);
return AddCode(std::move(op));
}
} // namespace Sirit