diff options
| author | 2018-06-06 23:53:43 -0500 | |
|---|---|---|
| committer | 2018-07-03 16:56:31 -0500 | |
| commit | 827bb08c91086e0e24edb82df79c9ed860baf836 (patch) | |
| tree | 08796267898f87068529a622aee8fae8f11a8520 /src | |
| parent | Merge pull request #608 from Subv/depth (diff) | |
| download | yuzu-827bb08c91086e0e24edb82df79c9ed860baf836.tar.gz yuzu-827bb08c91086e0e24edb82df79c9ed860baf836.tar.xz yuzu-827bb08c91086e0e24edb82df79c9ed860baf836.zip | |
GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index ff67f2a58..e264dd4d8 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -436,7 +436,12 @@ public: | |||
| 436 | u32 count; | 436 | u32 count; |
| 437 | } vertex_buffer; | 437 | } vertex_buffer; |
| 438 | 438 | ||
| 439 | INSERT_PADDING_WORDS(0x99); | 439 | INSERT_PADDING_WORDS(1); |
| 440 | |||
| 441 | float clear_color[4]; | ||
| 442 | float clear_depth; | ||
| 443 | |||
| 444 | INSERT_PADDING_WORDS(0x93); | ||
| 440 | 445 | ||
| 441 | struct { | 446 | struct { |
| 442 | u32 address_high; | 447 | u32 address_high; |
| @@ -584,7 +589,21 @@ public: | |||
| 584 | 589 | ||
| 585 | Cull cull; | 590 | Cull cull; |
| 586 | 591 | ||
| 587 | INSERT_PADDING_WORDS(0x77); | 592 | INSERT_PADDING_WORDS(0x2B); |
| 593 | |||
| 594 | union { | ||
| 595 | u32 raw; | ||
| 596 | BitField<0, 1, u32> Z; | ||
| 597 | BitField<1, 1, u32> S; | ||
| 598 | BitField<2, 1, u32> R; | ||
| 599 | BitField<3, 1, u32> G; | ||
| 600 | BitField<4, 1, u32> B; | ||
| 601 | BitField<5, 1, u32> A; | ||
| 602 | BitField<6, 4, u32> RT; | ||
| 603 | BitField<10, 11, u32> layer; | ||
| 604 | } clear_buffers; | ||
| 605 | |||
| 606 | INSERT_PADDING_WORDS(0x4B); | ||
| 588 | 607 | ||
| 589 | struct { | 608 | struct { |
| 590 | u32 query_address_high; | 609 | u32 query_address_high; |
| @@ -766,6 +785,9 @@ private: | |||
| 766 | /// Handles writes to the macro uploading registers. | 785 | /// Handles writes to the macro uploading registers. |
| 767 | void ProcessMacroUpload(u32 data); | 786 | void ProcessMacroUpload(u32 data); |
| 768 | 787 | ||
| 788 | /// Handles a write to the CLEAR_BUFFERS register. | ||
| 789 | void ProcessClearBuffers(); | ||
| 790 | |||
| 769 | /// Handles a write to the QUERY_GET register. | 791 | /// Handles a write to the QUERY_GET register. |
| 770 | void ProcessQueryGet(); | 792 | void ProcessQueryGet(); |
| 771 | 793 | ||
| @@ -788,6 +810,8 @@ ASSERT_REG_POSITION(rt, 0x200); | |||
| 788 | ASSERT_REG_POSITION(viewport_transform[0], 0x280); | 810 | ASSERT_REG_POSITION(viewport_transform[0], 0x280); |
| 789 | ASSERT_REG_POSITION(viewport, 0x300); | 811 | ASSERT_REG_POSITION(viewport, 0x300); |
| 790 | ASSERT_REG_POSITION(vertex_buffer, 0x35D); | 812 | ASSERT_REG_POSITION(vertex_buffer, 0x35D); |
| 813 | ASSERT_REG_POSITION(clear_color[0], 0x360); | ||
| 814 | ASSERT_REG_POSITION(clear_depth, 0x364); | ||
| 791 | ASSERT_REG_POSITION(zeta, 0x3F8); | 815 | ASSERT_REG_POSITION(zeta, 0x3F8); |
| 792 | ASSERT_REG_POSITION(vertex_attrib_format[0], 0x458); | 816 | ASSERT_REG_POSITION(vertex_attrib_format[0], 0x458); |
| 793 | ASSERT_REG_POSITION(rt_control, 0x487); | 817 | ASSERT_REG_POSITION(rt_control, 0x487); |
| @@ -803,6 +827,7 @@ ASSERT_REG_POSITION(code_address, 0x582); | |||
| 803 | ASSERT_REG_POSITION(draw, 0x585); | 827 | ASSERT_REG_POSITION(draw, 0x585); |
| 804 | ASSERT_REG_POSITION(index_array, 0x5F2); | 828 | ASSERT_REG_POSITION(index_array, 0x5F2); |
| 805 | ASSERT_REG_POSITION(cull, 0x646); | 829 | ASSERT_REG_POSITION(cull, 0x646); |
| 830 | ASSERT_REG_POSITION(clear_buffers, 0x674); | ||
| 806 | ASSERT_REG_POSITION(query, 0x6C0); | 831 | ASSERT_REG_POSITION(query, 0x6C0); |
| 807 | ASSERT_REG_POSITION(vertex_array[0], 0x700); | 832 | ASSERT_REG_POSITION(vertex_array[0], 0x700); |
| 808 | ASSERT_REG_POSITION(independent_blend, 0x780); | 833 | ASSERT_REG_POSITION(independent_blend, 0x780); |