diff options
| author | 2020-04-24 08:54:45 -0400 | |
|---|---|---|
| committer | 2020-04-24 08:54:45 -0400 | |
| commit | 6ec965ef91260d6eb3ec32d9bd0a4a00654e29c0 (patch) | |
| tree | 6163449db6bf315f86afff9f1d5f1dac1fad48c6 | |
| parent | Merge pull request #3760 from Morph1984/trailing-filedir-separator (diff) | |
| parent | Fix -Wdeprecated-copy warning. (diff) | |
| download | yuzu-6ec965ef91260d6eb3ec32d9bd0a4a00654e29c0.tar.gz yuzu-6ec965ef91260d6eb3ec32d9bd0a4a00654e29c0.tar.xz yuzu-6ec965ef91260d6eb3ec32d9bd0a4a00654e29c0.zip | |
Merge pull request #3786 from degasus/fix_warnings
Fix -Werror=conversion and -Wdeprecated-copy issues
| -rw-r--r-- | src/common/bit_field.h | 2 | ||||
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/fixed_pipeline_state.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index fd2bbbd99..26ae6c7fc 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -180,7 +180,7 @@ public: | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | constexpr void Assign(const T& value) { | 182 | constexpr void Assign(const T& value) { |
| 183 | storage = (static_cast<StorageType>(storage) & ~mask) | FormatValue(value); | 183 | storage = static_cast<StorageType>((storage & ~mask) | FormatValue(value)); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | constexpr T Value() const { | 186 | constexpr T Value() const { |
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 7231597d4..73d98fe8c 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -655,6 +655,7 @@ union Instruction { | |||
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | constexpr Instruction(u64 value) : value{value} {} | 657 | constexpr Instruction(u64 value) : value{value} {} |
| 658 | constexpr Instruction(const Instruction& instr) : value(instr.value) {} | ||
| 658 | 659 | ||
| 659 | BitField<0, 8, Register> gpr0; | 660 | BitField<0, 8, Register> gpr0; |
| 660 | BitField<8, 8, Register> gpr8; | 661 | BitField<8, 8, Register> gpr8; |
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.h b/src/video_core/renderer_vulkan/fixed_pipeline_state.h index 9fe6bdbf9..9a950f4de 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.h +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.h | |||
| @@ -129,7 +129,7 @@ struct alignas(32) FixedPipelineState { | |||
| 129 | auto& binding = bindings[index]; | 129 | auto& binding = bindings[index]; |
| 130 | binding.raw = 0; | 130 | binding.raw = 0; |
| 131 | binding.enabled.Assign(enabled ? 1 : 0); | 131 | binding.enabled.Assign(enabled ? 1 : 0); |
| 132 | binding.stride.Assign(stride); | 132 | binding.stride.Assign(static_cast<u16>(stride)); |
| 133 | binding_divisors[index] = divisor; | 133 | binding_divisors[index] = divisor; |
| 134 | } | 134 | } |
| 135 | 135 | ||