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 <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-04-26 14:14:08 +00:00 committed by Commit Bot service account
parent 15d4c2e63b
commit a32e3bd014
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}
}