summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2025-02-27 08:42:26 +0200
committerGitHub <noreply@github.com>2025-02-26 22:42:26 -0800
commit525c2acfe274d2519aef6f4221f5a29b46c3f07a (patch)
tree37bf2593c50f02935bc26775cd01c6b9d45c59d4 /docs
parent60c5db5caba089bf879fc958f373137b3e12a2d8 (diff)
Improve entry point lookup function documentation (#6451)
* Document that findEntryPointByName is not applicable if there is no [shader(...)] attribute * Update the user guide to mention findAndCheckEntryPoint for entry points without [shader(...)] attributes * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/user-guide/02-conventional-features.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md
index c59999ce3..aaeea4114 100644
--- a/docs/user-guide/02-conventional-features.md
+++ b/docs/user-guide/02-conventional-features.md
@@ -655,6 +655,7 @@ In this example, the `vertexMain` shader indicates that it is meant for the `ver
Rasterization, compute, and ray-tracing pipelines each define their own stages, and new versions of graphics APIs may introduce new stages.
For compatibility with legacy codebases, Slang supports code that leaves off `[shader(...)]` attributes; in these cases application developers must specify the names and stages for their entry points via explicit command-line or API options.
+Such entry points will not be found via `IModule::findEntryPointByName()`. Instead `IModule::findAndCheckEntryPoint()` must be used, and a stage must be specified.
It is recommended that new codebases always use `[shader(...)]` attributes both to simplify their workflow, and to make code more explicit and "self-documenting."
> #### Note ####