Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
- main
pull_request:

# Pin: 0.835.0, the latest release: its lane moves (aether#2550), bit
# casts and reductions (#2603) and `@target("avx2") import` (#2607) are
# what the wide gather, the wide separating axis test and the run-time
# width are written with. A reproducible bootstrap version: the floor
# this code needs, verified by every job below.
# Pin: 0.836.0, the latest release. The accessors that hand back a
# pointer into their argument declare it `@into` (aether#2990), which
# 0.836.0 checks; the lane moves (aether#2550), bit casts and reductions
# (#2603) and `@target("avx2") import` (#2607) are 0.835.0's. A
# reproducible bootstrap version: the floor this code needs, verified by
# every job below.
env:
AE_PIN: 0.835.0
AE_PIN: 0.836.0
AEB_REF: v0.328

jobs:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ Install the released toolchain with the shared, version-pinned installer

```sh
curl -fsSL https://raw.githubusercontent.com/aether-lang-dev/aeb/main/get.sh \
| AE_PIN=0.835.0 AEB_REF=v0.328 sh
| AE_PIN=0.836.0 AEB_REF=v0.328 sh
export PATH="$HOME/.local/bin:$PATH"
```

This installs `ae` 0.835.0, the release CI pins, and `aeb` v0.328 under
This installs `ae` 0.836.0, the release CI pins, and `aeb` v0.328 under
`~/.local` (`PREFIX` overrides it), using release binaries where available.
CI verifies only the pinned release; older ones are not tested (the lane
moves and `@target("avx2")` imports this code is written with arrived in
0.835.0).
CI verifies only the pinned release; older ones are not tested (the
`@into` parameters this code declares arrived in 0.836.0, the lane moves
and `@target("avx2")` imports in 0.835.0).

