Kode / Kinc

Modern low level game library and hardware abstraction.
http://kinc.tech
zlib License
511 stars 121 forks source link

Flickering/Possible Sync issue when reusing index buffer on Metal #831

Open oxue opened 9 months ago

oxue commented 9 months ago

Describe the bug have 2 draw calls per frame Reuse index buffer with differently "alignment" so go 012 123 for the first draw and 012345 for second draw call.

we see flickering on Metal but not on HTML5.

basically I thinkn index buffer is corrupted between the draw calls.

here is an example: https://github.com/oxue/kha_repro_1

To Reproduce https://github.com/oxue/kha_repro_1

have 2 draw calls per frame Reuse index buffer with differently "alignment" so go 012 123 for the first draw and 012345 for second draw call.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image

THAT smiley on the left should not be triangle.

Execution Environment:

Additional context Add any other context about the problem here.