Skip to content

Hal ray tracing pipelines#9464

Open
Vecvec wants to merge 12 commits into
gfx-rs:trunkfrom
Vecvec:hal-rt-pipelines
Open

Hal ray tracing pipelines#9464
Vecvec wants to merge 12 commits into
gfx-rs:trunkfrom
Vecvec:hal-rt-pipelines

Conversation

@Vecvec
Copy link
Copy Markdown
Contributor

@Vecvec Vecvec commented Apr 25, 2026

Connections
The hal part of #9450 (split to be easier to review)

Description
Adds ray tracing pipelines to wgpu-hal. Adds a feature and limits for this. However, these limits aren't validated because they are only usable through the hal (for now...). Naming is mostly based off Vulkan and DX12's, but I changed the name of shader binding tables to pipeline group data (they aren't a table and the bindings are of groups of shaders [closest hit group, miss group, intersection group (not to be confused with intersection shader)])

Testing
Testing is difficult in the hal, but these changes are the same as the hal part of #9450, which has some basic testing

Squash or Rebase?

Squash

Checklist

  • I self-reviewed and fully understand this PR.
  • WebGPU implementations built with wgpu may be affected behaviorally.
  • Validation and feature gates are in place to confine behavioral changes.
  • Tests demonstrate the validation and altered logic works. Only hal changes. No altered logic.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.

@Vecvec Vecvec changed the title Hal rt pipelines Hal ray tracing pipelines Apr 25, 2026
@Vecvec Vecvec force-pushed the hal-rt-pipelines branch from 4acd17b to 16fceae Compare April 25, 2026 19:15
@inner-daemons inner-daemons self-requested a review April 27, 2026 16:20
@cwfitzgerald cwfitzgerald self-assigned this Apr 29, 2026
@Vecvec Vecvec force-pushed the hal-rt-pipelines branch from 16fceae to bb84f1d Compare April 29, 2026 20:19
@Vecvec Vecvec force-pushed the hal-rt-pipelines branch from bb84f1d to c6bd457 Compare May 4, 2026 01:11
Copy link
Copy Markdown
Collaborator

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

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

Lgtm based on my very limited knowledge.

I would've also expected a trace_rays_indirect (iirc that exists), but that can always be added as a followup - I don't think I have any concrete use case for it atm.

@Vecvec
Copy link
Copy Markdown
Contributor Author

Vecvec commented May 11, 2026

I would've also expected a trace_rays_indirect (iirc that exists), but that can always be added as a followup - I don't think I have any concrete use case for it atm.

indirect trace rays would require an extra extension (https://docs.vulkan.org/refpages/latest/refpages/source/vkCmdTraceRaysIndirectKHR.html#VUID-vkCmdTraceRaysIndirectKHR-rayTracingPipelineTraceRaysIndirect-03637), so to be minimal, I decided to not add it.

@inner-daemons
Copy link
Copy Markdown
Collaborator

On my list to review this week, sorry for the massive delay

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.

4 participants