diff options
| author | 2018-11-26 20:31:44 -0300 | |
|---|---|---|
| committer | 2018-11-26 18:31:44 -0500 | |
| commit | cb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2 (patch) | |
| tree | d8eebad471412afebbee0c0e465655695b8df585 /src/video_core/engines | |
| parent | Merge pull request #1713 from FernandoS27/bra-cc (diff) | |
| download | yuzu-cb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2.tar.gz yuzu-cb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2.tar.xz yuzu-cb8d51e37e7d630f1ea3dc816b2d5aaab2295bc2.zip | |
GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)
* GPU States: Implement Polygon Offset. This is used in SMO all the time.
* Clang Format fixes.
* Initialize polygon_offset in the constructor.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 0c403e16a..286cde201 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -590,10 +590,18 @@ public: | |||
| 590 | 590 | ||
| 591 | float clear_color[4]; | 591 | float clear_color[4]; |
| 592 | float clear_depth; | 592 | float clear_depth; |
| 593 | |||
| 593 | INSERT_PADDING_WORDS(0x3); | 594 | INSERT_PADDING_WORDS(0x3); |
| 595 | |||
| 594 | s32 clear_stencil; | 596 | s32 clear_stencil; |
| 595 | 597 | ||
| 596 | INSERT_PADDING_WORDS(0x17); | 598 | INSERT_PADDING_WORDS(0x7); |
| 599 | |||
| 600 | u32 polygon_offset_point_enable; | ||
| 601 | u32 polygon_offset_line_enable; | ||
| 602 | u32 polygon_offset_fill_enable; | ||
| 603 | |||
| 604 | INSERT_PADDING_WORDS(0xD); | ||
| 597 | 605 | ||
| 598 | std::array<ScissorTest, NumViewports> scissor_test; | 606 | std::array<ScissorTest, NumViewports> scissor_test; |
| 599 | 607 | ||
| @@ -762,7 +770,11 @@ public: | |||
| 762 | } | 770 | } |
| 763 | } tsc; | 771 | } tsc; |
| 764 | 772 | ||
| 765 | INSERT_PADDING_WORDS(0x3); | 773 | INSERT_PADDING_WORDS(0x1); |
| 774 | |||
| 775 | float polygon_offset_factor; | ||
| 776 | |||
| 777 | INSERT_PADDING_WORDS(0x1); | ||
| 766 | 778 | ||
| 767 | struct { | 779 | struct { |
| 768 | u32 tic_address_high; | 780 | u32 tic_address_high; |
| @@ -787,7 +799,9 @@ public: | |||
| 787 | 799 | ||
| 788 | u32 framebuffer_srgb; | 800 | u32 framebuffer_srgb; |
| 789 | 801 | ||
| 790 | INSERT_PADDING_WORDS(0x12); | 802 | float polygon_offset_units; |
| 803 | |||
| 804 | INSERT_PADDING_WORDS(0x11); | ||
| 791 | 805 | ||
| 792 | union { | 806 | union { |
| 793 | BitField<2, 1, u32> coord_origin; | 807 | BitField<2, 1, u32> coord_origin; |
| @@ -864,7 +878,9 @@ public: | |||
| 864 | 878 | ||
| 865 | INSERT_PADDING_WORDS(0x7); | 879 | INSERT_PADDING_WORDS(0x7); |
| 866 | 880 | ||
| 867 | INSERT_PADDING_WORDS(0x20); | 881 | INSERT_PADDING_WORDS(0x1F); |
| 882 | |||
| 883 | float polygon_offset_clamp; | ||
| 868 | 884 | ||
| 869 | struct { | 885 | struct { |
| 870 | u32 is_instanced[NumVertexArrays]; | 886 | u32 is_instanced[NumVertexArrays]; |
| @@ -1137,6 +1153,9 @@ ASSERT_REG_POSITION(vertex_buffer, 0x35D); | |||
| 1137 | ASSERT_REG_POSITION(clear_color[0], 0x360); | 1153 | ASSERT_REG_POSITION(clear_color[0], 0x360); |
| 1138 | ASSERT_REG_POSITION(clear_depth, 0x364); | 1154 | ASSERT_REG_POSITION(clear_depth, 0x364); |
| 1139 | ASSERT_REG_POSITION(clear_stencil, 0x368); | 1155 | ASSERT_REG_POSITION(clear_stencil, 0x368); |
| 1156 | ASSERT_REG_POSITION(polygon_offset_point_enable, 0x370); | ||
| 1157 | ASSERT_REG_POSITION(polygon_offset_line_enable, 0x371); | ||
| 1158 | ASSERT_REG_POSITION(polygon_offset_fill_enable, 0x372); | ||
| 1140 | ASSERT_REG_POSITION(scissor_test, 0x380); | 1159 | ASSERT_REG_POSITION(scissor_test, 0x380); |
| 1141 | ASSERT_REG_POSITION(stencil_back_func_ref, 0x3D5); | 1160 | ASSERT_REG_POSITION(stencil_back_func_ref, 0x3D5); |
| 1142 | ASSERT_REG_POSITION(stencil_back_mask, 0x3D6); | 1161 | ASSERT_REG_POSITION(stencil_back_mask, 0x3D6); |
| @@ -1175,6 +1194,7 @@ ASSERT_REG_POSITION(point_size, 0x546); | |||
| 1175 | ASSERT_REG_POSITION(zeta_enable, 0x54E); | 1194 | ASSERT_REG_POSITION(zeta_enable, 0x54E); |
| 1176 | ASSERT_REG_POSITION(multisample_control, 0x54F); | 1195 | ASSERT_REG_POSITION(multisample_control, 0x54F); |
| 1177 | ASSERT_REG_POSITION(tsc, 0x557); | 1196 | ASSERT_REG_POSITION(tsc, 0x557); |
| 1197 | ASSERT_REG_POSITION(polygon_offset_factor, 0x55b); | ||
| 1178 | ASSERT_REG_POSITION(tic, 0x55D); | 1198 | ASSERT_REG_POSITION(tic, 0x55D); |
| 1179 | ASSERT_REG_POSITION(stencil_two_side_enable, 0x565); | 1199 | ASSERT_REG_POSITION(stencil_two_side_enable, 0x565); |
| 1180 | ASSERT_REG_POSITION(stencil_back_op_fail, 0x566); | 1200 | ASSERT_REG_POSITION(stencil_back_op_fail, 0x566); |
| @@ -1182,11 +1202,13 @@ ASSERT_REG_POSITION(stencil_back_op_zfail, 0x567); | |||
| 1182 | ASSERT_REG_POSITION(stencil_back_op_zpass, 0x568); | 1202 | ASSERT_REG_POSITION(stencil_back_op_zpass, 0x568); |
| 1183 | ASSERT_REG_POSITION(stencil_back_func_func, 0x569); | 1203 | ASSERT_REG_POSITION(stencil_back_func_func, 0x569); |
| 1184 | ASSERT_REG_POSITION(framebuffer_srgb, 0x56E); | 1204 | ASSERT_REG_POSITION(framebuffer_srgb, 0x56E); |
| 1205 | ASSERT_REG_POSITION(polygon_offset_units, 0x56F); | ||
| 1185 | ASSERT_REG_POSITION(point_coord_replace, 0x581); | 1206 | ASSERT_REG_POSITION(point_coord_replace, 0x581); |
| 1186 | ASSERT_REG_POSITION(code_address, 0x582); | 1207 | ASSERT_REG_POSITION(code_address, 0x582); |
| 1187 | ASSERT_REG_POSITION(draw, 0x585); | 1208 | ASSERT_REG_POSITION(draw, 0x585); |
| 1188 | ASSERT_REG_POSITION(primitive_restart, 0x591); | 1209 | ASSERT_REG_POSITION(primitive_restart, 0x591); |
| 1189 | ASSERT_REG_POSITION(index_array, 0x5F2); | 1210 | ASSERT_REG_POSITION(index_array, 0x5F2); |
| 1211 | ASSERT_REG_POSITION(polygon_offset_clamp, 0x61F); | ||
| 1190 | ASSERT_REG_POSITION(instanced_arrays, 0x620); | 1212 | ASSERT_REG_POSITION(instanced_arrays, 0x620); |
| 1191 | ASSERT_REG_POSITION(cull, 0x646); | 1213 | ASSERT_REG_POSITION(cull, 0x646); |
| 1192 | ASSERT_REG_POSITION(logic_op, 0x671); | 1214 | ASSERT_REG_POSITION(logic_op, 0x671); |