mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
gallium/aux: reorder vertex attributes in triangle fans according to PV
With triangle fans when "first vertex convention" is active the provoking vertex is actually the second vertex so that the different triangle can have different colors with flat shading. Take this into account when re-ordering the vertex indices (as proposed by Erik) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5976>
This commit is contained in:
parent
f5cce8929a
commit
fcc7a1e7b6
1 changed files with 5 additions and 1 deletions
|
|
@ -294,7 +294,11 @@ def trifan(intype, outtype, inpv, outpv, pr):
|
|||
print(' start = i;')
|
||||
prim_restart(3, 3, 1, close_func)
|
||||
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
if inpv == FIRST:
|
||||
do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', 'start', inpv, outpv );
|
||||
else:
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
|
||||
print(' }')
|
||||
postamble()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue