summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-20 18:14:17 -0400
committerGravatar Lioncash2018-07-20 18:23:54 -0400
commitbb960c8cb43a3250d971cd8bb4adc5dd0c5baccc (patch)
treec7745ac491c15a6d4519548812a7105903410a18 /src/video_core/engines
parentMerge pull request #740 from Subv/acc_crash (diff)
downloadyuzu-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.cpp6
-rw-r--r--src/video_core/engines/fermi_2d.h6
-rw-r--r--src/video_core/engines/maxwell_3d.h6
-rw-r--r--src/video_core/engines/maxwell_compute.h6
-rw-r--r--src/video_core/engines/maxwell_dma.h6
-rw-r--r--src/video_core/engines/shader_bytecode.h12
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
9namespace Tegra { 9namespace Tegra::Engines {
10namespace Engines {
11 10
12Fermi2D::Fermi2D(MemoryManager& memory_manager) : memory_manager(memory_manager) {} 11Fermi2D::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
15namespace Tegra { 15namespace Tegra::Engines {
16namespace 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);
110ASSERT_REG_POSITION(trigger, 0xB5); 109ASSERT_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
20namespace Tegra { 20namespace Tegra::Engines {
21namespace 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
9namespace Tegra { 9namespace Tegra::Engines {
10namespace Engines {
11 10
12class MaxwellCompute final { 11class MaxwellCompute final {
13public: 12public:
@@ -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
15namespace Tegra { 15namespace Tegra::Engines {
16namespace Engines {
17 16
18class MaxwellDMA final { 17class MaxwellDMA final {
19public: 18public:
@@ -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
18namespace Tegra { 18namespace Tegra::Shader {
19namespace Shader {
20 19
21struct Register { 20struct 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
115namespace std { 113namespace std {
116 114
@@ -127,8 +125,7 @@ struct make_unsigned<Tegra::Shader::Register> {
127 125
128} // namespace std 126} // namespace std
129 127
130namespace Tegra { 128namespace Tegra::Shader {
131namespace Shader {
132 129
133enum class Pred : u64 { 130enum 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