[BUG] Bad output indices from `pointcloud_search()` with batched shading
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 40/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
示されている oslc と testshade コマンドを testsuite/pointcloud-fold/cloud.geo に対して実行し、バッチ処理と非バッチ処理の出力を比較します。エントリポイント pointcloud_search から開始し、バッチ実行中に出力インデックス配列がどのように処理されるかを追跡します。workaround なしで batched.png が期待される非バッチ結果と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When using pointcloud_search() with batched shader execution, the output indices array is not being filled correctly. It looks a little like OSL thinks the output is a uniform rather than a varying value, but I don't know enough about what is going on under the hood to be sure.
OSL version and dependencies
- OSL branch/version: 1.14.5.1
- OS: Rocky 8.8
- C++ compiler: GCC 11.2.1
- LLVM version: 15.0.7
- OIIO version: 3.0.6.1
To Reproduce
Steps to reproduce the behavior:
oslc search.osl(source code in section below).testshade -g 16 16 -batched -param file cloud.geo search.oso -o Cout batched.pngtestshade -g 16 16 -param file cloud.geo search.oso -o Cout unbatched.png- Compare
batched.pngtounbatched.png. The latter has the expected results, and the former does not.
In the above commands, cloud.geo is testsuite/pointcloud-fold/cloud.geo from the OSL repo.
Evidence
search.osl
shader search( string file = "", output color Cout = 0 )
{
int indices[1];
// Uncommenting this workaround gives the expected results in batched
// mode. I suspect it works by tricking OSL into realising that `indices`
// is a varying quantity.
// indices[0] = P[0];
if( pointcloud_search( file, P, 1, 1, "index", indices ) )
{
Cout = color( indices[0] / 15.0 );
}
else
{
Cout = color( 1, 0, 0 );
}
}
batched.png :
unbatched.png :
- 主要言語
- C++
- スター
- 2.3k
- フォーク
- 415
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 14
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AcademySoftwareFoundation/OpenShadingLanguage のほかの issue
-
build / testing / port / CI
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AcademySoftwareFoundation/OpenShadingLanguage#2148 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AcademySoftwareFoundation/OpenShadingLanguage#2109 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
AcademySoftwareFoundation/OpenShadingLanguage#2175 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
AcademySoftwareFoundation/OpenShadingLanguage#2146 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
AcademySoftwareFoundation/OpenShadingLanguage#2135 ·
メンテナーはふだん 1 日以内に返信
AcademySoftwareFoundation/OpenShadingLanguage の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
espressif/esp-matter#1867 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
cuAmpcorParameter.cpp (CPU pycuampcor) does not compile with libc++: EXIT_FAILURE is undeclaredオープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
isce-framework/isce3#387 ·
-
upstream update
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
conan-io/conan-center-index#31055 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信