diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-24 21:35:54 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:36:11 +0200 |
commit | 1b4503c571d3b961efe74fa7e35d5fa14941ec09 (patch) | |
tree | fb732f50d8bd2855f3fa7657c7c6d36c58134d89 /src/video_core/texture_cache/surface_view.h | |
parent | texture_cache: Move staging buffer into a generic implementation (diff) | |
download | yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar.gz yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar.bz2 yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar.lz yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar.xz yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.tar.zst yuzu-1b4503c571d3b961efe74fa7e35d5fa14941ec09.zip |
Diffstat (limited to 'src/video_core/texture_cache/surface_view.h')
-rw-r--r-- | src/video_core/texture_cache/surface_view.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/surface_view.h b/src/video_core/texture_cache/surface_view.h new file mode 100644 index 000000000..e73d8f6ae --- /dev/null +++ b/src/video_core/texture_cache/surface_view.h @@ -0,0 +1,35 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <functional> + +#include "common/common_types.h" + +namespace VideoCommon { + +struct ViewKey { + std::size_t Hash() const; + + bool operator==(const ViewKey& rhs) const; + + u32 base_layer{}; + u32 num_layers{}; + u32 base_level{}; + u32 num_levels{}; +}; + +} // namespace VideoCommon + +namespace std { + +template <> +struct hash<VideoCommon::ViewKey> { + std::size_t operator()(const VideoCommon::ViewKey& k) const noexcept { + return k.Hash(); + } +}; + +} // namespace std |