diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-10-17 16:35:16 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-26 21:38:30 +0200 |
commit | be856a38d6b0c7c90c861baf3204ac48a108f3d2 (patch) | |
tree | feef5da87a406bc2e83326adbbf59a54772a34d2 /src/video_core/shader/const_buffer_locker.cpp | |
parent | Shader_IR: Clang format (diff) | |
download | yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar.gz yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar.bz2 yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar.lz yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar.xz yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.tar.zst yuzu-be856a38d6b0c7c90c861baf3204ac48a108f3d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/const_buffer_locker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/shader/const_buffer_locker.cpp b/src/video_core/shader/const_buffer_locker.cpp index 592bbf657..fe467608e 100644 --- a/src/video_core/shader/const_buffer_locker.cpp +++ b/src/video_core/shader/const_buffer_locker.cpp @@ -22,6 +22,8 @@ ConstBufferLocker::ConstBufferLocker(Tegra::Engines::ShaderType shader_stage, Tegra::Engines::ConstBufferEngineInterface& engine) : stage{shader_stage}, engine{&engine} {} +ConstBufferLocker::~ConstBufferLocker() = default; + std::optional<u32> ConstBufferLocker::ObtainKey(u32 buffer, u32 offset) { const std::pair<u32, u32> key = {buffer, offset}; const auto iter = keys.find(key); @@ -29,7 +31,7 @@ std::optional<u32> ConstBufferLocker::ObtainKey(u32 buffer, u32 offset) { return iter->second; } if (!engine) { - return {}; + return std::nullopt; } const u32 value = engine->AccessConstBuffer32(stage, buffer, offset); keys.emplace(key, value); @@ -43,7 +45,7 @@ std::optional<SamplerDescriptor> ConstBufferLocker::ObtainBoundSampler(u32 offse return iter->second; } if (!engine) { - return {}; + return std::nullopt; } const SamplerDescriptor value = engine->AccessBoundSampler(stage, offset); bound_samplers.emplace(key, value); @@ -58,7 +60,7 @@ std::optional<Tegra::Engines::SamplerDescriptor> ConstBufferLocker::ObtainBindle return iter->second; } if (!engine) { - return {}; + return std::nullopt; } const SamplerDescriptor value = engine->AccessBindlessSampler(stage, buffer, offset); bindless_samplers.emplace(key, value); |