AcademySoftwareFoundation / OpenShadingLanguage

Advanced shading language for production GI renderers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asymmetry for userdata vs attributes with ShadingSystemImpl::getattribute

etheory opened this issue · comments

Problem

In

ShadingSystemImpl::getattribute(ShaderGroup* group, string_view name,
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!