Pass the real error from D3D12_CreatePipelineState() back to the application

This commit is contained in:
Sam Lantinga
2024-02-20 06:24:20 -08:00
parent 376ef4e418
commit 8073f4aa1d

View File

@@ -2571,7 +2571,8 @@ static int D3D12_SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *c
} }
if (!rendererData->currentPipelineState) { if (!rendererData->currentPipelineState) {
return SDL_SetError("[direct3d12] Unable to create required pipeline state"); /* The error has been set inside D3D12_CreatePipelineState() */
return -1;
} }
D3D_CALL(rendererData->commandList, SetPipelineState, rendererData->currentPipelineState->pipelineState); D3D_CALL(rendererData->commandList, SetPipelineState, rendererData->currentPipelineState->pipelineState);