diff options
author | FengChen <vonchenplus@gmail.com> | 2022-10-21 09:38:50 +0200 |
---|---|---|
committer | FengChen <vonchenplus@gmail.com> | 2022-10-21 11:09:22 +0200 |
commit | 1f54cd4ac78dd1af48490dcc404bec4adf2876f3 (patch) | |
tree | 92b3ef5859262f2141e90344cd9179ed8895ec23 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #9088 from Fdawgs/chore/images (diff) | |
download | yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar.gz yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar.bz2 yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar.lz yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar.xz yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.tar.zst yuzu-1f54cd4ac78dd1af48490dcc404bec4adf2876f3.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index e5c09a969..21bac6ebf 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -205,7 +205,7 @@ void RasterizerOpenGL::Clear() { ++num_queued_commands; } -void RasterizerOpenGL::Draw(bool is_indexed, bool is_instanced) { +void RasterizerOpenGL::Draw(bool is_indexed, u32 instance_count) { MICROPROFILE_SCOPE(OpenGL_Drawing); SCOPE_EXIT({ gpu.TickWork(); }); @@ -228,8 +228,7 @@ void RasterizerOpenGL::Draw(bool is_indexed, bool is_instanced) { BeginTransformFeedback(pipeline, primitive_mode); const GLuint base_instance = static_cast<GLuint>(maxwell3d->regs.global_base_instance_index); - const GLsizei num_instances = - static_cast<GLsizei>(is_instanced ? maxwell3d->mme_draw.instance_count : 1); + const GLsizei num_instances = static_cast<GLsizei>(instance_count); if (is_indexed) { const GLint base_vertex = static_cast<GLint>(maxwell3d->regs.global_base_vertex_index); const GLsizei num_vertices = static_cast<GLsizei>(maxwell3d->regs.index_buffer.count); |