Re: [Mesa-dev] [PATCH] radeonsi: fix gl_BaseVertex value in non-indexed draws

2017-04-10 Thread Marek Olšák
Hi Nicolai, I think there is a simpler way to do this. Instead of going through update_shaders, we can just set some bit in a user data SGPR e.g. SI_SGPR_VS_STATE_BITS[1] and the vertex shader can clear gl_BaseVertex based on that bit. There is no performance concern due to additional instructions

[Mesa-dev] [PATCH] radeonsi: fix gl_BaseVertex value in non-indexed draws

2017-04-07 Thread Nicolai Hähnle
From: Nicolai Hähnle gl_BaseVertex is supposed to be 0 in non-indexed draws. Unfortunately, the way they're implemented, the VGT always generates indices starting at 0, and the VS prolog adds the start index. There's a VGT_INDX_OFFSET register which causes the VGT to start at a driver-defined in