summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/indices
diff options
context:
space:
mode:
authorMarc-Andre Lureau <marcandre.lureau@gmail.com>2015-02-27 19:40:19 +0100
committerIlia Mirkin <imirkin@alum.mit.edu>2015-03-04 00:15:22 -0500
commit073a5d2e84ac9d95f0d037aeb04889822e76aa4e (patch)
tree2cd06c5e1dd227c016407e33adec99c0bfd29163 /src/gallium/auxiliary/indices
parentb77576edc1a8010e5457f82b41c335ae27cb066b (diff)
downloadexternal_mesa3d-073a5d2e84ac9d95f0d037aeb04889822e76aa4e.zip
external_mesa3d-073a5d2e84ac9d95f0d037aeb04889822e76aa4e.tar.gz
external_mesa3d-073a5d2e84ac9d95f0d037aeb04889822e76aa4e.tar.bz2
gallium/auxiliary/indices: fix start param
Since commit 28f3f8d, indices generator take a start parameter. However, some index values have been left to start at 0. This fixes the glean/fbo test with the virgl driver, and copytexsubimage with freedreno. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/gallium/auxiliary/indices')
-rw-r--r--src/gallium/auxiliary/indices/u_indices_gen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/indices/u_indices_gen.py b/src/gallium/auxiliary/indices/u_indices_gen.py
index 2714df8..f05b70a 100644
--- a/src/gallium/auxiliary/indices/u_indices_gen.py
+++ b/src/gallium/auxiliary/indices/u_indices_gen.py
@@ -193,7 +193,7 @@ def lineloop(intype, outtype, inpv, outpv):
print ' for (i = start, j = 0; j < nr - 2; j+=2, i++) { '
do_line( intype, outtype, 'out+j', 'i', 'i+1', inpv, outpv );
print ' }'
- do_line( intype, outtype, 'out+j', 'i', '0', inpv, outpv );
+ do_line( intype, outtype, 'out+j', 'i', 'start', inpv, outpv );
postamble()
def tris(intype, outtype, inpv, outpv):
@@ -218,7 +218,7 @@ def tristrip(intype, outtype, inpv, outpv):
def trifan(intype, outtype, inpv, outpv):
preamble(intype, outtype, inpv, outpv, prim='trifan')
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
- do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
+ do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
print ' }'
postamble()
@@ -228,9 +228,9 @@ def polygon(intype, outtype, inpv, outpv):
preamble(intype, outtype, inpv, outpv, prim='polygon')
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
if inpv == FIRST:
- do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
+ do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
else:
- do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', '0', inpv, outpv );
+ do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', 'start', inpv, outpv );
print ' }'
postamble()