From 6b775034dd8343c06369b64bf073d6a70f35f510 Mon Sep 17 00:00:00 2001 From: Dwayne Slater Date: Wed, 2 Mar 2016 22:16:38 -0500 Subject: Add immediate mode vertex submission --- src/video_core/shader/shader.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/video_core/shader/shader.h') 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::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 MEMORY_ALIGNED16(f[96]); + + std::array b; + std::array, 4> i; + } uniforms; + + Math::Vec4 default_attributes[16]; + + std::array program_code; + std::array swizzle_data; +}; // Helper structure used to keep track of data useful for inspection of shader emulation template @@ -347,7 +363,7 @@ OutputVertex Run(UnitState& 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 ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const State::ShaderSetup& setup); +DebugData ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const ShaderSetup& setup); } // namespace Shader -- cgit v1.2.3