commit b0c953b665aa5bfd9f218f68f045206399f43593
parent c8288c8522f4fe073ed2586eef8e5928548f16fb
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Tue, 27 Feb 2018 13:45:23 +0100
Change my trg test to have more different media.
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/test_senc_many_triangles.c b/src/test_senc_many_triangles.c
@@ -85,16 +85,16 @@ main(int argc, char** argv)
CHK(senc_device_create (NULL, &allocator, SENC_NTHREADS_DEFAULT, 1, &dev)
== RES_OK);
+#define NB_CYL 10
/* Create the scene */
- CHK(senc_scene_create(dev, 2, &scn) == RES_OK);
+ CHK(senc_scene_create(dev, NB_CYL/2+1, &scn) == RES_OK);
ctx.ctx.positions = NULL;
ctx.ctx.indices = NULL;
ctx.ctx.scale = 1;
ctx.ctx.reverse_vrtx = 0;
ctx.ctx.reverse_med = 0;
- ctx.ctx.front_media = medium0;
- ctx.ctx.back_media = medium1;
+ ctx.ctx.back_media = medium0;
/* Create a cylinder (320 K trg, 160 K vrtx). */
CHK(s3dut_create_cylinder(&allocator, 1, 2, 400, 400, &cyl) == RES_OK);
S3DUT(mesh_get_data(cyl, &ctx.data));
@@ -102,8 +102,9 @@ main(int argc, char** argv)
ASSERT(ctx.data.nvertices < UINT_MAX);
cyl_trg_count = (unsigned)ctx.data.nprimitives;
cyl_vrtx_count = (unsigned)ctx.data.nvertices;
-#define NB_CYL 10
FOR_EACH(i, 0, NB_CYL) {
+ unsigned mmm = i/2;
+ ctx.ctx.front_media = &mmm;
d3(ctx.ctx.offset, 0, 0, i * 10);
CHK(senc_scene_add_geometry(scn, cyl_trg_count, get_s3dut_indices,
get_s3dut_media, NULL, cyl_vrtx_count, get_s3dut_position, &ctx)