descriptor indexing example

オープン
#1,441 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

リンク先の行 127-149 にある samples/extensions/descriptor_indexing/descriptor_indexing.cpp から始め、render 呼び出しと command buffer の送信にわたって current_buffer がどのように変化するかを追跡します。descriptor の更新タイミングを GPU アクセスおよびこの例の同期フローと照らし合わせて確認します。この例が自身のコメントに違反しているかどうかを解決し、この例を修正するか説明をドキュメント化すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I have a question on the descriptor indexing example.
As far as I know, DescriptorIndexing::render is called every from to record commands on a command buffer and submit the buffer for rendering. To show how to use the descriptor indexing extension, it binds descriptors.descriptor_set_update_after_bind, and then update it in the loop.

https://github.com/KhronosGroup/Vulkan-Samples/blob/8e966ebfad343112286ed705eca6be4472dd85df/samples/extensions/descriptor_indexing/descriptor_indexing.cpp#L127-L149

However as its comment says "We can update descriptors at any time, as long as the GPU is not actually accessing the descriptor.", it is updating while the GPU is accessing it. In my debugging, current_buffer variable changes like this: 0, 1, 2, 0, 1, 2. This means we get the current_buffer 0 and record and submit with it for frame 0, and then for frame 1, we don't wait for frame 0 and just update the descriptorset and submit it. While updating the desciptor set for frame 1, the frame 0 is not done yet, which means the GPU could be accessing the descriptorset.

In this case, I think the example is doing what the comment says you should not do. Please correct me If I'm wrong. Thanks.

主要言語
C++
スター
5.4k
フォーク
848
平均マージ
6日 25分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

KhronosGroup/Vulkan-Samples のほかの issue

KhronosGroup/Vulkan-Samples の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。