From 9f6ebccf066eb5b7c6b922dee30cf2fe6ee9d516 Mon Sep 17 00:00:00 2001 From: namkazy Date: Sun, 5 Apr 2020 15:18:42 +0700 Subject: shader_decode: SULD.D -> SINT actually same as UNORM. --- src/video_core/shader/decode/image.cpp | 9 ++++----- 1 file 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; -- cgit v1.2.3