Skip to content

[SM6.10] Add missing linalg.h include guard - #9070

Merged
Ashley Coleman (V-FEXrt) merged 2 commits into
microsoft:mainfrom
V-FEXrt:issue-9061
Oct 23, 2026
Merged

Ashley Coleman (V-FEXrt) merged 2 commits into
microsoft:mainfrom
V-FEXrt:issue-9061

Conversation

@V-FEXrt

Copy link
Copy Markdown
Collaborator

Fixes #9061

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The behavioral fix lacks the regression test required by the repository’s contribution policy.

1 open issue
What changed in this PR

Fixes #9061 by making DXC’s SM 6.10 Linear Algebra header safe to include multiple times.

Changes:

  • Wraps the entire header in _HLSL_DX_LINALG_H_ include guards.
  • Preserves the existing shader-model and HLSL-version checks.

Seagulls asking "TEST CASE?"

Please add a double-include regression test with SM 6.10 and HLSL 2021 enabled.

File Description
tools/​clang/​lib/​Headers/​hlsl/​dx/​linalg.h Adds an include guard to prevent redefinition errors.

Review effort: Balanced

Comment on lines +12 to +13
#ifndef _HLSL_DX_LINALG_H_
#define _HLSL_DX_LINALG_H_

@Icohedron Deric C. (Icohedron) left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this PR doesn't have tests to make sure this fix actually works! 🙃

Copilot AI balanced review requested due to automatic review settings October 23, 2026 19:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The guard correctly encloses the header, and the regression test covers the reported failure under the required shader model and language version.

1 open issue

Review effort: Balanced

@V-FEXrt
Ashley Coleman (V-FEXrt) merged commit 1527671 into microsoft:main Oct 23, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Oct 23, 2026
@V-FEXrt
Ashley Coleman (V-FEXrt) deleted the issue-9061 branch October 23, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[SM6.10] dx/linalg.h has no include guard, so a second include is a redefinition error

5 participants