Skip to content

Comments

Add support for late capability checks#10046

Draft
skiminki-nv wants to merge 7 commits intoshader-slang:masterfrom
skiminki-nv:2026-02-capability-improvements
Draft

Add support for late capability checks#10046
skiminki-nv wants to merge 7 commits intoshader-slang:masterfrom
skiminki-nv:2026-02-capability-improvements

Conversation

@skiminki-nv
Copy link
Contributor

Add new IR instruction IRLateRequireCapability, which can be used to perform capability requirement checks after linking, specialization, and all IR-level dead code elimination has been done.

Issue #9210

Add new IR instruction IRLateRequireCapability, which can be used to
perform capability requirement checks after linking, specialization,
and all IR-level dead code elimination has been done.

Issue shader-slang#9210
@skiminki-nv skiminki-nv added the pr: non-breaking PRs without breaking changes label Feb 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@slangbot
Copy link
Contributor

slangbot commented Feb 16, 2026

⚠️ IR Instruction Files Changed

This PR modifies IR instruction definition files. Please review if you need to update the following constants in source/slang/slang-ir.h:

  • k_minSupportedModuleVersion: Should be incremented if you're removing instructions or making breaking changes
  • k_maxSupportedModuleVersion: Should be incremented when adding new instructions

These version numbers help ensure compatibility between different versions of compiled modules.

This pass is done before dead code elimination has had a chance to
remove any branches.
Remove redundant atoms from the definition.

Note that texture_sm_4_1 already provides the basic shadow lod
functionality. GL_EXT_texture_shadow_lod adds support for 2d shadow
array, shadow cube, and shadow cube array. Realistically, sm_4_1 is
present always when GL_EXT_texture_shadow_lod is present.
Specify glsl_460 + GL_EXT_texture_shadow_lod for the glsl target. This
silences a warning and makes the test pass.
@skiminki-nv
Copy link
Contributor Author

/format

@slangbot
Copy link
Contributor

🌈 Formatted, please merge the changes from this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: non-breaking PRs without breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants