diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp index 84e01b151..6654fce81 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp | |||
| @@ -28,8 +28,8 @@ void SetSignFlag(EmitContext& ctx, IR::Inst& inst, std::string_view result) { | |||
| 28 | } | 28 | } |
| 29 | } // Anonymous namespace | 29 | } // Anonymous namespace |
| 30 | void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | 30 | void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { |
| 31 | const auto result{ctx.reg_alloc.Define(inst)}; | 31 | const auto result{ctx.reg_alloc.Define(inst, Type::U32)}; |
| 32 | ctx.Add("uint {}={}+{};", result, a, b); | 32 | ctx.Add("{}={}+{};", result, a, b); |
| 33 | SetZeroFlag(ctx, inst, result); | 33 | SetZeroFlag(ctx, inst, result); |
| 34 | SetSignFlag(ctx, inst, result); | 34 | SetSignFlag(ctx, inst, result); |
| 35 | } | 35 | } |
| @@ -120,8 +120,8 @@ void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst& inst, std::string_view bas | |||
| 120 | 120 | ||
| 121 | void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base, | 121 | void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base, |
| 122 | std::string_view offset, std::string_view count) { | 122 | std::string_view offset, std::string_view count) { |
| 123 | const auto result{ctx.reg_alloc.Define(inst)}; | 123 | const auto result{ctx.reg_alloc.Define(inst, Type::U32)}; |
| 124 | ctx.Add("uint {}=bitfieldExtract({},int({}),int({}));", result, base, offset, count); | 124 | ctx.Add("{}=bitfieldExtract({},int({}),int({}));", result, base, offset, count); |
| 125 | SetZeroFlag(ctx, inst, result); | 125 | SetZeroFlag(ctx, inst, result); |
| 126 | SetSignFlag(ctx, inst, result); | 126 | SetSignFlag(ctx, inst, result); |
| 127 | } | 127 | } |