From: Józef Kucia jkucia@codeweavers.com
On Windows invalid shader bytecode leads to a crash, E_FAIL or E_OUTOFMEMORY error.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index b7ebbdd75bdd..fc09bf9824c1 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -423,12 +423,14 @@ HRESULT hresult_from_vkd3d_result(int vkd3d_result) { case VKD3D_OK: return S_OK; + case VKD3D_ERROR_INVALID_SHADER: + WARN("Invalid shader bytecode.\n"); + /* fall-through */ case VKD3D_ERROR: return E_FAIL; case VKD3D_ERROR_OUT_OF_MEMORY: return E_OUTOFMEMORY; case VKD3D_ERROR_INVALID_ARGUMENT: - case VKD3D_ERROR_INVALID_SHADER: return E_INVALIDARG; case VKD3D_ERROR_NOT_IMPLEMENTED: return E_NOTIMPL;