Make the "switch-label not followed by statement" warning an error, depending on version.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
spv.switch.frag
|
||||
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
|
||||
WARNING: 0:121: 'switch' : last case/default label not followed by statements
|
||||
WARNING: 0:134: 'switch' : last case/default label not followed by statements
|
||||
WARNING: 0:139: 'switch' : last case/default label not followed by statements
|
||||
@@ -11,7 +12,7 @@ Linked fragment stage:
|
||||
// Generated by (magic number): 51a00bb
|
||||
// Id's are bound by 261
|
||||
|
||||
Source ESSL 300
|
||||
Source ESSL 310
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
switch.frag
|
||||
ERROR: 0:11: 'switch' : condition must be a scalar integer expression
|
||||
ERROR: 0:14: 'switch' : condition must be a scalar integer expression
|
||||
WARNING: 0:21: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:21: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:28: 'switch' : cannot have statements before first case/default label
|
||||
ERROR: 0:43: 'default' : duplicate label
|
||||
ERROR: 0:63: 'case' : duplicated value
|
||||
@@ -15,10 +15,10 @@ ERROR: 0:115: 'default' : cannot be nested inside control flow
|
||||
ERROR: 0:119: 'case' : cannot appear outside switch statement
|
||||
ERROR: 0:120: 'default' : cannot appear outside switch statement
|
||||
ERROR: 0:126: 'onlyInSwitch' : undeclared identifier
|
||||
WARNING: 0:128: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:128: 'switch' : last case/default label not followed by statements
|
||||
ERROR: 0:140: 'nestedX' : undeclared identifier
|
||||
ERROR: 0:157: 'nestedZ' : undeclared identifier
|
||||
ERROR: 17 compilation errors. No code generated.
|
||||
ERROR: 19 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 300
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#version 300 es
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
uniform int c, d;
|
||||
in float x;
|
||||
|
||||
Reference in New Issue
Block a user