From 3f69c2039de1c3d084ac2c9eb0aa9315490346bf Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 21 Jul 2015 19:38:59 -0400 Subject: Shader: Define a common interface for running vertex shader programs. --- src/video_core/pica.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/video_core/pica.h') diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 34b02b2f8..6ce90f95a 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -1083,6 +1083,7 @@ private: // TODO: Perform proper arithmetic on this! float value; }; +static_assert(sizeof(float24) == sizeof(float), "Shader JIT assumes float24 is implemented as a 32-bit float"); /// Struct used to describe current Pica state struct State { @@ -1092,7 +1093,10 @@ struct State { /// Vertex shader memory struct ShaderSetup { struct { - Math::Vec4 f[96]; + // The float uniforms are accessed by the shader JIT using SSE instructions, and are + // therefore required to be 16-byte aligned. + Math::Vec4 MEMORY_ALIGNED16(f[96]); + std::array b; std::array, 4> i; } uniforms; -- cgit v1.2.3