aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/shader.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-03-03 10:51:15 -0500
committerbunnei <bunneidev@gmail.com>2016-03-03 10:51:15 -0500
commitc9009d39d4e023ea9f45565fe241cc63bc765803 (patch)
tree24151beb25a6a53a9f2646f93dedbe834e7f04f5 /src/video_core/shader/shader.h
parent699b2a6571849bddda4fee3eb31f2f7b7e83a882 (diff)
parent6b775034dd8343c06369b64bf073d6a70f35f510 (diff)
Merge pull request #1394 from ds84182/immediate-mode-vtx
Add immediate mode vertex submission
Diffstat (limited to 'src/video_core/shader/shader.h')
-rw-r--r--src/video_core/shader/shader.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h
index f068cd93f..1be4e3734 100644
--- a/src/video_core/shader/shader.h
+++ b/src/video_core/shader/shader.h
@@ -77,6 +77,22 @@ struct OutputVertex {
static_assert(std::is_pod<OutputVertex>::value, "Structure is not POD");
static_assert(sizeof(OutputVertex) == 32 * sizeof(float), "OutputVertex has invalid size");
+/// Vertex shader memory
+struct ShaderSetup {
+ struct {
+ // 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;
+
+ Math::Vec4<float24> default_attributes[16];
+
+ std::array<u32, 1024> program_code;
+ std::array<u32, 1024> swizzle_data;
+};
// Helper structure used to keep track of data useful for inspection of shader emulation
template<bool full_debugging>
@@ -347,7 +363,7 @@ OutputVertex Run(UnitState<false>& state, const InputVertex& input, int num_attr
* @param setup Setup object for the shader pipeline
* @return Debug information for this shader with regards to the given vertex
*/
-DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const State::ShaderSetup& setup);
+DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const ShaderSetup& setup);
} // namespace Shader