Skip to content

Add missing ENABLE_SPIRV_CODEGEN guards#8374

Merged
damyanp merged 2 commits intomicrosoft:mainfrom
damyanp:user/damyanp/fix-spirv-guards
Apr 14, 2026
Merged

Add missing ENABLE_SPIRV_CODEGEN guards#8374
damyanp merged 2 commits intomicrosoft:mainfrom
damyanp:user/damyanp/fix-spirv-guards

Conversation

@damyanp
Copy link
Copy Markdown
Member

@damyanp damyanp commented Apr 14, 2026

The AR_OBJECT_VK_* enums are only available when ENABLE_SPIRV_CODEGEN is defined.

damyanp and others added 2 commits April 14, 2026 10:06
The SPIR-V SampledTexture1D commit (71bf911) added case labels for
AR_OBJECT_VK_SAMPLED_TEXTURE1D and AR_OBJECT_VK_SAMPLED_TEXTURE1D_ARRAY
in GetBasicKindType() and DiagnoseRegisterType() without wrapping them
in #ifdef ENABLE_SPIRV_CODEGEN. This causes build failures when SPIRV
codegen is disabled.

Co-authored-by: Copilot <[email protected]>
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@damyanp damyanp enabled auto-merge (squash) April 14, 2026 17:42
case AR_OBJECT_VK_SAMPLED_TEXTURE1D:
case AR_OBJECT_TEXTURE1D_ARRAY:
#ifdef ENABLE_SPIRV_CODEGEN
case AR_OBJECT_VK_SAMPLED_TEXTURE1D:
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.

This is fine, but in this case, there is a SPIRV block at the end of the empty fall-through case statements (L5061/R5063). It might be slightly cleaner to group these in that block.

@damyanp damyanp merged commit 317e2f1 into microsoft:main Apr 14, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Apr 14, 2026
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.

4 participants