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

Ray Tracing Pipeline (KHR) #2564

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

ComfyFluffy
Copy link
Contributor

@ComfyFluffy ComfyFluffy commented Sep 10, 2024

  1. Update documentation to reflect any user-facing changes - in this repository.

  2. Make sure that the changes are covered by unit-tests.

  3. Run cargo clippy on the changes.

  4. Run cargo +nightly fmt on the changes.

  5. Please put changelog entries in the description of this Pull Request
    if knowledge of this change could be valuable to users. No need to put the
    entries to the changelog directly, they will be transferred to the changelog
    file by maintainers right after the Pull Request merge.

Changelog:

### Additions
- Support for the `VK_KHR_ray_tracing_pipeline`.

Changes

  • New struct RayTracingPipeline, which corresponds to the vkPipeline object and construction methods and structs.
  • bind_pipeline_ray_tracing & trace_rays (vkCmdTraceRaysKHR) in the old and new sync.
  • Device::get_ray_tracing_shader_group_handles. Used in building the shader binding table.
  • ShaderGroupHandlesData. Helper for the data from get_ray_tracing_shader_group_handles.
  • ShaderBindingTable. Struct that holds the addresses and underlying buffer of shader binding table, which is used in trace_rays. It contains a constructor that automatically build the SBT from pipeline groups.
  • Examples: triangle-raytracing-auto for the old AutoCommandBuffer, and triangle-raytracing for the new taskgraph sync.

Not implemented (yet) in this PR

  • DeferredOperationKHR. Not planned.
  • RayTracingCaptureReplay. Not planned.
  • RayTracingPipelineStackSize (in dynamic stats). Maybe in this PR?

@ComfyFluffy
Copy link
Contributor Author

Finally a working example with vulkano-taskgraph. The next step is to test with AutoCommandBuffer.

@ComfyFluffy ComfyFluffy marked this pull request as ready for review November 27, 2024 16:01
@ComfyFluffy
Copy link
Contributor Author

I have done the major changes and the PR should be ready for review. I will add some description in PR page and maybe some unit tests soon.

@@ -60,13 +61,13 @@ vulkan_enum! {
// TODO: document
Graphics = GRAPHICS,

/* TODO: enable

// TODO: document
RayTracing = RAY_TRACING_KHR
RequiresOneOf([
RequiresAllOf([DeviceExtension(khr_ray_tracing_pipeline)]),
RequiresAllOf([DeviceExtension(nv_ray_tracing)]),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we leave only khr and remove nv?

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.

1 participant