diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-02 02:54:45 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-02 02:54:45 +0100 |
commit | 7c8f6ca0511b35c8a56dce466df01f6364728581 (patch) | |
tree | bd1fa3b50c090786dd0f91669702ebf010d2a900 /src/video_core/vertex_shader.cpp | |
parent | Merge pull request #379 from lioncash/sh (diff) | |
parent | Pica/Rasterizer: Remove some redundant casts. (diff) | |
download | yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.gz yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.bz2 yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.lz yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.xz yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.zst yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.zip |
Diffstat (limited to 'src/video_core/vertex_shader.cpp')
-rw-r--r-- | src/video_core/vertex_shader.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index bed5081a0..ff825e2e1 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp @@ -30,6 +30,8 @@ static struct { Math::Vec4<float24> f[96]; std::array<bool,16> b; + + std::array<Math::Vec4<u8>,4> i; } shader_uniforms; // TODO: Not sure where the shader binary and swizzle patterns are supposed to be loaded to! @@ -37,33 +39,31 @@ static struct { static std::array<u32, 1024> shader_memory; static std::array<u32, 1024> swizzle_data; -void SubmitShaderMemoryChange(u32 addr, u32 value) -{ +void SubmitShaderMemoryChange(u32 addr, u32 value) { shader_memory[addr] = value; } -void SubmitSwizzleDataChange(u32 addr, u32 value) -{ +void SubmitSwizzleDataChange(u32 addr, u32 value) { swizzle_data[addr] = value; } -Math::Vec4<float24>& GetFloatUniform(u32 index) -{ +Math::Vec4<float24>& GetFloatUniform(u32 index) { return shader_uniforms.f[index]; } -bool& GetBoolUniform(u32 index) -{ +bool& GetBoolUniform(u32 index) { return shader_uniforms.b[index]; } -const std::array<u32, 1024>& GetShaderBinary() -{ +Math::Vec4<u8>& GetIntUniform(u32 index) { + return shader_uniforms.i[index]; +} + +const std::array<u32, 1024>& GetShaderBinary() { return shader_memory; } -const std::array<u32, 1024>& GetSwizzlePatterns() -{ +const std::array<u32, 1024>& GetSwizzlePatterns() { return swizzle_data; } @@ -437,8 +437,7 @@ static void ProcessShaderCode(VertexShaderState& state) { } } -OutputVertex RunShader(const InputVertex& input, int num_attributes) -{ +OutputVertex RunShader(const InputVertex& input, int num_attributes) { VertexShaderState state; const u32* main = &shader_memory[registers.vs_main_offset]; |