mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
gallium/indices: implement prim-restart for triangle fans
Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5976>
This commit is contained in:
parent
dfc0a62994
commit
c2e9cd3f77
1 changed files with 6 additions and 0 deletions
|
|
@ -288,6 +288,12 @@ def tristrip(intype, outtype, inpv, outpv, pr):
|
|||
def trifan(intype, outtype, inpv, outpv, pr):
|
||||
preamble(intype, outtype, inpv, outpv, pr, prim='trifan')
|
||||
print(' for (i = start, j = 0; j < out_nr; j+=3, i++) { ')
|
||||
|
||||
if pr == PRENABLE:
|
||||
def close_func(index):
|
||||
print(' start = i;')
|
||||
prim_restart(3, 3, 1, close_func)
|
||||
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
print(' }')
|
||||
postamble()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue