Repository navigation
Description
Summary
On Windows 11 with an AMD Ryzen APU, 2D compositions render correctly, but any 3D content fails. The
raea render command still prints APPLIED and exits 0, so the failure is silent apart from the log.
- Default backend (Vulkan):
OutOfMemory RenderError. The whole 3D layer is dropped; only the page (HTML/text) is
drawn over black. Same result at 640×360. - DX12 (
WGPU_BACKEND=dx12): a fragment shader fails to compile under FXC witherror X3511: unable to unroll loop ... (172 iterations). Some meshes then draw (ground plane, a sphere) but others are missing, and some
scenes end inInternal RenderError. - DX12 + DXC (
WGPU_DX12_COMPILER=dxc): no adapter at all, apparently becausedxcompiler.dllisn't shipped
with the release, so this isn't a workaround.
Environment
- raea
0.1.0-canary.2, installed withirm https://raea.io/install.ps1 | iex - Windows 11 Home, build 26300, x86_64
- CPU/GPU: AMD Ryzen 7 4700U with Radeon Graphics (integrated, shared memory), driver 31.0.21912.14
- RAM: 15.4 GiB
- VC++ redistributable present (vcruntime140, vcruntime140_1, msvcp140)
Reproduce
The example from the raea-bevy skill, animation.md → "Example: blocks springing in one after another, then a turn",
copied unchanged into blocks.tsx:
raea render blocks.tsx --frame 80 -o blocks.png
WGPU_BACKEND=dx12 raea render blocks.tsx --frame 80 -o blocks-dx12.png
Expected: four coloured blocks on a floor, plus a dark ball.
Actual:
- default: frame is the background colour only; no 3D.
- dx12: floor draws, the four blocks (children of
<Entity>) are missing, the ball is a tiny sliver.
raea scene explain on a similar scene reports every part where it should be (pillars resting on the ground, the
sphere in the air), so the scene data is right and the loss happens in rendering.
For comparison, a 2D composition (the README's hello.tsx, and a 1080×1920 motion piece) renders correctly, about
12–19 ms a frame, and passes raea check.
Logs (distinct lines, with counts)
Default backend, --frame 80:
87 ERROR bevy_render::error_handler: Quitting the application due to OutOfMemory RenderError
9 ERROR bevy_render::error_handler: Caught rendering error: Validation Error
1 ERROR bevy_render::error_handler: Caught rendering error: Out of Memory
1 APPLIED frame 80 rendered to blocks.png (bevy_ui, the page over its 3D)
WGPU_BACKEND=dx12, --frame 80:
86 ERROR bevy_render::error_handler: Quitting the application due to Internal RenderError
2 [ERROR wgpu::backend::wgpu_core] Please report it to https://github.com/gfx-rs/wgpu
2 ERROR bevy_render::error_handler: Caught rendering error: Validation Error
2 [ERROR wgpu::backend::wgpu_core] Shader translation error for stage ShaderStages(FRAGMENT): FXC D3DCompile error
(0x80004005): Shader@0x...(105,5-15): error X3511: unable to unroll loop, loop does not appear to terminate in a
timely manner (172 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact
higher number
1 APPLIED frame 80 rendered to blocks-dx12.png (bevy_ui, the page over its 3D)
WGPU_BACKEND=dx12 WGPU_DX12_COMPILER=dxc:
raea: the shared GPU device isn't there (no GPU adapter: No suitable graphics adapter found; ... dx12
drivers/libraries could not be loaded ...)
thread 'main' panicked at bevy_render-0.20.0/src/renderer/mod.rs:308:36:
Unable to find a GPU! Make sure you have installed required drivers!
Notes
- The render exits 0 and prints
APPLIEDeven when the 3D layer failed. A non-zero exit, or aREFUSEDline like
the one for Vello's skipped draws, would stop an agent from shipping a blank video. - Possible fixes on the DX12 path: ship
dxcompiler.dll/dxil.dllso DXC can be used, or give the loop at
fragment line 105 an explicit bound or[loop]. - I can test builds on this machine if that helps.
Activity
Ink outlines compile under FXC, DX12's shader compiler on Windows (#66)…
A GPU error is the render's error (#66): raea's engine answers Bevy's…
shinyobjectz commentedon Nov 10, 2026
Thanks for the exact repro and the counted log lines; they made this quick to pin down. There are three separate problems here. Two are fixed on main, and the third needs a test on your machine.
DX12: fixed (85adac1). I reproduced it on a Windows 11 PC with an RTX 4070 using the blocks example, so it isn't AMD-specific. The shader FXC refused is raea's ink-outline pass. Every 3D scene builds that pipeline, so its X3511 error stopped all 3D drawing on DX12. The pass sampled 16 directions × 3 radii in two nested loops with an early return, which FXC can't unroll; it's now one 48-step loop that draws the same line. I checked it with naga's HLSL (as wgpu hands it to FXC) and the Windows SDK's
fxc: the old shader fails with your exact error and the new one compiles.APPLIED with exit 0: fixed (aa0a416). Bevy's default response to a GPU error is to ask the app to quit, and raea's renderer never read that request. So it saved whatever half-drawn frame it had and reported success. Now the first GPU error stops the render with a refusal that quotes what the GPU said.
Vulkan OutOfMemory on the Radeon iGPU: not reproduced yet. It doesn't happen on the NVIDIA card. My best guess is the shadow maps. A directional light with shadows gets 4096² maps by default, four cascades, about 256 MB of GPU memory, and an APU's device-local heap can be small. Could you try this on canary.2 (the prop is already there)? Put this beside the camera in
blocks.tsx:(
import { Shadows } from "raea/light"). Then also try once withshadow_maps_enabledremoved from theDirectionalLight, and say whether the default backend draws the blocks in either case. If one of those fixes it, raea can pick a smaller map on an integrated GPU by default.No Windows build with the two fixes is published yet (v0.1.0 shipped without one), so I'll keep this open.
Shadow maps fit a GPU with little memory of its own (#66): on Vulkan …
shinyobjectz commentedon Nov 10, 2026
An update on the Vulkan OutOfMemory part. It's still not reproduced (I don't have an AMD APU here), but main now has a fix for the likeliest cause (85f20fa).
What I measured. On the RTX 4070 with Vulkan, the blocks example's first frame holds this much GPU memory, by sun shadow map size:
On Vulkan, an APU's "own" memory is the carve-out the firmware reserves for it, often 512 MB on laptops. wgpu's allocator never puts a GPU-only texture anywhere else, so with the default maps this scene alone already overflows a 512 MB carve-out. A 4096 sun is four 4096² depth cascades, 268 MB on its own.
What changed. On Vulkan, raea now reads how much memory the GPU calls its own. If a scene doesn't set a shadow size, the sun's and spot lights' maps are 2048 under 2 GB and 1024 under 1 GB, and raea prints one line saying so.
<Shadows mapSize>still wins. DX12 isn't affected because it draws in shared system memory. I checked the memory read on Windows: it found 12 GB on the 4070 (which keeps 4096) and drew the 1024 path with its memory forced to 512 MB.Since you offered to test, two quick checks on canary.2 would tell us whether this is the right cause:
blocks.tsxdraw on the default backend with<Shadows mapSize={1024} />beside the camera (import { Shadows } from "raea/light")?If the answer to 2 is yes, the next Windows build should draw it without the prop. That build isn't published yet, so I'll keep this open until you've been able to try it.
shinyobjectz commentedon Nov 10, 2026
The next Windows build is up: v0.1.1-rc1, a pre-release. It has all three fixes from this thread: DX12's shader (85adac1), a GPU error stopping the render instead of saving a half-drawn frame (aa0a416), and smaller default shadow maps on Vulkan when the GPU's own memory is under 2 GB (85f20fa). (raea.io's
install.ps1installs it too, but at the moment it ends with a red Select-String error after everything is installed. That's fixed and goes out with the next site update; the zip avoids it.)On the RTX 4070, that zip draws
blocks.tsxon Vulkan, on DX12 and on the default backend. Since you offered, could you tryblocks.tsxon your Radeon with no<Shadows>prop, both on the default backend and withWGPU_BACKEND=vulkan? If the shadow-map fix kicks in, raea prints one line saying it chose smaller maps. If it still runs out of memory, the Dedicated GPU memory figure from Task Manager would tell me where to look next.shinyobjectz commentedon Nov 12, 2026
v0.1.1 is out with all three fixes from this thread (the installer and
irm https://raea.io/install.ps1 | iexboth give it). When you have a moment, could you tryblocks.tsxon the Radeon with no<Shadows>prop, on the default backend and withWGPU_BACKEND=vulkan? If the smaller-shadow-map path kicks in, raea prints one line saying so. If it still runs out of memory, Task Manager's Dedicated GPU memory figure for the Radeon tells me where to look next.