From cff7b29bbaca20b28ea52eedefed7c1cdafff2b9 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 19 Mar 2018 00:32:57 -0500 Subject: [PATCH 1/2] GPU: Added the TIC registers to the Maxwell3D register structure. --- src/video_core/engines/maxwell_3d.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 5d9b0043b7..272ebee311 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -62,7 +62,21 @@ public: union { struct { - INSERT_PADDING_WORDS(0x582); + INSERT_PADDING_WORDS(0x55D); + + struct { + u32 tic_address_high; + u32 tic_address_low; + u32 tic_limit; + + GPUVAddr TICAddress() const { + return static_cast( + (static_cast(tic_address_high) << 32) | tic_address_low); + } + } tic; + + INSERT_PADDING_WORDS(0x22); + struct { u32 code_address_high; u32 code_address_low; @@ -264,6 +278,7 @@ private: static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \ "Field " #field_name " has invalid position") +ASSERT_REG_POSITION(tic, 0x55D); ASSERT_REG_POSITION(code_address, 0x582); ASSERT_REG_POSITION(draw, 0x585); ASSERT_REG_POSITION(query, 0x6C0); From dcae0c9a4fb950784db36b372c21aef718551eb5 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 19 Mar 2018 00:36:25 -0500 Subject: [PATCH 2/2] GPU: Added the TSC registers to the Maxwell3D register structure. --- src/video_core/engines/maxwell_3d.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 272ebee311..096679162e 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -62,7 +62,20 @@ public: union { struct { - INSERT_PADDING_WORDS(0x55D); + INSERT_PADDING_WORDS(0x557); + + struct { + u32 tsc_address_high; + u32 tsc_address_low; + u32 tsc_limit; + + GPUVAddr TSCAddress() const { + return static_cast( + (static_cast(tsc_address_high) << 32) | tsc_address_low); + } + } tsc; + + INSERT_PADDING_WORDS(0x3); struct { u32 tic_address_high; @@ -278,6 +291,7 @@ private: static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \ "Field " #field_name " has invalid position") +ASSERT_REG_POSITION(tsc, 0x557); ASSERT_REG_POSITION(tic, 0x55D); ASSERT_REG_POSITION(code_address, 0x582); ASSERT_REG_POSITION(draw, 0x585);