From a32e3bd01402fd9a9aa7a626295162840d8fde50 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 26 Apr 2019 14:14:08 +0000 Subject: [PATCH] Metal: Invert CW and CCW because we compile with flip Y BUG=dawn:43 Change-Id: I6d09118d141046cd307604b1b4d53a82d8d15bf6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6761 Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/metal/RenderPipelineMTL.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dawn_native/metal/RenderPipelineMTL.mm b/src/dawn_native/metal/RenderPipelineMTL.mm index 0397ba6e59..b96416cb98 100644 --- a/src/dawn_native/metal/RenderPipelineMTL.mm +++ b/src/dawn_native/metal/RenderPipelineMTL.mm @@ -283,10 +283,11 @@ namespace dawn_native { namespace metal { } MTLWinding MTLFrontFace(dawn::FrontFace face) { + // Note that these are inverted because we flip the Y coordinate in the vertex shader switch (face) { - case dawn::FrontFace::CCW: - return MTLWindingCounterClockwise; case dawn::FrontFace::CW: + return MTLWindingCounterClockwise; + case dawn::FrontFace::CCW: return MTLWindingClockwise; } }