yuzu
yuzu copied to clipboard
VideoCore: Fix draw error when InstanceId is used in the vertex shader
The gpu will split multi-instance drawing into multiple drawing commands, and the current drawing scheduling scheme incorrectly identifies this kind of drawing, resulting in the vertex shader unable to obtain the correct instance number.
The currently adopted scheme is consistent with the MME drawing scheduling scheme, accumulating drawing instances and then performing a unified drawing.
Fixed the gpu_console black screen problem, which should also fix other games.
Fwiw just wanted to mention that the Hw does the draw on setIndexCount and setVertexCount rather than vertexEndGl, you might wanna take that into account if it could lead to a cleaner impl
@FernandoS27 this change appears to be safe, tested 20 games, we can tag ea if we want to make entirely sure
@vonchenplus PR this against YFC
I am waiting for the merge of yfc.
@vonchenplus Is this ready for review?
@vonchenplus Is this ready for review?
Yes, keep it that way for now