Fail gracefully when Metal encounters a geometry shader.

Change-Id: I452e52a87d89cefb5c21a0d9d57e9771f3038d73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319783
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
John Stiles 2020-09-25 15:51:28 -04:00 committed by Skia Commit-Bot
parent 1b6a43cf20
commit 3fabfc0bd1
6 changed files with 13 additions and 6 deletions

View File

@ -938,7 +938,8 @@ void MetalCodeGenerator::writeFunction(const FunctionDefinition& f) {
this->write("vertex Outputs vertexMain");
break;
default:
SkDEBUGFAIL("unsupported kind of program");
fErrors.error(-1, "unsupported kind of program");
return;
}
this->write("(Inputs _in [[stage_in]]");
if (-1 != fUniformBuffer) {

View File

@ -1,3 +1,4 @@
### Compilation failed:
unsupported kind of program
error: 1: unsupported kind of program
1 error

View File

@ -1,3 +1,4 @@
### Compilation failed:
unsupported kind of program
error: 1: unsupported kind of program
1 error

View File

@ -1,3 +1,4 @@
### Compilation failed:
unsupported kind of program
error: 1: unsupported kind of program
1 error

View File

@ -1,3 +1,4 @@
### Compilation failed:
unsupported kind of program
error: 1: unsupported kind of program
1 error

View File

@ -1,3 +1,5 @@
### Compilation failed:
unsupported kind of program
error: 1: Metal uniforms must have 'layout(set=...)'
error: 1: unsupported kind of program
2 errors