Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions/khr/ray_tracing_pipeline: Pass indirect SBT regions as single item #829

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

MarijnS95
Copy link
Collaborator

In an identical fashion to commit 84624fd ("ray_tracing_pipeline: Pass SBT regions as reference instead of slice (#350)") cmd_trace_rays_indirect() also only needs a pointer to a single StridedDeviceAddressRegionKHR structure. After all no length is ever passed to the API anywhere, and this could also lead to users passing empty slices, or passing too many elements that are never used.

Clear up the confusion by replacing the slice argument with a direct borrow of the struct.

…gle item

In an identical fashion to commit 84624fd ("ray_tracing_pipeline:
Pass SBT regions as reference instead of slice (#350)")
`cmd_trace_rays_indirect()` also only needs a pointer to a single
`StridedDeviceAddressRegionKHR` structure.  After all no length is ever
passed to the API anywhere, and this could also lead to users passing
empty slices, or passing too many elements that are never used.

Clear up the confusion by replacing the slice argument with a direct
borrow of the struct.
@MarijnS95 MarijnS95 force-pushed the rt-pipeline-fix-indirect-sbt-argument branch from d8cd685 to 9931eb2 Compare November 23, 2023 23:21
@MarijnS95 MarijnS95 requested a review from Ralith November 23, 2023 23:22
Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@MarijnS95 MarijnS95 merged commit b358b9d into master Nov 25, 2023
22 checks passed
@MarijnS95 MarijnS95 deleted the rt-pipeline-fix-indirect-sbt-argument branch November 25, 2023 10:08
@MarijnS95 MarijnS95 added this to the Ash 0.38 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants