Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#pragma osl nowarn
suppresses warning on the following source line. (…
…#864) This sets the precedent that all future osl pragmas will start with `#pragma osl`, and that any other token after the `#pragma` will be ignored.
- Loading branch information
Showing
7 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Compiled test.osl -> test.oso | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
|
||
# This shader would ordinarily issue a warning. | ||
# With -Werror, it should be upgraded to an error. | ||
oslcargs = "-Werror" | ||
|
||
# BUT... the shader carefully uses #pragma nowarn to disable the warning. | ||
# Which should cause the test to pass. | ||
|
||
command = testshade("test") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Engineer an ambiguous case that should be a warning | ||
|
||
normal func () { return 1; } | ||
vector func () { return 2; } | ||
|
||
shader test () | ||
{ | ||
#pragma osl nowarn | ||
point p = func(); | ||
} |