[SPIR-V] `vk::BufferPointer<T, Alignment>`: stores ignore `Alignment`

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
compilers

調査の方向性

Start by tracing how vk::BufferPointer<T, Alignment> lowers Get() assignment in the SPIR-V backend; the issue provides a minimal HLSL reproducer and Godbolt link. Compare the generated OpStore alignment with the OpLoad alignment, then run the reproducer with the listed DXC flags. Done means the store carries Aligned 16 while the load and other output remain valid.

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

説明

bug needs-triage spirv

Version: DXC (trunk) on godbolt
Flags: -spirv -T cs_6_8 -E main -HV 202x -fspv-target-env=vulkan1.3

[[vk::binding(0,0)]] RWStructuredBuffer<uint32_t> buf;

struct PushData { uint64_t addr; };
[[vk::push_constant]] PushData pc;

[numthreads(64,1,1)]
void main(uint32_t gi : SV_GroupIndex)
{
    vk::BufferPointer<uint32_t, 16> p = vk::BufferPointer<uint32_t, 16>(pc.addr);
    uint32_t v = p.Get();      // OpLoad ... Aligned 16
    p.Get() = v + 1u;          // OpStore ... Aligned 4  (expected 16)
    buf[gi] = v;
}

godbolt link: https://godbolt.org/z/vPvxeW17h

Expected: OpStore %ptr %val Aligned 16.
Actual:

%26 = OpLoad %uint %25 Aligned 16
      OpStore %25 %27 Aligned 4
主要言語
C++
スター
3.7k
フォーク
926
平均マージ
3日 22時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

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

microsoft/DirectXShaderCompiler のほかの issue

microsoft/DirectXShaderCompiler の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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