From c02213e900135c154973b84e4c4213d6382d51a0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 13 Jul 2020 01:48:00 +0900 Subject: [PATCH] shader: Use the loop counters in the test --- internal/shader/testdata/for.expected.vs | 4 ++-- internal/shader/testdata/for.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/shader/testdata/for.expected.vs b/internal/shader/testdata/for.expected.vs index 50e8f67cf..1c575cb3d 100644 --- a/internal/shader/testdata/for.expected.vs +++ b/internal/shader/testdata/for.expected.vs @@ -3,11 +3,11 @@ void F0(out vec2 l0) { vec2 l3 = vec2(0); l1 = vec2(0.0); for (int l2 = 0; l2 < 100; l2++) { - (l1).x = ((l1).x) + (1); + (l1).x = ((l1).x) + (l2); } l3 = vec2(0.0); for (float l4 = 10.0; l4 >= 0.0; l4 -= 2.0) { - (l3).x = ((l3).x) - (1); + (l3).x = ((l3).x) + (l4); } l0 = l1; return; diff --git a/internal/shader/testdata/for.go b/internal/shader/testdata/for.go index 911ac3cf9..60c5640ad 100644 --- a/internal/shader/testdata/for.go +++ b/internal/shader/testdata/for.go @@ -3,11 +3,11 @@ package main func Foo() vec2 { v := vec2(0) for i := 0; i < 100; i++ { - v.x++ + v.x += i } v2 := vec2(0) for i := 10.0; i >= 0; i -= 2 { - v2.x-- + v2.x += i } return v }