direct3d11: we don't need to create all the blend states up front

This commit is contained in:
Sam Lantinga
2024-07-15 06:25:56 -07:00
parent a419e2c890
commit 492e3c1a54

View File

@@ -787,11 +787,8 @@ static HRESULT D3D11_CreateDeviceResources(SDL_Renderer *renderer)
}
/* Create blending states: */
if (!D3D11_CreateBlendState(renderer, SDL_BLENDMODE_BLEND) ||
!D3D11_CreateBlendState(renderer, SDL_BLENDMODE_ADD) ||
!D3D11_CreateBlendState(renderer, SDL_BLENDMODE_MOD) ||
!D3D11_CreateBlendState(renderer, SDL_BLENDMODE_MUL)) {
/* D3D11_CreateBlendMode will set the SDL error, if it fails */
if (!D3D11_CreateBlendState(renderer, SDL_BLENDMODE_BLEND)) {
/* D3D11_CreateBlendState will set the SDL error, if it fails */
goto done;
}