diff options
author | namkazy <nam.kazt.91@gmail.com> | 2020-04-06 08:26:58 +0200 |
---|---|---|
committer | namkazy <nam.kazt.91@gmail.com> | 2020-04-06 08:26:58 +0200 |
commit | 7f5696513f2de891015cf852af34e2ddafb9f171 (patch) | |
tree | 28ed655822ef7641a57243768db27ec719c3ea6f /src/video_core | |
parent | shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage. (diff) | |
download | yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar.gz yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar.bz2 yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar.lz yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar.xz yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.tar.zst yuzu-7f5696513f2de891015cf852af34e2ddafb9f171.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/shader/decode/image.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp index 68913085f..96e8db618 100644 --- a/src/video_core/shader/decode/image.cpp +++ b/src/video_core/shader/decode/image.cpp @@ -278,7 +278,7 @@ Node ShaderIR::GetComponentValue(ComponentType component_type, u32 component_siz *is_signed = true; // range [-1.0, 1.0] auto cnv_value = Operation(OperationCode::FMul, original_value, - Immediate((1 << component_size) / 2.f - 1.f)); + Immediate(static_cast<float>(1 << component_size) / 2.f - 1.f)); cnv_value = SignedOperation(OperationCode::ICastFloat, is_signed, std::move(cnv_value)); return BitfieldExtract(std::move(cnv_value), 0, component_size); } @@ -286,8 +286,8 @@ Node ShaderIR::GetComponentValue(ComponentType component_type, u32 component_siz case ComponentType::UNORM: { *is_signed = component_type == ComponentType::SINT; // range [0.0, 1.0] - auto cnv_value = - Operation(OperationCode::FMul, original_value, Immediate((1 << component_size) - 1.f)); + auto cnv_value = Operation(OperationCode::FMul, original_value, + Immediate(static_cast<float>(1 << component_size) - 1.f)); return SignedOperation(OperationCode::ICastFloat, is_signed, std::move(cnv_value)); } case ComponentType::UINT: // range [0, (1 << component_size) - 1] |