Created attachment 126961 [details]
Apitrace reproducing the issue
With radeonsi, If primitive restart is enabled for two consecutive draws which use different primitive restart indices, then the first draw's primitive restart index is incorrectly used for the second draw.
The attached apitrace reproduces the issue. The first and second draws should draw the same thing. The first is using a primitive restart index of 0xFFFFFFFF, and the second is using 0xFFFF (these are set using fixed index primitive restart and different index types).
Created attachment 126962 [details] [review]
Patch fixing issue
It's best to send patches to mesa-dev for review and inclusion. You might need to subscribe, but you can opt-out of receiving anything from the list.
I've sent the patch to mesa-dev. It now appears here: https://patchwork.freedesktop.org/patch/113613/
Pushed as e33f31d61f5e9019f8b0bac0378dfb8fd1147421. Thanks for the patch. Closing.