```
scripts/test.sh # builds and runs every tests/test_*.ae with ae; what CI runs
Expand Down
8 changes: 4 additions & 4 deletions aephysics/contact_solver/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ struct ContactConstraint {
manifold_count: int
}

contact_constraint_at(base: ptr, index: int) -> *ContactConstraint { return (base + index * sizeof(ContactConstraint)) as *ContactConstraint }
manifold_constraint_at(base: ptr, index: int) -> *ManifoldConstraint { return (base + index * sizeof(ManifoldConstraint)) as *ManifoldConstraint }
contact_constraint_at(base: @into ptr, index: int) -> *ContactConstraint { return (base + index * sizeof(ContactConstraint)) as *ContactConstraint }
manifold_constraint_at(base: @into ptr, index: int) -> *ManifoldConstraint { return (base + index * sizeof(ManifoldConstraint)) as *ManifoldConstraint }
constraint_point_at(m: *ManifoldConstraint, index: int) -> *ManifoldConstraintPoint {
return ((m as ptr) + index * sizeof(ManifoldConstraintPoint)) as *ManifoldConstraintPoint
}

state_at(base: ptr, index: int) -> *BodyState { return (base + index * sizeof(BodyState)) as *BodyState }
sim_at(base: ptr, index: int) -> *BodySim { return (base + index * sizeof(BodySim)) as *BodySim }
state_at(base: @into ptr, index: int) -> *BodyState { return (base + index * sizeof(BodyState)) as *BodyState }
sim_at(base: @into ptr, index: int) -> *BodySim { return (base + index * sizeof(BodySim)) as *BodySim }

var g_dummy: ptr = null // BodyState: a static body's, identity, never written

Expand Down
4 changes: 2 additions & 2 deletions aephysics/contact_solver_wide/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct WideConstraint {
point3: WideConstraintPoint
}

wide_constraint_at(base: ptr, index: int) -> *WideConstraint { return (base + index * sizeof(WideConstraint)) as *WideConstraint }
wide_constraint_at(base: @into ptr, index: int) -> *WideConstraint { return (base + index * sizeof(WideConstraint)) as *WideConstraint }
wide_point_at(c: *WideConstraint, index: int) -> *WideConstraintPoint {
return ((&c.point0) as ptr + index * sizeof(WideConstraintPoint)) as *WideConstraintPoint
}
Expand Down Expand Up @@ -261,7 +261,7 @@ struct BodyStateW {
dq: QuatW
}

state_or_identity(states: ptr, index1: int) -> *BodyState {
state_or_identity(states: @into ptr, index1: int) -> *BodyState {
if index1 == 0 { return contact_solver.dummy_state() }
return (states + (index1 - 1) * sizeof(BodyState)) as *BodyState
}
Expand Down
2 changes: 1 addition & 1 deletion aephysics/dynamics/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ sleep_body_sim_index(encoded: int) -> int {

// A contact's body sim from its encoding, through the body when the body
// is neither awake nor static (b3ResolveContactBodySim).
resolve_contact_body_sim(w: *World, awake_sims: ptr, static_sims: ptr, encoded: int, body_id: int) -> *BodySim {
resolve_contact_body_sim(w: *World, awake_sims: @into ptr, static_sims: @into ptr, encoded: int, body_id: int) -> *BodySim {
if encoded >= 0 { return (awake_sims + encoded * sizeof(BodySim)) as *BodySim }
if encoded < NULL_INDEX { return (static_sims + (0 - encoded - 2) * sizeof(BodySim)) as *BodySim }
return get_body_sim(w, body_at(w, body_id))
Expand Down
2 changes: 1 addition & 1 deletion aephysics/human/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct BoneSpec {
// allocator: the reference's from human_reference_shape, a rig's once
// human_fit_shape has fitted it, and create_human_shaped builds either.
// The caller frees it with destroy_shape.
spec_at(shape: ptr, index: int) -> *BoneSpec { return (shape + index * sizeof(BoneSpec)) as *BoneSpec }
spec_at(shape: @into ptr, index: int) -> *BoneSpec { return (shape + index * sizeof(BoneSpec)) as *BoneSpec }
set_spec(shape: ptr, index: int, spec: BoneSpec) { (shape as BoneSpec[])[index] = spec }

no_foot() -> Capsule { return manifold.capsule(math.vec3(0.0, 0.0, 0.0), math.vec3(0.0, 0.0, 0.0), 0.0) }
Expand Down
2 changes: 1 addition & 1 deletion aephysics/native/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ semaphore_signal(s: ptr, count: int) { aephysics_semaphore_signal(s, count) }
// MAX_WORKERS blocks of `bytes`: what the reference keeps on the stack
// of each thread, kept here as one block per worker since Aether has
// neither stack arrays nor thread-local variables.
scratch(blocks: ptr, bytes: int) -> ptr { return blocks + aephysics_worker_index() * bytes }
scratch(blocks: @into ptr, bytes: int) -> ptr { return blocks + aephysics_worker_index() * bytes }
1 change: 0 additions & 1 deletion aephysics/recording/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,6 @@ player_step_frame(p: *Player) -> bool {
stepped = true
}
}
return stepped
}

// The next frame played in two calls when it makes a body
Expand Down
10 changes: 5 additions & 5 deletions aephysics/solver/module.ae
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ set_wide_contacts(enabled: bool) { g_wide_contacts = enabled }
wide_contacts_enabled() -> bool { return g_wide_contacts }
const MAX_CONTINUOUS_SENSOR_HITS = 8

state_at(base: ptr, index: int) -> *BodyState { return (base + index * sizeof(BodyState)) as *BodyState }
sim_at(base: ptr, index: int) -> *BodySim { return (base + index * sizeof(BodySim)) as *BodySim }
state_at(base: @into ptr, index: int) -> *BodyState { return (base + index * sizeof(BodyState)) as *BodyState }
sim_at(base: @into ptr, index: int) -> *BodySim { return (base + index * sizeof(BodySim)) as *BodySim }

// --- the body stages -------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -816,9 +816,9 @@ block_dim(item_count: int, min_size: int, max_block_count: int) -> BlockDim {
return BlockDim { size: size, count: (item_count + size - 1) / size }
}

block_at(blocks: ptr, index: int) -> *SolverBlock { return (blocks + index * sizeof(SolverBlock)) as *SolverBlock }
stage_at(stages: ptr, index: int) -> *SolverStage { return (stages + index * sizeof(SolverStage)) as *SolverStage }
color_blocks_at(base: ptr, index: int) -> *ColorBlocks { return (base + index * sizeof(ColorBlocks)) as *ColorBlocks }
block_at(blocks: @into ptr, index: int) -> *SolverBlock { return (blocks + index * sizeof(SolverBlock)) as *SolverBlock }
stage_at(stages: @into ptr, index: int) -> *SolverStage { return (stages + index * sizeof(SolverStage)) as *SolverStage }
color_blocks_at(base: @into ptr, index: int) -> *ColorBlocks { return (base + index * sizeof(ColorBlocks)) as *ColorBlocks }

// The blocks of one item range, the last one short; claims at zero so
// the first stage over them swaps 0 for 1.
Expand Down
Loading