diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-05 15:58:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 15:58:58 +0100 |
commit | 5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0 (patch) | |
tree | bd7fc5fd8f216f37e87524a17297db5f2ee7f19d /src | |
parent | Merge pull request #229 from Subv/ensuresavedata_impl (diff) | |
parent | GPU: Intercept writes to the VERTEX_END_GL register. (diff) | |
download | yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar.gz yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar.bz2 yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar.lz yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar.xz yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.tar.zst yuzu-5750f6f0466c84e0c5b832c00ab8260ea9ba0cd0.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 9 | ||||
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 9f699399f..842c5a014 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -19,6 +19,10 @@ void Maxwell3D::WriteReg(u32 method, u32 value) { #define MAXWELL3D_REG_INDEX(field_name) (offsetof(Regs, field_name) / sizeof(u32)) switch (method) { + case MAXWELL3D_REG_INDEX(draw.vertex_end_gl): { + DrawArrays(); + break; + } case MAXWELL3D_REG_INDEX(query.query_get): { ProcessQueryGet(); break; @@ -47,5 +51,10 @@ void Maxwell3D::ProcessQueryGet() { UNIMPLEMENTED_MSG("Query mode %u not implemented", regs.query.query_get.mode.Value()); } } + +void Maxwell3D::DrawArrays() { + LOG_WARNING(HW_GPU, "Game requested a DrawArrays, ignoring"); +} + } // namespace Engines } // namespace Tegra diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 1eeef6857..93f7698a0 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -32,7 +32,12 @@ public: union { struct { - INSERT_PADDING_WORDS(0x6C0); + INSERT_PADDING_WORDS(0x585); + struct { + u32 vertex_end_gl; + u32 vertex_begin_gl; + } draw; + INSERT_PADDING_WORDS(0x139); struct { u32 query_address_high; u32 query_address_low; @@ -61,6 +66,9 @@ private: /// Handles a write to the QUERY_GET register. void ProcessQueryGet(); + /// Handles a write to the VERTEX_END_GL register, triggering a draw. + void DrawArrays(); + MemoryManager& memory_manager; }; |