mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Validate shader module capabilities
Only create a shader module if the device actually supports the required features. Apparently this is needed for some Unity Engine games.
This commit is contained in:
parent
ddf010479d
commit
ee77afb6af
@ -2049,6 +2049,16 @@ namespace dxvk {
|
|||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
auto shader = commonShader.GetShader();
|
||||||
|
|
||||||
|
if (shader->hasCapability(spv::CapabilityStencilExportEXT)
|
||||||
|
&& !m_dxvkDevice->extensions().extShaderStencilExport)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (shader->hasCapability(spv::CapabilityShaderViewportIndexLayerEXT)
|
||||||
|
&& !m_dxvkDevice->extensions().extShaderViewportIndexLayer)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
*pShaderModule = std::move(commonShader);
|
*pShaderModule = std::move(commonShader);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user