Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DirectX] DXILBindingMap is incorrectly populated if we have cbuffers but no UAVs or SRVs. #128560

Open
bogner opened this issue Feb 24, 2025 · 0 comments · May be fixed by #128696
Open

[DirectX] DXILBindingMap is incorrectly populated if we have cbuffers but no UAVs or SRVs. #128560

bogner opened this issue Feb 24, 2025 · 0 comments · May be fixed by #128696
Assignees
Labels
backend:DirectX HLSL HLSL Language Support

Comments

@bogner
Copy link
Contributor

bogner commented Feb 24, 2025

In DXILBindingMap::populate we set up FirstUAV, FirstCBuffer, and FirstCBuffer variables in order to get iterators over just the specific type of resource. However, if we have cbuffers and no uavs, FirstUAV is set to size() but FirstCBuffer is zero, which causes our iterators to return garbage.

@bogner bogner added backend:DirectX HLSL HLSL Language Support labels Feb 24, 2025
@bogner bogner self-assigned this Feb 24, 2025
@bogner bogner mentioned this issue Feb 24, 2025
11 tasks
@bogner bogner moved this to Active in HLSL Support Feb 24, 2025
@bogner bogner moved this from Active to Planning in HLSL Support Feb 24, 2025
@damyanp damyanp moved this from Planning to Ready in HLSL Support Feb 24, 2025
@damyanp damyanp moved this from Ready to Active in HLSL Support Feb 24, 2025
bogner added a commit to bogner/llvm-project that referenced this issue Feb 25, 2025
When some resource types were present, but not all of them, we were
ending up in a situation where we would fail to initialize the `FirstX`
variables and get incorrect iterators.

Fixes llvm#128560.
@bogner bogner moved this from Active to Needs Review in HLSL Support Feb 25, 2025
bogner added a commit that referenced this issue Feb 25, 2025
When some resource types were present, but not all of them, we were
ending up in a situation where we would fail to initialize the `FirstX`
variables and get incorrect iterators.

Fixes #128560.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:DirectX HLSL HLSL Language Support
Projects
Status: Needs Review
Development

Successfully merging a pull request may close this issue.

1 participant