glsl: Fix <32-bit SSBO writes

and more cleanup
This commit is contained in:
ameerj 2021-06-03 22:25:06 -04:00
parent 4534294b7b
commit 8894af7c06
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) {