From 8604eb44955c95e487f00952c5eff89edb0e433b Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 14 Jul 2020 19:43:02 +0000 Subject: [PATCH] Update cube example This Cl updates the cube example to use unique names for the entry points and fixes the duplicate name used for fragColor between the vertex and fragment shaders. Change-Id: Icb77897bac88f7641cab2702b37573bfd771a586 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24781 Reviewed-by: David Neto --- test/cube.wgsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cube.wgsl b/test/cube.wgsl index ff56db5ed6..f5732c70b8 100644 --- a/test/cube.wgsl +++ b/test/cube.wgsl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -entry_point vertex as "main" = vtx_main; -entry_point fragment as "main" = frag_main; +entry_point vertex = vtx_main; +entry_point fragment = frag_main; # Vertex shader type Uniforms = struct { @@ -24,12 +24,12 @@ type Uniforms = struct { [[location 0]] var cur_position : vec4; [[location 1]] var color : vec4; -[[location 0]] var fragColor : vec4; +[[location 0]] var vtxFragColor : vec4; [[builtin position]] var Position : vec4; fn vtx_main() -> void { Position = uniforms.modelViewProjectionMatrix * cur_position; - fragColor = color; + vtxFragColor = color; return; }