diff options
author | namkazy <nam.kazt.91@gmail.com> | 2020-03-22 14:34:52 +0100 |
---|---|---|
committer | namkazy <nam.kazt.91@gmail.com> | 2020-04-05 05:31:30 +0200 |
commit | 5cd585700069b0b277b41a434b3880839cca27d3 (patch) | |
tree | ddea576800aa1c41e89dbeae3a002d26e239391d /src/video_core/shader/decode/image.cpp | |
parent | reimplement get component type, uncomment mistaken code (diff) | |
download | yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar.gz yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar.bz2 yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar.lz yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar.xz yuzu-5cd585700069b0b277b41a434b3880839cca27d3.tar.zst yuzu-5cd585700069b0b277b41a434b3880839cca27d3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/decode/image.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp index 34010a162..e6cc831fc 100644 --- a/src/video_core/shader/decode/image.cpp +++ b/src/video_core/shader/decode/image.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma optimize("", off) + #include <algorithm> #include <vector> #include <fmt/format.h> @@ -340,7 +342,6 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { original_value, Immediate(128.f)); return SignedOperation(OperationCode::ICastFloat, is_signed, NO_PRECISE, std::move(cnv_value)); - return cnv_value; } case ComponentType::UNORM: { // range [0.0, 1.0] @@ -349,7 +350,6 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { is_signed = false; return SignedOperation(OperationCode::ICastFloat, is_signed, NO_PRECISE, std::move(cnv_value)); - return cnv_value; } case ComponentType::SINT: // range [-128,128] return original_value; @@ -357,12 +357,6 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { is_signed = false; return original_value; case ComponentType::FLOAT: - if (component_size == 8) { - auto cnv_value = Operation(OperationCode::FMul, NO_PRECISE, - original_value, Immediate(255.f)); - return SignedOperation(OperationCode::ICastFloat, is_signed, - NO_PRECISE, std::move(cnv_value)); - } return original_value; default: UNIMPLEMENTED_MSG("Unimplement component type={}", component_type); @@ -379,12 +373,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { } // add value into result - if (element == 0) { - value = original_value; - } else { - value = - Operation(OperationCode::UBitwiseOr, value, std::move(converted_value)); - } + value = Operation(OperationCode::UBitwiseOr, value, std::move(converted_value)); break; } SetRegister(bb, instr.gpr0.Value(), std::move(value)); |