diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-02 01:54:00 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-09 18:40:53 -0300 |
| commit | eb5861e0a22851cd2b2ca38136bfc7870790836e (patch) | |
| tree | 2af932e6d3d4b7992b342576788fbab62cf94a36 /src/video_core/shader | |
| parent | b1acb4f73f79a555480d1405bc9732cab111f6e2 (diff) | |
engines/maxwell_3d: Add TFB registers and store them in shader registry
Diffstat (limited to 'src/video_core/shader')
| -rw-r--r-- | src/video_core/shader/registry.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/shader/registry.h | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/video_core/shader/registry.cpp b/src/video_core/shader/registry.cpp index 4a1e16c1e..af70b3f35 100644 --- a/src/video_core/shader/registry.cpp +++ b/src/video_core/shader/registry.cpp @@ -27,9 +27,12 @@ GraphicsInfo MakeGraphicsInfo(ShaderType shader_stage, ConstBufferEngineInterfac auto& graphics = static_cast<Tegra::Engines::Maxwell3D&>(engine); GraphicsInfo info; + info.tfb_layouts = graphics.regs.tfb_layouts; + info.tfb_varying_locs = graphics.regs.tfb_varying_locs; info.primitive_topology = graphics.regs.draw.topology; info.tessellation_primitive = graphics.regs.tess_mode.prim; info.tessellation_spacing = graphics.regs.tess_mode.spacing; + info.tfb_enabled = graphics.regs.tfb_enabled; info.tessellation_clockwise = graphics.regs.tess_mode.cw; return info; } diff --git a/src/video_core/shader/registry.h b/src/video_core/shader/registry.h index 07998c4db..0c80d35fd 100644 --- a/src/video_core/shader/registry.h +++ b/src/video_core/shader/registry.h @@ -25,9 +25,15 @@ using BindlessSamplerMap = std::unordered_map<std::pair<u32, u32>, Tegra::Engines::SamplerDescriptor, Common::PairHash>; struct GraphicsInfo { - Tegra::Engines::Maxwell3D::Regs::PrimitiveTopology primitive_topology{}; - Tegra::Engines::Maxwell3D::Regs::TessellationPrimitive tessellation_primitive{}; - Tegra::Engines::Maxwell3D::Regs::TessellationSpacing tessellation_spacing{}; + using Maxwell = Tegra::Engines::Maxwell3D::Regs; + + std::array<Maxwell::TransformFeedbackLayout, Maxwell::NumTransformFeedbackBuffers> + tfb_layouts{}; + std::array<std::array<u8, 128>, Maxwell::NumTransformFeedbackBuffers> tfb_varying_locs{}; + Maxwell::PrimitiveTopology primitive_topology{}; + Maxwell::TessellationPrimitive tessellation_primitive{}; + Maxwell::TessellationSpacing tessellation_spacing{}; + bool tfb_enabled = false; bool tessellation_clockwise = false; }; static_assert(std::is_trivially_copyable_v<GraphicsInfo> && |
