Bug 98025

Summary: [radeonsi] incorrect primitive restart index used
Product: Mesa Reporter: James Legg <jlegg>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: VERIFIED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Apitrace reproducing the issue
Patch fixing issue

Description James Legg 2016-10-03 09:58:07 UTC
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).
Comment 1 James Legg 2016-10-03 09:59:48 UTC
Created attachment 126962 [details] [review]
Patch fixing issue
Comment 2 Grazvydas Ignotas 2016-10-04 12:17:21 UTC
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.
Comment 3 James Legg 2016-10-04 13:34:28 UTC
I've sent the patch to mesa-dev. It now appears here: https://patchwork.freedesktop.org/patch/113613/
Comment 4 Marek Olšák 2016-10-04 14:04:44 UTC
Pushed as e33f31d61f5e9019f8b0bac0378dfb8fd1147421. Thanks for the patch. Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.