summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-08 07:27:12 +0200
committerbunnei <bunneidev@gmail.com>2018-08-08 07:45:23 +0200
commite542356d0cc37b61621da8d2b376d32407ec8eff (patch)
treeff3035337894e3e00320dea96754a24ef3562ea7 /src/video_core/engines
parentMerge pull request #964 from Hexagon12/lower-logs (diff)
downloadyuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar.gz
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar.bz2
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar.lz
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar.xz
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.tar.zst
yuzu-e542356d0cc37b61621da8d2b376d32407ec8eff.zip
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index c7e3fb4b1..0d33c5a5e 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -254,20 +254,15 @@ union Instruction {
BitField<56, 1, u64> invert_b;
} lop32i;
- float GetImm20_19() const {
- float result{};
+ u32 GetImm20_19() const {
u32 imm{static_cast<u32>(imm20_19)};
imm <<= 12;
imm |= negate_imm ? 0x80000000 : 0;
- std::memcpy(&result, &imm, sizeof(imm));
- return result;
+ return imm;
}
- float GetImm20_32() const {
- float result{};
- s32 imm{static_cast<s32>(imm20_32)};
- std::memcpy(&result, &imm, sizeof(imm));
- return result;
+ u32 GetImm20_32() const {
+ return static_cast<u32>(imm20_32);
}
s32 GetSignedImm20_20() const {