Quick Answer: cool_fox is an experimental, open-source D3D12 compatibility layer and shader translation runtime, written in Rust. It aims to run Xbox Series (GDK) x64 executables on Windows Direct3D 12 GPUs from AMD and NVIDIA. It handles shader translation to DXIL, GPU memory residency, and descriptor heap stability. It ships no game code and requires software you're legally entitled to run.
A D3D12 compatibility layer sounds like a niche tool until a frame fails on the wrong heap flag. cool_fox is a GitHub project that takes that problem seriously. Its README describes translating Xbox Series x64 binaries onto Windows D3D12 hardware, with work on memory residency, descriptor stability, and shader translation. Here's what the project actually does, which of its choices are interesting, and what caveats you should weigh before reading further.
What a D3D12 Compatibility Layer Has to Translate
Console titles are written against a console-specific graphics API, and they make assumptions about heaps, memory, and shader output that a PC driver doesn't share. A compatibility layer has to reconcile all three at once. The shader side is usually the first wall. Shaders have to come out as DXIL, the intermediate language produced by Microsoft's DirectXShaderCompiler, and the output has to validate.
The README requires Direct3D 12 with Shader Model 6.6 and mesh shaders. That isn't arbitrary. SM 6.6 is what makes bindless resource heaps practical, so the title can index into one large descriptor table instead of rebinding every texture. You can check support yourself with CheckFeatureSupport using D3D12_FEATURE_SHADER_MODEL before you waste time on a build.
Here's the part most people miss. Linux users often assume this work is the same as Proton. It isn't quite. Proton's path goes through vkd3d-proton, which maps D3D12 onto Vulkan. cool_fox targets native Windows D3D12, though its README notes it generates root signatures for vkd3d-shader, so some code paths overlap with the Wine ecosystem.
Memory Residency Is Where These Projects Usually Die
The most useful section of the README is the residency work. It describes a "Pareto" adaptive residency limit that prevents WDDM paging exhaustion, which shows up as 0x8007000E on 16–32 GB systems. That HRESULT is E_OUTOFMEMORY, and it's misleading. The machine isn't out of RAM. The budget the OS grants to your process for GPU-resident allocations is smaller than what the title asks for.
Here's the cause-and-effect chain. The title makes more allocations resident than the adapter's budget allows. The Windows Display Driver Model (WDDM) then fails the make-resident calls, and the runtime reports out-of-memory. You can read the real budget per adapter through DXGI's QueryVideoMemoryInfo, which is the number that matters.
The common advice is "add more system RAM." That's the counter-intuitive part: system RAM doesn't fix a residency failure. A ceiling you set on purpose often does better than an unbounded one. The README's VICTORY_LEVELS_ON_DEMAND=1 follows that logic, allocating card memory only for texture mip levels the title actually holds. The project credits it with saving up to 3 GB of VRAM. That's a project-reported figure, so treat it as a claim to test, not a benchmark you can cite.
The trade-off is real. A tighter residency limit means more eviction, and more eviction can mean more stalls on the first frame that needs an evicted resource.
Descriptor Slots and the Use-After-Free Problem
Bindless rendering turns descriptor slots into a shared, finite resource. Every texture alias, view, and temporary upload consumes one. The README describes three fixes here, and they map to three distinct failure modes.
- Dynamic slot release:
submit_splitreleases descriptor slots whenlist::tables_donemarks them finished, so long-running frames don't exhaust the heap. - Reference pinning: an
alias_ofrelationship is held by aHeldguard, so an asynchronous alias can't outlive the texture it points to. - Startup probing: heap root-signature flags such as
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXEDandSAMPLER_HEAP_DIRECTLY_INDEXEDare probed at startup and omitted on runtimes that reject them.
The third item is the one people hit first. The "Unsupported bit-flag set" error on older D3D12 runtimes comes from requesting flags the runtime doesn't implement. The fix is to probe and degrade, not to assume the newest flags exist. If you're writing your own D3D12 code, this is the cheapest lesson in the README.
Most people stop here, but the use-after-free risk is the one to watch. Async aliasing without reference pinning can free a descriptor while a command list still reads it. The symptom is a rare, non-reproducible GPU fault, which is far harder to debug than an out-of-memory error.
Pipeline Stalls: The Hitch Nobody Budgets For
Shader compilation and pipeline-library saves are the usual source of frame hitches. The README lists two settings that target this directly: VICTORY_PIPELINE_WAIT_MS=0 removes a 500 ms frame stall, and VICTORY_LIBRARY_STORE_LATER=1 defers the 200 ms+ pipeline-library save. The launchers set both.
Here's the counter-intuitive part. Blocking the frame until a pipeline finishes compiling feels safe, but it's often the worse choice. Rendering a frame with a fallback for a few frames gives you a glitch instead of a freeze, and players tolerate glitches far more readily than stalls. The catch is that a fallback can be visibly wrong, so this trade only works if the fallback path has been tested.
The worker side has two notable pieces. The pipeline worker queue uses Pending::make_with, which is panic-safe, so a failed translation can't leave a waiting thread blocked forever. The offline victory shaders translator catches panics per shader, so one bad assert doesn't abort the whole batch. This is good engineering. It also means a batch run can finish "successfully" while skipping shaders, so check the failure count in the log.
Renderer Ports: Where the Milliseconds Come From
The README's renderer ports are a set of switches that remove per-frame CPU work. The table below reproduces the project's figures. They're self-reported and tested "on AMD first," so read the saving column as the author's measurement, not an independent benchmark.
| Port | Switch | Project-reported saving | Default | Known edge case |
|---|---|---|---|---|
| 1 | VICTORY_PORT_CONSTANTS=1 | ~6 ms per frame | Off | 8 GB NVIDIA: C++ exception #15 |
| 5 | VICTORY_PORT_CBV=1 | ~4.7 ms per frame | Off | 8 GB NVIDIA: dropped surfaces |
| 6 | VICTORY_PORT_GUARD=1 | ~2 ms per frame | On | Write-guard lock sharing |
| 7 | VICTORY_PORT_JOURNAL=1 | ~1–3 ms per frame | On | Journal split into 64 parts |
The pattern is clear. The biggest savings come from the ports that break on 8 GB NVIDIA cards, so the project keeps them off by default. That's the right call. A 6 ms saving that crashes the run isn't a saving. The switches enabled by default (guard and journal) are the lower-risk pair.
Shader Fixes Show How Strict DXIL Validation Is
Some of the README's shader fixes are small, but they show how unforgiving the validator is. One example is the LOD slot fix: unused LOD slots in array texture coordinate queries are left undefined so the shader passes DXIL validation. A value you think is harmless can fail validation if it's initialized in the wrong place.
The project also lists Wave32 cascade lowering, scoped submerged-shader lowering, and dynamic view address indexing for ray-tracing BVH descriptors. If you're debugging a shader problem in a similar runtime, work through this checklist first:
- Confirm the shader model and wave size the source expects.
- Check every unused component and slot for undefined values that the validator rejects.
- Re-run the validator in isolation before blaming the runtime.
- Log per-shader results, so a skipped shader can't hide behind a successful batch.
Each step has a clear rationale. Steps 1 and 2 remove the two most common causes of validation failures. Step 3 separates translator bugs from driver bugs. Step 4 matters because the offline translator's per-shader panic handling can make failures quiet.
What the Project Doesn't Claim, and Why That Matters
The README is careful about scope, and you should read it the same way. It contains no copyrighted game code, keys, assets, or executables. It states that you should use it only with software you're legally entitled to run, and it says it doesn't encourage bypassing console protections. The GTA VI reference in the repo title is a community label. The README doesn't document a working status for any particular title, so don't assume one.
The "Community & Portwatch" section lists techniques the author is still investigating, including a unified memory layer, async present, descriptor-table patching, and mesh draws through an amplification stage. Those are roadmap items, not shipped features. That's the honest reading: the project is a useful study in residency and descriptor management, with its performance claims still open to testing.
Here's the practical takeaway. If you work on D3D12 engines, the most transferable lessons are the residency budget, the descriptor lifetime rules, and probing feature flags at startup. Those apply to any D3D12 code, whether or not you ever touch this runtime.
Frequently Asked Questions
what is a D3D12 compatibility layer?
A D3D12 compatibility layer is software that lets a program written for one graphics API or platform run on Direct3D 12 hardware. It translates shaders, memory, and API calls. cool_fox is one such layer, aimed at Xbox Series x64 executables running on Windows D3D12 GPUs. It is experimental and ships no game code.
why does my D3D12 app fail with 0x8007000E?
The code 0x8007000E is E_OUTOFMEMORY, but it often means WDDM refused to make resources resident, not that system RAM ran out. The GPU's per-process budget was exceeded. Query that budget with DXGI's QueryVideoMemoryInfo, then reduce resident allocations or texture levels rather than adding system memory.
how to fix "Unsupported bit-flag set" errors in D3D12?
Probe for the flags before you set them. cool_fox checks heap flags such as CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED at startup and omits any the runtime rejects. Older Direct3D 12 runtimes don't implement all flags, so degrading gracefully is safer than assuming the newest set is present.
can cool_fox run any Xbox game on PC?
No, and the project doesn't claim it can. It provides no games, keys, or assets, and it requires software you're legally entitled to run. Its README lists components still under investigation, and it doesn't document a working status for any specific title.
Here's the single most useful habit from this project: treat every allocation, descriptor, and pipeline as a finite budget that you measure at runtime. If you maintain a D3D12 engine, log your residency and descriptor usage this week, and note the first HRESULT you see when you push past the limit. Share this with anyone stuck on a D3D12 out-of-memory error they can't explain.