diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp index 40ed34a6d..be890c2d4 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp @@ -6,7 +6,6 @@ #include #include #include -#include #include namespace ShaderRecompiler { @@ -28,27 +27,21 @@ struct DescriptorSource { std::uint32_t selectorOffset = 0; std::uint32_t keyArg = 0; - bool operator==(const IndirectImage& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const IndirectImage& other) const = default; }; std::array dwords {}; std::uint32_t dwordCount = 0; std::optional indirectImage; - bool operator==(const DescriptorSource& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const DescriptorSource& other) const = default; }; struct SrtRead { IrValue* value = nullptr; std::uint32_t flatOffset = 0; - bool operator==(const SrtRead& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const SrtRead& other) const = default; }; struct ResourceBlock { diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/DescriptorBinding.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/DescriptorBinding.hpp index a91c1d986..4b00fd2c5 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/DescriptorBinding.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/DescriptorBinding.hpp @@ -43,9 +43,7 @@ struct IrDescriptorBinding { DescriptorBindingKind kind = DescriptorBindingKind::Buffers; std::vector resources; - bool operator==(const IrDescriptorBinding& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const IrDescriptorBinding& other) const = default; }; struct IrBindingLayout { @@ -65,9 +63,7 @@ struct IrBindingLayout { throw std::runtime_error("AdvancePushData not implemented"); } - bool operator==(const IrBindingLayout& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const IrBindingLayout& other) const = default; }; } diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourceInfo.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourceInfo.hpp index 060a4adee..7abb73613 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourceInfo.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourceInfo.hpp @@ -3,7 +3,6 @@ #include "RdnaDecoder/RdnaInstruction.hpp" #include -#include namespace ShaderRecompiler { @@ -47,9 +46,7 @@ struct MemoryInfo { bool offen = false; bool planningOnly = false; - bool operator==(const MemoryInfo& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const MemoryInfo& other) const = default; }; enum class ExportTargetKind { Unknown, Null, Position, Primitive, Parameter, Mrt, MrtZ }; @@ -63,9 +60,7 @@ struct ExportInfo { bool compr = false; bool vm = false; - bool operator==(const ExportInfo& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const ExportInfo& other) const = default; }; } diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourcePlan.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourcePlan.hpp index 024147a75..b7b82ba3f 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourcePlan.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ResourcePlan.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ShaderRecompiler { @@ -19,9 +18,7 @@ struct DescriptorValue { std::array dwords = {}; std::uint32_t dwordCount = 0; - bool operator==(const DescriptorValue& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const DescriptorValue& other) const = default; }; enum class UniformFillKind { None, Buffer, Image }; @@ -33,9 +30,7 @@ struct UniformFill { std::uint32_t words = 0; std::uint32_t value = 0; - bool operator==(const UniformFill& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const UniformFill& other) const = default; }; struct ResourceSnapshot { diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp index 070fce1f2..26e6f78c1 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp @@ -6,7 +6,6 @@ #include "RdnaDecoder/RdnaInstruction.hpp" #include #include -#include #include namespace ShaderRecompiler { @@ -27,9 +26,7 @@ struct BufferResource { bool formatted = false; bool scalar = false; - bool operator==(const BufferResource& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const BufferResource& other) const = default; }; enum class ImageMipMode { None, DynamicStorage }; @@ -57,9 +54,7 @@ struct ImageResource { std::uint32_t indirectSearchIterations = 0; std::vector indirectResources; - bool operator==(const ImageResource& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const ImageResource& other) const = default; }; struct SamplerResource { @@ -68,9 +63,7 @@ struct SamplerResource { bool forcePointFiltering = false; bool depthCompare = false; - bool operator==(const SamplerResource& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const SamplerResource& other) const = default; }; struct SampledResourcePair { @@ -78,9 +71,7 @@ struct SampledResourcePair { std::uint32_t sampler = 0; std::uint32_t firstUsePc = 0; - bool operator==(const SampledResourcePair& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const SampledResourcePair& other) const = default; }; } diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp index 366b4e4f1..ec6d4359c 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp @@ -5,7 +5,6 @@ #include "IntermediateRepresentation/IrMetadata/StageIO.hpp" #include #include -#include #include namespace ShaderRecompiler { @@ -30,9 +29,7 @@ struct ShaderInfo { bool hasBitwiseXor = false; bool usesDma = false; - bool operator==(const ShaderInfo& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const ShaderInfo& other) const = default; }; } diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hpp index 5cff813be..af874c1f8 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hpp @@ -3,7 +3,6 @@ #include #include -#include #include namespace ShaderRecompiler { @@ -65,9 +64,7 @@ struct StageInput { std::string debugName; bool perVertex = false; - bool operator==(const StageInput& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const StageInput& other) const = default; }; struct StageOutput { @@ -76,9 +73,7 @@ struct StageOutput { std::uint32_t location = 0; std::string debugName; - bool operator==(const StageOutput& other) const { - throw std::runtime_error("operator== not implemented"); - } + bool operator==(const StageOutput& other) const = default; }; }