mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +01:00
[d3d11] Fix Create*Shader return values
When not writing back any shader object, we should be returning S_FALSE instead of S_OK.
This commit is contained in:
parent
c7acfb667f
commit
e45d502fe4
@ -874,11 +874,11 @@ namespace dxvk {
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppVertexShader != nullptr) {
|
||||
if (ppVertexShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppVertexShader = ref(new D3D11VertexShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -894,11 +894,11 @@ namespace dxvk {
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppGeometryShader != nullptr) {
|
||||
if (ppGeometryShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppGeometryShader = ref(new D3D11GeometryShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -929,11 +929,11 @@ namespace dxvk {
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppPixelShader != nullptr) {
|
||||
if (ppPixelShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppPixelShader = ref(new D3D11PixelShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -944,17 +944,16 @@ namespace dxvk {
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11HullShader** ppHullShader) {
|
||||
D3D11ShaderModule module;
|
||||
*ppHullShader = nullptr;
|
||||
|
||||
if (FAILED(this->CreateShaderModule(&module,
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppHullShader != nullptr) {
|
||||
if (ppHullShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppHullShader = ref(new D3D11HullShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -965,16 +964,16 @@ namespace dxvk {
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11DomainShader** ppDomainShader) {
|
||||
D3D11ShaderModule module;
|
||||
*ppDomainShader = nullptr;
|
||||
|
||||
if (FAILED(this->CreateShaderModule(&module,
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppDomainShader != nullptr) {
|
||||
if (ppDomainShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppDomainShader = ref(new D3D11DomainShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -990,11 +989,11 @@ namespace dxvk {
|
||||
pShaderBytecode, BytecodeLength, pClassLinkage)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (ppComputeShader != nullptr) {
|
||||
if (ppComputeShader == nullptr)
|
||||
return S_FALSE;
|
||||
|
||||
*ppComputeShader = ref(new D3D11ComputeShader(
|
||||
this, std::move(module)));
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user