Skip to content

[SPIR-V] Fix bool cast on buffers with swizzle#7497

Merged
Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts:fix-7475
Jun 2, 2025
Merged

[SPIR-V] Fix bool cast on buffers with swizzle#7497
Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts:fix-7475

Conversation

@Keenuts
Copy link
Collaborator

@Keenuts Keenuts commented May 30, 2025

HLSL resources can store booleans. SPIR-V resources can't. We handle this by using integers in resources, and casting at the interface.

Swizzle path was handled a bit differently, and was not going through the common load/store path which handles the cast.

Fixes #7475

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

HLSL resources can store booleans. SPIR-V resources can't.
We handle this by using integers in resources, and casting at
the interface.

Swizzle path was handled a bit differently, and was not going through
the common load/store path which handles the cast.

Fixes microsoft#7475
@Keenuts Keenuts merged commit 0855509 into microsoft:main Jun 2, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Jun 2, 2025
@Keenuts Keenuts deleted the fix-7475 branch June 2, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[SPIR-V] Incorrect SPIR-V generated for 'or' and 'and'

2 participants