summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2020-03-13 10:08:57 -0400
committerGravatar GitHub2020-03-13 10:08:57 -0400
commitb30b1f741dcbcb69672d065b0bec4f4a9e5f0993 (patch)
treeb8416dffe6beb924c574ef25755aad12db0a68fb /src/video_core/engines
parentMerge pull request #3483 from namkazt/patch-1 (diff)
parentgl_rasterizer: Implement polygon modes and fill rectangles (diff)
downloadyuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.gz
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.tar.xz
yuzu-b30b1f741dcbcb69672d065b0bec4f4a9e5f0993.zip
Merge pull request #3491 from ReinUsesLisp/polygon-modes
gl_rasterizer: Implement polygon modes and fill rectangles
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/maxwell_3d.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 491cff370..ed7fc8fdd 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -524,6 +524,12 @@ public:
524 FractionalEven = 2, 524 FractionalEven = 2,
525 }; 525 };
526 526
527 enum class PolygonMode : u32 {
528 Point = 0x1b00,
529 Line = 0x1b01,
530 Fill = 0x1b02,
531 };
532
527 struct RenderTargetConfig { 533 struct RenderTargetConfig {
528 u32 address_high; 534 u32 address_high;
529 u32 address_low; 535 u32 address_low;
@@ -705,7 +711,12 @@ public:
705 711
706 s32 clear_stencil; 712 s32 clear_stencil;
707 713
708 INSERT_UNION_PADDING_WORDS(0x7); 714 INSERT_UNION_PADDING_WORDS(0x2);
715
716 PolygonMode polygon_mode_front;
717 PolygonMode polygon_mode_back;
718
719 INSERT_UNION_PADDING_WORDS(0x3);
709 720
710 u32 polygon_offset_point_enable; 721 u32 polygon_offset_point_enable;
711 u32 polygon_offset_line_enable; 722 u32 polygon_offset_line_enable;
@@ -764,7 +775,11 @@ public:
764 BitField<12, 4, u32> viewport; 775 BitField<12, 4, u32> viewport;
765 } clear_flags; 776 } clear_flags;
766 777
767 INSERT_UNION_PADDING_WORDS(0x19); 778 INSERT_UNION_PADDING_WORDS(0x10);
779
780 u32 fill_rectangle;
781
782 INSERT_UNION_PADDING_WORDS(0x8);
768 783
769 std::array<VertexAttribute, NumVertexAttributes> vertex_attrib_format; 784 std::array<VertexAttribute, NumVertexAttributes> vertex_attrib_format;
770 785
@@ -1422,6 +1437,8 @@ ASSERT_REG_POSITION(depth_mode, 0x35F);
1422ASSERT_REG_POSITION(clear_color[0], 0x360); 1437ASSERT_REG_POSITION(clear_color[0], 0x360);
1423ASSERT_REG_POSITION(clear_depth, 0x364); 1438ASSERT_REG_POSITION(clear_depth, 0x364);
1424ASSERT_REG_POSITION(clear_stencil, 0x368); 1439ASSERT_REG_POSITION(clear_stencil, 0x368);
1440ASSERT_REG_POSITION(polygon_mode_front, 0x36B);
1441ASSERT_REG_POSITION(polygon_mode_back, 0x36C);
1425ASSERT_REG_POSITION(polygon_offset_point_enable, 0x370); 1442ASSERT_REG_POSITION(polygon_offset_point_enable, 0x370);
1426ASSERT_REG_POSITION(polygon_offset_line_enable, 0x371); 1443ASSERT_REG_POSITION(polygon_offset_line_enable, 0x371);
1427ASSERT_REG_POSITION(polygon_offset_fill_enable, 0x372); 1444ASSERT_REG_POSITION(polygon_offset_fill_enable, 0x372);
@@ -1435,6 +1452,7 @@ ASSERT_REG_POSITION(rt_separate_frag_data, 0x3EB);
1435ASSERT_REG_POSITION(depth_bounds, 0x3E7); 1452ASSERT_REG_POSITION(depth_bounds, 0x3E7);
1436ASSERT_REG_POSITION(zeta, 0x3F8); 1453ASSERT_REG_POSITION(zeta, 0x3F8);
1437ASSERT_REG_POSITION(clear_flags, 0x43E); 1454ASSERT_REG_POSITION(clear_flags, 0x43E);
1455ASSERT_REG_POSITION(fill_rectangle, 0x44F);
1438ASSERT_REG_POSITION(vertex_attrib_format, 0x458); 1456ASSERT_REG_POSITION(vertex_attrib_format, 0x458);
1439ASSERT_REG_POSITION(rt_control, 0x487); 1457ASSERT_REG_POSITION(rt_control, 0x487);
1440ASSERT_REG_POSITION(zeta_width, 0x48a); 1458ASSERT_REG_POSITION(zeta_width, 0x48a);