diff options
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 2 | ||||
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_instructions.h | 2 | ||||
-rw-r--r-- | src/shader_recompiler/exception.h | 12 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 4 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/value.h | 4 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/control_flow.cpp | 2 | ||||
-rw-r--r-- | src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 2 | ||||
-rw-r--r-- | src/shader_recompiler/object_pool.h | 1 |
8 files changed, 17 insertions, 12 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index a5e8c9b6e..4ce1c4f54 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp @@ -350,7 +350,7 @@ std::string_view InputPrimitive(InputTopology topology) { case InputTopology::Lines: return "LINES"; case InputTopology::LinesAdjacency: - return "LINESS_ADJACENCY"; + return "LINES_ADJACENCY"; case InputTopology::Triangles: return "TRIANGLES"; case InputTopology::TrianglesAdjacency: diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index f99c02848..c9db1c164 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include <sirit/sirit.h> #include "common/common_types.h" diff --git a/src/shader_recompiler/exception.h b/src/shader_recompiler/exception.h index 337e7f0c8..277be8541 100644 --- a/src/shader_recompiler/exception.h +++ b/src/shader_recompiler/exception.h @@ -4,7 +4,7 @@ #pragma once -#include <stdexcept> +#include <exception> #include <string> #include <string_view> #include <utility> @@ -17,7 +17,7 @@ class Exception : public std::exception { public: explicit Exception(std::string message) noexcept : err_message{std::move(message)} {} - const char* what() const noexcept override { + [[nodiscard]] const char* what() const noexcept override { return err_message.c_str(); } @@ -36,21 +36,21 @@ private: class LogicError : public Exception { public: template <typename... Args> - LogicError(const char* message, Args&&... args) + explicit LogicError(const char* message, Args&&... args) : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} }; class RuntimeError : public Exception { public: template <typename... Args> - RuntimeError(const char* message, Args&&... args) + explicit RuntimeError(const char* message, Args&&... args) : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} }; class NotImplementedException : public Exception { public: template <typename... Args> - NotImplementedException(const char* message, Args&&... args) + explicit NotImplementedException(const char* message, Args&&... args) : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} { Append(" is not implemented"); } @@ -59,7 +59,7 @@ public: class InvalidArgument : public Exception { public: template <typename... Args> - InvalidArgument(const char* message, Args&&... args) + explicit InvalidArgument(const char* message, Args&&... args) : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} }; diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 53f7b3b06..1b89ca5a0 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h @@ -327,8 +327,8 @@ public: const Value& derivates, const Value& offset, const F32& lod_clamp, TextureInstInfo info); [[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info); - [[nodiscard]] void ImageWrite(const Value& handle, const Value& coords, const Value& color, - TextureInstInfo info); + void ImageWrite(const Value& handle, const Value& coords, const Value& color, + TextureInstInfo info); [[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords, const Value& value, TextureInstInfo info); diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h index dbea20115..334bb47aa 100644 --- a/src/shader_recompiler/frontend/ir/value.h +++ b/src/shader_recompiler/frontend/ir/value.h @@ -198,8 +198,8 @@ public: } template <typename FlagsType> - requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) - [[nodiscard]] void SetFlags(FlagsType value) noexcept { + requires(sizeof(FlagsType) <= sizeof(u32) && + std::is_trivially_copyable_v<FlagsType>) void SetFlags(FlagsType value) noexcept { std::memcpy(&flags, &value, sizeof(value)); } diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index 1a954a509..efe457baa 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp @@ -73,7 +73,7 @@ Token OpcodeToken(Opcode opcode) { return Token::PBK; case Opcode::PCNT: case Opcode::CONT: - return Token::PBK; + return Token::PCNT; case Opcode::PEXIT: case Opcode::EXIT: return Token::PEXIT; diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp index 5ead930f1..f69e1c9cc 100644 --- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp +++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp @@ -111,6 +111,8 @@ void VisitUsages(Info& info, IR::Inst& inst) { case IR::Opcode::ConvertF16U16: case IR::Opcode::ConvertF16U32: case IR::Opcode::ConvertF16U64: + case IR::Opcode::ConvertF16F32: + case IR::Opcode::ConvertF32F16: case IR::Opcode::FPAbs16: case IR::Opcode::FPAdd16: case IR::Opcode::FPCeil16: diff --git a/src/shader_recompiler/object_pool.h b/src/shader_recompiler/object_pool.h index f8b255b66..f3b12d04b 100644 --- a/src/shader_recompiler/object_pool.h +++ b/src/shader_recompiler/object_pool.h @@ -63,6 +63,7 @@ private: used_objects = std::exchange(rhs.used_objects, 0); num_objects = std::exchange(rhs.num_objects, 0); storage = std::move(rhs.storage); + return *this; } Chunk(Chunk&& rhs) noexcept |