diff options
| author | 2019-09-18 10:20:33 -0400 | |
|---|---|---|
| committer | 2019-09-19 11:41:32 -0400 | |
| commit | d2ea592ddbf1d236ebb4eb58eedd2d0ffbe92455 (patch) | |
| tree | f4bce3ff46c096a63613b197f018138e8ce22755 /src | |
| parent | Rasterizer: Refactor draw calls, remove deadcode and clean up. (diff) | |
| download | yuzu-d2ea592ddbf1d236ebb4eb58eedd2d0ffbe92455.tar.gz yuzu-d2ea592ddbf1d236ebb4eb58eedd2d0ffbe92455.tar.xz yuzu-d2ea592ddbf1d236ebb4eb58eedd2d0ffbe92455.zip | |
Rasterizer: Address Feedback and conscerns.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 9ca832863..b86aa49f3 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -728,19 +728,19 @@ void RasterizerOpenGL::DrawPrelude() { | |||
| 728 | } | 728 | } |
| 729 | 729 | ||
| 730 | struct DrawParams { | 730 | struct DrawParams { |
| 731 | bool is_indexed; | 731 | bool is_indexed{}; |
| 732 | bool is_instanced; | 732 | bool is_instanced{}; |
| 733 | GLenum primitive_mode; | 733 | GLenum primitive_mode{}; |
| 734 | GLint count; | 734 | GLint count{}; |
| 735 | GLint base_vertex; | 735 | GLint base_vertex{}; |
| 736 | 736 | ||
| 737 | // Indexed settings | 737 | // Indexed settings |
| 738 | GLenum index_format; | 738 | GLenum index_format{}; |
| 739 | GLintptr index_buffer_offset; | 739 | GLintptr index_buffer_offset{}; |
| 740 | 740 | ||
| 741 | // Instanced setting | 741 | // Instanced setting |
| 742 | GLint num_instances; | 742 | GLint num_instances{}; |
| 743 | GLint base_instance; | 743 | GLint base_instance{}; |
| 744 | 744 | ||
| 745 | void DispatchDraw() { | 745 | void DispatchDraw() { |
| 746 | if (is_indexed) { | 746 | if (is_indexed) { |
| @@ -770,7 +770,7 @@ void RasterizerOpenGL::DrawArrays() { | |||
| 770 | auto& maxwell3d = system.GPU().Maxwell3D(); | 770 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 771 | const auto& regs = maxwell3d.regs; | 771 | const auto& regs = maxwell3d.regs; |
| 772 | const auto current_instance = maxwell3d.state.current_instance; | 772 | const auto current_instance = maxwell3d.state.current_instance; |
| 773 | DrawParams draw_call; | 773 | DrawParams draw_call{}; |
| 774 | draw_call.is_indexed = accelerate_draw == AccelDraw::Indexed; | 774 | draw_call.is_indexed = accelerate_draw == AccelDraw::Indexed; |
| 775 | draw_call.num_instances = static_cast<GLint>(1); | 775 | draw_call.num_instances = static_cast<GLint>(1); |
| 776 | draw_call.base_instance = static_cast<GLint>(current_instance); | 776 | draw_call.base_instance = static_cast<GLint>(current_instance); |
| @@ -797,7 +797,7 @@ void RasterizerOpenGL::DrawMultiArrays() { | |||
| 797 | auto& maxwell3d = system.GPU().Maxwell3D(); | 797 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 798 | const auto& regs = maxwell3d.regs; | 798 | const auto& regs = maxwell3d.regs; |
| 799 | const auto& draw_setup = maxwell3d.mme_draw; | 799 | const auto& draw_setup = maxwell3d.mme_draw; |
| 800 | DrawParams draw_call; | 800 | DrawParams draw_call{}; |
| 801 | draw_call.is_indexed = | 801 | draw_call.is_indexed = |
| 802 | draw_setup.current_mode == Tegra::Engines::Maxwell3D::MMMEDrawMode::Indexed; | 802 | draw_setup.current_mode == Tegra::Engines::Maxwell3D::MMMEDrawMode::Indexed; |
| 803 | draw_call.num_instances = static_cast<GLint>(draw_setup.instance_count); | 803 | draw_call.num_instances = static_cast<GLint>(draw_setup.instance_count); |