Merge pull request #230 from Subv/gpu_draw

GPU: Intercept writes to the VERTEX_END_GL register.
This commit is contained in:
bunnei 2018-03-05 09:58:58 -05:00 committed by GitHub
commit 5750f6f046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -19,6 +19,10 @@ void Maxwell3D::WriteReg(u32 method, u32 value) {
#define MAXWELL3D_REG_INDEX(field_name) (offsetof(Regs, field_name) / sizeof(u32)) #define MAXWELL3D_REG_INDEX(field_name) (offsetof(Regs, field_name) / sizeof(u32))
switch (method) { switch (method) {
case MAXWELL3D_REG_INDEX(draw.vertex_end_gl): {
DrawArrays();
break;
}
case MAXWELL3D_REG_INDEX(query.query_get): { case MAXWELL3D_REG_INDEX(query.query_get): {
ProcessQueryGet(); ProcessQueryGet();
break; break;
@ -47,5 +51,10 @@ void Maxwell3D::ProcessQueryGet() {
UNIMPLEMENTED_MSG("Query mode %u not implemented", regs.query.query_get.mode.Value()); 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 Engines
} // namespace Tegra } // namespace Tegra

View File

@ -32,7 +32,12 @@ public:
union { union {
struct { struct {
INSERT_PADDING_WORDS(0x6C0); INSERT_PADDING_WORDS(0x585);
struct {
u32 vertex_end_gl;
u32 vertex_begin_gl;
} draw;
INSERT_PADDING_WORDS(0x139);
struct { struct {
u32 query_address_high; u32 query_address_high;
u32 query_address_low; u32 query_address_low;
@ -61,6 +66,9 @@ private:
/// Handles a write to the QUERY_GET register. /// Handles a write to the QUERY_GET register.
void ProcessQueryGet(); void ProcessQueryGet();
/// Handles a write to the VERTEX_END_GL register, triggering a draw.
void DrawArrays();
MemoryManager& memory_manager; MemoryManager& memory_manager;
}; };