diff options
author | bunnei <bunneidev@gmail.com> | 2015-07-21 19:38:59 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-08-15 17:33:44 -0400 |
commit | 3f69c2039de1c3d084ac2c9eb0aa9315490346bf (patch) | |
tree | 743f6bae0c3f1d475eabb083335ad7d6377bb97e /src/video_core/pica.h | |
parent | 18527b9e21a95445fbee45fea29f674fbdd2aae1 (diff) |
Shader: Define a common interface for running vertex shader programs.
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r-- | src/video_core/pica.h | 6 |
1 files changed, 5 insertions, 1 deletions
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<float24> 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<float24> MEMORY_ALIGNED16(f[96]); + std::array<bool, 16> b; std::array<Math::Vec4<u8>, 4> i; } uniforms; |