diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-17 03:12:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 03:12:33 +0200 |
commit | 79c1269f0fd25e8aaf090cd1f4640a52237a3fd3 (patch) | |
tree | cef3d04b0e14887bbcb6b021d42e2420ae1588a4 /src/video_core/shader/shader_ir.cpp | |
parent | Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cache (diff) | |
parent | CMakeLists: Specify -Wextra on linux builds (diff) | |
download | yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.gz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.bz2 yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.lz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.xz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.zst yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/shader_ir.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 8852c8a1b..822674926 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -56,8 +56,7 @@ Node ShaderIR::GetConstBuffer(u64 index_, u64 offset_) { const auto index = static_cast<u32>(index_); const auto offset = static_cast<u32>(offset_); - const auto [entry, is_new] = used_cbufs.try_emplace(index); - entry->second.MarkAsUsed(offset); + used_cbufs.try_emplace(index).first->second.MarkAsUsed(offset); return MakeNode<CbufNode>(index, Immediate(offset)); } @@ -66,8 +65,7 @@ Node ShaderIR::GetConstBufferIndirect(u64 index_, u64 offset_, Node node) { const auto index = static_cast<u32>(index_); const auto offset = static_cast<u32>(offset_); - const auto [entry, is_new] = used_cbufs.try_emplace(index); - entry->second.MarkAsUsedIndirect(); + used_cbufs.try_emplace(index).first->second.MarkAsUsedIndirect(); Node final_offset = [&] { // Attempt to inline constant buffer without a variable offset. This is done to allow @@ -166,6 +164,7 @@ Node ShaderIR::ConvertIntegerSize(Node value, Register::Size size, bool is_signe std::move(value), Immediate(16)); value = SignedOperation(OperationCode::IArithmeticShiftRight, is_signed, NO_PRECISE, std::move(value), Immediate(16)); + return value; case Register::Size::Word: // Default - do nothing return value; |