diff --git a/src/d3d10/d3d10_device.cpp b/src/d3d10/d3d10_device.cpp index 2fdc47fea..1716fd3f7 100644 --- a/src/d3d10/d3d10_device.cpp +++ b/src/d3d10/d3d10_device.cpp @@ -110,11 +110,10 @@ namespace dxvk { reinterpret_cast(pInitialData), ppBuffer != nullptr ? &d3d11Buffer : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppBuffer = static_cast(d3d11Buffer)->GetD3D10Iface(); - return S_OK; } @@ -143,11 +142,10 @@ namespace dxvk { reinterpret_cast(pInitialData), ppTexture1D != nullptr ? &d3d11Texture1D : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppTexture1D = static_cast(d3d11Texture1D)->GetD3D10Iface(); - return S_OK; } @@ -178,11 +176,10 @@ namespace dxvk { reinterpret_cast(pInitialData), ppTexture2D != nullptr ? &d3d11Texture2D : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppTexture2D = static_cast(d3d11Texture2D)->GetD3D10Iface(); - return S_OK; } @@ -212,11 +209,10 @@ namespace dxvk { reinterpret_cast(pInitialData), ppTexture3D != nullptr ? &d3d11Texture3D : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppTexture3D = static_cast(d3d11Texture3D)->GetD3D10Iface(); - return S_OK; } @@ -238,11 +234,10 @@ namespace dxvk { reinterpret_cast(pDesc), ppSRView ? &d3d11Srv : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppSRView = static_cast(d3d11Srv)->GetD3D10Iface(); - return S_OK; } @@ -264,11 +259,10 @@ namespace dxvk { reinterpret_cast(pDesc), ppSRView ? &d3d11View : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppSRView = static_cast(d3d11View)->GetD3D10Iface(); - return S_OK; } @@ -290,11 +284,10 @@ namespace dxvk { reinterpret_cast(pDesc), ppRTView ? &d3d11View : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppRTView = static_cast(d3d11View)->GetD3D10Iface(); - return S_OK; } @@ -359,11 +352,10 @@ namespace dxvk { d3d11Resource.ptr(), pDesc ? &d3d11Desc : nullptr, ppDepthStencilView ? &d3d11View : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppDepthStencilView = static_cast(d3d11View)->GetD3D10Iface(); - return S_OK; } @@ -385,11 +377,10 @@ namespace dxvk { NumElements, pShaderBytecodeWithInputSignature, BytecodeLength, ppInputLayout ? &d3d11InputLayout : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppInputLayout = static_cast(d3d11InputLayout)->GetD3D10Iface(); - return hr; } @@ -406,11 +397,10 @@ namespace dxvk { pShaderBytecode, BytecodeLength, nullptr, ppVertexShader ? &d3d11Shader : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppVertexShader = static_cast(d3d11Shader)->GetD3D10Iface(); - return S_OK; } @@ -427,11 +417,10 @@ namespace dxvk { pShaderBytecode, BytecodeLength, nullptr, ppGeometryShader ? &d3d11Shader : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppGeometryShader = static_cast(d3d11Shader)->GetD3D10Iface(); - return S_OK; } @@ -466,11 +455,10 @@ namespace dxvk { D3D11_SO_NO_RASTERIZED_STREAM, nullptr, ppGeometryShader ? &d3d11Shader : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppGeometryShader = static_cast(d3d11Shader)->GetD3D10Iface(); - return S_OK; } @@ -487,11 +475,10 @@ namespace dxvk { pShaderBytecode, BytecodeLength, nullptr, ppPixelShader ? &d3d11Shader : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppPixelShader = static_cast(d3d11Shader)->GetD3D10Iface(); - return S_OK; } @@ -523,11 +510,10 @@ namespace dxvk { HRESULT hr = m_device->CreateBlendState(&d3d11Desc, ppBlendState ? &d3d11BlendState : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppBlendState = static_cast(d3d11BlendState)->GetD3D10Iface(); - return S_OK; } @@ -542,11 +528,10 @@ namespace dxvk { reinterpret_cast(pBlendStateDesc), ppBlendState ? &d3d11BlendState : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppBlendState = static_cast(d3d11BlendState)->GetD3D10Iface(); - return S_OK; } @@ -561,11 +546,10 @@ namespace dxvk { reinterpret_cast(pDepthStencilDesc), ppDepthStencilState ? &d3d11DepthStencilState : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppDepthStencilState = static_cast(d3d11DepthStencilState)->GetD3D10Iface(); - return S_OK; } @@ -580,11 +564,10 @@ namespace dxvk { reinterpret_cast(pRasterizerDesc), ppRasterizerState ? &d3d11RasterizerState : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppRasterizerState = static_cast(d3d11RasterizerState)->GetD3D10Iface(); - return S_OK; } @@ -615,11 +598,10 @@ namespace dxvk { HRESULT hr = m_device->CreateSamplerState(&d3d11Desc, ppSamplerState ? &d3d11SamplerState : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppSamplerState = static_cast(d3d11SamplerState)->GetD3D10Iface(); - return S_OK; } @@ -640,11 +622,10 @@ namespace dxvk { HRESULT hr = m_device->CreateQuery(&d3d11Desc, ppQuery ? &d3d11Query : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppQuery = static_cast(d3d11Query)->GetD3D10Iface(); - return S_OK; } @@ -662,7 +643,7 @@ namespace dxvk { HRESULT hr = m_device->CreatePredicate(&d3d11Desc, ppPredicate ? &d3d11Predicate : nullptr); - if (FAILED(hr) || hr == S_FALSE) + if (hr != S_OK) return hr; *ppPredicate = D3D11Query::FromPredicate(d3d11Predicate)->GetD3D10Iface();