From d20be933b402a3ced25eccf35a5b651a6a34b63b Mon Sep 17 00:00:00 2001 From: FengChen Date: Wed, 12 Oct 2022 10:47:43 +0800 Subject: [PATCH] Fix index_buffer(32/16/8)_first draw error --- src/video_core/engines/maxwell_3d.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index dc1139e8b3..cc2433a58e 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -214,16 +214,22 @@ void Maxwell3D::ProcessMethodCall(u32 method, u32 argument, u32 nonshadow_argume regs.index_buffer.count = regs.index_buffer32_first.count; regs.index_buffer.first = regs.index_buffer32_first.first; dirty.flags[VideoCommon::Dirty::IndexBuffer] = true; + draw_state.current_mode = DrawMode::Indexed; + draw_state.gl_end_count = draw_state.instance_count = 1; return FlushInlineDraw(); case MAXWELL3D_REG_INDEX(index_buffer16_first): regs.index_buffer.count = regs.index_buffer16_first.count; regs.index_buffer.first = regs.index_buffer16_first.first; dirty.flags[VideoCommon::Dirty::IndexBuffer] = true; + draw_state.current_mode = DrawMode::Indexed; + draw_state.gl_end_count = draw_state.instance_count = 1; return FlushInlineDraw(); case MAXWELL3D_REG_INDEX(index_buffer8_first): regs.index_buffer.count = regs.index_buffer8_first.count; regs.index_buffer.first = regs.index_buffer8_first.first; dirty.flags[VideoCommon::Dirty::IndexBuffer] = true; + draw_state.current_mode = DrawMode::Indexed; + draw_state.gl_end_count = draw_state.instance_count = 1; return FlushInlineDraw(); case MAXWELL3D_REG_INDEX(topology_override): use_topology_override = true;