stage/schema/ids.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-License-Identifier: BSD-3-Clause | ||
| 2 | #pragma once | ||
| 3 | |||
| 4 | #include "chrono_batch_render/device/kernels/shared.h" | ||
| 5 | |||
| 6 | namespace chrono::batch_render { | ||
| 7 | |||
| 8 | static const uint kNoPrim = 0xFFFFFFFF; | ||
| 9 | static const uint kNoRow = 0xFFFFFFFF; | ||
| 10 | static const uint kGlobalWorld = 0xFFFFFFFF; | ||
| 11 | |||
| 12 | 100798 | CHRONO_BATCH_RENDER_SHARED uint WorldSlot(uint world) { | |
| 13 | 100798 | return world == kGlobalWorld ? 0 : world + 1; | |
| 14 | } | ||
| 15 | |||
| 16 | 12028 | CHRONO_BATCH_RENDER_SHARED uint SlotWorld(uint slot) { | |
| 17 | 12028 | return slot == 0 ? kGlobalWorld : slot - 1; | |
| 18 | } | ||
| 19 | |||
| 20 | 71 | CHRONO_BATCH_RENDER_SHARED uint TlasIndex(uint world, uint worldCount) { | |
| 21 | 71 | return world < worldCount ? world : worldCount; | |
| 22 | } | ||
| 23 | |||
| 24 | 733 | CHRONO_BATCH_RENDER_SHARED uint TlasWorld(uint tlas, uint worldCount) { | |
| 25 | 733 | return tlas < worldCount ? tlas : kGlobalWorld; | |
| 26 | } | ||
| 27 | |||
| 28 | } | ||
| 29 |