glsl: Fix <32-bit SSBO writes

and more cleanup
This commit is contained in:
ameerj
2021-06-03 22:25:06 -04:00
parent 34fdb6471d
commit 0a0b0a73d8
4 changed files with 43 additions and 50 deletions

View File

@ -11,11 +11,8 @@
namespace Shader::Backend::GLSL {
namespace {
constexpr const char cas_loop[]{R"(for (;;){{
uint old_value={};
{}=atomicCompSwap({},old_value,{}({},{}));
if ({}==old_value){{break;}}
}})"};
constexpr char cas_loop[]{
"for (;;){{uint old={};{}=atomicCompSwap({},old,{}({},{}));if({}==old){{break;}}}}"};
void SharedCasFunction(EmitContext& ctx, IR::Inst& inst, std::string_view offset,
std::string_view value, std::string_view function) {