imageworks/OpenShadingLanguage — pull request #263 by brechtvl (2013-06-18 23:09:32+00:00)
Title: Fix missing output of shader parameters when returning from a block

If you have test two shaders:
```
shader test_a(output float f = 0.0)
{
if(P[0] >= 0.0) {
f = 1.0;
return;
}
}
```

```
shader test_b(float f = 2.0)
{
printf("%f\n", f);
}
```

and link them like this:
```
./testshade --layer layer_a test_a --layer layer_b test_b --connect layer_a f layer_b f
```

Then it will output `0.0`. When removing the `return;` statement from the first shader, which you would expect to have no influence, the output will be `1.0`.

The `return;` statement would skip transferring the layer outputs into downstream shader's inputs, so I moved that code into the `exit_instance_block`. The tests pass with this fix, though I feel like I'm missing something obvious as I would expect someone to have encountered this bug already.