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

System values in a link time structure are not legal when compiling to targets other than hlsl/dxil #5994

Closed
lodinukal opened this issue Jan 3, 2025 · 2 comments · Fixed by #6450
Assignees
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang

Comments

@lodinukal
Copy link

Here is a set of files which can be used to reproduce this https://github.com/lodinukal/slang-link-type-bug-repro.

Code generated for hlsl looks correct, with the system value being passed properly and used:

#line 12832
    float _S1 = float(params_0.inner_0._instance_id_offset_0 + BaseAttributes_0.base_instance_0);

However the code doesn't link when targeting spriv/metal, with it erroring when attempting to legalize the entrypoint parameters (in slang-ir-glsl-legalize.cpp and the corresponding metal file). When debugging, I found that usually the structTypeLayout has at least 1 operand usually, but with linking the module, it had 0. Not sure if that helps.

@bmillsNV bmillsNV added this to the Q1 2025 (Winter) milestone Jan 7, 2025
@bmillsNV bmillsNV added the goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang label Jan 7, 2025
@expipiplus1
Copy link
Collaborator

Blocked on #6437

@bmillsNV
Copy link
Collaborator

Still not passing CI. Moving back to In Progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants