OpenShadingLanguage icon indicating copy to clipboard operation
OpenShadingLanguage copied to clipboard

asymmetry for userdata vs attributes with ShadingSystemImpl::getattribute

Open etheory opened this issue 2 years ago • 0 comments

Problem

In https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/bd7fd4cf8cd4b0b75c52715737b64b204bc585bf/src/liboslexec/shadingsys.cpp#L1927 we have:

  • num_userdata
  • userdata_names
  • userdata_types
  • userdata_offsets
  • userdata_derivs

but only:

  • num_attributes_needed
  • attributes_needed
  • attribute_scopes
  • unknown_attributes_needed

which is missing a types, offsets and derivs for attributes.

This issue is to log the need for parity across these.

The mis-matching names are already a little bit confusing, so some kind of homogenization would also make sense.

Expected behavior:

I expect userdata and attributes to provide the same abilities for query during llvm compilation.

Actual behavior:

I don't have parity for userdata and attribute queries.

Steps to Reproduce

NA

Versions

  • OSL branch/version: ALL
  • OS: ALL
  • C++ compiler: ALL
  • LLVM version: ALL
  • OIIO version: ALL

NOTE

I know this should be a PR, which I'll try and get to, but for the moment, I figured an issue would make sense.

Thanks!

etheory avatar Nov 18 '22 05:11 etheory