summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-30 23:27:00 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:37 +0200
commit1269a0cf8b3844c1a9bb06c843a7698b0a9643d5 (patch)
treea0716589fa3952bdeb0f1d19b4bb455d9cdd86e5 /src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
parentglsl: Fix ATOM and implement ATOMS (diff)
downloadyuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar.gz
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar.bz2
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar.lz
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar.xz
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.tar.zst
yuzu-1269a0cf8b3844c1a9bb06c843a7698b0a9643d5.zip
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
index 4a3d66c90..1c7413cd4 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
@@ -29,7 +29,7 @@ void SetSignFlag(EmitContext& ctx, IR::Inst& inst, std::string_view result) {
}
} // Anonymous namespace
void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) {
- const auto result{ctx.reg_alloc.Define(inst, Type::U32)};
+ const auto result{ctx.var_alloc.Define(inst, GlslVarType::U32)};
if (IR::Inst* const carry{inst.GetAssociatedPseudoOperation(IR::Opcode::GetCarryFromOp)}) {
ctx.uses_cc_carry = true;
ctx.Add("{}=uaddCarry({},{},carry);", result, a, b);
@@ -130,7 +130,7 @@ void EmitBitFieldInsert(EmitContext& ctx, IR::Inst& inst, std::string_view base,
void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base,
std::string_view offset, std::string_view count) {
- const auto result{ctx.reg_alloc.Define(inst, Type::U32)};
+ const auto result{ctx.var_alloc.Define(inst, GlslVarType::U32)};
ctx.Add("{}=uint(bitfieldExtract(int({}),int({}),int({})));", result, base, offset, count);
SetZeroFlag(ctx, inst, result);
SetSignFlag(ctx, inst, result);
@@ -138,7 +138,7 @@ void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst& inst, std::string_view bas
void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base,
std::string_view offset, std::string_view count) {
- const auto result{ctx.reg_alloc.Define(inst, Type::U32)};
+ const auto result{ctx.var_alloc.Define(inst, GlslVarType::U32)};
ctx.Add("{}=uint(bitfieldExtract(uint({}),int({}),int({})));", result, base, offset, count);
SetZeroFlag(ctx, inst, result);
SetSignFlag(ctx, inst, result);
@@ -184,7 +184,7 @@ void EmitUMax32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::strin
void EmitSClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view min,
std::string_view max) {
- const auto result{ctx.reg_alloc.Define(inst, Type::U32)};
+ const auto result{ctx.var_alloc.Define(inst, GlslVarType::U32)};
ctx.Add("{}=clamp(int({}),int({}),int({}));", result, value, min, max);
SetZeroFlag(ctx, inst, result);
SetSignFlag(ctx, inst, result);
@@ -192,7 +192,7 @@ void EmitSClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, std:
void EmitUClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view min,
std::string_view max) {
- const auto result{ctx.reg_alloc.Define(inst, Type::U32)};
+ const auto result{ctx.var_alloc.Define(inst, GlslVarType::U32)};
ctx.Add("{}=clamp(uint({}),uint({}),uint({}));", result, value, min, max);
SetZeroFlag(ctx, inst, result);
SetSignFlag(ctx, inst, result);