Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

asymmetry for userdata vs attributes with ShadingSystemImpl::getattribute

未关闭
#1,622 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
cpp
领域
compilers

调研方向

从 src/liboslexec/shadingsys.cpp 第 1927 行附近开始,比较 LLVM 编译期间公开的 userdata 和属性查询数据。定义属性类型、偏移量和导数的对等性应意味着什么,包括是否应统一现有名称;完成的标准是两个查询路径提供相同的能力。

由索引模型根据 Issue 内容生成。

描述

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!

主要语言
C++
星标
2.3k
派生
414
平均合并
2 天 14 小时
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AcademySoftwareFoundation/OpenShadingLanguage 的其他 Issue

查看 AcademySoftwareFoundation/OpenShadingLanguage 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。