diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-16 06:34:45 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-23 23:00:06 +0200 |
commit | 72deb773fdcc59b1df9752de4e846422b7bb5280 (patch) | |
tree | 524006956b6dbb6789831652129013e54f185f16 /src/video_core/shader/shader_ir.h | |
parent | Merge pull request #3768 from H27CK/cmd-title-fmt (diff) | |
download | yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar.gz yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar.bz2 yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar.lz yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar.xz yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.tar.zst yuzu-72deb773fdcc59b1df9752de4e846422b7bb5280.zip |
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
-rw-r--r-- | src/video_core/shader/shader_ir.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index c6e7bdf50..ae5e414cb 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -29,12 +29,11 @@ using ProgramCode = std::vector<u64>; constexpr u32 MAX_PROGRAM_LENGTH = 0x1000; -class ConstBuffer { -public: - explicit ConstBuffer(u32 max_offset, bool is_indirect) +struct ConstBuffer { + constexpr explicit ConstBuffer(u32 max_offset, bool is_indirect) : max_offset{max_offset}, is_indirect{is_indirect} {} - ConstBuffer() = default; + constexpr ConstBuffer() = default; void MarkAsUsed(u64 offset) { max_offset = std::max(max_offset, static_cast<u32>(offset)); @@ -57,8 +56,8 @@ public: } private: - u32 max_offset{}; - bool is_indirect{}; + u32 max_offset = 0; + bool is_indirect = false; }; struct GlobalMemoryUsage { @@ -332,12 +331,13 @@ private: std::optional<u32> buffer = std::nullopt); /// Accesses a texture sampler - const Sampler* GetSampler(const Tegra::Shader::Sampler& sampler, - std::optional<SamplerInfo> sampler_info = std::nullopt); + std::optional<Sampler> GetSampler(const Tegra::Shader::Sampler& sampler, + std::optional<SamplerInfo> sampler_info = std::nullopt); /// Accesses a texture sampler for a bindless texture. - const Sampler* GetBindlessSampler(Tegra::Shader::Register reg, Node& index_var, - std::optional<SamplerInfo> sampler_info = std::nullopt); + std::optional<Sampler> GetBindlessSampler( + Tegra::Shader::Register reg, Node& index_var, + std::optional<SamplerInfo> sampler_info = std::nullopt); /// Accesses an image. Image& GetImage(Tegra::Shader::Image image, Tegra::Shader::ImageType type); |