Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array of struct not allowed as parameters #1910

Open
ld-kerley opened this issue Dec 20, 2024 · 0 comments
Open

Array of struct not allowed as parameters #1910

ld-kerley opened this issue Dec 20, 2024 · 0 comments

Comments

@ld-kerley
Copy link

Problem

Posting this as a result of this comment made by Larry.

Not sure this is really a problem, but Larry thought it might be.

Currently this generates a compile error.

struct textureresource
{
    string filename;
    string colorspace;
};

shader test_shader
(
    textureresource files[2] = {{"",""},{"",""}},
    output float out = 0
)
{}

generates the following compile error.

> oslc test.osl
test.osl:9: error: array of struct are not allowed as parameters
FAILED test.osl

Steps to Reproduce

  1. compile code above.

Versions

  • OSL branch/version: 1.13.8
  • OS: macOS
  • C++ compiler:
  • LLVM version: 17.0.6
  • OIIO version: 2.5.9.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant