diff options
Diffstat (limited to 'src/video_core/shader/shader.h')
| -rw-r--r-- | src/video_core/shader/shader.h | 18 |
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 { | |||
| 77 | static_assert(std::is_pod<OutputVertex>::value, "Structure is not POD"); | 77 | static_assert(std::is_pod<OutputVertex>::value, "Structure is not POD"); |
| 78 | static_assert(sizeof(OutputVertex) == 32 * sizeof(float), "OutputVertex has invalid size"); | 78 | static_assert(sizeof(OutputVertex) == 32 * sizeof(float), "OutputVertex has invalid size"); |
| 79 | 79 | ||
| 80 | /// Vertex shader memory | ||
| 81 | struct ShaderSetup { | ||
| 82 | struct { | ||
| 83 | // The float uniforms are accessed by the shader JIT using SSE instructions, and are | ||
| 84 | // therefore required to be 16-byte aligned. | ||
| 85 | Math::Vec4<float24> MEMORY_ALIGNED16(f[96]); | ||
| 86 | |||
| 87 | std::array<bool, 16> b; | ||
| 88 | std::array<Math::Vec4<u8>, 4> i; | ||
| 89 | } uniforms; | ||
| 90 | |||
| 91 | Math::Vec4<float24> default_attributes[16]; | ||
| 92 | |||
| 93 | std::array<u32, 1024> program_code; | ||
| 94 | std::array<u32, 1024> swizzle_data; | ||
| 95 | }; | ||
| 80 | 96 | ||
| 81 | // Helper structure used to keep track of data useful for inspection of shader emulation | 97 | // Helper structure used to keep track of data useful for inspection of shader emulation |
| 82 | template<bool full_debugging> | 98 | template<bool full_debugging> |
| @@ -347,7 +363,7 @@ OutputVertex Run(UnitState<false>& state, const InputVertex& input, int num_attr | |||
| 347 | * @param setup Setup object for the shader pipeline | 363 | * @param setup Setup object for the shader pipeline |
| 348 | * @return Debug information for this shader with regards to the given vertex | 364 | * @return Debug information for this shader with regards to the given vertex |
| 349 | */ | 365 | */ |
| 350 | DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const State::ShaderSetup& setup); | 366 | DebugData<true> ProduceDebugInfo(const InputVertex& input, int num_attributes, const Regs::ShaderConfig& config, const ShaderSetup& setup); |
| 351 | 367 | ||
| 352 | } // namespace Shader | 368 | } // namespace Shader |
| 353 | 369 | ||