-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix: incorrect instance merging when unspecified-length arrays di…
…ffered. (#656) Because the altered data offset wasn't transferred from the instance overrides to the instance's full symbol table, it was comparing the default values rather than the actual values, so two instances that should not have been merged, were merged. Also fixed a (harmless) bug in ShadingSystemImpl::ShaderGroupBegin, where the serialized group is parsed, where it was double-calling Parameter() to add the parameters. Fixes #655
- Loading branch information
Showing
8 changed files
with
43 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
shader arrayparam( | ||
color in_value[] = { color(1) }, | ||
output color out_value = in_value[0] ) | ||
{ | ||
} |
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,4 @@ | ||
Compiled arrayparam.osl -> arrayparam.oso | ||
Compiled simple.osl -> simple.oso | ||
1.000000 0.000000 1.000000 | ||
|
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,7 @@ | ||
#!/usr/bin/env python | ||
|
||
# This is a regression test for a bug in which instance merging was | ||
# done incorrectly for shaders that differed only in the values given | ||
# to parameters which were arrays of unspecified length. | ||
|
||
command = testshade("--group data/shadergroup") |
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,7 @@ | ||
param color[1] in_value 0 0 1 ; | ||
shader arrayparam param_node_2 ; | ||
param color[1] in_value 1 0 0 ; | ||
shader arrayparam param_node_1 ; | ||
shader simple simple_surface ; | ||
connect param_node_1.out_value simple_surface.a ; | ||
connect param_node_2.out_value simple_surface.b ; |
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,7 @@ | ||
surface simple( | ||
color a = color(0), | ||
color b = color(0) ) | ||
{ | ||
printf("%f\n", a + b); | ||
Ci = emission() * (a + b); | ||
} |