[SPIR-V] Mesh shader output writes are dropped or produce invalid SPIR-V
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Reproduce each numbered case separately with the dxc command in the issue, using repro.hlsl and one numbered line at a time. The four failures are dropped out-parameter writes, invalid SPIR-V for a single-component SV_Position write under -fvk-invert-y, invalid SPIR-V for bool2 outputs, and dropped inherited struct fields in mesh output writes. Done means each case produces valid SPIR-V with the write reaching the output variable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Four kinds of write to mesh shader out vertices elements are mishandled:
- Passing an output to an out parameter silently drops the write.
- With -fvk-invert-y, writing one component of SV_Position produces invalid SPIR-V.
- Writing a bool2 output produces invalid SPIR-V.
- Writing a vertex or primitive output whose struct inherits fields from a base struct silently drops the inherited fields.
Steps to Reproduce
struct V { float4 pos : SV_Position; bool2 flag : FLAG; };
void setPos(out float4 p) { p = float4(1, 2, 3, 1); }
[numthreads(1, 1, 1)] [outputtopology("triangle")]
void main(out vertices V v[3], out indices uint3 t[1]) {
SetMeshOutputCounts(3, 1);
t[0] = uint3(0, 1, 2);
setPos(v[0].pos); // (1)
v[1].pos.x = 4; // (2)
v[2].flag = bool2(true, false); // (3)
}
struct Base { float a : A; };
struct V : Base { float4 pos : SV_Position; };
[numthreads(1, 1, 1)] [outputtopology("triangle")]
void main(out vertices V v[3], out indices uint3 t[1]) {
SetMeshOutputCounts(3, 1);
t[0] = uint3(0, 1, 2);
V e = (V)0;
e.a = 1;
v[0] = e; // (4)
}
dxc -T ms_6_5 -E main -spirv -fspv-target-env=vulkan1.3 -fvk-invert-y -fcgl repro.hlsl
Keep only one numbered line at a time to see each failure on its own.
Actual Behavior
- setPos writes to a function-local copy of v, and nothing is stored to gl_Position.
- fatal error: generated SPIR-V is invalid: Reached non-composite type while indexes still remain to be traversed.
- fatal error: generated SPIR-V is invalid: OpAccessChain result type ... %v2bool ... does not match ... %v2uint
- out.var.A is declared, but nothing is ever stored to it; only gl_Position is written.
Environment
• DXC version: 1.10.2609.0
• Host Operating System: Windows
- Ngôn ngữ chính
- C++
- Star
- 3.7k
- Fork
- 926
- Merge trung bình
- 3 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/DirectXShaderCompiler
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/DirectXShaderCompiler#9173 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
microsoft/DirectXShaderCompiler#9155 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/DirectXShaderCompiler#9135 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSLCó thể đã có người làm @rj123-nv đã nhận 18 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/DirectXShaderCompiler#9087 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/DirectXShaderCompiler#9086 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/DirectXShaderCompiler
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
arch-based bug niri
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
noctalia-dev/noctalia#5552 ·
Maintainer thường phản hồi trong vòng 1 ngày