Skip to content

Commit 1df8ba4

Browse files
authored
Fix shader cursor doc to use getBindingRangeFirstDescriptorRangeIndex.
1 parent 2c1cc98 commit 1df8ba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/shader-cursors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ The `write()` operations of this Vulkan RHI shader object are similar to those o
772772
```cpp
773773
void VulkanShaderObject::write(ShaderOffset offset, Texture* texture)
774774
{
775-
uint32_t bindingIndex = m_typeLayout->getBindingRangeIndexOffset(
775+
uint32_t bindingIndex = m_typeLayout->getBindingRangeFirstDescriptorRangeIndex(
776776
offset.bindingRangeIndex);
777777

778778
VkDescriptorImageInfo image;
@@ -813,7 +813,7 @@ VkDescriptorType mapToDescriptorType(slang::BindingType bindingRangeType)
813813

814814
This RHI code is able to remain simple and clean because the Slang reflection API provides methods that directly query the information that an RHI needs to know (in this case, in order to fill out the fields of a `VkWriteDescriptorSet`):
815815

816-
* The `slang::TypeLayoutReflection::getBindingRangeIndexOffset()` method translates the target-independent binding range index into the Vulkan binding index
816+
* The `slang::TypeLayoutReflection::getBindingRangeFirstDescriptorRangeIndex()` method translates the target-independent binding range index into the Vulkan binding index
817817
* The `slang::TypeLayoutReflection::getBindingRangeType()` method provides information about the binding range that can be mapped directly to the `VkDescriptorType`
818818

819819
### Is that really all the code that is needed?

0 commit comments

Comments
 (0)