diff options
| author | cheneym2 <acheney@nvidia.com> | 2025-01-29 14:59:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 11:59:42 -0800 |
| commit | 2ba6458eba8bd2d4f4d2ffdd452ae089e5b50907 (patch) | |
| tree | df185018f91073eff6066b2e1569557c6d2df1a0 /docs | |
| parent | 605204374658fc6d7f647f9a57e9e322b8c83100 (diff) | |
Fix combined sampler documentation and warning (#6207)
* Fix combined sampler documentation and warning
* Update comment, show detailed '-fvk-t-shift' message in warning instead of generic '-fvk-xxx-shift'
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/user-guide/a2-01-spirv-target-specific.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/user-guide/a2-01-spirv-target-specific.md b/docs/user-guide/a2-01-spirv-target-specific.md index dcbe44e96..5090caacf 100644 --- a/docs/user-guide/a2-01-spirv-target-specific.md +++ b/docs/user-guide/a2-01-spirv-target-specific.md @@ -20,7 +20,14 @@ Combined texture sampler Slang supports Combined texture sampler such as `Sampler2D`. Slang emits SPIR-V code with `OpTypeSampledImage` instruction. -You can specify two different register numbers for each: one for the texture register and another for the sampler register. +For SPIR-V targets, explicit bindings may be provided through a single `vk::binding` decoration. +``` +[[vk::binding(1,2)]] +Sampler2D explicitBindingSampler; +``` + +For other targets (HLSL or others) where combined texture samplers are _not_ supported intrinsicly, they are emulated by Slang using separate objects for Texture and Sampler. +For explicit binding on such targets, you can specify two different register numbers for each: one for the texture register and another for the sampler register. ``` Sampler2D explicitBindingSampler : register(t4): register(s3); ``` |
