Просмотр исходного кода

GPU: Added the TSC registers to the Maxwell3D register structure.

Subv 8 лет назад
Родитель
Сommit
dcae0c9a4f
1 измененных файлов с 15 добавлено и 1 удалено
  1. 15 1
      src/video_core/engines/maxwell_3d.h

+ 15 - 1
src/video_core/engines/maxwell_3d.h

@@ -62,7 +62,20 @@ public:
 
 
         union {
         union {
             struct {
             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<GPUVAddr>(
+                            (static_cast<GPUVAddr>(tsc_address_high) << 32) | tsc_address_low);
+                    }
+                } tsc;
+
+                INSERT_PADDING_WORDS(0x3);
 
 
                 struct {
                 struct {
                     u32 tic_address_high;
                     u32 tic_address_high;
@@ -278,6 +291,7 @@ private:
     static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4,                           \
     static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4,                           \
                   "Field " #field_name " has invalid position")
                   "Field " #field_name " has invalid position")
 
 
+ASSERT_REG_POSITION(tsc, 0x557);
 ASSERT_REG_POSITION(tic, 0x55D);
 ASSERT_REG_POSITION(tic, 0x55D);
 ASSERT_REG_POSITION(code_address, 0x582);
 ASSERT_REG_POSITION(code_address, 0x582);
 ASSERT_REG_POSITION(draw, 0x585);
 ASSERT_REG_POSITION(draw, 0x585);