xref: /third_party/mesa3d/src/compiler/glsl/tests/warnings/023-switch.vert
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/mesa3d/src/compiler/glsl/tests/warnings/
1bf215546Sopenharmony_ci#version 130
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_civoid main()
4bf215546Sopenharmony_ci{
5bf215546Sopenharmony_ci  int defined = 2;
6bf215546Sopenharmony_ci  int undefined;
7bf215546Sopenharmony_ci  float fooFloat;
8bf215546Sopenharmony_ci  int fooInt;
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_ci  switch(undefined) {
11bf215546Sopenharmony_ci  case 0:
12bf215546Sopenharmony_ci    fooFloat = 0.0;
13bf215546Sopenharmony_ci  case 1:
14bf215546Sopenharmony_ci    fooFloat = 1.0;
15bf215546Sopenharmony_ci  default:
16bf215546Sopenharmony_ci    fooFloat = undefined;
17bf215546Sopenharmony_ci  }
18bf215546Sopenharmony_ci
19bf215546Sopenharmony_ci  switch(defined) {
20bf215546Sopenharmony_ci  case 0:
21bf215546Sopenharmony_ci    fooFloat = 0.0;
22bf215546Sopenharmony_ci  case 1:
23bf215546Sopenharmony_ci    fooFloat = 1.0;
24bf215546Sopenharmony_ci  default:
25bf215546Sopenharmony_ci    fooFloat = undefined;
26bf215546Sopenharmony_ci  }
27bf215546Sopenharmony_ci}
28bf215546Sopenharmony_ci
29

Indexes created Thu Nov 07 10:32:03 CST 2024