mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
gallium/indices: use prim_restart-helper for polygon
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
3aa4f64e8d
commit
dfc0a62994
1 changed files with 3 additions and 22 deletions
|
|
@ -298,28 +298,9 @@ def polygon(intype, outtype, inpv, outpv, pr):
|
|||
preamble(intype, outtype, inpv, outpv, pr, prim='polygon')
|
||||
print(' for (i = start, j = 0; j < out_nr; j+=3, i++) { ')
|
||||
if pr == PRENABLE:
|
||||
print('restart:')
|
||||
print(' if (i + 3 > in_nr) {')
|
||||
print(' (out+j+0)[0] = restart_index;')
|
||||
print(' (out+j+0)[1] = restart_index;')
|
||||
print(' (out+j+0)[2] = restart_index;')
|
||||
print(' continue;')
|
||||
print(' }')
|
||||
print(' if (in[i + 0] == restart_index) {')
|
||||
print(' i += 1;')
|
||||
print(' start = i;')
|
||||
print(' goto restart;')
|
||||
print(' }')
|
||||
print(' if (in[i + 1] == restart_index) {')
|
||||
print(' i += 2;')
|
||||
print(' start = i;')
|
||||
print(' goto restart;')
|
||||
print(' }')
|
||||
print(' if (in[i + 2] == restart_index) {')
|
||||
print(' i += 3;')
|
||||
print(' start = i;')
|
||||
print(' goto restart;')
|
||||
print(' }')
|
||||
def close_func(index):
|
||||
print(' start = i;')
|
||||
prim_restart(3, 3, 1, close_func)
|
||||
|
||||
if inpv == FIRST:
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue