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 Support (glsl->spv) #2289

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daniel-keitel
Copy link

Support for SPV_KHR_ray_tracing (includeng new shader stages)
from glsl to spir-v.

Requires: #2256

I will wait until Ray Query Support is merged, before I continue.

@codecov-commenter
Copy link

Codecov Report

Merging #2289 (cd160e0) into master (0b87d19) will decrease coverage by 0.12%.
The diff coverage is 20.93%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #2289      +/-   ##
==========================================
- Coverage   81.96%   81.85%   -0.12%     
==========================================
  Files          80       80              
  Lines       43312    43401      +89     
==========================================
+ Hits        35502    35524      +22     
- Misses       7810     7877      +67     
Impacted Files Coverage Δ
cli/src/bin/naga.rs 0.28% <0.00%> (-0.01%) ⬇️
src/back/glsl/mod.rs 85.56% <0.00%> (-0.37%) ⬇️
src/back/hlsl/mod.rs 77.04% <0.00%> (-1.29%) ⬇️
src/back/hlsl/writer.rs 91.07% <0.00%> (-0.05%) ⬇️
src/back/msl/writer.rs 90.89% <0.00%> (-0.16%) ⬇️
src/back/spv/helpers.rs 95.00% <0.00%> (-1.62%) ⬇️
src/back/wgsl/writer.rs 91.46% <0.00%> (-0.29%) ⬇️
src/front/glsl/token.rs 70.00% <ø> (ø)
src/lib.rs 34.78% <ø> (ø)
src/proc/mod.rs 75.32% <0.00%> (-0.25%) ⬇️
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -861,6 +869,8 @@ pub struct GlobalVariable {
pub space: AddressSpace,
/// For resources, defines the binding point.
pub binding: Option<ResourceBinding>,
/// For some ray-tracing storage qualifiers, define the location
pub location: Option<u32>,
Copy link
Member

Choose a reason for hiding this comment

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

does this need to work differently from the existing mechanism of passing locations? Currently, struct Binding has a location, and it's carried for entry point inputs/outputs. The incoming ray payload should probably just be an argument to the entry point.

Copy link
Member

Choose a reason for hiding this comment

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

Moreover, we should probably consider just merging the IncompingRayPayload address space into Input, since it's non-ambiguous and likely has the same constraints.

Copy link
Author

Choose a reason for hiding this comment

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

All new storage classes are somewhere between StorageQualifier::Output and StorageQualifier::AddressSpace.
They are read and write, have a location, no interpolation, no binding.
Additionally storage classes are mapped from AddressSpaces.
So StorageQualifier::AddressSpace seemed to be the better fit.
A new StorageQualifier may even be best.

@cwfitzgerald
Copy link
Member

Hello, thank you for your PR against Naga!

As part of gfx-rs/wgpu#4231, we have moved development of Naga into the wgpu repository in the Naga subfolder. We have transferred all issues, but we are unable to automatically transfer PRs.

As such, please recreate your PR against the wgpu repository. We apologize for the inconvenience this causes, but will make contributing to both projects more streamlined going forward.

We are leaving PRs open, but once they are transferred, please close the original Naga PR.

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