Skip to content

[PR1] Introduced batch versions of ray_fire() and point_in_volume() with GPRT backend#195

Open
Waqar-ukaea wants to merge 66 commits intoxdg-org:mainfrom
Waqar-ukaea:PR1-Batch-Versions
Open

[PR1] Introduced batch versions of ray_fire() and point_in_volume() with GPRT backend#195
Waqar-ukaea wants to merge 66 commits intoxdg-org:mainfrom
Waqar-ukaea:PR1-Batch-Versions

Conversation

@Waqar-ukaea
Copy link
Collaborator

Summary

This PR adds core XDG support for batched GPRT ray queries, enabling both ray_fire() and point_in_volume() to run over many rays efficiently.

With this PR there are now two query paths to GPRT ray tracing:

  • Scalar query (single ray) — primarily for debugging / comparison (launching a full RT pipeline for one ray is expensive).
  • Batch query (host → device staging) — accepts arrays of origins/directions and launches the RT pipeline once for the entire batch. Single Volume

Public API Changes

GPRTRayTracer (new / overridden)

Point-in-volume

  • point_in_volume(...) — batched PIV over points (optional directions and exclude list).

Ray fire

  • ray_fire(...) — batched ray fire over origins/directions (with distance limit, orientation, optional exclude list).

Buffer / workflow plumbing

  • check_rayhit_buffer_capacity(...) — ensure device buffers can accommodate N rays.

GPRT backend accessors

  • context() — access the underlying GPRT context. Currently required since GPRT does not implement VK_EXTERNAL_MEMORY as of yet. So to mock an external application, I use "external" compute shaders attached to the same underlying GPRTContext.

RayTracer interface (new virtuals)

Adds virtual entry points for batched and prepared workflows:

  • point_in_volume(...)
  • ray_fire(...)
  • check_rayhit_buffer_capacity(...)

XDG API (new overloads / helpers)

Batched launch

  • ray_fire(...) — volume-level overload for batched ray fire.

Also included are a set of tests for the new batch API versions of the two methods.

Waqar-ukaea and others added 21 commits January 21, 2026 18:12
Added a code path that involves populating GPRT rays via a callback and firing against these pre-populated rays with `xdg::ray_fire_prepared()`
@Waqar-ukaea Waqar-ukaea force-pushed the PR1-Batch-Versions branch 3 times, most recently from e0fc13b to 9bed03d Compare February 3, 2026 18:31
@Waqar-ukaea Waqar-ukaea changed the title Introduced batch versions of ray_fire() and point_in_volume() with GPRT backend [PR1] Introduced batch versions of ray_fire() and point_in_volume() with GPRT backend Feb 4, 2026
@Waqar-ukaea Waqar-ukaea requested a review from pshriwise February 4, 2026 12:14
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