diff options
| author | 2021-06-11 00:41:28 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:38 -0400 | |
| commit | 7d89a82a4891f78e2c068a24ad3bb56d74c92055 (patch) | |
| tree | db21e0994cfd729d7deeaf47eb300d1109539861 /src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp | |
| parent | glsl: Address Rodrigo's feedback (diff) | |
| download | yuzu-7d89a82a4891f78e2c068a24ad3bb56d74c92055.tar.gz yuzu-7d89a82a4891f78e2c068a24ad3bb56d74c92055.tar.xz yuzu-7d89a82a4891f78e2c068a24ad3bb56d74c92055.zip | |
glsl: Remove Signed Integer variables
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp index 777e290b4..c9f173e2f 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp | |||
| @@ -15,7 +15,7 @@ void EmitConvertS16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::I | |||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | void EmitConvertS16F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 17 | void EmitConvertS16F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 18 | ctx.AddS32("{}=(int({})&0xffff)|(bitfieldExtract(int({}),31,1)<<15);", inst, value, value); | 18 | ctx.AddU32("{}=(int({})&0xffff)|(bitfieldExtract(int({}),31,1)<<15);", inst, value, value); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | void EmitConvertS16F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 21 | void EmitConvertS16F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
| @@ -29,11 +29,11 @@ void EmitConvertS32F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::I | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | void EmitConvertS32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 31 | void EmitConvertS32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 32 | ctx.AddS32("{}=int({});", inst, value); | 32 | ctx.AddU32("{}=int({});", inst, value); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | void EmitConvertS32F64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 35 | void EmitConvertS32F64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 36 | ctx.AddS32("{}=int({});", inst, value); | 36 | ctx.AddU32("{}=int({});", inst, value); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | void EmitConvertS64F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 39 | void EmitConvertS64F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
| @@ -42,11 +42,11 @@ void EmitConvertS64F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::I | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | void EmitConvertS64F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 44 | void EmitConvertS64F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 45 | ctx.AddS64("{}=int64_t(double({}));", inst, value); | 45 | ctx.AddU64("{}=int64_t(double({}));", inst, value); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | void EmitConvertS64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 48 | void EmitConvertS64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 49 | ctx.AddS64("{}=int64_t({});", inst, value); | 49 | ctx.AddU64("{}=int64_t({});", inst, value); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | void EmitConvertU16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 52 | void EmitConvertU16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |