[SPIR-V] `vk::ext_capability` on a `vk::SpirvType` type alias is not emitted
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
- 55/100
Hướng nghiên cứu
Start by tracing how DXC handles vk::ext_capability attributes on vk::SpirvType aliases and how it emits capabilities for functions and entry points. Reproduce the issue with the HLSL example and the listed SPIR-V target flags, then compare generated output for an alias and a function. Done means the alias causes OpCapability PhysicalStorageBufferAddresses to be emitted and the generated SPIR-V validates.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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;
using UintPtr [[vk::ext_capability(/*PhysicalStorageBufferAddresses*/5347)]]
= vk::SpirvType</*OpTypePointer*/32, 8, 8, vk::Literal<vk::integral_constant<uint32_t, /*PhysicalStorageBuffer*/5349> >, uint32_t>;
[[vk::ext_instruction(/*OpBitcast*/124)]]
UintPtr toPtr(uint32_t2 addr);
[[vk::ext_instruction(/*OpLoad*/61)]]
uint32_t load(UintPtr p, [[vk::ext_literal]] uint32_t aligned, [[vk::ext_literal]] uint32_t alignment);
struct PushData { uint32_t2 addr; };
[[vk::push_constant]] PushData pc;
[numthreads(64,1,1)]
void main(uint32_t gi : SV_GroupIndex)
{
buf[gi] = load(toPtr(pc.addr), /*Aligned*/0x2, 4);
}
godbolt link: https://godbolt.org/z/vjW4c4s5j
Expected: OpCapability PhysicalStorageBufferAddresses (the Inline SPIR-V wiki lists type aliases of SpirvType as valid targets).
Actual: generated SPIR-V is invalid: Operand 2 of TypePointer requires one of these capabilities: PhysicalStorageBufferAddresses. Same result with a typedef. The capability is emitted only when the attribute is on a called function or the entry point.
So for now, what we can do is to emit the capabilities on functions working with it.
- 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