summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornamkazy <nam.kazt.91@gmail.com>2020-04-05 10:18:42 +0200
committernamkazy <nam.kazt.91@gmail.com>2020-04-05 10:18:42 +0200
commit9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516 (patch)
treec4b53749ba26478f80c4565a0c80cc73939ee39c
parentshader_decode: SULD.D fix decode SNORM component (diff)
downloadyuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar.gz
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar.bz2
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar.lz
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar.xz
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.tar.zst
yuzu-9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516.zip
-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;