mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 13:13:24 +02:00
The shader creation helpers returned S_FALSE when compilation produced no bytecode - but S_FALSE is a success code, so the FAILED() checks in the D3D11VertexShader/D3D11FragmentShader constructors never fired and failed_ was never set. Return E_FAIL instead, and only hand out the bytecode when the shader object was actually created. Failed() had no callers at all, so a failed shader was handed to the draw as usual: VSSetShader(nullptr), CreateInputLayout on empty bytecode, and the ignored HRESULT from SetupDecFmtForDraw meant IASetInputLayout(nullptr). The draw then did nothing, with no log line to explain it. Skip the draw and warn instead, like the GL backend does.