The Witcher 3: Wild Hunt
Refuses the stream-output pipeline that crashes D3DMetal's shader converter, and lets the game offer DLSS.
What you see
A black window at full CPU on every launch; once past it, DLSS listed as not supported
Why it happens
One stream-output pipeline crashes D3DMetal's shader converter; the game switches NVIDIA Streamline off when it finds Wine
What the fix changes
Refuse that pipeline; tell the one Streamline check that there is no Wine
The code
tholtman1-del's rule: a geometry-shader pipeline that streams out, or has no pixel shader, is refused.
fixes/w3-streamout-fix.c · refuse, lines 101–112c
static BOOL refuse(BOOL gs, BOOL ps, UINT so_entries)
{
#ifdef W3_RTPROBE
if (allow_gs_without_ps && gs && !so_entries && !ps)
{
logline("let through geometry-shader pipeline %ld with no pixel shader and no stream output",
InterlockedIncrement(&let_through));
return FALSE;
}
#endif
return gs && (so_entries || !ps);
}The refusal: E_INVALIDARG before the pipeline reaches Apple's shader converter, which crashed on it and left the game deadlocked on a black screen.
fixes/w3-streamout-fix.c · my_gfx, lines 119–139c
static HRESULT WINAPI my_gfx(void *dev, const void *desc, REFIID iid, void **out)
{
const char *d = desc;
InterlockedIncrement(&seen_gfx);
if (d && refuse(has_shader(d + 72), has_shader(d + 24), *(const UINT *)(d + 96)))
{
LONG n = InterlockedIncrement(&refused);
logline("refused stream-output pipeline %ld (graphics desc, %u entries)", n, *(const UINT *)(d + 96));
if (out) *out = NULL;
return E_INVALIDARG;
}
#ifdef W3_RTPROBE
{
HRESULT hr = real_gfx(dev, desc, iid, out);
if (FAILED(hr)) logline("CreateGraphicsPipelineState failed: %08lx", (unsigned long)hr);
return hr;
}
#else
return real_gfx(dev, desc, iid, out);
#endif
}Thanks to
- tholtman1-delThe diagnosis of the black screen and the rule that refuses the pipeline (MIT).
Details
- Needs
- D3DMetal, D3D12, Metal 4 on
- Installer
- install-w3-fix.sh
- Executable
- witcher3.exe
- Built from
- w3-streamout-fix.c
- Verified on
- Stable 26.3 with Game Porting Toolkit 4.0b2 (2026-09-30)