diff options
Diffstat (limited to 'src/shader_recompiler')
| -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) { | |||
| 350 | case InputTopology::Lines: | 350 | case InputTopology::Lines: |
| 351 | return "LINES"; | 351 | return "LINES"; |
| 352 | case InputTopology::LinesAdjacency: | 352 | case InputTopology::LinesAdjacency: |
| 353 | return "LINESS_ADJACENCY"; | 353 | return "LINES_ADJACENCY"; |
| 354 | case InputTopology::Triangles: | 354 | case InputTopology::Triangles: |
| 355 | return "TRIANGLES"; | 355 | return "TRIANGLES"; |
| 356 | case InputTopology::TrianglesAdjacency: | 356 | 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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | ||
| 6 | |||
| 5 | #include <sirit/sirit.h> | 7 | #include <sirit/sirit.h> |
| 6 | 8 | ||
| 7 | #include "common/common_types.h" | 9 | #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 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <stdexcept> | 7 | #include <exception> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | #include <string_view> | 9 | #include <string_view> |
| 10 | #include <utility> | 10 | #include <utility> |
| @@ -17,7 +17,7 @@ class Exception : public std::exception { | |||
| 17 | public: | 17 | public: |
| 18 | explicit Exception(std::string message) noexcept : err_message{std::move(message)} {} | 18 | explicit Exception(std::string message) noexcept : err_message{std::move(message)} {} |
| 19 | 19 | ||
| 20 | const char* what() const noexcept override { | 20 | [[nodiscard]] const char* what() const noexcept override { |
| 21 | return err_message.c_str(); | 21 | return err_message.c_str(); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| @@ -36,21 +36,21 @@ private: | |||
| 36 | class LogicError : public Exception { | 36 | class LogicError : public Exception { |
| 37 | public: | 37 | public: |
| 38 | template <typename... Args> | 38 | template <typename... Args> |
| 39 | LogicError(const char* message, Args&&... args) | 39 | explicit LogicError(const char* message, Args&&... args) |
| 40 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} | 40 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | class RuntimeError : public Exception { | 43 | class RuntimeError : public Exception { |
| 44 | public: | 44 | public: |
| 45 | template <typename... Args> | 45 | template <typename... Args> |
| 46 | RuntimeError(const char* message, Args&&... args) | 46 | explicit RuntimeError(const char* message, Args&&... args) |
| 47 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} | 47 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | class NotImplementedException : public Exception { | 50 | class NotImplementedException : public Exception { |
| 51 | public: | 51 | public: |
| 52 | template <typename... Args> | 52 | template <typename... Args> |
| 53 | NotImplementedException(const char* message, Args&&... args) | 53 | explicit NotImplementedException(const char* message, Args&&... args) |
| 54 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} { | 54 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} { |
| 55 | Append(" is not implemented"); | 55 | Append(" is not implemented"); |
| 56 | } | 56 | } |
| @@ -59,7 +59,7 @@ public: | |||
| 59 | class InvalidArgument : public Exception { | 59 | class InvalidArgument : public Exception { |
| 60 | public: | 60 | public: |
| 61 | template <typename... Args> | 61 | template <typename... Args> |
| 62 | InvalidArgument(const char* message, Args&&... args) | 62 | explicit InvalidArgument(const char* message, Args&&... args) |
| 63 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} | 63 | : Exception{fmt::format(fmt::runtime(message), std::forward<Args>(args)...)} {} |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
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: | |||
| 327 | const Value& derivates, const Value& offset, | 327 | const Value& derivates, const Value& offset, |
| 328 | const F32& lod_clamp, TextureInstInfo info); | 328 | const F32& lod_clamp, TextureInstInfo info); |
| 329 | [[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info); | 329 | [[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info); |
| 330 | [[nodiscard]] void ImageWrite(const Value& handle, const Value& coords, const Value& color, | 330 | void ImageWrite(const Value& handle, const Value& coords, const Value& color, |
| 331 | TextureInstInfo info); | 331 | TextureInstInfo info); |
| 332 | 332 | ||
| 333 | [[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords, | 333 | [[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords, |
| 334 | const Value& value, TextureInstInfo info); | 334 | 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: | |||
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | template <typename FlagsType> | 200 | template <typename FlagsType> |
| 201 | requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) | 201 | requires(sizeof(FlagsType) <= sizeof(u32) && |
| 202 | [[nodiscard]] void SetFlags(FlagsType value) noexcept { | 202 | std::is_trivially_copyable_v<FlagsType>) void SetFlags(FlagsType value) noexcept { |
| 203 | std::memcpy(&flags, &value, sizeof(value)); | 203 | std::memcpy(&flags, &value, sizeof(value)); |
| 204 | } | 204 | } |
| 205 | 205 | ||
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) { | |||
| 73 | return Token::PBK; | 73 | return Token::PBK; |
| 74 | case Opcode::PCNT: | 74 | case Opcode::PCNT: |
| 75 | case Opcode::CONT: | 75 | case Opcode::CONT: |
| 76 | return Token::PBK; | 76 | return Token::PCNT; |
| 77 | case Opcode::PEXIT: | 77 | case Opcode::PEXIT: |
| 78 | case Opcode::EXIT: | 78 | case Opcode::EXIT: |
| 79 | return Token::PEXIT; | 79 | 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) { | |||
| 111 | case IR::Opcode::ConvertF16U16: | 111 | case IR::Opcode::ConvertF16U16: |
| 112 | case IR::Opcode::ConvertF16U32: | 112 | case IR::Opcode::ConvertF16U32: |
| 113 | case IR::Opcode::ConvertF16U64: | 113 | case IR::Opcode::ConvertF16U64: |
| 114 | case IR::Opcode::ConvertF16F32: | ||
| 115 | case IR::Opcode::ConvertF32F16: | ||
| 114 | case IR::Opcode::FPAbs16: | 116 | case IR::Opcode::FPAbs16: |
| 115 | case IR::Opcode::FPAdd16: | 117 | case IR::Opcode::FPAdd16: |
| 116 | case IR::Opcode::FPCeil16: | 118 | 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: | |||
| 63 | used_objects = std::exchange(rhs.used_objects, 0); | 63 | used_objects = std::exchange(rhs.used_objects, 0); |
| 64 | num_objects = std::exchange(rhs.num_objects, 0); | 64 | num_objects = std::exchange(rhs.num_objects, 0); |
| 65 | storage = std::move(rhs.storage); | 65 | storage = std::move(rhs.storage); |
| 66 | return *this; | ||
| 66 | } | 67 | } |
| 67 | 68 | ||
| 68 | Chunk(Chunk&& rhs) noexcept | 69 | Chunk(Chunk&& rhs) noexcept |