summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/video_core/shader/decode/image.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp
index efcf271dc..999cfda78 100644
--- a/src/video_core/shader/decode/image.cpp
+++ b/src/video_core/shader/decode/image.cpp
@@ -352,11 +352,13 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
case ComponentType::SNORM: {
is_signed = true;
// range [-1.0, 1.0]
- auto cnv_value = Operation(OperationCode::FMul, original_value, Immediate(127.f));
+ auto cnv_value =
+ Operation(OperationCode::FMul, original_value, Immediate(127.f));
cnv_value = SignedOperation(OperationCode::ICastFloat, is_signed,
- std::move(cnv_value));
+ std::move(cnv_value));
return BitfieldExtract(std::move(cnv_value), 0, 8);
}
+ case ComponentType::SINT:
case ComponentType::UNORM: {
is_signed = false;
// range [0.0, 1.0]
@@ -365,9 +367,6 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
return SignedOperation(OperationCode::ICastFloat, is_signed,
std::move(cnv_value));
}
- case ComponentType::SINT: // range [-128,127]
- is_signed = true;
- return original_value;
case ComponentType::UINT: // range [0, 255]
is_signed = false;
return original_value;