video_core: use nested namespaces

This commit is contained in:
tgsm 2019-02-19 03:09:57 -05:00
parent f409342ab5
commit d6c530d08c
26 changed files with 52 additions and 120 deletions

View file

@ -19,8 +19,7 @@
using Pica::Rasterizer::Vertex;
namespace Pica {
namespace Clipper {
namespace Pica::Clipper {
struct ClippingEdge {
public:
@ -192,5 +191,4 @@ void ProcessTriangle(const OutputVertex& v0, const OutputVertex& v1, const Outpu
}
}
} // namespace Clipper
} // namespace Pica
} // namespace Pica::Clipper

View file

@ -16,8 +16,7 @@
#include "video_core/utils.h"
#include "video_core/video_core.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
void DrawPixel(int x, int y, const Math::Vec4<u8>& color) {
const auto& framebuffer = g_state.regs.framebuffer.framebuffer;
@ -407,5 +406,4 @@ void DrawShadowMapPixel(int x, int y, u32 depth, u8 stencil) {
}
}
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -8,8 +8,7 @@
#include "common/vector_math.h"
#include "video_core/regs_framebuffer.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
void DrawPixel(int x, int y, const Math::Vec4<u8>& color);
const Math::Vec4<u8> GetPixel(int x, int y);
@ -27,5 +26,4 @@ u8 LogicOp(u8 src, u8 dest, FramebufferRegs::LogicOp op);
void DrawShadowMapPixel(int x, int y, u32 depth, u8 stencil);
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -7,8 +7,7 @@
#include "common/math_util.h"
#include "video_core/swrasterizer/proctex.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
using ProcTexClamp = TexturingRegs::ProcTexClamp;
using ProcTexShift = TexturingRegs::ProcTexShift;
@ -219,5 +218,4 @@ Math::Vec4<u8> ProcTex(float u, float v, TexturingRegs regs, State::ProcTex stat
}
}
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -6,11 +6,9 @@
#include "common/vector_math.h"
#include "video_core/pica_state.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
/// Generates procedural texture color for the given coordinates
Math::Vec4<u8> ProcTex(float u, float v, TexturingRegs regs, State::ProcTex state);
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -32,8 +32,7 @@
#include "video_core/utils.h"
#include "video_core/video_core.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
// NOTE: Assuming that rasterizer coordinates are 12.4 fixed-point values
struct Fix12P4 {
@ -893,5 +892,4 @@ void ProcessTriangle(const Vertex& v0, const Vertex& v1, const Vertex& v2) {
ProcessTriangleInternal(v0, v1, v2);
}
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -6,8 +6,7 @@
#include "video_core/shader/shader.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
struct Vertex : Shader::OutputVertex {
Vertex(const OutputVertex& v) : OutputVertex(v) {}
@ -42,5 +41,4 @@ struct Vertex : Shader::OutputVertex {
void ProcessTriangle(const Vertex& v0, const Vertex& v1, const Vertex& v2);
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -7,11 +7,9 @@
#include "common/common_types.h"
#include "video_core/rasterizer_interface.h"
namespace Pica {
namespace Shader {
namespace Pica::Shader {
struct OutputVertex;
}
} // namespace Pica
} // namespace Pica::Shader
namespace VideoCore {

View file

@ -9,8 +9,7 @@
#include "video_core/regs_texturing.h"
#include "video_core/swrasterizer/texturing.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
using TevStageConfig = TexturingRegs::TevStageConfig;
@ -238,5 +237,4 @@ u8 AlphaCombine(TevStageConfig::Operation op, const std::array<u8, 3>& input) {
}
};
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer

View file

@ -8,8 +8,7 @@
#include "common/vector_math.h"
#include "video_core/regs_texturing.h"
namespace Pica {
namespace Rasterizer {
namespace Pica::Rasterizer {
int GetWrappedTexCoord(TexturingRegs::TextureConfig::WrapMode mode, int val, unsigned size);
@ -24,5 +23,4 @@ Math::Vec3<u8> ColorCombine(TexturingRegs::TevStageConfig::Operation op,
u8 AlphaCombine(TexturingRegs::TevStageConfig::Operation op, const std::array<u8, 3>& input);
} // namespace Rasterizer
} // namespace Pica
} // namespace Pica::Rasterizer