diff options
| author | 2018-07-20 18:14:17 -0400 | |
|---|---|---|
| committer | 2018-07-20 18:23:54 -0400 | |
| commit | bb960c8cb43a3250d971cd8bb4adc5dd0c5baccc (patch) | |
| tree | c7745ac491c15a6d4519548812a7105903410a18 /src/video_core/engines | |
| parent | Merge pull request #740 from Subv/acc_crash (diff) | |
| download | yuzu-bb960c8cb43a3250d971cd8bb4adc5dd0c5baccc.tar.gz yuzu-bb960c8cb43a3250d971cd8bb4adc5dd0c5baccc.tar.xz yuzu-bb960c8cb43a3250d971cd8bb4adc5dd0c5baccc.zip | |
video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/engines/fermi_2d.h | 6 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 6 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_compute.h | 6 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_dma.h | 6 | ||||
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 12 |
6 files changed, 14 insertions, 28 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 34053e393..ea1555c5d 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -6,8 +6,7 @@ | |||
| 6 | #include "video_core/engines/fermi_2d.h" | 6 | #include "video_core/engines/fermi_2d.h" |
| 7 | #include "video_core/textures/decoders.h" | 7 | #include "video_core/textures/decoders.h" |
| 8 | 8 | ||
| 9 | namespace Tegra { | 9 | namespace Tegra::Engines { |
| 10 | namespace Engines { | ||
| 11 | 10 | ||
| 12 | Fermi2D::Fermi2D(MemoryManager& memory_manager) : memory_manager(memory_manager) {} | 11 | Fermi2D::Fermi2D(MemoryManager& memory_manager) : memory_manager(memory_manager) {} |
| 13 | 12 | ||
| @@ -69,5 +68,4 @@ void Fermi2D::HandleSurfaceCopy() { | |||
| 69 | } | 68 | } |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | } // namespace Engines | 71 | } // namespace Tegra::Engines |
| 73 | } // namespace Tegra | ||
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index 70667cb94..dcf9ef8b9 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h | |||
| @@ -12,8 +12,7 @@ | |||
| 12 | #include "video_core/gpu.h" | 12 | #include "video_core/gpu.h" |
| 13 | #include "video_core/memory_manager.h" | 13 | #include "video_core/memory_manager.h" |
| 14 | 14 | ||
| 15 | namespace Tegra { | 15 | namespace Tegra::Engines { |
| 16 | namespace Engines { | ||
| 17 | 16 | ||
| 18 | #define FERMI2D_REG_INDEX(field_name) \ | 17 | #define FERMI2D_REG_INDEX(field_name) \ |
| 19 | (offsetof(Tegra::Engines::Fermi2D::Regs, field_name) / sizeof(u32)) | 18 | (offsetof(Tegra::Engines::Fermi2D::Regs, field_name) / sizeof(u32)) |
| @@ -110,5 +109,4 @@ ASSERT_REG_POSITION(operation, 0xAB); | |||
| 110 | ASSERT_REG_POSITION(trigger, 0xB5); | 109 | ASSERT_REG_POSITION(trigger, 0xB5); |
| 111 | #undef ASSERT_REG_POSITION | 110 | #undef ASSERT_REG_POSITION |
| 112 | 111 | ||
| 113 | } // namespace Engines | 112 | } // namespace Tegra::Engines |
| 114 | } // namespace Tegra | ||
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 91b077005..dbd106c53 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | #include "video_core/memory_manager.h" | 17 | #include "video_core/memory_manager.h" |
| 18 | #include "video_core/textures/texture.h" | 18 | #include "video_core/textures/texture.h" |
| 19 | 19 | ||
| 20 | namespace Tegra { | 20 | namespace Tegra::Engines { |
| 21 | namespace Engines { | ||
| 22 | 21 | ||
| 23 | #define MAXWELL3D_REG_INDEX(field_name) \ | 22 | #define MAXWELL3D_REG_INDEX(field_name) \ |
| 24 | (offsetof(Tegra::Engines::Maxwell3D::Regs, field_name) / sizeof(u32)) | 23 | (offsetof(Tegra::Engines::Maxwell3D::Regs, field_name) / sizeof(u32)) |
| @@ -898,5 +897,4 @@ ASSERT_REG_POSITION(tex_info_buffers.size[0], 0xD2F); | |||
| 898 | 897 | ||
| 899 | #undef ASSERT_REG_POSITION | 898 | #undef ASSERT_REG_POSITION |
| 900 | 899 | ||
| 901 | } // namespace Engines | 900 | } // namespace Tegra::Engines |
| 902 | } // namespace Tegra | ||
diff --git a/src/video_core/engines/maxwell_compute.h b/src/video_core/engines/maxwell_compute.h index 7262e1bcb..2b3e4ced6 100644 --- a/src/video_core/engines/maxwell_compute.h +++ b/src/video_core/engines/maxwell_compute.h | |||
| @@ -6,8 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | 8 | ||
| 9 | namespace Tegra { | 9 | namespace Tegra::Engines { |
| 10 | namespace Engines { | ||
| 11 | 10 | ||
| 12 | class MaxwellCompute final { | 11 | class MaxwellCompute final { |
| 13 | public: | 12 | public: |
| @@ -18,5 +17,4 @@ public: | |||
| 18 | void WriteReg(u32 method, u32 value); | 17 | void WriteReg(u32 method, u32 value); |
| 19 | }; | 18 | }; |
| 20 | 19 | ||
| 21 | } // namespace Engines | 20 | } // namespace Tegra::Engines |
| 22 | } // namespace Tegra | ||
diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h index 905749bde..7882f16e0 100644 --- a/src/video_core/engines/maxwell_dma.h +++ b/src/video_core/engines/maxwell_dma.h | |||
| @@ -12,8 +12,7 @@ | |||
| 12 | #include "video_core/gpu.h" | 12 | #include "video_core/gpu.h" |
| 13 | #include "video_core/memory_manager.h" | 13 | #include "video_core/memory_manager.h" |
| 14 | 14 | ||
| 15 | namespace Tegra { | 15 | namespace Tegra::Engines { |
| 16 | namespace Engines { | ||
| 17 | 16 | ||
| 18 | class MaxwellDMA final { | 17 | class MaxwellDMA final { |
| 19 | public: | 18 | public: |
| @@ -151,5 +150,4 @@ ASSERT_REG_POSITION(src_params, 0x1CA); | |||
| 151 | 150 | ||
| 152 | #undef ASSERT_REG_POSITION | 151 | #undef ASSERT_REG_POSITION |
| 153 | 152 | ||
| 154 | } // namespace Engines | 153 | } // namespace Tegra::Engines |
| 155 | } // namespace Tegra | ||
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 65fa1495f..939a71022 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -15,8 +15,7 @@ | |||
| 15 | #include "common/bit_field.h" | 15 | #include "common/bit_field.h" |
| 16 | #include "common/common_types.h" | 16 | #include "common/common_types.h" |
| 17 | 17 | ||
| 18 | namespace Tegra { | 18 | namespace Tegra::Shader { |
| 19 | namespace Shader { | ||
| 20 | 19 | ||
| 21 | struct Register { | 20 | struct Register { |
| 22 | /// Number of registers | 21 | /// Number of registers |
| @@ -109,8 +108,7 @@ union Sampler { | |||
| 109 | u64 value{}; | 108 | u64 value{}; |
| 110 | }; | 109 | }; |
| 111 | 110 | ||
| 112 | } // namespace Shader | 111 | } // namespace Tegra::Shader |
| 113 | } // namespace Tegra | ||
| 114 | 112 | ||
| 115 | namespace std { | 113 | namespace std { |
| 116 | 114 | ||
| @@ -127,8 +125,7 @@ struct make_unsigned<Tegra::Shader::Register> { | |||
| 127 | 125 | ||
| 128 | } // namespace std | 126 | } // namespace std |
| 129 | 127 | ||
| 130 | namespace Tegra { | 128 | namespace Tegra::Shader { |
| 131 | namespace Shader { | ||
| 132 | 129 | ||
| 133 | enum class Pred : u64 { | 130 | enum class Pred : u64 { |
| 134 | UnusedIndex = 0x7, | 131 | UnusedIndex = 0x7, |
| @@ -784,5 +781,4 @@ private: | |||
| 784 | } | 781 | } |
| 785 | }; | 782 | }; |
| 786 | 783 | ||
| 787 | } // namespace Shader | 784 | } // namespace Tegra::Shader |
| 788 | } // namespace Tegra | ||