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

Add ALLOW_OPACITY_MICROMAPS template flag to RayQuery object #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amarpMSFT
Copy link
Collaborator

Inline raytracing needs to be aware OMMs may be used, just like non-inline raytracing does.

Non-inline raytracing has RAYTRACING_PIPELINE_FLAG_ALLOW_OPACITY_MICROMAPS.

But raytracing pipeline state doesn't apply to inline raytracing. So for in the inline case, add a RAYQUERY_FLAG_ALLOW_OPACITY_MICROMAPS flag to the template parameters for instantiating the RayQuery object.

Inline raytracing needs to be aware OMMs may be used, just like non-inline raytracing does.  

Non-inline raytracing has RAYTRACING_PIPELINE_FLAG_ALLOW_OPACITY_MICROMAPS.  

But raytracing pipeline state doesn't apply to inline raytracing.  So for in the inline case, add a RAYQUERY_FLAG_ALLOW_OPACITY_MICROMAPS flag to the template parameters for instantiating the RayQuery object.
@damyanp
Copy link
Member

damyanp commented Oct 30, 2024

@amarpMSFT - sorry for the delay here. Does adding this new template flag to the RayQuery object mean we also need to add new diagnostics, or make any changes to DXIL? If so, then this also needs to be detailed in the proposal.

@amarpMSFT
Copy link
Collaborator Author

@amarpMSFT - sorry for the delay here. Does adding this new template flag to the RayQuery object mean we also need to add new diagnostics, or make any changes to DXIL? If so, then this also needs to be detailed in the proposal.

My guess is it would. If HLSL folks can confirm this solution is something you're ok with, the same folks might be able to quickly summarize the necessary DXIL/diag changes. But if not, I can take a stab.

@tex3d
Copy link
Collaborator

tex3d commented Oct 30, 2024

@amarpMSFT - sorry for the delay here. Does adding this new template flag to the RayQuery object mean we also need to add new diagnostics, or make any changes to DXIL? If so, then this also needs to be detailed in the proposal.

My guess is it would. If HLSL folks can confirm this solution is something you're ok with, the same folks might be able to quickly summarize the necessary DXIL/diag changes. But if not, I can take a stab.

After sorting out some questions:

  • Is SM 6.9 the only requirement, or is there an optional feature bit we need to introduce? With the DXR pipeline, we could detect feature usage from the subobject flag or use of the equivalent flag in the API. For RayQuery we don't have that luxury, so we may need an optional feature flag to indicate use in the shader.
  • Do we need additional runtime info (RDAT, PSV0) to indicate a usage with a RaytracingAccelerationStructure resource? Maybe this will be nothing because we would rely on GBV only for these checks.

This will require additions in:

  • AllocateRayQuery DXIL op
  • updated diagnostic requirements
  • validation changes
  • potential new feature info flag and/or additional runtime info (RDAT, PSV0) required for runtime checks
  • research/comment on SPIR-V alignment
  • various test additions

@llvm-beanz llvm-beanz added the Design Meeting Agenda item for the design meeting label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Meeting Agenda item for the design meeting
Projects
Status: No status
Status: Triaged
Development

Successfully merging this pull request may close these issues.

4 participants