[SPIR-V] QuadReadLaneAt with a matrix input generates invalid SPIR-V
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the HLSL reproducer in the issue and compile it using the provided DXC SPIR-V command to confirm the invalid matrix result. Compare the generated SPIR-V behavior with the successful DXIL output, which uses six scalar quad reads. Done means SPIR-V validation succeeds and each result element reads the corresponding matrix element from the selected lane.
索引モデルが issue の本文から書いたものです。
説明
Description
QuadReadLaneAt accepts a float2x3 input, but DXC generates invalid
SPIR-V. It emits OpGroupNonUniformQuadBroadcast with a matrix result.
That instruction permits only scalar and vector results.
The same source compiles successfully for DXIL. That output contains six
scalar quad reads, one for each matrix element.
Reproducer
Save this as repro.hlsl:
StructuredBuffer<float2x3> In : register(t0);
RWStructuredBuffer<float2x3> Out : register(u1);
[numthreads(4, 1, 1)]
void main(uint3 ID : SV_DispatchThreadID) {
Out[ID.x] = QuadReadLaneAt(In[ID.x], 0);
}
Compile with:
dxc -spirv -T cs_6_5 -E main -fspv-target-env=vulkan1.3 repro.hlsl
Actual result
Compilation fails during SPIR-V validation:
fatal error: generated SPIR-V is invalid: Result must be a scalar or vector of integer, floating-point, or boolean type
%28 = OpGroupNonUniformQuadBroadcast %mat2v3float %uint_3 %27 %uint_0
Expected result
Compilation succeeds. DXC splits the matrix operation into valid scalar
or vector quad reads. Each result element comes from the same matrix
element in the selected source lane.
- 主要言語
- C++
- スター
- 3.7k
- フォーク
- 926
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 45
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/DirectXShaderCompiler のほかの issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/DirectXShaderCompiler#9173 ·
メンテナーはふだん 2 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/DirectXShaderCompiler#9155 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/DirectXShaderCompiler#9135 ·
メンテナーはふだん 2 日以内に返信
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSL対応中かも @rj123-nv が 18 日前に担当しました。 オープンbug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/DirectXShaderCompiler#9087 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/DirectXShaderCompiler#9086 ·
メンテナーはふだん 2 日以内に返信
microsoft/DirectXShaderCompiler の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
arch-based bug niri
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
noctalia-dev/noctalia#5552 ·
メンテナーはふだん 1 日以内に返信