From 909ba638a383a7123fbdfd6bb9e7bb2d0e35ab2a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 1 Jun 2020 03:24:43 +0900 Subject: [PATCH] shader: Add more shadowing tests --- internal/shader/shader_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/shader/shader_test.go b/internal/shader/shader_test.go index d91d959e8..fe4ca2f11 100644 --- a/internal/shader/shader_test.go +++ b/internal/shader/shader_test.go @@ -88,6 +88,11 @@ func Foo(foo vec2) vec4 { var foo vec4 r.z = foo.z } + { + r.y = foo.y + var foo vec4 + r.z = foo.z + } } return r }`, @@ -101,6 +106,11 @@ func Foo(foo vec2) vec4 { (l2).y = (l3).y; (l2).z = (l4).z; } + { + vec4 l4 = vec4(0.0); + (l2).y = (l3).y; + (l2).z = (l4).z; + } } l1 = l2; return;